[LLVMbugs] [Bug 3762] New: Constant folding methods need the iterator treatment

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Mar 9 02:29:49 PDT 2009


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

           Summary: Constant folding methods need the iterator treatment
           Product: new-bugs
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: baldrick at free.fr
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=2686)
 --> (http://llvm.org/bugs/attachment.cgi?id=2686)
testcase .ll

When built with expensive checks,
  opt -globalopt paq8p.bc -disable-output
barfs due to taking the address of the first
element of an empty vector.  It happens here:

2216            if (Constant *C = ConstantFoldCall(Callee, &Formals[0],
2217                                               Formals.size())) {

This kind of problem was fixed elsewhere by
introducing methods that take iterators.  It
looks like the constant methods need the same
treatment.  The above code would then become

  if (Constant *C = ConstantFoldCall(Callee, Formals.begin(),
                                     Formals.end()) {


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