summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/fixedpnt.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/fixedpnt.adb')
-rw-r--r--gcc/testsuite/gnat.dg/fixedpnt.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/fixedpnt.adb b/gcc/testsuite/gnat.dg/fixedpnt.adb
new file mode 100644
index 000000000..2e9988c33
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/fixedpnt.adb
@@ -0,0 +1,10 @@
+-- { dg-do run }
+
+procedure Fixedpnt is
+ A : Duration := 1.0;
+ B : Duration := Duration ((-1.0) * A);
+begin
+ if B > 0.0 then
+ raise Constraint_Error;
+ end if;
+end;