This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Fix a C++ crash with may_alias type attribute
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Tue, 4 Apr 2017 13:58:43 +0100
- Subject: Re: [PATCH] Fix a C++ crash with may_alias type attribute
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jwakely at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com DCB9775EA1
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DCB9775EA1
- References: <AM4PR0701MB216224552289BEFFCD2B1A12E40B0@AM4PR0701MB2162.eurprd07.prod.outlook.com>
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.