[llvm-bugs] [Bug 28496] New: clang crashes on likely invalid C++11 code: Assertion `hasInClassInitializer() && InitStorage.getPointer() == nullptr && "bit width, initializer or captured type already set"' failed
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jul 10 23:01:24 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28496
Bug ID: 28496
Summary: clang crashes on likely invalid C++11 code: Assertion
`hasInClassInitializer() && InitStorage.getPointer()
== nullptr && "bit width, initializer or captured type
already set"' failed
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: su at cs.ucdavis.edu
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
The current clang trunk crashes when compiling the following C++11 test case on
x86_64-linux-gnu in both 32-bit and 64-bit modes.
It also crashes 3.6.x and later and is rejected by 3.5.x and earlier.
It is
- rejected by GCC 6.x and later (5.x ICEs)
- accepted by GCC 4.8.x and 4.9.x
- accepted by MSVC 19.00.23720.0 (x86)
- rejected by ICC 13.0.1 (data member initializer unsupported)
Crash log is too large and thus omitted.
$ clang++ -v
clang version 3.9.0 (trunk 275012)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/clang-trunk/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.1.1
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$
-----------------------------------------------
template < class T > struct A
{
int t = [] (A *) { return 0; } (new A);
};
int main ()
{
A < int > a;
a.t;
return 0;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160711/3ab211d9/attachment.html>
More information about the llvm-bugs
mailing list