This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/28042] optimizer (-O2) changes the semantics of my programs



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]