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