diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-23 10:56:12 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-23 10:56:12 +0000 |
commit | 44fc8df61d7612b40af549efb9cebf3e1975edd1 (patch) | |
tree | a3057050b9c5ee96e9c6f46bb7399e5b15509865 /gcc/ada/gcc-interface/misc.c | |
parent | f34c0696554e1d9fd964247aebc52f2706192bbe (diff) |
* gcc-interface/misc.c (gnat_get_subrange_bounds): Fix thinko.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147820 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
-rw-r--r-- | gcc/ada/gcc-interface/misc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index bd6b51af118b..6a601bbdd128 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 |