[Bug middle-end/21223] Output register variable is reloaded into the wrong register for asm

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Apr 25 21:10:00 GMT 2005


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-25 21:09 -------
And here is an x86 testcase:
int bar(int *mem)
{
  return ({ register int a_oldval asm ("eax");
            register int a_tmp asm ("ebx");
            int a_oldval2 = 3;
            __asm__ __volatile__ ("# Should be eax - %0\n\t"
                                  "# Should be ebx - %1\n\t"
                                  "# unknown - %2"
                                  : "=&r" (a_oldval), "=&r" (a_tmp)
                                  : "r" (a_oldval2));
            a_tmp; });
}

Which shows this fails at -O2 and above too.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|rtl-optimization            |middle-end
 GCC target triplet|arm-none-linux-gnueabi,     |
                   |powerpc-darwin              |
      Known to fail|3.3.3 4.1.0                 |3.3.3 4.1.0 2.95.3


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



More information about the Gcc-bugs mailing list