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
+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.
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);