On Wed, Dec 05, 2018 at 04:34:14AM -0200, Alexandre Oliva wrote: > for gcc/cp/ChangeLog > > PR c++/85569 > * constexpr.c (adjust_temp_type): Test for type equality with > same_type_p. > (constexpr_call_hasher::equal): Likewise. > > for gcc/testsuite > > PR c++/85569 > * g++.dg/cpp1z/pr85569.C: New.
This patch fixed also PR87897, I've added the following testcase from it, regtested on x86_64-linux and committed as obvious: 2018-12-05 Jakub Jelinek <ja...@redhat.com> PR c++/87897 * g++.dg/init/const13.C: New test. --- gcc/testsuite/g++.dg/init/const13.C.jj 2018-12-05 09:39:04.604974302 +0100 +++ gcc/testsuite/g++.dg/init/const13.C 2018-12-05 09:38:55.961117120 +0100 @@ -0,0 +1,5 @@ +// PR c++/87897 +// { dg-do compile } + +typedef struct A {} B; +A const a = B (); Jakub