Commit c7f4981a by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/6073 ([Solaris] Internal compiler error in simplify_gen_subreg, at simplify-rtx.c:2711)

	PR c++/6073
	* class.c (finish_struct_1): Update static field's DECL_MODE even
	if its type is a variant of t.

	* g++.dg/opt/static1.C: New test.

From-SVN: r51549
parent c9045f47
2002-03-29 Jakub Jelinek <jakub@redhat.com>
PR c++/6073
* class.c (finish_struct_1): Update static field's DECL_MODE even
if its type is a variant of t.
2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
......
......@@ -5191,7 +5191,7 @@ finish_struct_1 (t)
working on. */
for (x = TYPE_FIELDS (t); x; x = TREE_CHAIN (x))
if (TREE_CODE (x) == VAR_DECL && TREE_STATIC (x)
&& TREE_TYPE (x) == t)
&& same_type_p (TYPE_MAIN_VARIANT (TREE_TYPE (x)), t))
DECL_MODE (x) = TYPE_MODE (t);
/* Done with FIELDS...now decide whether to sort these for
......
2002-03-29 Jakub Jelinek <jakub@redhat.com>
* g++.dg/opt/static1.C: New test.
2002-03-28 Hans-Peter Nilsson <hp@bitrange.com>
* gcc.dg/weak-1.c: Fix typo in scan-assembler pattern.
......
// PR c++/6073
// This testcase ICEd because finish_struct_bits changed
// A's and const A's TYPE_MODE from QI to BLK, but did
// not change a's DECL_MODE because its mode was not
// TYPE_MAIN_VARIANT.
struct A
{
static const A a;
~A ();
};
void bar (A x);
void foo ();
void
foo ()
{
bar (A::a);
}
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