summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-30 16:46:12 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-30 16:46:12 +0000
commitb1b2597a927472571ca5136a9ca58e72659d81a7 (patch)
treed683a5ca69d1dfd075af708ef9c2fa857e138a37 /gcc/ada
parentbbbacc0bf0173e75a82d663ff0ac96fdda438c06 (diff)
downloadgcc-b1b2597a927472571ca5136a9ca58e72659d81a7.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178335 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/gcc-interface/ada-tree.h2
-rw-r--r--gcc/ada/gcc-interface/utils2.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index ffa53871425..7159c35c829 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,11 @@
2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
+ * 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.
+
+2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
+
* raise-gcc.c: Do not include coretypes.h and tm.h.
(setup_to_install): Remove test for compiler macro.
* targext.c: Document use for the library.
diff --git a/gcc/ada/gcc-interface/ada-tree.h b/gcc/ada/gcc-interface/ada-tree.h
index 588c852cd95..2d0e6e4945e 100644
--- a/gcc/ada/gcc-interface/ada-tree.h
+++ b/gcc/ada/gcc-interface/ada-tree.h
@@ -106,7 +106,7 @@ do { \
/* Nonzero in an arithmetic subtype if this is a subtype not known to the
front-end. */
-#define TYPE_EXTRA_SUBTYPE_P(NODE) TYPE_LANG_FLAG_2 (NODE)
+#define TYPE_EXTRA_SUBTYPE_P(NODE) TYPE_LANG_FLAG_2 (INTEGER_TYPE_CHECK (NODE))
/* For RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE, nonzero if this is the
type for an object whose type includes its template in addition to
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c
index 25e293dd3e6..897f328565d 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);