From: Eric Botcazou Date: Sun, 27 Nov 2016 22:04:13 +0000 (+0000) Subject: re PR ada/78524 (failure of ACATS c41104a at -O0) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6724cebe761b8f5cae319f267824f62c5535a74a;p=gcc.git re PR ada/78524 (failure of ACATS c41104a at -O0) PR ada/78524 * gcc-interface/utils.c (max_size) : Add missing conversion to original type in the PLACEHOLDER_EXPR case. From-SVN: r242902 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d89b9674556..ca438dbf626 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2016-11-27 Eric Botcazou + + PR ada/78524 + * gcc-interface/utils.c (max_size) : Add missing + conversion to original type in the PLACEHOLDER_EXPR case. + 2016-11-27 Eric Botcazou PR ada/78531 diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index fd6c2029d03..cde17fe3b36 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -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;