[Bug inline-asm/23200] [4.0/4.1 regression] rejects "i"(&var + 1)
bonzini at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Nov 11 08:59:00 GMT 2005
------- 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
More information about the Gcc-bugs
mailing list