This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug regression/23328] New: Improper removal of struct field assignments by optimizer
- From: "gcczilla at achurch dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2005 15:59:42 -0000
- Subject: [Bug regression/23328] New: Improper removal of struct field assignments by optimizer
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
GCC 4.0.0 and later optimize out struct assignments inappropriately when the
struct is used as an input to an asm(). For example, in:
int foo(int a, int b) {
struct {int a,b} args;
args.a = a; args.b = b;
asm("..." : "" : "S" (&args));
}
the args.a and args.b assignments are optimized out (with -O3 at least) despite
the structure being specified as an input to the asm(). See attached files.
--
Summary: Improper removal of struct field assignments by
optimizer
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: regression
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcczilla at achurch dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23328