Following test ICEs with gcc mainline when compiled with -O1. Test was done on apple-ppc-darwin. % gcc -c -O1 bad.c bad.c: In function 'CheckFile': bad.c:2: internal compiler error: Bus error Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. /* TEST */ typedef unsigned char uchar; static void CheckFile () { uchar *p; uchar tagname[10]; uchar * a = tagname; void validate(uchar const * pp, uchar const * q){ uchar const * p = pp; if (a == tagname+4) { uchar const * x = p; } } while(1){ if(a == tagname) goto slip; if (*p == '\"') { uchar const * const q = ++p; validate(q, p++); } } slip: ; }
Confirmed, reduced testcase: void CheckFile () { char tagname[10]; char * a = tagname; int validate() { return (a == tagname+4); } if(a == tagname) validate(); } t.c: In function ‘CheckFile’: t.c:11: error: Invalid operand to binary operator FRAME.1D.1246.aD.1249; t.c:11: internal compiler error: verify_stmts failed. Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Postponed until 4.0.2.
Subject: Bug 21894 CVSROOT: /cvs/gcc Module name: gcc Changes by: rth@gcc.gnu.org 2005-08-07 19:01:09 Modified files: gcc : ChangeLog tree-nested.c Added files: gcc/testsuite/gcc.c-torture/compile: nested-2.c Log message: PR 21894 * tree-nested.c (convert_local_reference): Save and restore val_only around component_ref and friends. Clear walk_subtrees by default. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9673&r2=2.9674 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-nested.c.diff?cvsroot=gcc&r1=2.28&r2=2.29 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/nested-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
Subject: Bug 21894 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: rth@gcc.gnu.org 2005-08-08 17:32:00 Modified files: gcc : ChangeLog tree-nested.c Added files: gcc/testsuite/gcc.c-torture/compile: nested-2.c Log message: PR 21894 * tree-nested.c (convert_local_reference): Save and restore val_only around component_ref and friends. Clear walk_subtrees by default. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.357&r2=2.7592.2.358 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-nested.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.24&r2=2.24.10.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/nested-2.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
Fixed.
Thanks. Test case should say PR 21894. > Fixed.