This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17884] [4.0 Regression] asm 'volatile' is not honored as documented
- From: "dalej at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Oct 2004 18:27:14 -0000
- Subject: [Bug tree-optimization/17884] [4.0 Regression] asm 'volatile' is not honored as documented
- References: <20041007193056.17884.fjahanian@apple.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dalej at apple dot com 2004-10-08 18:27 -------
The doc also says "You can prevent an asm from being deleted, moved significantly, or combined,
by writing the keyword volatile after the asm." Which seems to contradict the later statement
that they can be moved across jumps; if that's not significant motion, what is? Both sentences
go back to at least 2.95.
So what are the semantics of 'asm volatile'? If it does not disable code motion, it seems to me
Fariborz is right that it's a NOP and should be deprecated. But there is a lot of code around here
that uses it, and worked as intended with 3.3. IMO the incorrect statement in the doc is the
last one, not the first two.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17884