1. 11 Jul, 2019 12 commits
    • [Ada] Compile-time evaluation of predicate checks · a081ded4
      This patch recognizes case of dynamic predicates on integer subtypes
      that are simple enough to be evaluated statically when the argument is
      itself a literal. Even though in many cases such predicate checks will
      be removed by the back-end with any level of optimization, it is
      preferable to perform this constant folding in the front-end, wich also
      cleans up the output of CCG, as well as producing explicit warnings when
      the test will fail.
      
      2019-07-11  Ed Schonberg  <schonberg@adacore.com>
      
      gcc/ada/
      
      	* exp_ch6.adb (Can_Fold_Predicate_Call): New function,
      	subsidiary of Expand_Call_Helper, to compute statically a
      	predicate check when the argument is a static integer.
      
      gcc/testsuite/
      
      	* gnat.dg/predicate11.adb: New testcase.
      
      From-SVN: r273386
      Ed Schonberg committed
    • [Ada] Link error due to negated intrinsic comparison · dd8b4c11
      This patch corrects the resolution of operator "not" when the expression
      being negated is an equality operator to prevent the transformation of
      an intrinsic equality operator into a function call.
      
      2019-07-11  Hristian Kirtchev  <kirtchev@adacore.com>
      
      gcc/ada/
      
      	* sem_res.adb (Resolve_Op_Not): Do not rewrite an equality
      	operator into a function call when the operator is intrinsic.
      
      gcc/testsuite/
      
      	* gnat.dg/equal9.adb: New testcase.
      
      From-SVN: r273385
      Hristian Kirtchev committed
    • [Ada] Fix crash on dynamic predicate when generating SCOs · e2a2d494
      A pragma Check for Dynamic_Predicate does not correspond to any source
      construct that has a provisionally-disabled SCO.
      
      2019-07-11  Thomas Quinot  <quinot@adacore.com>
      
      gcc/ada/
      
      	* sem_prag.adb (Analyze_Pragma, case pragma Check): Do not call
      	Set_SCO_Pragma_Enabled for the dynamic predicate case.
      
      gcc/testsuite/
      
      	* gnat.dg/scos1.adb: New testcase.
      
      From-SVN: r273384
      Thomas Quinot committed
    • [Ada] Missing finalization of private protected type · a3d1ca01
      This patch updates the analysis of protected types to properly mark the
      type as having controlled components when it contains at least one such
      component. This in turn marks a potential partial view as requiring
      finalization actions.
      
      ------------
      -- Source --
      ------------
      
      --  types.ads
      
      with Ada.Finalization; use Ada.Finalization;
      
      package Types is
         type Ctrl_Typ is new Controlled with null record;
         procedure Finalize (Obj : in out Ctrl_Typ);
      
         type Prot_Typ is limited private;
      
      private
         protected type Prot_Typ is
         private
            Comp : Ctrl_Typ;
         end Prot_Typ;
      end Types;
      
      --  types.adb
      
      with Ada.Text_IO; use Ada.Text_IO;
      
      package body Types is
         procedure Finalize (Obj : in out Ctrl_Typ) is
         begin
            Put_Line ("finalize");
         end Finalize;
      
         protected body Prot_Typ is
         end Prot_Typ;
      end Types;
      
      --  main.adb
      
      with Types; use Types;
      
      procedure Main is
         Obj : Prot_Typ;
      begin
         null;
      end Main;
      
      2019-07-11  Hristian Kirtchev  <kirtchev@adacore.com>
      
      gcc/ada/
      
      	* exp_util.ads, exp_util.adb (Needs_Finalization): Move to
      	Sem_Util.
      	* sem_ch9.adb (Analyze_Protected_Definition): Code cleanup. Mark
      	the protected type as having controlled components when it
      	contains at least one such component.
      	* sem_util.ads, sem_util.adb (Needs_Finalization): New
      	function.
      
      From-SVN: r273383
      Hristian Kirtchev committed
    • [Ada] New Repinfo.Input unit to read back JSON representation info. · 6c165711
      For some time the Repinfo unit has been able to output the
      representation information in the JSON data interchange format in
      addition to the usual text and binary formats.
      
      The new Repinfo.Input unit makes it possible to read back this
      information under this format and make it available to clients, the main
      one being ASIS.
      
      The big advantage of using this approach over manipulating a binary blob
      is that the writer and the reader of the JSON representation need not be
      binary compatible, i.e. in practice need not be the same version of the
      compiler or ASIS for the same target.
      
      The patch also adds a -gnatd_j switch to read back the information in
      the compiler itself, which makes it easy to keep the writer and the
      reader in sync using only one tool, namely the compiler.  The typical
      usage is:
      
        gcc -c p.ads -gnatR4js
        gcc -c p.ads -gnatd_j
      
      to exercise respectively the writer and the reader from the compiler.
      
      2019-07-11  Eric Botcazou  <ebotcazou@adacore.com>
      
      gcc/ada/
      
      	* alloc.ads (Rep_JSON_Table_Initial): New constant.
      	(Rep_JSON_Table_Increment): Likewise.
      	* debug.adb: Document -gnatd_j switch.
      	* gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add
      	repinfo-input.o.
      	* gnat1drv.adb: Add with clause for Repinfo.Input.
      	Add with and use clauses for Sinput.
      	(Read_JSON_Files_For_Repinfo): New procedure.
      	(Gnat1drv1): Deal with -gnatd_j switch.
      	* repinfo-input.ad[sb]: New unit.
      	* snames.ads-tmpl (Name_Discriminant): New constant.
      	(Name_Operands): Likewise.
      
      From-SVN: r273382
      Eric Botcazou committed
    • [Ada] No warning for guaranteed accessibility check failures · ccf17305
      This patch corrects the generation of dynamic accessibility checks which
      are guaranteed to trigger errors during run time so as to give the user
      proper warning during unit compiliation.
      
      2019-07-11  Justin Squirek  <squirek@adacore.com>
      
      gcc/ada/
      
      	* checks.adb (Apply_Accessibility_Check): Add check for constant
      	folded conditions on accessibility checks.
      
      gcc/testsuite/
      
      	* gnat.dg/access7.adb: New testcase.
      
      From-SVN: r273381
      Justin Squirek committed
    • [Ada] GNAT.Threads: Add a Get_Thread overload taking a Task_Id · a1a8b172
      2019-07-11  Arnaud Charlet  <charlet@adacore.com>
      
      gcc/ada/
      
      	* libgnarl/g-thread.ads, libgnarl/g-thread.adb (Get_Thread):
      	Update comments. Add new version taking a Task_Id.
      
      From-SVN: r273380
      Arnaud Charlet committed
    • [Ada] Elaboration order v4.0 and infinite loops · 490ed9ba
      This patch introduces binder switch -d_S which prompts the various
      phases of the elaboration order mechanism to output a short message
      concerning their commencement and completion. The output is useful when
      trying to determine whether a phase is stuck in an infinite loop.
      
      ------------
      -- Source --
      ------------
      
      --  main.adb
      
      procedure Main is begin null; end Main;
      
      ----------------------------
      -- Compilation and output --
      ----------------------------
      
      $ gnatmake -q main.adb -bargs -d_S -d_V
      elaborating units...
      collecting units...
      units collected.
      constructing library graph...
      validating library graph...
      library graph validated.
      library graph constructed.
      constructing invocation graph...
      validating invocation graph...
      invocation graph validated.
      invocation graph constructed.
      augmenting library graph...
      library graph augmented.
      discovering components...
      components discovered.
      validating elaboration order...
      elaboration order validated.
      units elaborated.
      
      2019-07-11  Hristian Kirtchev  <kirtchev@adacore.com>
      
      gcc/ada/
      
      	* bindo.adb: Update the section of switches and debugging
      	elaboration issues.
      	* bindo.ads: Add type Elaboration_Phase.
      	* bindo-augmentors.adb: Add use clause for
      	Bindo.Writers.Phase_Writers.
      	(Augment_Library_Graph): Signal the start and end of the
      	aubmentation phase.
      	* bindo-builders.adb: Add with and use clause for Bindo.Writers.
      	Add use clause for Bindo.Writers.Phase_Writers.
      	(Build_Invocation_Graph): Signal the start and end of the
      	invocation graph construction phase.
      	(Build_Library_Graph): Signal the start and end of the library
      	graph construction phase.
      	* bindo-diagnostics.adb: Add use clause for
      	Bindo.Writers.Phase_Writers.
      	(Diagnose_Cycle): Signal the start and end of the cycle
      	diagnostic phase.
      	* bindo-elaborators.adb: Add use clause for
      	Bindo.Writers.Phase_Writers.
      	(Elaborate_Units): Signal the start and end of the unit
      	elaboration phase.
      	* bindo-graphs.adb: Add use clause for
      	Bindo.Writers.Phase_Writers.
      	(Find_Components): Signal the start and end of the component
      	discovery phase.
      	(Find_Cycles): Signal the start and end of the cycle discovery
      	phase.
      	* bindo-units.adb: Add with and use clause for Bindo.Writers.
      	Add use clause for Bindo.Writers.Phase_Writers.
      	(Collect_Elaborable_Units): Signal the start and end of the unit
      	collection phase.
      	* bindo-validators.adb: Add with and use clause for
      	Bindo.Writers.  Add use clause for Bindo.Writers.Phase_Writers.
      	(Validate_Cycles, Validate_Elaboration_Order,
      	Validate_Invocation_Graph, Validate_Library_Graph): Signal the
      	start and end of the libray graph validation phase.
      	* bindo-writers.ads, bindo-writers.adb: Add new nested package
      	Phase_Writers.
      	* debug.adb: Update the documentation of switch d_S.
      
      From-SVN: r273379
      Hristian Kirtchev committed
    • [Ada] Avoid spurious warning on wrong order of operator call arguments · a34badbd
      GNAT issues a warning under -gnatwa when actuals for a call are named
      like the formals, but in a different order. This is inappropriate for
      calls to operators in infix form, when e.g. Right <= Left is in general
      the intended order. Special case calls to operators to avoid that
      spurious warning.
      
      2019-07-11  Yannick Moy  <moy@adacore.com>
      
      gcc/ada/
      
      	* sem_res.adb (Check_Argument_Order): Special case calls to
      	operators.
      
      gcc/testsuite/
      
      	* gnat.dg/warn21.adb, gnat.dg/warn21.ads: New testcase.
      
      From-SVN: r273378
      Yannick Moy committed
    • Do not try to further refine a VR_UNDEFINED result when intersecting · 435a6d95
      value_ranges.
      
      From-SVN: r273377
      Aldy Hernandez committed
    • re PR middle-end/91131 (Bad bitfield coalescing) · 3e66e7b0
      2019-07-11  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/91131
      	* gimplify.c (gimplify_compound_literal_expr): Force a temporary
      	when the object is volatile and we have not cleared it even though
      	there are no nonzero elements.
      
      	* gcc.target/i386/pr91131.c: New testcase.
      
      From-SVN: r273376
      Richard Biener committed
    • Daily bump. · 639000e2
      From-SVN: r273375
      GCC Administrator committed
  2. 10 Jul, 2019 28 commits
    • predicates.md (cint34_operand): Update SIGNED_34BIT_OFFSET_P call. · 4ded6adc
      2019-07-10  Michael Meissner  <meissner@linux.ibm.com>
      
      	* config/rs6000/predicates.md (cint34_operand): Update
      	SIGNED_34BIT_OFFSET_P call.
      	(pcrel_address): Update SIGNED_34BIT_OFFSET_P call.
      	(pcrel_external_address): Update SIGNED_34BIT_OFFSET_P call.
      	* config/rs6000/rs6000.c (rs6000_prefixed_address): Update
      	SIGNED_16BIT_OFFSET_P and SIGNED_34BIT_OFFSET_P calls.
      	* config/rs6000/rs6000.h (SIGNED_16BIT_OFFSET_P): Remove EXTRA
      	argument.
      	(SIGNED_34BIT_OFFSET_P): Remove EXTRA argument.
      	(SIGNED_16BIT_OFFSET_EXTRA_P): New macro, like
      	SIGNED_16BIT_OFFSET_P with an EXTRA argument.
      	(SIGNED_34BIT_OFFSET_EXTRA_P): New macro, like
      	SIGNED_34BIT_OFFSET_P with an EXTRA argument.
      
      From-SVN: r273370
      Michael Meissner committed
    • [Darwin, PPC] Collate the system library spec into one expression. · 4b5c5391
      There's no need to redefine this dependent on the target header (that only
      works in the case that we have self-hosting which is less and less likely
      for the older system versions).
      
      Actually, what we need is for the correct library set to be used based
      on the SDK(s) that can target the chosen system.
      
      gcc/ChangeLog:
      
      2019-07-10  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* config/rs6000/darwin.h (LIB_SPEC): Collate this spec here.
      	* config/rs6000/darwin7.h (LIB_SPEC): Remove.
      	* config/rs6000/darwin8.h (LIB_SPEC): Remove.
      	(DEF_MIN_OSX_VERSION): New.
      
      From-SVN: r273369
      Iain Sandoe committed
    • Fix folding of vector EQ/NE · 2cb73623
      For vector1 != vector2, we returned false if any elements were equal,
      rather than if all elements were equal.
      
      2019-07-10  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* fold-const.c (fold_relational_const): Fix folding of
      	vector-to-scalar NE_EXPRs.
      	(test_vector_folding): Add more tests.
      
      From-SVN: r273366
      Richard Sandiford committed
    • [arm] Fix BE index for single-var vector initialisers (PR91060) · 8ba8ebff
      If a vector constructor has a single nonconstant element,
      neon_expand_vector_init loads the constant lanes and then inserts the
      nonconstant value.  The problem was that it was doing the insertion
      using the arm_neon.h neon_vset_lane<mode> patterns, which use
      architectural lane numbering rather than GCC lane numbering.
      
      2019-07-10  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	PR target/91060
      	* config/arm/iterators.md (V2DI_ONLY): New mode iterator.
      	* config/arm/neon.md (vec_set<mode>_internal): Add a '@' prefix.
      	(vec_setv2di_internal): Reexpress as...
      	(@vec_set<V2DI_ONLY:mode>_internal): ...this.
      	* config/arm/arm.c (neon_expand_vector_init): Use gen_vec_set_internal
      	rather than gen_neon_vset_lane<mode>.
      
      From-SVN: r273365
      Richard Sandiford committed
    • compiler: finalize methods when importing types · 4b8d9b23
          
          This patch changes the compiler to be more aggressive about finalizing
          methods on imported types, to avoid problems with interface types that
          are imported but remain unreachable until a later stage in the compilation.
          
          The normal pattern prior to this change was that the import process would
          leave imported interface types alone, and rely on Gogo::finalize_methods
          to locate and finalize all interface types at a later point. This way
          of doing things was not working in all cases due to the fact that we can
          import an interface type that is only reachable from the body of an
          inlinable function, meaning that we can't "find" the type during
          the methods finalize phase.
          
          The importer's Import::read_types() now makes a pass over all imported
          types to finalize methods on any newly imported type, which takes care
          of the issue.
          
          New test case for this problem in CL 185517.
          
          Fixes golang/go#33013
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/185518
      
      From-SVN: r273364
      Ian Lance Taylor committed
    • compiler: add break label in 1,2-case select statement lowering · 41112d95
          
          CL 184998 added optimizations for one- and two-case select
          statements. But it didn't handle break statement in the select
          case correctly. Specifically, it didn't add the label definition,
          so it could result in a dangling goto. This CL fixes this, by
          adding the label definition.
          
          A test case is CL 185520.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/185519
      
      From-SVN: r273359
      Ian Lance Taylor committed
    • PR testsuite/91132 - test gcc.dg/strlenopt-67.c in r273317 fails · b59ff586
      gcc/testsuite/ChangeLog:
      	* gcc.dg/strlenopt-67.c: Removed second copy of test.
      
      From-SVN: r273358
      Martin Sebor committed
    • re PR target/91102 (aarch64 ICE on Linux kernel with -Os starting with r270266) · 613caed2
      2019-07-10  Vladimir Makarov  <vmakarov@redhat.com>
      
      	PR target/91102
      	* lra-constraints.c (process_alt_operands): Don't match user
      	defined regs only if they are early clobbers.
      
      2019-07-10  Vladimir Makarov  <vmakarov@redhat.com>
      
      	PR target/91102
      	* gcc.target/aarch64/pr91102.c: New test.
      
      From-SVN: r273357
      Vladimir Makarov committed
    • Fix wi::lshift · 12bb0436
      2019-07-10  Marc Glisse  <marc.glisse@inria.fr>
      
      	* wide-int.h (wi::lshift): Reject negative values for the fast path.
      
      From-SVN: r273356
      Marc Glisse committed
    • re PR tree-optimization/91126 (Incorrect constant propagation of BIT_FIELD_REF) · 95efa227
      2019-07-10  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/91126
      	* tree-ssa-sccvn.c (n_walk_cb_data::push_partial_def): Adjust
      	native encoding offset for BYTES_BIG_ENDIAN.
      	(vn_reference_lookup_3): Likewise.
      
      	* gcc.dg/torture/pr91126.c: New testcase.
      
      From-SVN: r273355
      Richard Biener committed
    • gimple-parser.c (c_parser_gimple_postfix_expression): Support _Literal (int *)… · 8389386c
      gimple-parser.c (c_parser_gimple_postfix_expression): Support _Literal (int *) &x for address literals.
      
      2019-07-10  Richard Biener  <rguenther@suse.de>
      
      	c/
      	* gimple-parser.c (c_parser_gimple_postfix_expression): Support
      	_Literal (int *) &x for address literals.
      
      	* tree-ssa-sccvn.c (vn_reference_lookup_3): Look at valueized
      	LHS whenever possible.
      
      	* gcc.dg/torture/ssa-fre-5.c: New testcase.
      	* gcc.dg/torture/ssa-fre-6.c: Likewise.
      	* gcc.dg/torture/ssa-fre-7.c: Likewise.
      
      From-SVN: r273354
      Richard Biener committed
    • [Ada] System.Strings.Stream_Ops: do not depend on Stream_IO · f861d731
      Dependence was only from Ada.Streams.Stream_IO.End_Error exception which
      is renaming of the Ada.IO_Exceptions.End_Error. Use
      Ada.IO_Exceptions.End_Error directly.
      
      2019-07-10  Dmitriy Anisimkov  <anisimko@adacore.com>
      
      gcc/ada/
      
      	* libgnat/s-ststop.adb: Remove System.Strings.Stream_Ops
      	dependence on System.Streams.Stream_IO.
      
      From-SVN: r273353
      Dmitriy Anisimkov committed
    • [Ada] Spurious run-time error with 64-bit modular types · 4669743b
      As a lexical element an integer literal has type Universal_Integer, i.e
      is compatible with any integer type. This is semantically consistent and
      simplifies type checking and subsequent constant folding when
      applicable.  An exception is caused by 64-bit modular types, whose upper
      bound is not representable in a non-static context that will use 64-bit
      integers at run-time. For such cases we need to preserve the information
      that the analyzed literal has that modular type. For simplicity we
      preseve the information for all integer literals that result from a
      modular operation.  This happens after prior analysis (or construction)
      of the literal, and after type checking and resolution.
      
      2019-07-10  Ed Schonberg  <schonberg@adacore.com>
      
      gcc/ada/
      
      	* sem_ch2.adb (Analyze_Integer_Literal): Preserve the type of
      	the literal if prior analysis determined that its type is a
      	modular integer type.
      
      gcc/testsuite/
      
      	* gnat.dg/modular5.adb: New testcase.
      
      From-SVN: r273352
      Ed Schonberg committed
    • [Ada] Do not attempt to re-arm guard page on x86_64-vx7(r2) · ccba4bf1
      A change in the API prohibits accessing Tcb fields directly. The bug in
      VxWorks7 (failure to re-arm the guard page) now appears to be fixed, so
      this is no long necessary.
      
      2019-07-10  Doug Rupp  <rupp@adacore.com>
      
      gcc/ada/
      
      	* init.c: Do not attempt to re-arm guard page on x86_64-vx7(r2).
      
      From-SVN: r273351
      Doug Rupp committed
    • [Ada] Crash on aggregate for limited type in extended return · c14dc27e
      This patch fixes a compiler abort on an extended return statement whose
      expression is an aggregate (to be built in place) for a discriminated
      record with a limited component. The build-in-place mechanism creates an
      access type and a renaming declaration  through which individual
      components are assigned. The renamed object is constrained because it is
      limited, and the renaming declaration does not need to create a local
      subtype indication for it, which may lead to type mismatches in the
      back-end, and is in any case redundant. This patch extends this
      optimization to the case of records that are limited only because of a
      limitied component, and not because they are explicit declared limited.
      
      2019-07-10  Ed Schonberg  <schonberg@adacore.com>
      
      gcc/ada/
      
      	* sem_ch8.adb (Check_Constrained_Object): A record that is
      	limited because of the presence of a limited component is
      	constrained, and no subtype indiciation needs to be created for
      	it, just as is the case for declared limited records.
      
      gcc/testsuite/
      
      	* gnat.dg/limited3.adb, gnat.dg/limited3_pkg.adb,
      	gnat.dg/limited3_pkg.ads: New testcase.
      
      From-SVN: r273350
      Ed Schonberg committed
    • [Ada] Fix spurious messages on global variables for SPARK pointer support · 179682a5
      Pointer support in GNATprove leads to spurious messages about global
      variables, with local variables declared in local packages and protected
      components. Now fixed.
      
      There is no impact on compilation.
      
      2019-07-10  Yannick Moy  <moy@adacore.com>
      
      gcc/ada/
      
      	* sem_aux.adb, sem_aux.ads (Is_Protected_Operation): New
      	function to determine if a subprogram is protected.
      	* sem_spark.adb (Setup_Protected_Components): New procedure to
      	add protected components to the environment.
      	(Check_Callable_Body): Call the new Setup_Protected_Components.
      	(Check_Package_Spec): Merge local environment with enclosing one
      	when done.
      
      From-SVN: r273349
      Yannick Moy committed
    • [Ada] Fix possible crashes in GNATprove analysis of pointers · 1bc68e0d
      The new analysis of SPARK pointer rules could crash on some constructs.
      Now fixed.
      
      There is no impact on compilation.
      
      2019-07-10  Claire Dross  <dross@adacore.com>
      
      gcc/ada/
      
      	* sem_spark.adb (Check_Expression): Allow digits constraints as
      	input.
      	(Illegal_Global_Usage): Pass in the entity.
      	(Is_Subpath_Expression): New function to allow different nodes
      	as inner parts of a path expression.
      	(Read_Indexes): Allow concatenation and aggregates with box
      	expressions.  Allow attributes Update and Loop_Entry.
      	(Check_Expression): Allow richer membership test.
      	(Check_Node): Ignore bodies of generics.
      	(Get_Root_Object): Allow concatenation and attributes.
      
      From-SVN: r273348
      Claire Dross committed
    • [Ada] Spurious error on discriminant of incomplete type · d036b2b8
      This patch corrects the conformance verification of discriminants to
      provide symmetry between the analysis of incomplete and full view
      discriminants. As a result, types of discriminants always resolve to the
      proper view.
      
      2019-07-10  Hristian Kirtchev  <kirtchev@adacore.com>
      
      gcc/ada/
      
      	* sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
      	discover the type of a full view discriminant.
      
      gcc/testsuite/
      
      	* gnat.dg/incomplete7.adb, gnat.dg/incomplete7.ads: New testcase.
      
      From-SVN: r273347
      Hristian Kirtchev committed
    • [Ada] Improve gnatmem's doc for the depth switch · 6056bc73
      2019-07-10  Arnaud Charlet  <charlet@adacore.com>
      
      gcc/ada
      
      	* doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
      	doc for the depth switch.
      
      From-SVN: r273346
      Arnaud Charlet committed
    • [Ada] GNATpp: document the --source-line-breaks switch · 710e0240
      2019-07-10  Bob Duff  <duff@adacore.com>
      
      gcc/ada/
      
      	* doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
      	--source-line-breaks switch.
      
      From-SVN: r273345
      Bob Duff committed
    • [Ada] Documentation of Img attribute out of date · 764ffff0
      2019-07-10  Justin Squirek  <squirek@adacore.com>
      
      gcc/ada/
      
      	* doc/gnat_rm/implementation_defined_attributes.rst: Add mention
      	of 'Image attribute with 'Img's entry to mention additional
      	added 2012 usage of Obj'Image.
      	* doc/gnat_rm/implementation_defined_pragmas.rst: Correct
      	mispelling of Async_Writers.
      	* gnat_rm.texi: Regenerate.
      	* sem_prag.adb (Analyze_Pragma): Correct mispelling of
      	Async_Writers.
      	* sem_util.adb (State_Has_Enabled_Property): Correct mispelling
      	of Async_Writers.
      
      From-SVN: r273344
      Justin Squirek committed
    • [Ada] Entity names are not unique · 1ae0159e
      This patch updates the Unique_Name procedure in order to prefix the
      string "ada___" to child units that have a nested subprogram or package,
      so that they do not clash with a parent package of the same name.
      
      This is for GNATprove only and does not affect regular compilation.
      
      2019-07-10  Simon Buist  <buist@adacore.com>
      
      gcc/ada/
      
      	* sem_util.ads (Child_Prefix): New constant.
      	* sem_util.adb (Unique_Name): Add a special prefix to child
      	units that have a nested subprogram or package.
      
      From-SVN: r273343
      Simon Buist committed
    • [Ada] Add an annotation for static analysis · f35688c9
      2019-07-10  Arnaud Charlet  <charlet@adacore.com>
      
      gcc/ada/
      
      	* sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
      
      From-SVN: r273342
      Arnaud Charlet committed
    • [Ada] Spelling mistakes in error messages · 9a5245da
      This patch updates certain error messages to eliminate spelling
      mistakes. No need for a test as this is a minor cosmetic fix.
      
      2019-07-10  Hristian Kirtchev  <kirtchev@adacore.com>
      
      gcc/ada/
      
      	* sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
      	spelling in certain error messages.
      	(Check_Pragma_Implemented): Correct the spelling in certain
      	error messages.
      
      From-SVN: r273341
      Hristian Kirtchev committed
    • [Ada] Improve support for tuning branch probability heuristics · 9ead6ee5
      This adds a new GNAT.Branch_Prediction package to make it possible to
      tune the branch probability heuristics more finely.  This package
      contains the equivalent of __builtin_expect in C/C++ plus a couple of
      specializations.
      
      The following program gives a summary of the usage:
      
      package Q is
      
        I : Integer;
        pragma Volatile (I);
      
      end Q;
      
      with GNAT.Branch_Prediction; use GNAT.Branch_Prediction;
      with Text_IO; use Text_IO;
      with Q; use Q;
      
      procedure P is
      begin
        if Unlikely (I = 0) then
          Put_Line ("Zero was passed");
          return;
        end if;
      
        if Likely (I > 0) then
          Put_Line ("A positive number was passed");
        else
          Put_Line ("A negative number was passed");
        end if;
      
        if Expect ((I rem 2) = 0, False) then
          Put_Line ("An even number was passed");
        else
          Put_Line ("An odd number was passed");
        end if;
      end;
      
      2019-07-10  Eric Botcazou  <ebotcazou@adacore.com>
      
      gcc/ada/
      
      	* Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-brapre.
      	* libgnat/g-brapre.ads: New package specification.
      	* doc/gnat_rm/the_gnat_library.rst: Document it.
      	* gnat_rm.texi: Regenerate.
      
      From-SVN: r273340
      Eric Botcazou committed
    • [Ada] Allow multiple units per file in GNATprove · 27572ba3
      For analysis tools that rely on information generated in ALI files, but
      do not generate object files, the frontend did not generate the special
      extension names like file~2.ali for unit 2 in the file. This is needed
      to be able to analyze files with multiple units. Now fixed.
      
      There is no impact on compilation.
      
      2019-07-10  Yannick Moy  <moy@adacore.com>
      
      gcc/ada/
      
      	* osint-c.adb (Set_File_Name): Always add extension for multiple
      	units per file mode.
      
      From-SVN: r273339
      Yannick Moy committed
    • [Ada] sysdep.c: correct include directives ordering · 9ab234e5
      Some VxWorks headers are relying on types that are defined in
      `vxWorks.h` but do not include it themselves, we move the include
      directive for `vxWorks.h` at the top of the include directives.
      
      2019-07-10  Corentin Gay  <gay@adacore.com>
      
      gcc/ada/
      
      	* sysdep.c: Put include directive for 'vxWorks.h' before any
      	other VxWorks headers.
      
      From-SVN: r273338
      Corentin Gay committed
    • [Ada] GNAT RM: add note about debuggers for Scalar_Storage_Order · 1c6f14b6
      2019-07-10  Eric Botcazou  <ebotcazou@adacore.com>
      
      gcc/ada/
      
      	* doc/gnat_rm/implementation_defined_attributes.rst
      	(Scalar_Storage_Order): Minor tweaks.  Add note about debuggers.
      	* gnat_rm.texi: Regenerate.
      
      From-SVN: r273337
      Eric Botcazou committed