This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17408] [4.0 regression] ICE in verify_stmts with -O2
- From: "dalej at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Sep 2004 21:25:51 -0000
- Subject: [Bug c/17408] [4.0 regression] ICE in verify_stmts with -O2
- References: <20040910211053.17408.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dalej at apple dot com 2004-09-10 21:25 -------
I believe the following is the fix (it has the effect of adding && !initialized to the existing test):
Index: c-decl.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.577
diff -u -d -b -w -p -r1.577 c-decl.c
--- c-decl.c 9 Sep 2004 01:25:46 -0000 1.577
+++ c-decl.c 10 Sep 2004 21:17:20 -0000
@@ -4642,7 +4642,7 @@ grokdeclarator (const struct c_declarato
/* At file scope, an initialized extern declaration may follow
a static declaration. In that case, DECL_EXTERNAL will be
reset later in start_decl. */
- DECL_EXTERNAL (decl) = !!(specbits & (1 << (int) RID_EXTERN));
+ DECL_EXTERNAL (decl) = extern_ref;
/* At file scope, the presence of a `static' or `register' storage
class specifier, or the absence of all storage class specifiers
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17408