This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/28042] optimizer (-O2) changes the semantics of my programs
- From: "tonyg-gccbugzilla at lshift dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jun 2006 09:07:57 -0000
- Subject: [Bug middle-end/28042] optimizer (-O2) changes the semantics of my programs
- References: <bug-28042-12834@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from tonyg-gccbugzilla at lshift dot net 2006-06-16 09:07 -------
Jun 16 10:07:17 tonyg@shortstop
~$ gcc -Wall -O0 -o is_small is_small.c
Jun 16 10:07:29 tonyg@shortstop
~$ ./is_small
0
Jun 16 10:07:32 tonyg@shortstop
~$ gcc -Wall -O1 -o is_small is_small.c
Jun 16 10:07:37 tonyg@shortstop
~$ ./is_small
ivalue: 1073741824
1
Jun 16 10:07:38 tonyg@shortstop
~$ gcc --version
gcc (GCC) 4.0.4 20060507 (prerelease) (Debian 4.0.3-3)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28042