This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/23200] [4.0/4.1/4.2/4.3 regression] rejects "i"(&var + 1)
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Nov 2007 15:41:32 -0000
- Subject: [Bug inline-asm/23200] [4.0/4.1/4.2/4.3 regression] rejects "i"(&var + 1)
- References: <bug-23200-11104@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #31 from jakub at gcc dot gnu dot org 2007-11-22 15:41 -------
Could we perhaps for !optimize allow in ASM input operands arbitrary
tree expressions if TREE_CONSTANT for operands which !allows_mem &&
!allows_reg?
Then we'd just need to make sure the few -O0 passes are able to cope with it
and adjust gimplifier to do that and verification to accept that.
For -O0 expecting
int i = 1;
asm ("" :: "i" (i));
to work is certainly bad assumption, so it is enough to preserve what the user
used in the inline asm. I guess only nesting and omp passes would care, those
can transform a valid "i" operand into invalid one.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23200