middle-end/10336: [3.4 regression] ICE with -Wunreachable-code

Wolfgang Bangerth bangerth@ices.utexas.edu
Tue Apr 29 00:54:00 GMT 2003

> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10336

> I fixed a bug some time ago where such a loop ignored
> BARRIER insns, walked the whole list of INSNs until insn
> was NULL, which caused a segfault.  It seems that for
> this test case, the same thing happens in your new loop.
> You can see in gdb that the C front end is ignoring
> "(barrier 14 13 15)".  Two insns later you have a the
> segfault...
> So maybe something like this would fix it??
> + for (insn = PREV_INSN (avoided_insn);
> +      GET_CODE (insn) != BARRIER;
> +      insn = PREV_INSN (insn))
> Assuming PREV_INSN (avoided_insn) is never NULL, but of
> course we make that assumption now, too.
> Can't test it this week.  Wolfgang, maybe you can, and if
> it works, submit a patch and use your new privileges? :-)

Too bad ;-) I tried it, but it ain't workin', assuming I did it right.  
Since this about exhausts my possibilities (not knowing all this stuff), I
fear I have to leave this to more experienced hackers. At least the 
testcase is short...


Wolfgang Bangerth              email:            bangerth@ices.utexas.edu
                               www: http://www.ices.utexas.edu/~bangerth/

More information about the Gcc-bugs mailing list