summaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/trans.c
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-04 10:54:14 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-04 10:54:14 +0000
commit9700ab47fe3ff62674cfd8983126dc623add593b (patch)
tree722577bd2a66fb922752e6be27a55faa51a34339 /gcc/ada/gcc-interface/trans.c
parentd8d887834cb24d26b450271939461c7177d47382 (diff)
downloadgcc-9700ab47fe3ff62674cfd8983126dc623add593b.tar.gz
2014-08-04 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with renaming discriminants in tagged types first. * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test the underlying type of the prefix. (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..." (process_freeze_entity): Reset the nodes of all the view of a type, if any. 2014-08-04 Doug Rupp <rupp@adacore.com> Olivier Hainque <hainque@adacore.com> * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7 and remove incorrect EH_MECHANISM macros. Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to EXTRA_LIBGNAT_OBJS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213569 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r--gcc/ada/gcc-interface/trans.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 77a8f87f2d1..8117ee8f546 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -1417,7 +1417,8 @@ Pragma_to_gnu (Node_Id gnat_node)
gcc_unreachable ();
}
- if (Present (Next (gnat_temp)))
+ /* Deal with optional pattern (but ignore Reason => "..."). */
+ if (Present (Next (gnat_temp)) && No (Chars (Next (gnat_temp))))
{
/* pragma Warnings (On | Off, Name) is handled differently. */
if (Nkind (Expression (Next (gnat_temp))) != N_String_Literal)
@@ -5767,7 +5768,7 @@ gnat_to_gnu (Node_Id gnat_node)
/* For discriminant references in tagged types always substitute the
corresponding discriminant as the actual selected component. */
- if (Is_Tagged_Type (Etype (gnat_prefix)))
+ if (Is_Tagged_Type (Underlying_Type (Etype (gnat_prefix))))
while (Present (Corresponding_Discriminant (gnat_field)))
gnat_field = Corresponding_Discriminant (gnat_field);
@@ -7910,12 +7911,14 @@ process_freeze_entity (Node_Id gnat_node)
{
Entity_Id full_view = Full_View (gnat_entity);
+ save_gnu_tree (full_view, NULL_TREE, false);
+
if (IN (Ekind (full_view), Private_Kind)
&& Present (Underlying_Full_View (full_view)))
- full_view = Underlying_Full_View (full_view);
-
- if (present_gnu_tree (full_view))
- save_gnu_tree (full_view, NULL_TREE, false);
+ {
+ full_view = Underlying_Full_View (full_view);
+ save_gnu_tree (full_view, NULL_TREE, false);
+ }
}
if (IN (kind, Type_Kind)