summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/pr36954.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/warn/pr36954.C')
-rw-r--r--gcc/testsuite/g++.dg/warn/pr36954.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/warn/pr36954.C b/gcc/testsuite/g++.dg/warn/pr36954.C
new file mode 100644
index 000000000..92cea2f38
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/pr36954.C
@@ -0,0 +1,23 @@
+// PR c++/36954
+// { dg-do compile }
+// { dg-options "-Wlogical-op -Wextra -Wall" }
+
+template<class C> void Test()
+{
+ if ((1 == 2) || (true)) {
+ }
+
+ if ((1 == 2) || (!false)) {
+ }
+
+ if (false || true) {
+ }
+}
+
+
+
+int main() {
+ if ((1 == 2) || (true)) {
+ }
+}
+