]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gcc-interface/misc.c (gnat_get_subrange_bounds): Fix thinko.
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 23 May 2009 10:56:12 +0000 (10:56 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 23 May 2009 10:56:12 +0000 (10:56 +0000)
From-SVN: r147820

gcc/ada/ChangeLog
gcc/ada/gcc-interface/misc.c

index 8c963db93007636a731de67355f2e2d1ed8205f5..27665e4248d6640663b3718c2a3d18d57f48e90b 100644 (file)
@@ -1,3 +1,7 @@
+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
index bd6b51af118be69485b0898799635396052c06a0..6a601bbdd12861ab9e091a3ce69f962d8d0e2c08 100644 (file)
@@ -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