This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Fix PR ada/78524


This is the failure of ACATS c41104a introduced by the recent match.pd change.

Fixed thusly, tested on x86_64-suse-linux, applied on the mainline.


2016-11-27  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/78524
	* gcc-interface/utils.c (max_size) <tcc_reference>: Add missing
	conversion to original type in the PLACEHOLDER_EXPR case.

-- 
Eric Botcazou
Index: gcc-interface/utils.c
===================================================================
--- gcc-interface/utils.c	(revision 242863)
+++ gcc-interface/utils.c	(working copy)
@@ -3548,7 +3548,9 @@ max_size (tree exp, bool max_p)
 	{
 	  tree val_type = TREE_TYPE (TREE_OPERAND (exp, 1));
 	  tree val = (max_p ? TYPE_MAX_VALUE (type) : TYPE_MIN_VALUE (type));
-	  return max_size (convert (get_base_type (val_type), val), true);
+	  return
+	    convert (type,
+		     max_size (convert (get_base_type (val_type), val), true));
 	}
 
       return exp;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]