struct A { int a; }; extern void *y; __attribute__((optimize (0))) void foo (void *, A x) { foo (y, x); } ICEs on 4.8 branch at -O2, starting with (likely) r190260 and fixed on the trunk with r200369. The 4.8 version of that fix didn't fix this, since it changed only a different function. I see 3 remaining walk_aliased_vdefs calls not guarded for !optimize in ipa-prop.c, perhaps all of them need fixing?
Mine
I have posted a fix to the mailing list: http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00294.html
Author: jamborm Date: Wed Jan 8 15:06:22 2014 New Revision: 206428 URL: http://gcc.gnu.org/viewcvs?rev=206428&root=gcc&view=rev Log: 2014-01-08 Martin Jambor <mjambor@suse.cz> PR ipa/59610 * ipa-prop.c (ipa_compute_jump_functions): Bail out if not optimizing. (parm_preserved_before_stmt_p): Assume modification present when not optimizing. testsuite/ * gcc.dg/ipa/pr59610.c: New test. Added: branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/ipa/pr59610.c Modified: branches/gcc-4_8-branch/gcc/ChangeLog branches/gcc-4_8-branch/gcc/ipa-prop.c branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
Author: jamborm Date: Wed Jan 8 15:32:50 2014 New Revision: 206430 URL: http://gcc.gnu.org/viewcvs?rev=206430&root=gcc&view=rev Log: 2014-01-08 Martin Jambor <mjambor@suse.cz> PR ipa/59610 testsuite/ * gcc.dg/ipa/pr59610.c: New test. Added: trunk/gcc/testsuite/gcc.dg/ipa/pr59610.c Modified: trunk/gcc/testsuite/ChangeLog
Fixed.