This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: more, re painful optimization bug in 19980921
- To: Corey Kosak <kosak at cs dot cmu dot edu>
- Subject: Re: more, re painful optimization bug in 19980921
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sat, 31 Oct 1998 02:01:06 -0700
- cc: egcs-bugs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199809272050.NAA20741@cygnus.com>you write:
>
> Sorry for the second email but I have a simpler, template-free version of
> the program that exhibits the same error (maybe this simplifies debugging?)
> Also I want to point out that the same problem exists on egcs-1.1b and
> gcc-2.8.1
>
>
> % cat pp5.cc
> #include <stdio.h>
>
> int main()
> {
> int n=1000;
>
> printf("%d\n", n);
> for(int i=0; i<1; ++i) {
> printf("%d\n", n);
> n=666;
> (int&)n;
> }
> }
>
>
> % g++ -v && g++ -O pp5.cc && a.out
> Reading specs from /afs/cs.cmu.edu/project/cmcl-kosak/various-gcc/egcs-1998
> 0921/i386_linux2/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.92.11/specs
> gcc version egcs-2.92.11 19980921 (gcc2 ss-980609 experimental)
> 1000
> 666
>
> % ~/ko/various-gcc/egcs-latest-release/i386_linux2/bin/g++ -v && ~/ko/vario
> us-gcc/egcs-latest-release/i386_linux2/bin/g++ -O pp5.cc && a.out
> Reading specs from /afs/cs.cmu.edu/project/cmcl-kosak/various-gcc/egcs-1.1b
> /i386_linux2/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.57/specs
> gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
> 1000
> 666
>
> % ~/281local/bin/g++ -v && ~/281local/bin/g++ -O pp5.cc && a.out
> Reading specs from /home/kosak/281local/lib/gcc-lib/i686-pc-linux-gnulibc1/
> 2.8.1/specs
> gcc version 2.8.1
> 1000
> 666
This has been fixed for the upcoming egcs-1.1.1 release.
jeff