Bug report and patch to suggest on triggering related to optimizing out a great deal of code
Jeffrey A Law
law@cygnus.com
Tue Jan 4 23:28:00 GMT 2000
In message < 200001011409.PAA09183@loewis.home.cs.tu-berlin.de >you write:
> > attached is compressed mon.i.gz file
> >
> > Here is the patch in action:
> >
> > [david@lucy color_mon]$ cc -I/m/include -I/usr/include -O -c mon.c -o
> > mon.o -
> > -save-temps
> > mon.c: In function `main':
> > mon.c:839: warning: optimizing out a lot of code: try without -O switch
> > mon.c:839: Internal compiler error in `build_insn_chain', at
> > global.c:1758
>
> Thanks again for your bug report. I have simplified your testcase a
> bit (see below), but I could not figure out how to fix the bug. Please
> note that it only occurs with -O; it works fine with -O2.
>
> Regards,
> Martin
>
> main(int na, char* argv[])
> {
> int wflg = 0, tflg = 0;
> int dflg = 0;
> exit(0);
> while(1)
> {
> switch(argv[1][0])
> {
> help:
> exit(0);
> case 'w':
> case 'W':
> wflg = 1;
> break;
> case 't':
> case 'T':
> tflg = 1;
> break;
> case 'd':
> dflg = 1;
> break;
> }
> }
> }
FWIW, I put this test into the regression testsuite.
jeff
More information about the Gcc-bugs
mailing list