aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2010-05-30 12:01:55 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2010-05-30 12:01:55 +0000
commite6bdd0396c69b8f08da394aca0687fb46c188b4a (patch)
tree5828204a3c6b0360ef04bfe89a699185c8995230 /gcc/ada
parentc01fe45120921336cd37363f723fbf04e29b28a7 (diff)
downloadgcc-e6bdd0396c69b8f08da394aca0687fb46c188b4a.zip
gcc-e6bdd0396c69b8f08da394aca0687fb46c188b4a.tar.gz
gcc-e6bdd0396c69b8f08da394aca0687fb46c188b4a.tar.bz2
decl.c (gnat_to_gnu_entity): Reuse the TYPE_DECL of the equivalent type instead of building a new one.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Task_Type>: Reuse the TYPE_DECL of the equivalent type instead of building a new one. From-SVN: r160049
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/gcc-interface/decl.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 53a4260..7b909f8 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
2010-05-30 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Task_Type>: Reuse the
+ TYPE_DECL of the equivalent type instead of building a new one.
+
+2010-05-30 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/decl.c (gnat_to_gnu_entity): Adjust warning message.
Fix nits in comments.
* gcc-interface/misc.c (gnat_init_gcc_eh): Likewise.
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 71679fd..0fd7753 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -4382,11 +4382,11 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
case E_Task_Subtype:
case E_Protected_Type:
case E_Protected_Subtype:
+ /* Concurrent types are always transformed into their record type. */
if (type_annotate_only && No (gnat_equiv_type))
gnu_type = void_type_node;
else
- gnu_type = gnat_to_gnu_type (gnat_equiv_type);
-
+ gnu_decl = gnat_to_gnu_entity (gnat_equiv_type, NULL_TREE, 0);
maybe_present = true;
break;