Commit 54948285 by Javier Miranda Committed by Pierre-Marie de Rodat

[Ada] Disable expansion of 'Min/'Max of floating point types

2019-07-01  Javier Miranda  <miranda@adacore.com>

gcc/ada/

	* exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
	'Min/'Max on integer, enumeration, fixed point and floating
	point types since the CCG backend now provides in file
	standard.h routines to support it.

From-SVN: r272858
parent 5a428808
2019-07-01 Javier Miranda <miranda@adacore.com>
* exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
'Min/'Max on integer, enumeration, fixed point and floating
point types since the CCG backend now provides in file
standard.h routines to support it.
2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
* impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
......
......@@ -1694,9 +1694,15 @@ package body Exp_Attr is
Check_Restriction (No_Implicit_Conditionals, N);
-- In Modify_Tree_For_C mode, we rewrite as an if expression
if Modify_Tree_For_C then
-- In Modify_Tree_For_C mode, we rewrite as an if expression (unless it
-- is supported).
if Modify_Tree_For_C
and then not Is_Integer_Type (Etype (N))
and then not Is_Enumeration_Type (Etype (N))
and then not Is_Fixed_Point_Type (Etype (N))
and then not Is_Floating_Point_Type (Etype (N))
then
declare
Loc : constant Source_Ptr := Sloc (N);
Typ : constant Entity_Id := Etype (N);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment