[LLVMbugs] [Bug 5585] New: Global variables that are references and have constant initializers should be marked constant

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Nov 21 15:49:22 PST 2009


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

           Summary: Global variables that are references and have constant
                    initializers should be marked constant
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: andersca at mac.com
                CC: llvmbugs at cs.uiuc.edu


int a;
int& ar = a;

clang++ compiles to

@a = global i32 0, align 4                        ; <i32*> [#uses=1]
@ar = global i32* @a, align 8                     ; <i32**> [#uses=0]

llvm-gcc compiles to

@a = global i32 0               ; <i32*> [#uses=1]
@ar = constant i32* @a          ; <i32**> [#uses=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.



More information about the llvm-bugs mailing list