This test was fixed by r256550 but that commit was fixing another issue,
and just happened to fix this too.

Tested x86_64-pc-linux-gnu, applying to trunk.

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<typename T>
+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)), "");
+   }
+};

base-commit: 5bcd7de6402595fcaefcf1305e053fcb47dfc424
-- 
2.26.2

Reply via email to