[LLVMbugs] [Bug 11716] New: Crash referring to label from a constexpr function

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 5 16:18:09 PST 2012


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

             Bug #: 11716
           Summary: Crash referring to label from a constexpr function
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu,
                    richard-llvm at metafoo.co.uk
    Classification: Unclassified


Testcase:
constexpr long a() {
  return (0 && ({lbl1:lbl2: 0;})), (long)&&lbl1 - (long)&&lbl2;
}
void b() { static long b = a(); }

Crashes in IRGen with:

Referring to a basic block in another function!
  indirectbr i8* undef, [label %lbl1, label %lbl2]
Broken module found, compilation aborted!

Not sure whether we should try to enforce some restriction on Evaluate or just
add the relevant safety check to CGExprConstant.

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