From cf427f02bb7cc5a0103f5821e7b4f042c9275320 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 1 Oct 2012 11:21:46 +0200 Subject: [multiple changes] 2012-10-01 Vincent Pucci * s-gearop.adb (Vector_Matrix_Product): Dimensions check fixed. Index of Left in S evaluation fixed. 2012-10-01 Javier Miranda * sem_ch3.adb (Analyze_Declarations): Avoid premature freezing caused by the internally generated subprogram _postconditions. * checks.adb (Expr_Known_Valid): Float literals are assumed to be valid in VM targets. 2012-10-01 Thomas Quinot * sinput.ads, sinput.adb, sinput-l.adb sinput-c.adb (Sinput): New Instances table, tracking all generic instantiations. Source file attribute Instance replaces previous Instantiation attribute with an index into the Instances table. (Iterate_On_Instances): New generic procedure. (Create_Instantiation_Source): Record instantiations in Instances. (Tree_Read, Tree_Write): Read/write the instance table. * scils.ads, scos.adb (SCO_Instance_Table): New table, contains information copied from Sinput.Instance_Table, but self-contained within the SCO data structures. * par_sco.ads, par_sco.adb (To_Source_Location): Move to library level. (Record_Instance): New subprogram, used by... (Populate_SCO_Instance_Table): New subprogram to fill the SCO instance table from the Sinput one (called by SCO_Output). * opt.ads (Generate_SCO_Instance_Table): New option. * put_scos.adb (Write_Instance_Table): New subprogram, used by... (Put_SCOs): Dump the instance table at the end of SCO information if requested. * get_scos.adb (Get_SCOs): Read SCO_Instance_Table. * types.h: Add declaration for Instance_Id. * back_end.adb (Call_Back_End): Pass instance ids in source file information table. (Scan_Back_End_Switches): -fdebug-instances sets Opt.Generate_SCO_Instance_Table. * gcc-interface/gigi.h: File_Info_Type includes instance id. * gcc-interface/trans.c: Under -fdebug-instances, set instance id in line map from same in file info. 2012-10-01 Thomas Quinot * sem_elab.adb: Minor reformatting (Check_Elab_Call): Minor fix to debugging code (add special circuit for the valid case where a 'Access attribute reference is passed to Check_Elab_Call). 2012-10-01 Thomas Quinot * exp_ch3.adb: Minor reformatting. From-SVN: r191904 --- gcc/ada/back_end.adb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/ada/back_end.adb') diff --git a/gcc/ada/back_end.adb b/gcc/ada/back_end.adb index fa7c54d..0cfd45f 100644 --- a/gcc/ada/back_end.adb +++ b/gcc/ada/back_end.adb @@ -76,6 +76,7 @@ package body Back_End is type File_Info_Type is record File_Name : File_Name_Type; + Instance : Instance_Id; Num_Source_Lines : Nat; end record; @@ -119,6 +120,7 @@ package body Back_End is for J in 1 .. Last_Source_File loop File_Info_Array (J).File_Name := Full_Debug_Name (J); + File_Info_Array (J).Instance := Instance (J); File_Info_Array (J).Num_Source_Lines := Nat (Physical_To_Logical (Last_Source_Line (J), J)); end loop; @@ -243,6 +245,12 @@ package body Back_End is elsif Switch_Chars (First .. Last) = "fdump-scos" then Opt.Generate_SCO := True; + -- Back end switch -fdebug-instances also enables instance table + -- SCO generation. + + elsif Switch_Chars (First .. Last) = "fdebug-instances" then + Opt.Generate_SCO_Instance_Table := True; + end if; end if; end Scan_Back_End_Switches; -- cgit v1.1