From fa54f4da74b48a088fb1cef7b7f593d02319d019 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 24 Dec 2019 09:36:03 +0100 Subject: [Ada] Remove degenerate Treat_Fixed_As_Integer mechanism 2020-06-02 Eric Botcazou gcc/ada/ * exp_ch4.adb (Expand_N_Op_Divide): Remove code dealing with the Treat_Fixed_As_Integer flag. (Expand_N_Op_Multiply): Likewise. * exp_fixd.adb (Build_Divide): Do the division in an integer type long enough to hold both operands and convert the result to the type of the LHS. Do not set Treat_Fixed_As_Integer. (Build_Multiply): Do not set Treat_Fixed_As_Integer. (Build_Rem): Likewise. * sem_ch4.adb (Analyze_Arithmetic_Op): Remove code dealing with the Treat_Fixed_As_Integer flag. (Check_Arithmetic_Pair): Likewise. * sinfo.ads (Treat_Fixed_As_Integer): Delete. (N_Has_Treat_Fixed_As_Integer): Likewise. (Set_Treat_Fixed_As_Integer): Likewise. * sinfo.adb (Treat_Fixed_As_Integer): Likewise. (Set_Treat_Fixed_As_Integer): Likewise. * sprint.ads (Syntax Extensions): Remove '#' special character. * sprint.adb (Process_TFAI_RR_Flags): Delete. (Sprint_Node_Actual) : Print '@' manually. : Likewise. : Do not print '#'. : Likewise. --- gcc/ada/sprint.adb | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) (limited to 'gcc/ada/sprint.adb') diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb index 8a8139d..6a02d8f 100644 --- a/gcc/ada/sprint.adb +++ b/gcc/ada/sprint.adb @@ -176,11 +176,6 @@ package body Sprint is -- Used to print output lines in Debug_Generated_Code mode (this is used -- as the argument for a call to Set_Special_Output in package Output). - procedure Process_TFAI_RR_Flags (Nod : Node_Id); - -- Given a divide, multiplication or division node, check the flags - -- Treat_Fixed_As_Integer and Rounded_Flags, and if set, output the - -- appropriate special syntax characters (# and @). - procedure Set_Debug_Sloc; -- If Dump_Node is non-empty, this routine sets the appropriate value -- in its Sloc field, from the current location in the debug source file @@ -471,21 +466,6 @@ package body Sprint is Write_Debug_Line (S, Debug_Sloc); end Print_Debug_Line; - --------------------------- - -- Process_TFAI_RR_Flags -- - --------------------------- - - procedure Process_TFAI_RR_Flags (Nod : Node_Id) is - begin - if Treat_Fixed_As_Integer (Nod) then - Write_Char ('#'); - end if; - - if Rounded_Result (Nod) then - Write_Char ('@'); - end if; - end Process_TFAI_RR_Flags; - -------- -- ps -- -------- @@ -2508,7 +2488,9 @@ package body Sprint is when N_Op_Divide => Sprint_Left_Opnd (Node); Write_Char (' '); - Process_TFAI_RR_Flags (Node); + if Rounded_Result (Node) then + Write_Char ('@'); + end if; Write_Operator (Node, "/ "); Sprint_Right_Opnd (Node); @@ -2548,18 +2530,15 @@ package body Sprint is when N_Op_Mod => Sprint_Left_Opnd (Node); - - if Treat_Fixed_As_Integer (Node) then - Write_Str (" #"); - end if; - Write_Operator (Node, " mod "); Sprint_Right_Opnd (Node); when N_Op_Multiply => Sprint_Left_Opnd (Node); Write_Char (' '); - Process_TFAI_RR_Flags (Node); + if Rounded_Result (Node) then + Write_Char ('@'); + end if; Write_Operator (Node, "* "); Sprint_Right_Opnd (Node); @@ -2583,11 +2562,6 @@ package body Sprint is when N_Op_Rem => Sprint_Left_Opnd (Node); - - if Treat_Fixed_As_Integer (Node) then - Write_Str (" #"); - end if; - Write_Operator (Node, " rem "); Sprint_Right_Opnd (Node); -- cgit v1.1