diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-03-11 16:12:22 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-03-11 16:12:22 -0800 |
commit | bc636c218f2b28da06cd1404d5b35d1f8cc43fd1 (patch) | |
tree | 764937d8460563db6132d7c75e19b95ef3ea6ea8 /gcc/ada | |
parent | 89d7be42db00cd0953e7d4584877cf50a56ed046 (diff) | |
parent | 7ad5a72c8bc6aa71a0d195ddfa207db01265fe0b (diff) | |
download | gcc-bc636c218f2b28da06cd1404d5b35d1f8cc43fd1.zip gcc-bc636c218f2b28da06cd1404d5b35d1f8cc43fd1.tar.gz gcc-bc636c218f2b28da06cd1404d5b35d1f8cc43fd1.tar.bz2 |
Merge from trunk revision 7ad5a72c8bc6aa71a0d195ddfa207db01265fe0b.
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 46 | ||||
-rw-r--r-- | gcc/ada/Makefile.rtl | 12 | ||||
-rw-r--r-- | gcc/ada/cstreams.c | 5 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 4 | ||||
-rw-r--r-- | gcc/ada/init.c | 8 | ||||
-rw-r--r-- | gcc/ada/libgnarl/s-osinte__linux.ads | 2 | ||||
-rw-r--r-- | gcc/ada/raise-gcc.c | 6 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_ch8.adb | 10 |
9 files changed, 86 insertions, 9 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 4397355..2f39282 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,49 @@ +2021-03-10 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/decl.c (gnat_to_gnu_entity): Build a TYPE_STUB_DECL + for the main variant of an enumeration type declared as volatile. + +2021-03-09 Mikael Pettersson <mikpelinux@gmail.com> + + * raise-gcc.c: On Cygwin include mingw32.h to prevent + windows.h from including x86intrin.h or emmintrin.h. + +2021-03-05 Eric Botcazou <ebotcazou@adacore.com> + + PR ada/99264 + * init.c (__gnat_alternate_sta) [Linux]: Remove preprocessor test on + MINSIGSTKSZ and bump size to 32KB. + * libgnarl/s-osinte__linux.ads (Alternate_Stack_Size): Bump to 32KB. + +2021-03-02 Mikael Pettersson <mikpelinux@gmail.com> + + PR bootstrap/98590 + * cstreams.c: Ensure fileno_unlocked() is visible on Cygwin. + +2021-03-02 Eric Botcazou <ebotcazou@adacore.com> + + PR ada/99095 + * sem_ch8.adb (Check_Constrained_Object): Restrict again the special + optimization for limited types to non-array types except in the case + of an extended return statement. + +2021-03-02 Eric Botcazou <ebotcazou@adacore.com> + + PR ada/99020 + * sem_ch3.adb (Build_Discriminated_Subtype): Set the Cloned_Subtype + only if the type is not private. + +2021-02-26 YunQiang Su <yunqiang.su@cipunited.com> + + PR ada/98996 + * Makefile.rtl: <mips*-*-linux*> + add 128Bit operation file for MIPS N64 and N32 to + LIBGNAT_TARGET_PAIRS and EXTRA_GNATRTL_NONTASKING_OBJS + +2021-02-12 Arnaud Charlet <charlet@adacore.com> + + * repinfo.ads, repinfo.adb (*SO_Ref*): Restore. + 2021-02-03 Eric Botcazou <ebotcazou@adacore.com> * gcc-interface/decl.c (components_to_record): If the first component diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index 35faf13..987eff0 100644 --- a/gcc/ada/Makefile.rtl +++ b/gcc/ada/Makefile.rtl @@ -2311,6 +2311,18 @@ ifeq ($(strip $(filter-out mips% linux%,$(target_cpu) $(target_os))),) s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \ system.ads<libgnat/system-linux-mips.ads + ifeq ($(strip $(filter-out mips64% mipsisa64%,$(target_cpu))),) + ifneq ($(strip $(MULTISUBDIR)),/32) + LIBGNAT_TARGET_PAIRS += $(GNATRTL_128BIT_PAIRS) + EXTRA_GNATRTL_NONTASKING_OBJS += $(GNATRTL_128BIT_OBJS) + endif + else + ifneq ($(strip $(filter /64 /n32,$(MULTISUBDIR))),) + LIBGNAT_TARGET_PAIRS += $(GNATRTL_128BIT_PAIRS) + EXTRA_GNATRTL_NONTASKING_OBJS += $(GNATRTL_128BIT_OBJS) + endif + endif + TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb EXTRA_GNATRTL_TASKING_OBJS=s-linux.o diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c index 4e00ded..8072320 100644 --- a/gcc/ada/cstreams.c +++ b/gcc/ada/cstreams.c @@ -37,6 +37,11 @@ #define _FILE_OFFSET_BITS 64 /* the define above will make off_t a 64bit type on GNU/Linux */ +/* Tell Cygwin's <stdio.h> to expose fileno_unlocked() */ +#if defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(_GNU_SOURCE) +#define _GNU_SOURCE +#endif + #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index aea191c..27ef51a 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -4713,6 +4713,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) const int quals = TYPE_QUAL_VOLATILE | (Is_Full_Access (gnat_entity) ? TYPE_QUAL_ATOMIC : 0); + /* This is required by free_lang_data_in_type to disable the ODR. */ + if (TREE_CODE (gnu_type) == ENUMERAL_TYPE) + TYPE_STUB_DECL (gnu_type) + = create_type_stub_decl (TYPE_NAME (gnu_type), gnu_type); gnu_type = change_qualified_type (gnu_type, quals); } diff --git a/gcc/ada/init.c b/gcc/ada/init.c index e76aa79..3ceb1a3 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -579,12 +579,8 @@ __gnat_error_handler (int sig, siginfo_t *si ATTRIBUTE_UNUSED, void *ucontext) #ifndef __ia64__ #define HAVE_GNAT_ALTERNATE_STACK 1 -/* This must be in keeping with System.OS_Interface.Alternate_Stack_Size. - It must be larger than MINSIGSTKSZ and hopefully near 2 * SIGSTKSZ. */ -# if 16 * 1024 < MINSIGSTKSZ -# error "__gnat_alternate_stack too small" -# endif -char __gnat_alternate_stack[16 * 1024]; +/* This must be in keeping with System.OS_Interface.Alternate_Stack_Size. */ +char __gnat_alternate_stack[32 * 1024]; #endif #ifdef __XENO__ diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads index f7af00b..2272f83 100644 --- a/gcc/ada/libgnarl/s-osinte__linux.ads +++ b/gcc/ada/libgnarl/s-osinte__linux.ads @@ -328,7 +328,7 @@ package System.OS_Interface is oss : access stack_t) return int; pragma Import (C, sigaltstack, "sigaltstack"); - Alternate_Stack_Size : constant := 16 * 1024; + Alternate_Stack_Size : constant := 32 * 1024; -- This must be in keeping with init.c:__gnat_alternate_stack Alternate_Stack : aliased char_array (1 .. Alternate_Stack_Size); diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c index 1446bfa..b096eba 100644 --- a/gcc/ada/raise-gcc.c +++ b/gcc/ada/raise-gcc.c @@ -79,6 +79,12 @@ typedef char bool; (SJLJ or DWARF). We need a consistently named interface to import from a-except, so wrappers are defined here. */ +#ifdef __CYGWIN__ +/* Prevent compile error due to unwind-generic.h including <windows.h>, + see comment above #include <windows.h> in mingw32.h. */ +#include "mingw32.h" +#endif + #ifndef IN_RTS /* For gnat1/gnatbind compilation: cannot use unwind.h, as it is for the target. So mimic configure... diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index c01bce1..4c7b8e7 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -10493,7 +10493,7 @@ package body Sem_Ch3 is then Create_Constrained_Components (Def_Id, Related_Nod, T, Elist); - else + elsif not Is_Private_Type (T) then Set_Cloned_Subtype (Def_Id, T); end if; end if; diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index 4689ae4..efff714 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -830,11 +830,19 @@ package body Sem_Ch8 is -- that are used in iterators. This is an optimization, but it -- also prevents typing anomalies when the prefix is further -- expanded. + -- Note that we cannot just use the Is_Limited_Record flag because -- it does not apply to records with limited components, for which -- this syntactic flag is not set, but whose size is also fixed. - elsif Is_Limited_Type (Typ) then + -- Note also that we need to build the constrained subtype for an + -- array in order to make the bounds explicit in most cases, but + -- not if the object comes from an extended return statement, as + -- this would create dangling references to them later on. + + elsif Is_Limited_Type (Typ) + and then (not Is_Array_Type (Typ) or else Is_Return_Object (Id)) + then null; else |