* *
* C Implementation File *
* *
- * Copyright (C) 1992-2007, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2008, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
large as an integer not to overflow. REAL types are always fine, but
INTEGER or ENUMERAL types we are handed may be too short. We use a
base integer type node for the computations in this case and will
- convert the final result back to the incoming type later on. */
+ convert the final result back to the incoming type later on.
+ The base integer precision must be superior than 16. */
if (TREE_CODE (comp_type) != REAL_TYPE
- && TYPE_PRECISION (comp_type) < TYPE_PRECISION (integer_type_node))
- comp_type = integer_type_node;
+ && TYPE_PRECISION (comp_type) < TYPE_PRECISION (long_integer_type_node))
+ {
+ comp_type = long_integer_type_node;
+ gcc_assert (TYPE_PRECISION (comp_type) > 16);
+ }
gnu_base = build_cst_from_int (comp_type, Base);