aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2016-11-27 22:04:13 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2016-11-27 22:04:13 +0000
commit6724cebe761b8f5cae319f267824f62c5535a74a (patch)
treeab4c57d20fa53e3e92fa4922f3863b1d09648ecf /gcc
parent18e5eb77b7eb185b83795ab47f1ec52dd88c1c98 (diff)
downloadgcc-6724cebe761b8f5cae319f267824f62c5535a74a.zip
gcc-6724cebe761b8f5cae319f267824f62c5535a74a.tar.gz
gcc-6724cebe761b8f5cae319f267824f62c5535a74a.tar.bz2
re PR ada/78524 (failure of ACATS c41104a at -O0)
PR ada/78524 * gcc-interface/utils.c (max_size) <tcc_reference>: Add missing conversion to original type in the PLACEHOLDER_EXPR case. From-SVN: r242902
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/gcc-interface/utils.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index d89b967..ca438db 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,11 @@
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.
+
+2016-11-27 Eric Botcazou <ebotcazou@adacore.com>
+
PR ada/78531
* namet.h (Max_Line_Length): Define.
(struct Bounded_String): Declare Chars with exact size.
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index fd6c202..cde17fe 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;