[LLVMbugs] [Bug 710] NEW: [llvm-gcc] Should codegen automatic constant arrays as static

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Feb 22 13:47:20 PST 2006


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=710

           Summary: [llvm-gcc] Should codegen automatic constant arrays as
                    static
           Product: tools
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org


Consider this:

char foo(int i) {
  const char arr[16] = {0,1,4,5,2,3,6,7,8,9,12,13,10,11,14,15};
  return arr[i];
}

We should make 'arr' into a global, not emit 16 stores to the stack.

This is fixed in the new CFE.

-Chris



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the llvm-bugs mailing list