This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug inline-asm/23200] [4.0/4.1 regression] rejects "i"(&var + 1)



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]