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: dnicol at cstp dot umkc dot edu
- Subject: Re: Bug report and patch to suggest on triggering related to optimizing out a great deal of code
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sat, 1 Jan 2000 15:09:11 +0100
- CC: gcc-bugs at gcc dot gnu dot org
- References: <38695362.7DC767CA@cstp.umkc.edu> <199912300909.KAA01238@loewis.home.cs.tu-berlin.de> <386BE87C.57C4A620@cstp.umkc.edu> <199912302326.AAA22949@loewis.home.cs.tu-berlin.de> <386BFACF.B7ED2A44@cstp.umkc.edu> <199912310811.JAA00596@loewis.home.cs.tu-berlin.de> <386D04AD.FFA8EAAE@cstp.umkc.edu>
> 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;
}
}
}