Closed
Description
Bugzilla Link | 12953 |
Version | unspecified |
OS | Linux |
Blocks | llvm/llvm-bugzilla-archive#13707 |
CC | @DougGregor,@tritao,@belkadan,@tkremenek,@Weverything |
Extended Description
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.