Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 441778

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] DevelopmentAssignee: 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

Description Ben Longbons 2012-11-04 21:08:22 UTC
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;
};
Comment 1 Bernard Cafarelli gentoo-dev 2013-06-13 21:30:29 UTC
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 :)