Summary: | sys-devel/clang-3.1 ICE's when a type with multiple copy-ctors is in a union | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Ben Longbons <b.r.longbons> |
Component: | [OLD] Development | Assignee: | Bernard Cafarelli <voyageur> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mgorny, ryao |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://llvm.org/bugs/show_bug.cgi?id=13480 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | patch backported from trunk |
Thanks for the report and patch for those that used 3.1, marking fixed now that 3.2 (and soon 3.3) are in tree :) |
Created attachment 328354 [details, diff] patch backported from trunk Compiling the following code segfaults clang. Note that putting nontrivial types in a union is a C++11 feature not implemented by clang 3.0, and it is fixed on trunk for 3.2 I've put the attached patch in /etc/portage/patches/sys-devel/clang/ and it resolves the issue for me. Testcase: // compile with -std=c++11 struct String { String(const String&); String(String&); }; union Impl { String first; };