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 regression] rejects "i"(&var + 1)
- From: "bonzini 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 Nov 2005 08:59:30 -0000
- Subject: [Bug inline-asm/23200] [4.0/4.1 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 #11 from bonzini at gcc dot gnu dot org 2005-11-11 08:59 -------
Could the patch to lower pointer arithmetic to array arithmetic help?
typedef int int_array[];
typedef int_array *p_int_array;
int var;
void f()
{
asm volatile ("" :: "i"(&(*(p_int_array)&var)[1]));
}
does not work too, but it looks like if the compiler did this lowering, it
would be valid GIMPLE and there would be no need to create the temporary.
And this would be doable at -O0 too.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23200