This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bug report and patch to suggest on triggering related to optimizing out a great deal of code
- To: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Subject: Re: Bug report and patch to suggest on triggering related to optimizing out a great deal of code
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 05 Jan 2000 00:24:19 -0700
- cc: dnicol at cstp dot umkc dot edu, gcc-bugs at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
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