From f10ff6cc46ab7e851afbaf05818f4e9db0f8a335 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 4 Aug 2014 12:54:14 +0200 Subject: [PATCH] [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/ChangeLog | 18 ++++++++++++++++ gcc/ada/gcc-interface/Makefile.in | 19 ++++++++++------- gcc/ada/gcc-interface/decl.c | 34 +++++++++++++------------------ gcc/ada/gcc-interface/trans.c | 15 ++++++++------ 4 files changed, 53 insertions(+), 33 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ea254043647..affb324903b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,21 @@ +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. + 2014-08-04 Robert Dewar * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index dddbf757c03..07d9828f775 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -451,8 +451,10 @@ LIB_VERSION = $(strip $(shell grep ' Library_Version :' $(fsrcpfx)ada/gnatvsn.ad # Additionnal object files from C source to be added to libgnat. EXTRA_LIBGNAT_OBJS= -# Additionnal C source file to be added to libgnat without corresponding object -# file (included files). + +# Additionnal C source files to be added to libgnat without corresponding +# object file (#included files). This should include at least the GNAT +# specific header files required to rebuild the runtime library from sources. EXTRA_LIBGNAT_SRCS= # GCC spec files to be installed in $(libsubdir), so --specs= @@ -588,6 +590,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(target_cpu) $(target_vendor) $ EH_MECHANISM=-gcc EXTRA_LIBGNAT_OBJS+=affinity.o sigtramp-vxworks.o + EXTRA_LIBGNAT_SRCS+=sigtramp.h else ifeq ($(strip $(filter-out kernel-smp,$(THREAD_KIND))),) LIBGNAT_TARGET_PAIRS += \ @@ -618,6 +621,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(target_cpu) $(target_vendor) $ endif EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o + EXTRA_LIBGNAT_SRCS+=sigtramp.h endif endif @@ -672,6 +676,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(target_cpu) $(target_vendor) EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o + EXTRA_LIBGNAT_SRCS+=sigtramp.h # Extra pairs for the vthreads runtime ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),) @@ -736,6 +741,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksmils,$(target_cpu) $(target_vendo EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o EXTRA_LIBGNAT_OBJS+=vx_stack_info.o sigtramp-vxworks.o + EXTRA_LIBGNAT_SRCS+=sigtramp.h GNATRTL_SOCKETS_OBJS = ifeq ($(strip $(filter-out yes,$(TRACE))),) @@ -864,7 +870,7 @@ ifeq ($(strip $(filter-out sparc% wrs vx%,$(target_cpu) $(target_vendor) $(targe endif # x86 VxWorks -ifeq ($(strip $(filter-out %86 wrs vxworks,$(target_cpu) $(target_vendor) $(target_os))),) +ifeq ($(strip $(filter-out %86 wrs vxworks vxworks7,$(target_cpu) $(target_vendor) $(target_os))),) LIBGNAT_TARGET_PAIRS = \ a-intnam.ads= 0; index--) { tem = build_nonshared_array_type (tem, gnu_index_types[index]); - if (Reverse_Storage_Order (gnat_entity)) + if (Reverse_Storage_Order (gnat_entity) && !GNAT_Mode) sorry ("non-default Scalar_Storage_Order"); TYPE_MULTI_ARRAY_P (tem) = (index > 0); if (array_type_has_nonaliased_component (tem, gnat_entity)) @@ -2916,7 +2911,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) gnu_type = make_node (tree_code_for_record_type (gnat_entity)); TYPE_NAME (gnu_type) = gnu_entity_name; TYPE_PACKED (gnu_type) = (packed != 0) || has_rep; - if (Reverse_Storage_Order (gnat_entity) && !GNAT_Mode) sorry ("non-default Scalar_Storage_Order"); process_attributes (&gnu_type, &attr_list, true, gnat_entity); 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) -- 2.30.2