c++: testcases for PR113545 (constexpr with switch and passing non-constexpr parameter)
commit48207a5f00d6ae7cb11038e7c17f6858de4a884e
authorHans-Peter Nilsson <hp@axis.com>
Mon, 22 Jan 2024 00:09:03 +0000 (22 01:09 +0100)
committerHans-Peter Nilsson <hp@bitrange.com>
Sat, 10 Feb 2024 03:41:18 +0000 (10 04:41 +0100)
tree6511d2d7345714739a7651252c6c402ecf6d82a1
parent863202684dff775ae4a3e576f77044474384d41f
c++: testcases for PR113545 (constexpr with switch and passing non-constexpr parameter)

Test-cases, with constexpr-reinterpret3.C dg-ice:ing the PR c++/113545 bug.

Regarding the request in the comment, A dg-do run when there's an ICE
will cause some CI's to signal an error for the run being "UNRESOLVED"
(compilation failed to produce executable).  Note that dejagnu (1.6.3)
itself doesn't consider this an error.

gcc/testsuite:
PR c++/113545
* g++.dg/cpp1y/constexpr-reinterpret3.C,
g++.dg/cpp1y/constexpr-reinterpret4.C: New tests.
gcc/testsuite/g++.dg/cpp1y/constexpr-reinterpret3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-reinterpret4.C [new file with mode: 0644]