On Tue, Mar 24, 2015 at 05:46:57PM +0000, Alan Lawrence wrote: > Hmmm. This is not the right fix: the tests Richard fixed, were failing because > of lack of constant propagation and DCE at compile-time, which then didn't > eliminate the call to link_error. The AArch64 test is failing because this > from > aarch64/constraints.md: > > (define_constraint "S" > "A constraint that matches an absolute symbolic address." > (and (match_code "const,symbol_ref,label_ref") > (match_test "aarch64_symbolic_address_p (op)"))) > > previously was seeing (and being satisfied by): > > (const:DI (plus:DI (symbol_ref:DI ("test") [flags 0x3] <function_decl > 0x7fb7c60300 test>) > (const_int 4 [0x4]))) > > but following Richard's patch the constraint is evaluated only on: > > (reg/f:DI 73 [ D.2670 ]) I don't think we should get too concerned by this. There are a number of other constraints which we define which we can only satisfy given a level of optimisation. Take the I (immediate acceptable for an ADD instruction) constraint, which will fail for:
int foo (int x) { int z = 5; __asm__ ("xxx %0 %1":"=r"(x) : "I"(z)); return x; } at O0 and happily produce: xxx x0 5 with optimisations. I think your original patch to add -O is just fine, but Marcus or Richard will need to approve it. Cheers, James