testsuite: Add test for r11-4123
commitb25c5d6133d356a34aee72a24fd4cdec5637cc17
authorMarek Polacek <polacek@redhat.com>
Mon, 22 Aug 2022 16:43:30 +0000 (22 12:43 -0400)
committerMarek Polacek <polacek@redhat.com>
Tue, 23 Aug 2022 13:09:46 +0000 (23 09:09 -0400)
treeb3f27e1c22689142e7a22320bda0905d391e8a6f
parentfcd9671e73c877d0bd8a2c0a16cf7cf2ce93fe60
testsuite: Add test for r11-4123

r11-4123 came without a test but I happened upon a nice test case that
got fixed by that revision.  So I think it'd be good to add it.  The
ICE was:

phi-1.C: In constructor 'ElementManager::ElementManager()':
phi-1.C:28:1: error: missing definition
   28 | ElementManager::ElementManager() : array_(makeArray()) {}
      | ^~~~~~~~~~~~~~
for SSA_NAME: _12 in statement:
_10 = PHI <_12(3), _11(5)>
PHI argument
_12
for PHI node
_10 = PHI <_12(3), _11(5)>
during GIMPLE pass: fixup_cfg
phi-1.C:28:1: internal compiler error: verify_ssa failed

gcc/testsuite/ChangeLog:

* g++.dg/torture/phi-1.C: New test.
gcc/testsuite/g++.dg/torture/phi-1.C [new file with mode: 0644]