1. 08 Jul, 2019 17 commits
    • [Ada] Arrange not to set DECL_ARTIFICIAL on elab procs · 19d9ce46
      Unlike, say, clones created internally by the compiler, elab procs
      materialize specific user code and flagging them artificial now takes
      elab code away from gcov's analysis, a regression compared to previous
      releases.
      
      On the testcase below:
      
      package Gcov_Q is
         function F (X : Integer) return Integer is (X + 1);
      end;
      
      with Gcov_Q;
      package Gcov_P is
         Y : Integer := Gcov_Q.F (X => 1);
      end;
      
      with Gcov_P;
      procedure Gcov_Test is
      begin
         if Gcov_P.Y /= 2 then
            raise Program_Error;
         end if;
      end;
      
      After compiling with:
      
        gnatmake -f -g gcov_test.adb \
          -cargs -ftest-coverage -fprofile-arcs \
          -largs -fprofile-generate
      
      and executing with
      
        ./gcov_test
      
      We expect
      
         gcov gcov_p
      
      to produce a gcov_p.ads.gcov report.
      
      2019-07-08  Olivier Hainque  <hainque@adacore.com>
      
      gcc/ada/
      
      	* gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
      	DECL_ARTIFICIAL_P on elab proc declarations.
      
      From-SVN: r273207
      Olivier Hainque committed
    • [Ada] Fix crash on extension of private type with -gnatRj · abbc4546
      This fixes a crash (or an assertion failure) during the processing done
      for -gnatRj on the declaration of an extension of a private type.
      Generally speaking, extension declarations are delicate in this context
      because the front-end does not duplicate the structure of the parent
      type, so the processing required to output the structural layout needs
      to go up to the declaration of the parent type, which may or may not be
      available or usable.
      
      The change also makes the processing more robust by falling back to the
      flat layout if the declaration of the parent type cannot be processed.
      
      2019-07-08  Eric Botcazou  <ebotcazou@adacore.com>
      
      gcc/ada/
      
      	* repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
      	Not_In_Extended_Main local exceptions.
      	(List_Structural_Record_Layout): For an extension, raise the
      	former if the parent subtype has not been built and the latter
      	if it is not declared in the main source unit.  Fall back to the
      	flat layout if either exception has been raised.
      
      From-SVN: r273206
      Eric Botcazou committed
    • [Ada] Semantics of Delete for fixed strings · 4962dc44
      This patch corrects a bug in the implementation of Delete in an unusual
      boundary case: the RM describes the semantics of Delete as equivalent to
      that of Replace_String with a null argument. As a result, deleting a
      null string that starts past the end of its argument is a noop and must
      not raise Index_Error.
      
      2019-07-08  Ed Schonberg  <schonberg@adacore.com>
      
      gcc/ada/
      
      	* libgnat/a-strfix.adb (Delete): The RM describes the semantics
      	of Delete as equivalent to that of Replace_String with a null
      	argument. As a result, deleting a null string that starts past
      	the end of its argument is a noop and must not raise
      	Index_Error.
      
      gcc/testsuite/
      
      	* gnat.dg/fixed_delete.adb: New testcase.
      
      From-SVN: r273205
      Ed Schonberg committed
    • [Ada] Crash in interface derivation with null primitive · 4a0e6ac1
      The frontend crashes processing the derivation of a tagged type whose
      ultimate ancestor is an interface type I1 that has a null primitive,
      implements another interface I2 derived from I2, and does not override
      the null primitive.
      
      2019-07-08  Javier Miranda  <miranda@adacore.com>
      
      gcc/ada/
      
      	* exp_disp.adb (Register_Primitive): When registering a
      	primitive in the secondary dispatch table, handle primitive
      	inherited through several levels of type derivation (required to
      	properly handle inherited 'null' primitive).
      
      gcc/testsuite/
      
      	* gnat.dg/interface9.adb, gnat.dg/interface9_root-child.ads,
      	gnat.dg/interface9_root.ads: New testcase.
      
      From-SVN: r273204
      Javier Miranda committed
    • [Ada] Document handling of preprocessor directives in GNATpp · 23eb3cb2
      2019-07-08  Bob Duff  <duff@adacore.com>
      
      gcc/ada/
      
      	* doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
      	preprocessor directives in GNATpp.
      
      From-SVN: r273203
      Bob Duff committed
    • [Ada] Code reorganization · f56e04e8
      This patch performs a code reorganization of the implementation of
      pragma Compile_Time_Error. No functional change.
      
      No test required.
      
      2019-07-08  Javier Miranda  <miranda@adacore.com>
      
      gcc/ada/
      
      	* gnat1drv.adb (Post_Compilation_Validation_Checks:
      	Validate_Compile_Time_Warning_Errors is now located in sem_prag
      	(instead of sem_ch13).
      	* sem_ch13.ads (Validate_Compile_Time_Warning_Error,
      	Validate_Compile_Time_Warning_Errors): Move to sem_prag.
      	* sem_ch13.adb
      	(Compile_Time_Warnings_Errors): Move to sem_prag.
      	(Initialize): Remove initialization of table
      	Compile_Time_Warning_Errors.
      	(Validate_Compile_Time_Warning_Error,
      	Validate_Compile_Time_Warning_Errors): Move to sem_prag.
      	* sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
      	procedure.
      	* sem_prag.adb (Initialize): Initialize table
      	Compile_Time_Warning_Errors.
      
      From-SVN: r273202
      Javier Miranda committed
    • [Ada] Crash on named actual in postcondition for generic subprogram · 5291985c
      This patch fixes a crash on compiling the postcondtion for a generic
      subprogram, when the postcondition is a call with both positional and
      named parameter associations.
      
      2019-07-08  Ed Schonberg  <schonberg@adacore.com>
      
      gcc/ada/
      
      	* sem_ch13.adb (Analyze_Aspect_Specifications): For a
      	pre/postcondition of a generic subprogram declaration, do not
      	use Relocate_Node on the aspect expression to construct the
      	corresponding attribute specification, to prevent tree anomalies
      	when the expression is a call with named actual parameters.
      
      gcc/testsuite/
      
      	* gnat.dg/predicate9.adb: New testcase.
      
      From-SVN: r273201
      Ed Schonberg committed
    • [Ada] Spurious error reported by pragma Compile_Time_Error · b91cdf75
      The compiler may trigger spurious errors on pragmas Compile_Time_Error
      and Compile_Time_Warning when their boolean expression computes the size
      of a type. After this patch the following test compiles fine.
      
      with Interfaces; use Interfaces;
      package Types is
         type Arr is array (1 .. 6) of Unsigned_8
           with Size      => 48,
                Alignment => 1;
      
         type Rec is record
            Comp_1 : Unsigned_32;
            Comp_2 : Unsigned_16;
         end record
           with Size      => 48,
                Alignment => 1;
      end Types;
      
      with Types; use Types;
      package Main is
         pragma Compile_Time_Error
           (Arr'Size  = 12, "ERROR: Arr'Size is 48, not 12");
         pragma Compile_Time_Error
           (Arr'Size  = 48, "OK: Arr");
         pragma Compile_Time_Error
           (Arr'Size /= 48, "ERROR: Arr'Size is 48");
      
         pragma Compile_Time_Error
           (Rec'Size  = 34, "ERROR: Rec'Size is 48, not 34");
         pragma Compile_Time_Error
           (Rec'Size  = 48, "OK: Rec");
         pragma Compile_Time_Error
           (Rec'Size /= 48, "ERROR: Rec'Size is 48");
      end Main;
      
      Command: gcc -c main.ads
       Output: main.ads:7:07: OK: Arr
               main.ads:14:07: OK: Rec
      
      2019-07-08  Javier Miranda  <miranda@adacore.com>
      
      gcc/ada/
      
      	* sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
      	used to report user defined compile time warning or errors
      	handle 'Size for types with known static RM size.
      
      From-SVN: r273200
      Javier Miranda committed
    • [Ada] Crash on Image and Value attributes · ffec45e3
      This patch fixes an issue whereby the creation of an enumeration within
      package where Default_Scalar_Storage_Order is in effect may lead to a
      crash when the attributes Image or Value are applied to objects of said
      type or the type directly.
      
      2019-07-08  Justin Squirek  <squirek@adacore.com>
      
      gcc/ada/
      
      	* exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
      	the building of image tables.
      	(Expand_Image_Attribute): Minor cleanup.
      
      gcc/testsuite/
      
      	* gnat.dg/sso16.adb: New testcase.
      
      From-SVN: r273199
      Justin Squirek committed
    • [Ada] GNAT.Sockets: remove default level in Get/Set_Socket_Option · 0a904120
      2019-07-08  Dmitriy Anisimkov  <anisimko@adacore.com>
      
      gcc/ada/
      
      	* libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
      	documentation.
      	(Get_Socket_Option, Set_Socket_Option): Remove default value for
      	the Level formal.
      
      From-SVN: r273198
      Dmitriy Anisimkov committed
    • [Ada] Spurious visibility error on dynamic_predicate aspect in generic · e87f67eb
      This patch fixes a spurious error when verifying that the visibility of
      the expression of an aspect has not changed between the freeze point of
      the entity to which it applies, and the end of the enclosing declarative
      part. If the entity is a composite type its components must be made
      directly visible for the analysis of the expression. In a generic
      context this must be done explicitly at the end of the declarative part.
      
      2019-07-08  Ed Schonberg  <schonberg@adacore.com>
      
      gcc/ada/
      
      	* sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
      	unanalized aspect in a generic context that has not been
      	analyzed yet, if the aspect applies to a type, place the type on
      	the scope stack to make its components visible, before checking
      	conformance with the version of the expression analyzed at the
      	freeze point.
      
      gcc/testsuite/
      
      	* gnat.dg/predicate8.adb, gnat.dg/predicate8_pkg.adb,
      	gnat.dg/predicate8_pkg.ads: New testcase.
      
      From-SVN: r273197
      Ed Schonberg committed
    • Add myself to MAINTAINERS (Write After Approval) · c19713b7
      From-SVN: r273195
      Kito Cheng committed
    • re PR tree-optimization/83518 (Missing optimization: useless instructions should be dropped) · 38988cbf
      2019-07-08  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/83518
      	* tree-ssa-sccvn.c: Include splay-tree.h.
      	(struct pd_range, struct pd_data): New.
      	(struct vn_walk_cb_data): Add data to track partial definitions.
      	(vn_walk_cb_data::~vn_walk_cb_data): New.
      	(vn_walk_cb_data::push_partial_def): New.
      	(pd_tree_alloc, pd_tree_dealloc, pd_range_compare): New.
      	(vn_reference_lookup_2): When partial defs are registered give up.
      	(vn_reference_lookup_3): Track partial defs for memset and
      	constructor zeroing and for defs from constants.
      
      	* gcc.dg/tree-ssa/ssa-fre-73.c: New testcase.
      	* gcc.dg/tree-ssa/ssa-fre-74.c: Likewise.
      	* gcc.dg/tree-ssa/ssa-fre-75.c: Likewise.
      	* gcc.dg/tree-ssa/ssa-fre-76.c: Likewise.
      	* g++.dg/tree-ssa/pr83518.C: Likewise.
      
      From-SVN: r273194
      Richard Biener committed
    • Add a build config for bootstrapping at -Og · 8849d503
      Although BOOT_CFLAGS can be used to bootstrap with -Og, having a
      dedicated build config is sometimes more convenient.
      
      2019-07-08  Richard Sandiford  <richard.sandiford@arm.com>
      
      config/
      	* bootstrap-Og.mk: New file.
      
      gcc/
      	* doc/install.texi (bootstrap-Og): Document.
      
      From-SVN: r273193
      Richard Sandiford committed
    • Make guality.h handle Yama restricted ptrace mode · 0de175b8
      guality.exp is silently skipped on Linux systems with
      kernel.yama.ptrace_scope=1 because gdb fails to attach to the
      sanity check test.  This patch uses PR_SET_PTRACER (where available)
      to avoid this.
      
      prctl was apparently added in Linux 2.1.57, so I don't think we
      need any tests other than __linux for the #include.
      
      2019-07-08  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/testsuite/
      	* gcc.dg/guality/guality.h: Include <sys/prctl.h> on Linux targets.
      	(main): Use PR_SET_PTRACER where available.
      
      From-SVN: r273192
      Richard Sandiford committed
    • [riscv] Fix ambiguous .md attribute uses · 7ef00402
      This patch is part of a series that fixes ambiguous attribute
      uses in .md files, i.e. cases in which attributes didn't use
      <ITER:ATTR> to specify an iterator, and in which <ATTR> could
      have different values depending on the iterator chosen.
      
      No behavioural change -- produces the same code as before.
      
      2019-07-08  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* config/riscv/pic.md (*local_pic_load_s<mode>)
      	(*local_pic_load_u<mode>): Explicitly specify the mode iterator
      	referenced by <mode>, giving...
      	(*local_pic_load_s<SUBX:mode>, *local_pic_load_u<SUBX:mode>): ...these.
      	* config/riscv/riscv.md (*sge<u>_<X:mode><GPR:mode>)
      	(*slt<u>_<X:mode><GPR:mode>, *sle<u>_<X:mode><GPR:mode>): Explicitly
      	use <X:MODE> for the mode attribute.
      
      From-SVN: r273191
      Richard Sandiford committed
    • Daily bump. · 0b194960
      From-SVN: r273190
      GCC Administrator committed
  2. 07 Jul, 2019 8 commits
    • re PR tree-optimization/91090 (A suspicious code in tree-ssa-dom.c) · 0411f1d6
              PR tree-optimization/91090
              * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Fix logic error
              in handling of ranges to simplify switch statements.
      
      From-SVN: r273184
      Jeff Law committed
    • rs6000: Delete Ffre · 6ce4dac8
      It is unused.
      
      
      	* config/rs6000/rs6000.md (Ffre): Delete.
      
      From-SVN: r273182
      Segher Boessenkool committed
    • [Darwin] Make a final check on PIC options. · 21f94af9
      Final check on PCI options; for Darwin these are not dependent on the PIE
      ones, although PIE does require PIC to support it.  Specifically, for Darwin,
      "fPIC fno-PIE" should result in the same as "-fno-PIE -fPIC".
      
      2019-07-07  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* config/darwin.c (darwin_override_options): Make a final check on PIC
      	options.
      
      From-SVN: r273181
      Iain Sandoe committed
    • [Darwin] Don't jam symbol stubs on for kernel code. · 2ea64934
      For PPC Darwin, we need the JBSR long jump code to be enabled when generating
      kernel code.  Now we have that handled in rs6000.c, we can drop the conflated
      setting in the common code.  Symbol stubs are not generated for any X86 case.
      
      2019-07-07  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* config/darwin.c (darwin_override_options): Don't jam symbol stubs
      	on for kernel code.
      
      From-SVN: r273180
      Iain Sandoe committed
    • re PR fortran/91077 (Wrong indexing when using a pointer) · 94f3d11c
      2019-07-07  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/91077
      	* trans-array.c (gfc_conv_scalarized_array_ref) Delete code
      	that gave symbol backend decl for subref arrays and deferred
      	length variables.
      
      2019-07-07  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/91077
      	* gfortran.dg/pointer_array_11.f90 : New test.
      
      From-SVN: r273176
      Paul Thomas committed
    • PR91068: Fix MIPS fallout from IRA matched operand changes · 0b3839a4
      PR91068 is a case in which we have (ignoring non-LRA alternatives):
      
        [(set (match_operand:SI 0 "register_operand" "=l,d?")
      	(plus:SI (mult:SI (match_operand:SI 1 "register_operand" "d,d")
      			  (match_operand:SI 2 "register_operand" "d,d"))
      		 (match_operand:SI 3 "register_operand" "0,d")))
         (clobber (match_scratch:SI 4 "=X,l"))
         (clobber (match_scratch:SI 5 "=X,&d"))]
      
      where the first alternative is one instruction but the second is two.
      This is very similar to the case that my recent IRA patches were
      supposed to help.  The crucial difference is that the cheap
      alternative requires a single-register class while the expensive
      alternative uses general registers.
      
      This makes a difference when one of operand 0 or 3 can naturally be
      allocated to LO but the other can't.  If IRA makes that allocation,
      both alternatives require one reload of equal cost and so the first
      alternative clearly wins.
      
      However, if we say that tying operands 0 and 3 saves the cost of a full
      move, then all other things being equal, IRA will prefer to allocate
      both registers to the same GPR.  The registers will then naturally
      fit the second alternative.
      
      This has a more drastic effect in the MIPS case than it should because
      using the GPR alternative is much more expensive there than it appears
      to the RA.  But that's really a separate problem and something we were
      able to live with before my IRA patch.
      
      What makes tying less useful here is the fact that the tied register is
      a single-register class.  I think in those circumstances it's better not
      to use tied operands at all and instead use "l" for the inputs.
      Allocating the input to LO, and allocating the output to LO, then depend
      naturally on class costs.  If we decide to allocate at least one of them
      to LO, we'll use the cheap alternative, otherwise we'll (correctly) use
      the expensive alternative.  This effectively restores the situation
      before my IRA patch, but this time making the preference on the input
      register more explicit.
      
      I originally wrote the patterns in the early days of IRA, and certainly
      well before LRA.  I think they were largely influened by reload rather
      than RA proper (see the comment above *mul_acc_si, which is all about
      the reload behaviour).  LRA copes with the two-"l" case just fine.
      
      The patch may well cause problems for -mno-lra, but I think we should
      cull that option anyway.
      
      2019-07-07  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	PR target/91068
      	* config/mips/mips.md (*mul_acc_si, *mul_acc_si_r3900, *macc)
      	(*msac, *msac_using_macc, *mul_sub_si): Use "l" for input operands
      	instead of matching them to "l" output operands.
      
      From-SVN: r273175
      Richard Sandiford committed
    • Fix uninitialised use in mips_split_move · f40ce450
      While testing the fix for PR91068, I hit an rtl checking failure
      while building newlib.  mips_split_move was decomposing an address that
      happened to be symbolic and then tried to access the REGNO of the base
      register field, which wasn't initialised but which by chance pointed to
      valid memory.
      
      2019-07-07  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* config/mips/mips.c (mips_split_move): Zero-initialize addr
      	and check whether addr.reg is nonnull before using it.
      
      From-SVN: r273174
      Richard Sandiford committed
    • Daily bump. · 389aba0d
      From-SVN: r273173
      GCC Administrator committed
  3. 06 Jul, 2019 12 commits
    • omp-low.c (lower_rec_input_clauses): For lastprivate clauses in… · 6f67abcd
      omp-low.c (lower_rec_input_clauses): For lastprivate clauses in ctx->for_simd_scan_phase simd copy the outer var to...
      
      	* omp-low.c (lower_rec_input_clauses): For lastprivate clauses in
      	ctx->for_simd_scan_phase simd copy the outer var to the privatized
      	variable(s).  For conditional lastprivate look through outer
      	GIMPLE_OMP_SCAN context.
      	(lower_omp_1): For conditional lastprivate look through outer
      	GIMPLE_OMP_SCAN context.
      
      	* testsuite/libgomp.c/scan-19.c: New test.
      	* testsuite/libgomp.c/scan-20.c: New test.
      
      From-SVN: r273169
      Jakub Jelinek committed
    • omp-low.c (struct omp_context): Rename combined_into_simd_safelen0 member to… · 94e14f2e
      omp-low.c (struct omp_context): Rename combined_into_simd_safelen0 member to combined_into_simd_safelen1.
      
      	* omp-low.c (struct omp_context): Rename combined_into_simd_safelen0
      	member to combined_into_simd_safelen1.
      	(lower_rec_input_clauses, lower_omp_1): Adjust uses.
      	(lower_lastprivate_clauses): Likewise.  For conditional lastprivate
      	clauses if ctx->combined_into_simd_safelen1 put statements after the
      	predicate conditionalized block rather than into it.
      
      From-SVN: r273168
      Jakub Jelinek committed
    • Fix recent regression in __atomic_add_dispatch · a10b664e
      	* include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
      	throw() with _GLIBCXX_NOTHROW.
      	(__atomic_add_dispatch): Return after performing atomic increment.
      
      From-SVN: r273167
      Jonathan Wakely committed
    • [s390] Fix ambiguous .md attribute uses · ef2df516
      This patch is part of a series that fixes ambiguous attribute
      uses in .md files, i.e. cases in which attributes didn't use
      <ITER:ATTR> to specify an iterator, and in which <ATTR> could
      have different values depending on the iterator chosen.
      
      The vx-builtins.md part changes the choice of <mode> from the
      implicit <VFCMP:mode> to an explicit <VF_HW:mode> (i.e. from the
      mode of the comparison result to the mode of the operands being
      compared).  That seemed like the intended behaviour given later
      patterns like vec_cmpeq<mode>_cc.
      
      The use of BFP in the s390.md LNDFR pattern looks like a typo,
      since the operand to (abs ...) has to have the same mode as the result.
      The only effect before this series was to create some extra variants
      that would never match, making it harmless apart from very minor code
      bloat.
      
      2019-07-06  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* config/s390/s390.md (*negabs<FP:mode>2_nocc): Use FP for
      	operand 1.
      	* config/s390/vx-builtins.md (*vec_cmp<insn_cmp><mode>_cconly):
      	Make the choice of <mode> explicit, giving...
      	(*vec_cmp<insn_cmp><VF_HW:mode>_cconly): ...this.
      
      From-SVN: r273162
      Richard Sandiford committed
    • [i386] Fix ambiguous .md attribute uses · a0cb70b7
      This patch is part of a series that fixes ambiguous attribute
      uses in .md files, i.e. cases in which attributes didn't use
      <ITER:ATTR> to specify an iterator, and in which <ATTR> could
      have different values depending on the iterator chosen.
      
      No behavioural change except for dropping the unused *andnot<mode>3_bcst
      permutations.
      
      2019-07-06  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* config/i386/i386.md (*fop_<X87MODEF:mode>_3_i387)
      	(l<rounding_insn><MODEF:mode><SWI48:mode>2): Fix ambiguous uses
      	of .md attributes.
      	* config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask)
      	(*avx512pf_gatherpf<mode>df_mask, *avx512pf_scatterpf<mode>sf_mask)
      	(*avx512pf_scatterpf<mode>df_mask, *avx2_gathersi<mode>)
      	(*avx2_gathersi<mode>_2, *avx2_gatherdi<mode>)
      	(*avx2_gatherdi<mode>_2, *avx2_gatherdi<mode>_3): Likewise.
      	(*avx2_gatherdi<mode>_4, *avx512f_gathersi<mode>): Likewise.
      	(*avx512f_gathersi<mode>_2, *avx512f_gatherdi<mode>): Likewise.
      	(*avx512f_gatherdi<mode>_2, *avx512f_scattersi<mode>): Likewise.
      	(*avx512f_scatterdi<mode>): Likewise.
      	(*andnot<mode>3_bcst): Fix VI/VI48_AVX512VL typo.
      
      From-SVN: r273161
      Richard Sandiford committed
    • [h8300] Fix ambiguous .md attribute uses · 212ecf90
      This patch is part of a series that fixes ambiguous attribute
      uses in .md files, i.e. cases in which attributes didn't use
      <ITER:ATTR> to specify an iterator, and in which <ATTR> could
      have different values depending on the iterator chosen.
      
      No behavioural change -- produces the same code as before.
      
      2019-07-06  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* config/h8300/h8300.md (*push1_h8300hs_<mode>): Explicitly
      	specify the mode iterator referenced by <mode>, giving...
      	(*push1_h8300hs_<QHI:mode>): ...this.
      
      From-SVN: r273160
      Richard Sandiford committed
    • [amdgcn] Fix ambiguous .md attribute uses · 96eb1765
      This patch is part of a series that fixes ambiguous attribute
      uses in .md files, i.e. cases in which attributes didn't use
      <ITER:ATTR> to specify an iterator, and in which <ATTR> could
      have different values depending on the iterator chosen.
      
      I think this is a genuine bugfix for the case in which the 1REG_MODE
      and 1REG_ALT are different, since previously we would use the 1REG_MODE
      for both the comparison and the select, even though the operands being
      compared are 1REG_ALT rather than 1REG_MODE.
      
      2019-07-06  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* config/gcn/gcn-valu.md
      	(vcond<VEC_1REG_MODE:mode><VEC_1REG_ALT:mode>): Use
      	gen_vec_cmp<VEC_1REG_ALT:mode>di rather than (implicitly)
      	gen_vec_cmp<VEC_1REG_MODE:mode>di.  Explicitly use
      	gen_vcond_mask_<VEC_1REG_MODE:mode>di.
      	(vcond<VEC_1REG_MODE:mode><VEC_1REG_ALT:mode>_exec): Likewise,
      	but using the _exec comparison patterns.
      	(vcondu<VEC_1REG_INT_MODE:mode><VEC_1REG_INT_ALT:mode>): Use
      	gen_vec_cmp<VEC_1REG_INT_ALT:mode>di rather than (implicitly)
      	gen_vec_cmp<VEC_1REG_INT_MODE:mode>di.  Explicitly use
      	gen_vcond_mask_<VEC_1REG_INT_MODE:mode>di.
      	(vcondu<VEC_1REG_INT_MODE:mode><VEC_1REG_INT_ALT:mode>_exec): Likewise,
      	but using the _exec comparison patterns.
      
      From-SVN: r273159
      Richard Sandiford committed
    • [arm] Fix ambiguous .md attribute uses · 193bee75
      This patch is part of a series that fixes ambiguous attribute
      uses in .md files, i.e. cases in which attributes didn't use
      <ITER:ATTR> to specify an iterator, and in which <ATTR> could
      have different values depending on the iterator chosen.
      
      I think this is a genuine bugfix for Thumb-1, since previously the
      LDREX width was taken from the SImode success result rather than the
      memory mode:
      
      -#define HAVE_atomic_compare_and_swapt1qi_1 ((TARGET_HAVE_LDREX && TARGET_HAVE_MEMORY_BARRIER) && (TARGET_THUMB1))
      -#define HAVE_atomic_compare_and_swapt1hi_1 ((TARGET_HAVE_LDREX && TARGET_HAVE_MEMORY_BARRIER) && (TARGET_THUMB1))
      -#define HAVE_atomic_compare_and_swapt1di_1 ((TARGET_HAVE_LDREX && TARGET_HAVE_MEMORY_BARRIER) && (TARGET_THUMB1))
      +#define HAVE_atomic_compare_and_swapt1qi_1 ((TARGET_HAVE_LDREXBH && TARGET_HAVE_MEMORY_BARRIER) && (TARGET_THUMB1))
      +#define HAVE_atomic_compare_and_swapt1hi_1 ((TARGET_HAVE_LDREXBH && TARGET_HAVE_MEMORY_BARRIER) && (TARGET_THUMB1))
      +#define HAVE_atomic_compare_and_swapt1di_1 ((TARGET_HAVE_LDREXD && ARM_DOUBLEWORD_ALIGN \
      +       && TARGET_HAVE_MEMORY_BARRIER) && (TARGET_THUMB1))
      
      The same goes for the predicate and constraints in
      @atomic_compare_and_swapt1di_1, which previously used the
      SI values from the success result.
      
      2019-07-06  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* config/arm/sync.md
      	(@atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): Use
      	<NARROW:sync_predtab> instead of (implicitly) <CCSI:sync_predtab>.
      	(@atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise
      	<SIDI:sync_predtab>.  Use <SIDI:cas_cmp_operand> and
      	<SIDI:cas_cmp_str>.
      
      From-SVN: r273158
      Richard Sandiford committed
    • omp-low.c (struct omp_context): Add for_simd_scan_phase member. · 1f52d1a8
      	* omp-low.c (struct omp_context): Add for_simd_scan_phase member.
      	(maybe_lookup_ctx): Add forward declaration.
      	(omp_find_scan): Likewise.  Walk into body of simd if composited
      	with worksharing loop.
      	(scan_omp_simd_scan): New function.
      	(scan_omp_1_stmt): Call it.
      	(lower_rec_simd_input_clauses): Don't create rvar nor rvar2 if
      	ctx->for_simd_scan_phase.
      	(lower_rec_input_clauses): Do much less work for inscan reductions
      	in ctx->for_simd_scan_phase is_simd regions.
      	(lower_omp_scan): Set is_simd also on simd constructs composited
      	with worksharing loop, unless ctx->for_simd_scan_phase.  Never emit
      	a sorry message.  Don't change GIMPLE_OMP_SCAN stmts into nops and
      	emit their body after in simd constructs composited with worksharing
      	loop.
      	(lower_omp_for_scan): Handle worksharing loop composited with simd.
      
      	* c-c++-common/gomp/scan-4.c: Don't expect sorry message.
      
      	* testsuite/libgomp.c/scan-11.c: New test.
      	* testsuite/libgomp.c/scan-12.c: New test.
      	* testsuite/libgomp.c/scan-13.c: New test.
      	* testsuite/libgomp.c/scan-14.c: New test.
      	* testsuite/libgomp.c/scan-15.c: New test.
      	* testsuite/libgomp.c/scan-16.c: New test.
      	* testsuite/libgomp.c/scan-17.c: New test.
      	* testsuite/libgomp.c/scan-18.c: New test.
      	* testsuite/libgomp.c++/scan-9.C: New test.
      	* testsuite/libgomp.c++/scan-10.C: New test.
      	* testsuite/libgomp.c++/scan-11.C: New test.
      	* testsuite/libgomp.c++/scan-12.C: New test.
      	* testsuite/libgomp.c++/scan-13.C: New test.
      	* testsuite/libgomp.c++/scan-14.C: New test.
      	* testsuite/libgomp.c++/scan-15.C: New test.
      	* testsuite/libgomp.c++/scan-16.C: New test.
      
      From-SVN: r273157
      Jakub Jelinek committed
    • re PR tree-optimization/91096 (Openmp vector max reduction incorrect) · 5d121287
      	PR tree-optimization/91096
      	* gcc.dg/vect/vect-simd-10.c (FLT_MIN_VALUE): Define.
      	(bar, main): Use it instead of -__builtin_inff ().
      	* gcc.dg/vect/vect-simd-14.c (FLT_MIN_VALUE): Define.
      	(bar, main): Use it instead of -__builtin_inff ().
      
      From-SVN: r273156
      Jakub Jelinek committed
    • omp-low.c (omp_find_scan): Make static. · 2dcb0d5b
      	* omp-low.c (omp_find_scan): Make static.
      	(lower_omp_for_scan): Fix order of merge arguments in input phase of
      	the second loop, var2 represents the first partial sum and so needs
      	to go before rprivb[ivar].
      
      From-SVN: r273155
      Jakub Jelinek committed
    • Daily bump. · e954337f
      From-SVN: r273154
      GCC Administrator committed
  4. 05 Jul, 2019 3 commits
    • re PR c++/67184 (Missed optimization with C++11 final specifier) · 99e4ed78
      	PR c++/67184
      	PR c++/69445
      	* call.c (build_new_method_call_1): Remove set but not used variable
      	binfo.
      
      From-SVN: r273149
      Jakub Jelinek committed
    • [Darwin.PPC] Remove dead code. · 9eb5f744
      TARGET_LINK_STACK is unused on Darwin, and only relevant to a processor on
      which the port was never released.
      
      2019-07-05  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* config/rs6000/rs6000-logue.c: Remove unused code.
      
      From-SVN: r273148
      Iain Sandoe committed
    • PR c++/67184 (again) · 26f8363d
      /cp
      2019-07-05  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/67184 (again)
      	PR c++/69445
      	* call.c (build_over_call): Devirtualize user-defined operators
      	coming from a base too.
      	(build_new_method_call_1): Do not devirtualize here.
      
      /testsuite
      2019-07-05  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/67184 (again)
      	PR c++/69445
      	* g++.dg/other/final4.C: New.
      
      From-SVN: r273147
      Paolo Carlini committed