diff options
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 30 | ||||
-rw-r--r-- | gcc/ada/checks.adb | 7 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/Makefile.in | 4 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/ada-tree.h | 9 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 2 | ||||
-rw-r--r-- | gcc/ada/system-linux-m68k.ads | 7 |
6 files changed, 49 insertions, 10 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index dc8f27994d5..dda51d423b6 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,7 +1,33 @@ +2017-07-29 Jakub Jelinek <jakub@redhat.com> + + * gcc-interface/utils.c (gnat_write_global_declarations): Pass false + as new argument to the imported_module_or_decl debug hook. + +2017-07-25 Javier Miranda <miranda@adacore.com> + + * checks.adb (Apply_Divide_Checks): Ensure that operands are not + evaluated twice. + +2017-07-19 Jakub Jelinek <jakub@redhat.com> + + * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE, + TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL. + (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL. + +2017-07-18 Mike Frysinger <vapier@chromium.org> + + * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P). + (../../gnatlink$(exeext)): Likewise. + +2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> + + PR ada/81446 + * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All. + (Backend_Overflow_Checks): Set to True. + 2017-06-23 Jakub Jelinek <jakub@redhat.com> - * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false to - avoid UB. + * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false. 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com> diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 6162a0e38c0..a6670fa7697 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -1818,6 +1818,13 @@ package body Checks is and then ((not LOK) or else (Llo = LLB)) then + -- Ensure that expressions are not evaluated twice (once + -- for their runtime checks and once for their regular + -- computation). + + Force_Evaluation (Left, Mode => Strict); + Force_Evaluation (Right, Mode => Strict); + Insert_Action (N, Make_Raise_Constraint_Error (Loc, Condition => diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index 1c172037d92..b485c18ec21 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -2643,10 +2643,10 @@ gnatlink-re: ../stamp-tools gnatmake-re # stamp target in the parent directory whenever gnat1 is rebuilt # Likewise for the tools -../../gnatmake$(exeext): $(P) b_gnatm.o $(GNATMAKE_OBJS) +../../gnatmake$(exeext): b_gnatm.o $(GNATMAKE_OBJS) +$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) $(TOOLS_LIBS) $(TOOLS1_LIBS) -../../gnatlink$(exeext): $(P) b_gnatl.o $(GNATLINK_OBJS) +../../gnatlink$(exeext): b_gnatl.o $(GNATLINK_OBJS) +$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) $(TOOLS_LIBS) $(TOOLS1_LIBS) ../stamp-gnatlib-$(RTSDIR): diff --git a/gcc/ada/gcc-interface/ada-tree.h b/gcc/ada/gcc-interface/ada-tree.h index 511a0bd8173..2470c83c901 100644 --- a/gcc/ada/gcc-interface/ada-tree.h +++ b/gcc/ada/gcc-interface/ada-tree.h @@ -209,21 +209,24 @@ do { \ this is a conflict on the minval field, but there doesn't seem to be simple fix, so we'll live with this kludge for now. */ #define TYPE_OBJECT_RECORD_TYPE(NODE) \ - (TYPE_MINVAL (TREE_CHECK2 ((NODE), UNCONSTRAINED_ARRAY_TYPE, ENUMERAL_TYPE))) + (TYPE_MIN_VALUE_RAW (TREE_CHECK2 ((NODE), UNCONSTRAINED_ARRAY_TYPE, \ + ENUMERAL_TYPE))) /* For numerical types, this is the GCC lower bound of the type. The GCC type system is based on the invariant that an object X of a given type cannot hold at run time a value smaller than its lower bound; otherwise the behavior is undefined. The optimizer takes advantage of this and considers that the assertion X >= LB is always true. */ -#define TYPE_GCC_MIN_VALUE(NODE) (TYPE_MINVAL (NUMERICAL_TYPE_CHECK (NODE))) +#define TYPE_GCC_MIN_VALUE(NODE) \ + (TYPE_MIN_VALUE_RAW (NUMERICAL_TYPE_CHECK (NODE))) /* For numerical types, this is the GCC upper bound of the type. The GCC type system is based on the invariant that an object X of a given type cannot hold at run time a value larger than its upper bound; otherwise the behavior is undefined. The optimizer takes advantage of this and considers that the assertion X <= UB is always true. */ -#define TYPE_GCC_MAX_VALUE(NODE) (TYPE_MAXVAL (NUMERICAL_TYPE_CHECK (NODE))) +#define TYPE_GCC_MAX_VALUE(NODE) \ + (TYPE_MAX_VALUE_RAW (NUMERICAL_TYPE_CHECK (NODE))) /* For a FUNCTION_TYPE, if the subprogram has parameters passed by copy in/ copy out, this is the list of nodes used to specify the return values of diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 9e656579dda..475261b3682 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -5553,7 +5553,7 @@ gnat_write_global_declarations (void) FOR_EACH_VEC_SAFE_ELT (global_decls, i, iter) if (TREE_CODE (iter) == IMPORTED_DECL && !DECL_IGNORED_P (iter)) debug_hooks->imported_module_or_decl (iter, DECL_NAME (iter), - DECL_CONTEXT (iter), 0); + DECL_CONTEXT (iter), false, false); } /* ************************************************************************ diff --git a/gcc/ada/system-linux-m68k.ads b/gcc/ada/system-linux-m68k.ads index 9aa6143f262..71d4f5762fb 100644 --- a/gcc/ada/system-linux-m68k.ads +++ b/gcc/ada/system-linux-m68k.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (GNU/Linux/m68k Version) -- -- -- --- Copyright (C) 2014-2016, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2017, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -40,6 +40,9 @@ package System is -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada -- 2005, this is Pure in any case (AI-362). + pragma No_Elaboration_Code_All; + -- Allow the use of that restriction in units that WITH this unit + type Name is (SYSTEM_NAME_GNAT); System_Name : constant Name := SYSTEM_NAME_GNAT; @@ -126,7 +129,7 @@ private -- of the individual switch values. Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := False; + Backend_Overflow_Checks : constant Boolean := True; Command_Line_Args : constant Boolean := True; Configurable_Run_Time : constant Boolean := False; Denorm : constant Boolean := True; |