The following (IMHO valid) code snippet triggers an ICE since GCC 4.1.0: ================================ typedef int* X; typedef int* Y; X (*p)[][0]; Y (*q)[][0]; typeof(*(0 ? p : q)) x = { 0 }; ================================ bug.c:7: internal compiler error: Segmentation fault Please submit a full bug report, [etc.] The code compiled fine with GCC 2.95.3, crashed GCC 3.0.0, 3.0.1, and was rejected by GCC 3.0.2 - 4.0.4.
Closing 4.1 branch.
Working on a patch.
Subject: Bug 35433 Author: jsm28 Date: Tue Feb 3 20:38:12 2009 New Revision: 143906 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143906 Log: PR c/35433 * c-typeck.c (composite_type): Set TYPE_SIZE and TYPE_SIZE_UNIT for composite type involving a zero-length array type. testsuite: * gcc.dg/init-bad-6.c: New test. Added: trunk/gcc/testsuite/gcc.dg/init-bad-6.c Modified: trunk/gcc/ChangeLog trunk/gcc/c-typeck.c trunk/gcc/testsuite/ChangeLog
Fixed for 4.4; will fix for 4.3.
Subject: Bug 35433 Author: jsm28 Date: Wed Feb 4 13:07:43 2009 New Revision: 143922 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143922 Log: PR c/35433 * c-typeck.c (composite_type): Set TYPE_SIZE and TYPE_SIZE_UNIT for composite type involving a zero-length array type. testsuite: * gcc.dg/init-bad-6.c: New test. Added: branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/init-bad-6.c Modified: branches/gcc-4_3-branch/gcc/ChangeLog branches/gcc-4_3-branch/gcc/c-typeck.c branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
Fixed for 4.3.4 and 4.4.0. Not planning to work on backport to 4.2 branch.
Closing 4.2 branch, fixed for 4.3.4 and 4.4.