[patch] Fix PR c++/68290

Eric Botcazou ebotcazou@adacore.com
Thu Nov 26 23:45:00 GMT 2015


Hi,

this is a variant of the just fixed PR c++/68434 on SPARC64/Solaris:

/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/concepts/auto1.C:16:6: 
internal compiler error: canonical types differ for identical types C and C

with the same underlying issue, which is that TYPE_CANONICAL is computed 
before PLACEHOLDER_TYPE_CONSTRAINTS is set in make_constrained_auto.

Tested on x86_64-suse-linux, OK for the mainline?


2015-11-26  Eric Botcazou  <ebotcazou@adacore.com>

	PR c++/68290
	* constraint.cc (make_constrained_auto): Move to...
	* pt.c (make_auto_1): Add set_canonical parameter and set
	TYPE_CANONICAL on the type only if it is true.
	(make_decltype_auto): Adjust call to make_auto_1.
	(make_auto): Likewise.
	(splice_late_return_type): Likewise.
	(make_constrained_auto): ...here.  Call make_auto_1 instead of
	make_auto and pass false.  Set TYPE_CANONICAL directly.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr68290.diff
Type: text/x-patch
Size: 4058 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20151126/a86c132e/attachment.bin>


More information about the Gcc-patches mailing list