Fix diagnostic recursion ICE
authorNathan Sidwell <nathan@acm.org>
Tue, 4 Jan 2022 20:45:36 +0000 (12:45 -0800)
committerNathan Sidwell <nathan@acm.org>
Wed, 5 Jan 2022 12:04:01 +0000 (04:04 -0800)
commitf2da9e26f5c0f04d48872938eff130e2028e75d3
tree21c2313a06f78ad1d13a54720a6fc7ef52d4ef81
parent77e71619532c7cd27e907bb22af157b8e56dca58
Fix diagnostic recursion ICE

The [with T = $TYPE] diagnostic machinery must not cause recursion. So let's
not unilaterally warn about new alignment.  (template extracted from Open3D.)

gcc/cp/
* init.c (build_new_1): Check complain before alignment warning.
gcc/testsuite/
* g++.dg/diagnostic/recur-align.C: New.
gcc/cp/init.c
gcc/testsuite/g++.dg/diagnostic/recur-align.C [new file with mode: 0644]