This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug regression/23328] Improper removal of struct field assignments by optimizer
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2005 16:48:14 -0000
- Subject: [Bug regression/23328] Improper removal of struct field assignments by optimizer
- References: <20050811155941.23328.gcczilla@achurch.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-11 16:48 -------
The code is invalid as you don't say you going to access memory.
either mark the asm as clobbers memory (which is not fully true) or use the following replacement asm
(which works):
asm("mov 0(%%esi),%%eax; mov 4(%%esi),%%edx; add %%edx,%%eax;"
: "=a" (c)
: "S" (&args)
,"m" (args)
: "edx");
It says to the compiler that args is accessed as memory.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23328