diff mbox series

[Ada] Work around missing Long_Long_Long_Size entry in .atp file

Message ID 20201021072334.GA73720@adacore.com
State New
Headers show
Series [Ada] Work around missing Long_Long_Long_Size entry in .atp file | expand

Commit Message

Pierre-Marie de Rodat Oct. 21, 2020, 7:23 a.m. UTC
This prevents the compiler from giving an error message when the new
Long_Long_Long_Size entry is missing in a target configuration file.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* set_targ.adb (DTN): Fix oversight.
	(Read_Target_Dependent_Values): Do not error out on missing
	Long_Long_Long_Size entry and reuse Long_Long_Size for it.
diff mbox series

Patch

diff --git a/gcc/ada/set_targ.adb b/gcc/ada/set_targ.adb
--- a/gcc/ada/set_targ.adb
+++ b/gcc/ada/set_targ.adb
@@ -84,8 +84,8 @@  package body Set_Targ is
           S_Float_Size                 'Unrestricted_Access,
           S_Float_Words_BE             'Unrestricted_Access,
           S_Int_Size                   'Unrestricted_Access,
-          S_Long_Long_Long_Size        'Unrestricted_Access,
           S_Long_Double_Size           'Unrestricted_Access,
+          S_Long_Long_Long_Size        'Unrestricted_Access,
           S_Long_Long_Size             'Unrestricted_Access,
           S_Long_Size                  'Unrestricted_Access,
           S_Maximum_Alignment          'Unrestricted_Access,
@@ -748,8 +748,15 @@  package body Set_Targ is
 
       for J in DTR'Range loop
          if not DTR (J) then
-            Fail ("missing entry for " & DTN (J).all & " in file "
-                  & File_Name);
+            --  Make an exception for Long_Long_Long_Size???
+
+            if DTN (J) = S_Long_Long_Long_Size'Unrestricted_Access then
+               Long_Long_Long_Size := Long_Long_Size;
+
+            else
+               Fail ("missing entry for " & DTN (J).all & " in file "
+                     & File_Name);
+            end if;
          end if;
       end loop;