summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/test_version.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/test_version.adb')
-rw-r--r--gcc/testsuite/gnat.dg/test_version.adb13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/test_version.adb b/gcc/testsuite/gnat.dg/test_version.adb
new file mode 100644
index 000000000..2b88a147a
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/test_version.adb
@@ -0,0 +1,13 @@
+-- { dg-do run }
+with GNAT.Compiler_Version;
+procedure Test_Version is
+ package Vsn is new GNAT.Compiler_Version;
+ use Vsn;
+ X : constant String := Version;
+begin
+ if X'Length = 78 then
+ -- 78 = Ver_Len_Max + Ver_Prefix'Length
+ -- actual version should be shorter than this
+ raise Program_Error;
+ end if;
+end Test_Version;