From: Arnaud Charlet Date: Fri, 13 Jan 2017 10:11:43 +0000 (+0100) Subject: Minor reformatting. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=53a5377aac21ee96adacdcbc9fdf0535d4f1fb7b;p=gcc.git Minor reformatting. From-SVN: r244404 --- diff --git a/gcc/ada/exp_spark.adb b/gcc/ada/exp_spark.adb index bd66d015afd..10461900321 100644 --- a/gcc/ada/exp_spark.adb +++ b/gcc/ada/exp_spark.adb @@ -31,7 +31,7 @@ with Exp_Util; use Exp_Util; with Namet; use Namet; with Nlists; use Nlists; with Nmake; use Nmake; -with Rtsfind; +with Rtsfind; use Rtsfind; with Sem_Res; use Sem_Res; with Sem_Util; use Sem_Util; with Sinfo; use Sinfo; @@ -121,29 +121,34 @@ package body Exp_SPARK is -------------------------------------- procedure Expand_SPARK_Attribute_Reference (N : Node_Id) is - Aname : constant Name_Id := Attribute_Name (N); + Aname : constant Name_Id := Attribute_Name (N); Attr_Id : constant Attribute_Id := Get_Attribute_Id (Aname); - Expr : Node_Id; - Call : Node_Id; + Loc : constant Source_Ptr := Sloc (N); + + Call : Node_Id; + Expr : Node_Id; begin if Attr_Id = Attribute_To_Address then + -- Extract argument to later reanalyze it in the new context Expr := First (Expressions (N)); Nlists.Remove (Expr); - Set_Etype (Expr, Empty); + Set_Etype (Expr, Empty); Set_Analyzed (Expr, False); -- Create the call and insert it in the tree - Call := Make_Function_Call (Sloc (N), - Name => New_Occurrence_Of - (Rtsfind.RTE (Rtsfind.RE_To_Address), Sloc (N)), - Parameter_Associations => - New_List (Expr)); + Call := + Make_Function_Call (Loc, + Name => + New_Occurrence_Of (RTE (RE_To_Address), Loc), + Parameter_Associations => New_List ( + Expr)); + Set_Etype (Call, Etype (N)); - Rewrite (Old_Node => N, New_Node => Call); + Rewrite (N, Call); -- Reanalyze argument and call in the new context diff --git a/gcc/ada/osint-c.adb b/gcc/ada/osint-c.adb index 28abc609030..62ccb7fca06 100644 --- a/gcc/ada/osint-c.adb +++ b/gcc/ada/osint-c.adb @@ -351,6 +351,7 @@ package body Osint.C is -- Remove trailing NUL that comes from Set_File_Name above. This is -- needed for consistency with names that come from Scan_ALI and thus -- preventing repeated scanning of the same file. + pragma Assert (Name_Len > 1 and then Name_Buffer (Name_Len) = ASCII.NUL); Name_Len := Name_Len - 1;