Analyze_Number_Declaration contains a fast track for the case where the
expression of an integer named number is a literal, but it fails to set
the Debug_Info_Needed flag on the named number.

No functional changes.

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

2019-10-10  Eric Botcazou  <ebotca...@adacore.com>

gcc/ada/

        * sem_ch3.adb (Analyze_Number_Declaration): Set
        Debug_Info_Needed in the case where the expression is an integer
        literal.
--- gcc/ada/sem_ch3.adb
+++ gcc/ada/sem_ch3.adb
@@ -3522,6 +3522,8 @@ package body Sem_Ch3 is
          Set_Etype     (Id, Universal_Integer);
          Set_Ekind     (Id, E_Named_Integer);
          Set_Is_Frozen (Id, True);
+
+         Set_Debug_Info_Needed (Id);
          return;
       end if;
 

Reply via email to