code:

register int *p asm("r4");
void a()
{
        asm volatile("" : "+m" (*p));
}

generates:

[...]
        mov     r3, r4
[...]

when it should generate no move as the address register won't be modified
inside asm().

Similar bugs: #40680, #34283, #13355.

(gcc 4.5 from svn 157582)


-- 
           Summary: Unnecessary reload of asm "m" operand address
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mirq-gccboogs at rere dot qmqm dot pl
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-none-eabi


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43471

Reply via email to