[PATCH] Fix a C++ crash with may_alias type attribute
Bernd Edlinger
bernd.edlinger@hotmail.de
Tue Apr 4 21:29:00 GMT 2017
On 04/04/17 14:58, Jonathan Wakely wrote:
> On 04/04/17 12:39 +0000, Bernd Edlinger wrote:
>> Hi,
>>
>> I noticed that the already created reference and pointer types
>> are left in an inconsistent state if the may_alias attribute
>> is added to a class, in some cases.
>>
>> The attached patch fixes this by adding another loop over
>> all type variants of each pointer and reference type.
>>
>> The new test case 20_util/any/assign/2a.cc is just a
>> clone of 20_util/any/assign/2.cc with the may_alias
>> attribute at the right place.
>
> The new test doesn't really belong in the libstdc++, does it?
>
> If this is a bug in the front-end then a reduced version of the test
> belongs in the g++ testsuite.
>
Yes, I moved the test case to the g++.dg/lto branch, where it
fortunately also works (I forgot to mention that the crash only
happened with -flto).
Is it Ok for trunk?
Thanks
Bernd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-pr80287.diff
Type: text/x-patch
Size: 3386 bytes
Desc: patch-pr80287.diff
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20170404/ba58dc2a/attachment.bin>
More information about the Libstdc++
mailing list