From f9805f52d581f361e33ac770f26fc5c48580a72a Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 29 Nov 2008 10:31:53 +0000 Subject: [PATCH] re PR ada/30827 (GNAT.compiler_version problem for official releases) PR ada/30827 * g-comver.adb (Ver_Len_Max): Fix inconsistency. From-SVN: r142274 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/g-comver.adb | 2 +- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gnat.dg/test_version.adb | 4 ++-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b212a113655..634b1407d5a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2008-11-29 Eric Botcazou + + PR ada/30827 + * g-comver.adb (Ver_Len_Max): Fix inconsistency. + 2008-11-27 Eric Botcazou * gcc-interface/decl.c: Fix various nits. diff --git a/gcc/ada/g-comver.adb b/gcc/ada/g-comver.adb index ae3bf3bf66c..e3191b58e61 100644 --- a/gcc/ada/g-comver.adb +++ b/gcc/ada/g-comver.adb @@ -37,7 +37,7 @@ package body GNAT.Compiler_Version is - Ver_Len_Max : constant := 32; + Ver_Len_Max : constant := 64; -- This is logically a reference to Gnatvsn.Ver_Len_Max but we cannot -- import this directly since run-time units cannot WITH compiler units. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e36902281ae..707a9591d51 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-11-29 Eric Botcazou + + * gnat.dg/test_version.adb: Adjust to new string length. + 2008-11-28 Andrew Pinski PR testsuite/38311 diff --git a/gcc/testsuite/gnat.dg/test_version.adb b/gcc/testsuite/gnat.dg/test_version.adb index d7fa2976c56..2b88a147a5c 100644 --- a/gcc/testsuite/gnat.dg/test_version.adb +++ b/gcc/testsuite/gnat.dg/test_version.adb @@ -5,8 +5,8 @@ procedure Test_Version is use Vsn; X : constant String := Version; begin - if X'Length = 46 then - -- 46 = Ver_Len_Max + Ver_Prefix + if X'Length = 78 then + -- 78 = Ver_Len_Max + Ver_Prefix'Length -- actual version should be shorter than this raise Program_Error; end if;