From 953277ba3fa39a9285cf89f59932b0169e7f6b9d Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Tue, 20 Oct 2020 10:15:41 -0400 Subject: [PATCH] c++: Add fixed test [PR82239] This test was fixed by r256550 but that commit was fixing another issue, and just happened to fix this too. gcc/testsuite/ChangeLog: PR c++/82239 * g++.dg/cpp0x/static_assert16.C: New test. --- gcc/testsuite/g++.dg/cpp0x/static_assert16.C | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/static_assert16.C diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert16.C b/gcc/testsuite/g++.dg/cpp0x/static_assert16.C new file mode 100644 index 00000000000..5b40b774f7b --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/static_assert16.C @@ -0,0 +1,14 @@ +// PR c++/82239 +// { dg-do compile { target c++11 } } + +template +struct C { + static constexpr int x = 5; + void f() + { + static_assert(0 < x, ""); + static_assert(0 < (x), ""); + static_assert(true || (0 < x), ""); + static_assert(true || (0 < (x)), ""); + } +}; -- 2.30.2