1. 19 Aug, 2019 16 commits
    • [Ada] Improve placement of warning on formals of generic subprograms · 4527ea2e
      This patch modifies the handling of warnings on unused formal parameters
      of generic subprograms. Previously such warnings were placed on the
      formal appearing in the subprogram declaration, in contrast with
      warnings on non-generic subprograms, where the warning is placed on the
      corresponding entity in the body of the subprogram. This patch makes the
      handling of both cases uniform. It is preferable to place the warning in
      the body because this also provides a better suggestion for the
      placement of an Unreferenced pragma to suppress the warning when desired.
      
      2019-08-19  Ed Schonberg  <schonberg@adacore.com>
      
      gcc/ada/
      
      	* sem_warn.adb (Check_References, Generic_Body_Formal): When a
      	formal parameter of a generic subprogram is not referenced in
      	the body, place the corresponding warning on the corresponding
      	entity in the specification of the generic body, as is done for
      	non-generic subprograms.
      
      gcc/testsuite/
      
      	* gnat.dg/warn28.adb, gnat.dg/warn28.ads: New testcase.
      
      From-SVN: r274649
      Ed Schonberg committed
    • [Ada] Factor out the "size for& too small..." error message · dafa2ae4
      Use a constant for the Size_Too_Small_Message, so if it changes, it
      won't change in one place but not another.  DRY. It might be better to
      move this code out of errout.adb, but that's for another day.
      
      2019-08-19  Bob Duff  <duff@adacore.com>
      
      gcc/ada/
      
      	* errout.ads (Size_Too_Small_Message): New constant.
      	* errout.adb, freeze.adb, sem_ch13.adb: Use it.
      
      From-SVN: r274648
      Bob Duff committed
    • [Ada] Fix internal error on subprogram instantiation with -gnatzc · 27b2fbc9
      This fixes a fallout of the recent change keeping the
      Is_Generic_Instance flag on the wrapper package built for the
      instantiation of a generic subprogram.
      
      There is no need to visit the Instance_Spec of an
      N_Subprogram_Instantiation node anymore because the regular processing
      for an N_Package_Declaration node now does the job for instantiations of
      generic subprograms.
      
      The following subprogram must compile again quietly with -gnatzc:
      
      with Gen_Proc;
      
      package RCI is
         pragma Remote_Call_Interface;
      
         procedure Inst_Proc is new Gen_Proc;
      
         procedure P (S : String);
      end RCI;
      
      generic
      procedure Gen_Proc (S : String);
      pragma Remote_Call_Interface (Gen_Proc);
      
      with Ada.Text_IO; use Ada.Text_IO;
      procedure Gen_Proc (S : String) is
      begin
         Put_Line ("Gen_Proc called: " & S);
      end Gen_Proc;
      
      2019-08-19  Eric Botcazou  <ebotcazou@adacore.com>
      
      gcc/ada/
      
      	* exp_dist.adb (Build_Package_Stubs): Do not specifically visit
      	the declarations of an N_Subprogram_Instantiation node.
      
      From-SVN: r274647
      Eric Botcazou committed
    • [Ada] Document missing gnatmetric switches · d41f5c1f
      2019-08-19  Bob Duff  <duff@adacore.com>
      
      gcc/ada/
      
      	* doc/gnat_ugn/gnat_utility_programs.rst: Document missing
      	metrics switches.
      
      From-SVN: r274646
      Bob Duff committed
    • [Ada] Minor refactorings · 086734ae
      2019-08-19  Piotr Trojanek  <trojanek@adacore.com>
      
      gcc/ada/
      
      	* sem_ch12.adb (Get_Unit_Instantiation_Node): Simplify Nkind_In
      	membership test.
      	* sem.adb (Depends_On_Main): Whitespace cleanup; only assign a
      	local variable if needed.
      
      From-SVN: r274645
      Piotr Trojanek committed
    • [Ada] Allow reading a borrowed object inside a call to a pledge function · ef1c6c0e
      No impact on regular compilation.
      
      2019-08-19  Claire Dross  <dross@adacore.com>
      
      gcc/ada/
      
      	* sem_spark.ads, sem_spark.adb (Is_Pledge_Function): New
      	parameter of the generic. Function used to decide whether a
      	function is a pledge function.
      	(Check_Not_Borrowed): Disable check inside the second parameter
      	of a pledge function for the path borrowed by the first
      	parameter. Also disable checks for entities inside a Global
      	contract.
      
      From-SVN: r274644
      Claire Dross committed
    • [Ada] Add formal function parameter equality to SPARK containers · 123f0215
      This patch adds a formal function parameter "=" (L, R : Element_Type) to
      SPARK containers. The equality that is used by default for Element_Type
      after this patch is the primitive equality and not the predefined any
      more. It also allows to use any function with the appropriate signature
      for the equality function.
      
      2019-08-19  Joffrey Huguet  <huguet@adacore.com>
      
      gcc/ada/
      
      	* libgnat/a-cfdlli.ads, libgnat/a-cfhama.ads,
      	libgnat/a-cfinve.ads, libgnat/a-cforma.ads,
      	libgnat/a-cofove.ads, libgnat/a-cofuma.ads,
      	libgnat/a-cofuve.ads: Add formal function parameter "=" (L, R :
      	Element_Type) to the generic packages.
      
      From-SVN: r274643
      Joffrey Huguet committed
    • [Ada] Opt: clean up left-overs of earlier implementation in comment · b1d7f6fe
      2019-08-19  Eric Botcazou  <ebotcazou@adacore.com>
      
      gcc/ada/
      
      	* opt.ads: Clean up left-overs of earlier implementation in
      	comment:
      
      From-SVN: r274642
      Eric Botcazou committed
    • [Ada] Representation clause for derived enumeration type is mishandled · d9ef7b97
      This patch fixes an old-standing problem with premature freezing. When a
      derived type declaration includes a constraint, we generate a subtype
      declaration of an anonymous base type, with the constraint given in the
      original type declaration, Conceptually, the bounds are converted to the
      new base type, and this conversion freezes (prematurely) that base type,
      when the bounds are simply literals.  As a result, a representation
      clause for the derived type is then rejected or ignared. This procedure
      recognizes the simple case of literal bounds in derived enumeration type
      declarations, which allows us to indicate that the conversions are not
      freeze points, and the subsequent representation clause can be accepted.
      
      2019-08-19  Ed Schonberg  <schonberg@adacore.com>
      
      gcc/ada/
      
      	* sem_ch3.adb (Derived_Enumeration_Type): Do no freeze anonymous
      	base type if the bounds in the derived type declaration are
      	literals of the type.
      
      gcc/testsuite/
      
      	* gnat.dg/rep_clause9.adb: New testcase.
      
      From-SVN: r274641
      Ed Schonberg committed
    • [Ada] Do not skip non-aliasing checking when inlining in GNATprove · c811dd91
      When code is inlinined for proof in the special mode for GNATprove, Ada
      rules about non-aliasing should still be checked. Now fixed.
      
      There is no impact on compilation.
      
      2019-08-19  Yannick Moy  <moy@adacore.com>
      
      gcc/ada/
      
      	* sem_res.adb (Resolve_Call): Check non-aliasing rules before
      	GNATprove inlining.
      
      From-SVN: r274640
      Yannick Moy committed
    • [Ada] Further cleanup in inlining machinery · a4bbe10d
      This gets rid of a small issue in the inlining machinery: under very
      peculiar circumstances, it would add a pending instantiation for the
      body of a generic package at the point of call to an inlined subprogram
      of the instance.  That's theoritically problematic because the saved
      context is that of the call and not that of the instance in this case,
      although the strict conditions ensure that this doesn't make a real
      difference in practice.
      
      Now that the machinery can perform the pending instantiations on demand,
      we can optimistically add more of them when the instantiations are
      analyzed and thus remove the problematic handling at the point of call.
      
      No functional changes.
      
      2019-08-19  Eric Botcazou  <ebotcazou@adacore.com>
      
      gcc/ada/
      
      	* inline.adb (Add_Inlined_Body): Do not add pending
      	instantiations.
      	* sem_ch12.adb (Needs_Body_Instantiated): New predicate.
      	(Analyze_Package_Instantiation): Use it to decide whether to add
      	a pending instantiation for the body of the package.
      
      From-SVN: r274639
      Eric Botcazou committed
    • [Ada] Fix thinko in Acc_Loop_to_gnu · 04d933fd
      This fixes a glitch introduced during the initial OpenACC work import
      process, causing crashes on any Acc_Parallel + Acc_Loop combination.
      
      2019-08-19  Olivier Hainque  <hainque@adacore.com>
      
      gcc/ada/
      
      	* gcc-interface/trans.c (Acc_Loop_to_gnu): Return the openacc
      	BIND_EXPR node we have constructed on purpose.  Remove unused
      	variable.
      
      gcc/testsuite/
      
      	* gnat.dg/openacc1.adb: New testcase.
      
      From-SVN: r274638
      Olivier Hainque committed
    • [Ada] Define the -fdump-scos option in lang.opt · c9d57552
      2019-08-19  Pierre-Marie de Rodat  <derodat@adacore.com>
      
      gcc/ada/
      
      	* gcc-interface/lang.opt (fdump-scos): Define.
      	* gcc-interface/misc.c (gnat_handle_option): Handle
      	OPT_fdump_scos.
      
      From-SVN: r274637
      Pierre-Marie de Rodat committed
    • PR target/91441 - Turn off -fsanitize=kernel-address if… · 6490e255
      PR target/91441 - Turn off -fsanitize=kernel-address if TARGET_ASAN_SHADOW_OFFSET is not implemented.
      
       - -fsanitize=kernel-address will call targetm.asan_shadow_offset ()
         at asan_shadow_offset, so it will crash if TARGET_ASAN_SHADOW_OFFSET
         is not implemented, that's mean -fsanitize=kernel-address is not
         supported for target without TARGET_ASAN_SHADOW_OFFSET implementation.
      
      gcc/ChangeLog:
      
      	PR target/91441
      	* toplev.c (process_options): Check TARGET_ASAN_SHADOW_OFFSET is
      	implemented for -fsanitize=kernel-address, and merge check logic
      	with -fsanitize=address.
      
      testsuite/ChangeLog:
      
      	PR target/91441
      	* gcc.target/riscv/pr91441.c: New.
      
      From-SVN: r274631
      Kito Cheng committed
    • re PR fortran/91485 (Erroneous conflict between variable x and operator(.x.)) · 88898d1e
      2019-08-18  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/91485
      	module.c (gfc_match_use): User defined operator cannot conflict with
      	a rename symbol.
      
      2019-08-18  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/91485
      	* gfortran.dg/pr91485.f90: New test.
      
      From-SVN: r274630
      Steven G. Kargl committed
    • Daily bump. · e00f8658
      From-SVN: r274629
      GCC Administrator committed
  2. 18 Aug, 2019 4 commits
  3. 17 Aug, 2019 13 commits
  4. 16 Aug, 2019 7 commits