diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2012-08-19 14:07:58 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-08-19 14:07:58 +0000 |
commit | 08cb7d42bfd7810c05761df53348d582acc4eea1 (patch) | |
tree | 1fc0a2fd4cc949b2b12f6caf8201c7def77a2fef /gcc | |
parent | 594d6faafa9741bd445bd22c2d597276ef5a7db7 (diff) | |
download | gcc-08cb7d42bfd7810c05761df53348d582acc4eea1.zip gcc-08cb7d42bfd7810c05761df53348d582acc4eea1.tar.gz gcc-08cb7d42bfd7810c05761df53348d582acc4eea1.tar.bz2 |
decl.c (gnat_to_gnu_entity): Use proper dummy type for the temporary COMPONENT_REF built for a derived...
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Use proper
dummy type for the temporary COMPONENT_REF built for a derived tagged
type with discriminant.
From-SVN: r190514
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 711bea9..b9b63b1 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2012-08-19 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Use proper + dummy type for the temporary COMPONENT_REF built for a derived tagged + type with discriminant. + 2012-08-14 Diego Novillo <dnovillo@google.com> Merge from cxx-conversion branch. Re-implement VEC in C++. diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 9c44329..cb0f074 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -2988,6 +2988,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) if (Present (Parent_Subtype (gnat_entity))) { Entity_Id gnat_parent = Parent_Subtype (gnat_entity); + tree gnu_dummy_parent_type = make_node (RECORD_TYPE); tree gnu_parent; /* A major complexity here is that the parent subtype will @@ -2999,11 +3000,11 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) each of those discriminants to a COMPONENT_REF of the above dummy parent referencing the corresponding discriminant of the base type of the parent subtype. */ - gnu_get_parent = build3 (COMPONENT_REF, void_type_node, + gnu_get_parent = build3 (COMPONENT_REF, gnu_dummy_parent_type, build0 (PLACEHOLDER_EXPR, gnu_type), build_decl (input_location, FIELD_DECL, NULL_TREE, - void_type_node), + gnu_dummy_parent_type), NULL_TREE); if (has_discr) |