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

             Bug #: 14851
           Summary: LTO is removing functions that populate
                    cross-boundaries array setup
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Interprocedural Optimizations
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


Created attachment 9833
  --> http://llvm.org/bugs/attachment.cgi?id=9833
source and script to reproduce

Attached a C file that exposes an LTO problem (with script).

Function 'setup()' fills up all three arrays through the first one (by overrun)
and funcion 'main()' prints the values. After LTO (opt -std-link-opts), LLVM
reduces the stride of 'setup()' to 20 (bar and baz come empty), since they were
never initialized in the first place.

Another bug will be filled in Clang to add a warning on such cases, but the
legality of this change is questioned.

-- 
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