aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils2.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-08-30 16:46:12 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-08-30 16:46:12 +0000
commit4f1a975cc19d5cd5ce2fa7142044a77eeffb5572 (patch)
treed683a5ca69d1dfd075af708ef9c2fa857e138a37 /gcc/ada/gcc-interface/utils2.c
parentf2991b48202740f19566099850048e8718da03b1 (diff)
downloadgcc-4f1a975cc19d5cd5ce2fa7142044a77eeffb5572.zip
gcc-4f1a975cc19d5cd5ce2fa7142044a77eeffb5572.tar.gz
gcc-4f1a975cc19d5cd5ce2fa7142044a77eeffb5572.tar.bz2
ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
* gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check. * gcc-interface/utils2.c (build_binary_op): Tighten condition. (build_unary_op): Likewise. From-SVN: r178335
Diffstat (limited to 'gcc/ada/gcc-interface/utils2.c')
-rw-r--r--gcc/ada/gcc-interface/utils2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c
index 25e293d..897f328 100644
--- a/gcc/ada/gcc-interface/utils2.c
+++ b/gcc/ada/gcc-interface/utils2.c
@@ -544,7 +544,7 @@ build_binary_op (enum tree_code op_code, tree result_type,
operation_type = TREE_TYPE (TYPE_FIELDS (operation_type));
if (operation_type
- && !AGGREGATE_TYPE_P (operation_type)
+ && TREE_CODE (operation_type) == INTEGER_TYPE
&& TYPE_EXTRA_SUBTYPE_P (operation_type))
operation_type = get_base_type (operation_type);
@@ -1002,7 +1002,7 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand)
operation_type = TREE_TYPE (TYPE_FIELDS (operation_type));
if (operation_type
- && !AGGREGATE_TYPE_P (operation_type)
+ && TREE_CODE (operation_type) == INTEGER_TYPE
&& TYPE_EXTRA_SUBTYPE_P (operation_type))
operation_type = get_base_type (operation_type);