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 target/15084] -O/-O2 generate wrong code on structure modification


------- Additional Comments From hjl at lucon dot org  2004-04-22 23:53 -------
Created an attachment (id=6145)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6145&action=view)
A testcase 

I got:

[hjl@gnu-20 struct-1]$ /usr/gcc-3.4/bin/gcc -O2 bug.c
[hjl@gnu-20 struct-1]$ ./a.out
compiler bug
[hjl@gnu-20 struct-1]$ /usr/gcc-3.4/bin/gcc -O bug.c
[hjl@gnu-20 struct-1]$ ./a.out
compiler bug
[hjl@gnu-20 struct-1]$ /usr/gcc-3.4/bin/gcc  bug.c
[hjl@gnu-20 struct-1]$ ./a.out
[hjl@gnu-20 struct-1]$ /usr/gcc-3.4/bin/gcc -O3  bug.c
[hjl@gnu-20 struct-1]$ ./a.out
[hjl@gnu-20 struct-1]$

-O0, -Os and -O3 are OK.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15084


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