Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 441778 - sys-devel/clang-3.1 ICE's when a type with multiple copy-ctors is in a union
Summary: sys-devel/clang-3.1 ICE's when a type with multiple copy-ctors is in a union
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL: http://llvm.org/bugs/show_bug.cgi?id=...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-11-04 21:08 UTC by Ben Longbons
Modified: 2013-06-13 22:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch backported from trunk (0001-Backport-two-patches-from-trunk-to-3.1.patch,2.25 KB, patch)
2012-11-04 21:08 UTC, Ben Longbons
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 :)