http://llvm.org/bugs/show_bug.cgi?id=2848

           Summary: new volatile regression
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [email protected]


Seen on r56938 on Ubuntu Hardy on ia32.

This is a strange one: wrong code at -O0, correct at other optimization levels.

I don't think this problem was there 24 hours ago.

[EMAIL PROTECTED]:~/volatile/tmp50$ llvm-gcc -O0 small.c -S -o - | grep g_126
        .type   g_126,@object
        .section        .gnu.linkonce.b.g_126,"aw",@nobits
        .comm   g_126,4,4               # g_126

The x86 code contains no load from the volatile location!  The LLVM looks OK.



int mod_rhs (int x)
{
  return x;
}

volatile unsigned int g_126;

int func_93 (void);
int func_93 (void)
{
  return (g_126 > (mod_rhs (1)) < 0);
}

int main (void)
{
  func_93 ();
  return 0;
}


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to