Commit a2460abb by Marek Polacek Committed by Marek Polacek

re PR c++/84707 (internal compiler error: Segmentation fault (tree_check()/duplicate_decls()))

	PR c++/84707
	* decl.c (duplicate_decls): Check DECL_NAME before accessing
	UDLIT_OPER_P.

	* g++.dg/cpp0x/inline-ns10.C: New test.

From-SVN: r258255
parent a5dccd46
2018-03-05 Marek Polacek <polacek@redhat.com>
PR c++/84707
* decl.c (duplicate_decls): Check DECL_NAME before accessing
UDLIT_OPER_P.
2018-03-05 Nathan Sidwell <nathan@acm.org>
PR c++/84694
......
......@@ -1410,7 +1410,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
|| TREE_TYPE (olddecl) == error_mark_node)
return error_mark_node;
if (UDLIT_OPER_P (DECL_NAME (newdecl))
if (DECL_NAME (newdecl)
&& DECL_NAME (olddecl)
&& UDLIT_OPER_P (DECL_NAME (newdecl))
&& UDLIT_OPER_P (DECL_NAME (olddecl)))
{
if (TREE_CODE (newdecl) == TEMPLATE_DECL
......
2018-03-05 Marek Polacek <polacek@redhat.com>
PR c++/84707
* g++.dg/cpp0x/inline-ns10.C: New test.
2018-03-05 Nathan Sidwell <nathan@acm.org>
PR c++/84694
......
// PR c++/84707
// { dg-do compile { target c++11 } }
inline namespace {
namespace {}
}
namespace {} // { dg-error "conflicts" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment