From f10ff6cc46ab7e851afbaf05818f4e9db0f8a335 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 4 Aug 2014 12:54:14 +0200 Subject: [multiple changes] 2014-08-04 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity) : Deal with renaming discriminants in tagged types first. * gcc-interface/trans.c (gnat_to_gnu) : 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 Olivier Hainque * 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. From-SVN: r213569 --- gcc/ada/gcc-interface/trans.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'gcc/ada/gcc-interface/trans.c') diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 77a8f87..8117ee8 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) -- cgit v1.1