/* { dg-do compile } */ /* { dg-options "-g -O" } */ extern void foo (void); static void baz (int i) { foo (); typedef char A[i]; struct { A b; } *x = 0; } void bar (i) { baz (i); } ICEs in modified_type_die in 4.1.x (x86_64-linux -m32, -m64, ppc-linux -m32, -m64 at least). Works with 3.4.6 as well as 4.2.x.
"Fixed" by http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01014.html modified_type_die rearrangment, which dropped the assert (not sure if intentionally or not).
Subject: Bug number PR debug/30189 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00140.html
This patch is OK for mainline and 4.2, and for 4.1 after it reopens.
Subject: Bug 30189 Author: aoliva Date: Tue Feb 6 01:34:37 2007 New Revision: 121637 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121637 Log: gcc/ChangeLog: PR debug/30189 * dwarf2out.c (modified_type_die): Follow DECL_ORIGINAL_TYPE even if cv-qualification is the same. gcc/testsuite/ChangeLog: PR debug/30189 * gcc.dg/pr30189.c: New test. Added: branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/pr30189.c Modified: branches/gcc-4_2-branch/gcc/ChangeLog branches/gcc-4_2-branch/gcc/dwarf2out.c branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
Subject: Bug 30189 Author: aoliva Date: Tue Feb 6 01:35:10 2007 New Revision: 121638 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121638 Log: gcc/ChangeLog: PR debug/30189 * dwarf2out.c (modified_type_die): Follow DECL_ORIGINAL_TYPE even if cv-qualification is the same. gcc/testsuite/ChangeLog: PR debug/30189 * gcc.dg/pr30189.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr30189.c Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c trunk/gcc/testsuite/ChangeLog
Subject: Bug 30189 Author: aoliva Date: Thu Feb 15 07:27:00 2007 New Revision: 121986 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121986 Log: gcc/ChangeLog: PR debug/30189 * dwarf2out.c (modified_type_die): Follow DECL_ORIGINAL_TYPE even if cv-qualification is the same. gcc/testsuite/ChangeLog: PR debug/30189 * gcc.dg/pr30189.c: New test. Added: branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr30189.c Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/dwarf2out.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
Fixed