[LLVMbugs] [Bug 12953] New: CFG builder asserts when goto jumps variable with nontrivial destructor in MS mode

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 25 22:13:14 PDT 2012


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

             Bug #: 12953
           Summary: CFG builder asserts when goto jumps variable with
                    nontrivial destructor in MS mode
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


This testcase:

struct X { ~X(); }; void f() { goto end; X x; end:; }

... crashes when built with clang++ -Wuninitialized -fms-compatibility:

<stdin>:1:32: warning: goto into protected scope [-Wmicrosoft]
struct X { ~X(); }; void f() { goto end; X x; end:; }
                               ^
<stdin>:1:44: note: jump bypasses variable with a non-trivial destructor
struct X { ~X(); }; void f() { goto end; X x; end:; }
                                           ^
clang-3.2: lib/Analysis/CFG.cpp:196: int <anonymous
namespace>::LocalScope::const_iterator::distance(LocalScope::const_iterator):
Assertion `F != const_iterator() && "L iterator is not reachable from F
iterator."' failed.

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