[pushed] c++: fix up cpp23/consteval-if3.C test [PR115583]

Patrick Palka ppalka@redhat.com
Thu Aug 15 18:40:18 GMT 2024


Compiling with optimizations is needed to trigger the bug fixed
by r15-2369.

	PR c++/115583

gcc/testsuite/ChangeLog:

	* g++.dg/cpp23/consteval-if13.C: Compile with -O.
---
 gcc/testsuite/g++.dg/cpp23/consteval-if13.C | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/testsuite/g++.dg/cpp23/consteval-if13.C b/gcc/testsuite/g++.dg/cpp23/consteval-if13.C
index b98bbc33d13..b10ec18b3c6 100644
--- a/gcc/testsuite/g++.dg/cpp23/consteval-if13.C
+++ b/gcc/testsuite/g++.dg/cpp23/consteval-if13.C
@@ -1,5 +1,6 @@
 // PR c++/115583
 // { dg-do compile { target c++23 } }
+// { dg-additional-options -O }
 
 consteval int f(int i) {
   return i;
-- 
2.46.0.164.g477ce5ccd6



More information about the Gcc-patches mailing list