This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/15084] -O/-O2 generate wrong code on structure modification
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Apr 2004 23:53:05 -0000
- Subject: [Bug target/15084] -O/-O2 generate wrong code on structure modification
- References: <20040422235109.15084.hjl@lucon.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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