diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2009-05-23 10:56:12 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2009-05-23 10:56:12 +0000 |
commit | 22702f93614e482a1e17970afdf58f5aa8a72369 (patch) | |
tree | a3057050b9c5ee96e9c6f46bb7399e5b15509865 /gcc | |
parent | 03049a4e4057caafa15970e41be553a1043b643c (diff) | |
download | gcc-22702f93614e482a1e17970afdf58f5aa8a72369.zip gcc-22702f93614e482a1e17970afdf58f5aa8a72369.tar.gz gcc-22702f93614e482a1e17970afdf58f5aa8a72369.tar.bz2 |
* gcc-interface/misc.c (gnat_get_subrange_bounds): Fix thinko.
From-SVN: r147820
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/misc.c | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8c963db..27665e4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,9 @@ 2009-05-23 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/misc.c (gnat_get_subrange_bounds): Fix thinko. + +2009-05-23 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/decl.c (set_rm_size): Bypass the check for packed array types. diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index bd6b51a..6a601bb 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -661,8 +661,12 @@ gnat_get_subrange_bounds (const_tree gnu_type, tree *lowval, tree *highval) { tree min = TYPE_MIN_VALUE (gnu_type); tree max = TYPE_MAX_VALUE (gnu_type); - *lowval = TREE_CONSTANT (min) ? min : TYPE_GCC_MIN_VALUE (gnu_type); - *highval = TREE_CONSTANT (max) ? max : TYPE_GCC_MAX_VALUE (gnu_type); + /* If the bounds aren't constant, use non-representable constant values + to get the same effect on debug info without tree sharing issues. */ + *lowval + = TREE_CONSTANT (min) ? min : build_int_cstu (integer_type_node, -1); + *highval + = TREE_CONSTANT (max) ? max : build_int_cstu (integer_type_node, -1); } /* GNU_TYPE is a type. Determine if it should be passed by reference by |