summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/notnot.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/notnot.adb')
-rw-r--r--gcc/testsuite/gnat.dg/notnot.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/notnot.adb b/gcc/testsuite/gnat.dg/notnot.adb
new file mode 100644
index 000000000..3d4181aaa
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/notnot.adb
@@ -0,0 +1,9 @@
+-- { dg-do compile }
+-- { dg-options "-gnatwr" }
+
+procedure notnot (x, y : integer) is
+begin
+ if not (not (x = y)) then -- { dg-warning "redundant double negation" }
+ return;
+ end if;
+end;