[PATCH] Fix a C++ crash with may_alias type attribute

Bernd Edlinger bernd.edlinger@hotmail.de
Tue Apr 4 12:39:00 GMT 2017


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.

Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
Is it OK for trunk?


Thanks
Bernd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-pr80287.diff
Type: text/x-patch
Size: 3402 bytes
Desc: patch-pr80287.diff
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20170404/10e34f32/attachment.bin>


More information about the Libstdc++ mailing list