1. 31 Oct, 2019 27 commits
    • re PR preprocessor/92296 (internal compiler error: Segmentation fault #pragma… · aa23e73b
      re PR preprocessor/92296 (internal compiler error: Segmentation fault  #pragma push_macro("__LINE__"))
      
      	PR preprocessor/92296
      	* internal.h (struct def_pragma_macro): Add is_builtin bitfield.
      	(_cpp_restore_special_builtin): Declare.
      	* init.c (_cpp_restore_special_builtin): New function.
      	* directives.c (do_pragma_push_macro): For NT_BUILTIN_MACRO
      	set is_builtin and don't try to grab definition.
      	(cpp_pop_definition): Use _cpp_restore_special_builtin to restore
      	builtin macros.
      
      	* c-c++-common/cpp/pr92296-1.c: New test.
      	* c-c++-common/cpp/pr92296-2.c: New test.
      
      From-SVN: r277685
      Jakub Jelinek committed
    • devices-main.c: Move to devices subdirectory. · 0092b21f
      2019-10-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
      
      	* gcc.target/msp430/devices-main.c: Move to devices subdirectory.
      	* gcc.target/msp430/devices/bad-devices-1.c: Update #include path to
      	devices-main.c.
      	* gcc.target/msp430/devices/bad-devices-2.c: Likewise.
      	* gcc.target/msp430/devices/bad-devices-3.c: Likewise.
      	* gcc.target/msp430/devices/bad-devices-4.c: Likewise.
      	* gcc.target/msp430/devices/bad-devices-5.c: Likewise.
      	* gcc.target/msp430/devices/bad-devices-6.c: Likewise.
      	* gcc.target/msp430/devices/csv-device-order.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_00.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_01.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_02.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_04.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_08.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_10.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_11.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_12.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_14.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_18.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_20.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_21.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_22.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_24.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430_28.c: Likewise.
      	* gcc.target/msp430/devices/csv-msp430fr5969.c: Likewise.
      	* gcc.target/msp430/devices/hard-cc430f5123.c: Likewise.
      	* gcc.target/msp430/devices/hard-foo.c: Likewise.
      	* gcc.target/msp430/devices/hard-msp430afe253.c: Likewise.
      	* gcc.target/msp430/devices/hard-msp430cg4616.c: Likewise.
      	* gcc.target/msp430/devices/hard-msp430f4783.c: Likewise.
      	* gcc.target/msp430/devices/hard-rf430frl154h_rom.c: Likewise.
      
      From-SVN: r277684
      Jozef Lawrynowicz committed
    • [AArch64] Fix g++.target/aarch64/sve/vcond_1_run.C · cc6336f5
      This had been failing since a mass renaming.  Noticed it a few times
      before but somehow never got around to fixing it.
      
      2019-10-31  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/testsuite/
      	* g++.target/aarch64/sve/vcond_1_run.C: Update test name.
      
      From-SVN: r277683
      Richard Sandiford committed
    • [AArch64] Split gcc.target/aarch64/sve/vcond_4* · 354ee867
      vcond_4.c combined too much stuff into one test, so that when we needed
      to add XFAILs for one set of routines, we lost testing of others that
      used the same instructions.  This patch splits it into four:
      
      vcond_4.c:
        The main test for selects between a vector and a scalar, with all
        elements having the same size.
      
        After Prathamesh's fix for PR91272, we are now guaranteed to use the
        conditionally-loaded vector as the "then" value and the scalar as the
        "else" value.
      
      vcond_4_zero.c:
        Like vcond_4.c, but comparing with zero.
      
      vcond_4_sel.c:
        Tests for selects between two scalars, with all elements having
        the same size.  The optimisers can legitimately switch the "then"
        and "else" order and adjust the comparison to match.
      
      vcond_4_costly.c:
        Like vcnod_4.c, but with mixed element sizes.  The sequences tested
        here will not be the preferred ones once we support mixtures of vector
        sizes, but it still tests an important code path.
      
      This means that vcond_4_run.c now only tests what's left in vcond_4.c,
      but that seems OK, since the main point was to ensure correct exception
      behaviour.
      
      Similarly it means that vcond_5.c only tests what's left in vcond_4.c,
      but that too is OK, since the point of the test was to compare the
      default handling of each comparison in vcond_4.c with the
      -fno-trapping-math equivalent.
      
      2019-10-31  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/testsuite/
      	* gcc.target/aarch64/sve/vcond_4.c: Split parts out into...
      	* gcc.target/aarch64/sve/vcond_4_costly.c,
      	* gcc.target/aarch64/sve/vcond_4_sel.c,
      	* gcc.target/aarch64/sve/vcond_4_zero.c: ...these new tests.
      	* gcc.target/aarch64/sve/vcond_4_run.c: Adjust accordingly.
      	* gcc.target/aarch64/sve/vcond_5.c: Likewise.
      
      From-SVN: r277682
      Richard Sandiford committed
    • [AArch64] Split gcc.target/aarch64/sve/reduc_strict_3.c · 37115224
      This patch splits gcc.target/aarch64/sve/reduc_strict_3.c into one
      test per function, so that it's easier to see what each scan is
      matching and also so that we no longer rely on the number of times
      that each dump message is printed.
      
      The patch also generalises the tests to work with scalable vectors.
      I think the test probably predates support for variable-length
      loop-aware SLP.
      
      2019-10-31  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/testsuite/
      	* gcc.target/aarch64/sve/reduc_strict_3.c: Split all but the
      	first function out into...
      	* gcc.target/aarch64/sve/reduc_strict_4.c,
      	* gcc.target/aarch64/sve/reduc_strict_5.c,
      	* gcc.target/aarch64/sve/reduc_strict_6.c,
      	* gcc.target/aarch64/sve/reduc_strict_7.c,
      	* gcc.target/aarch64/sve/reduc_strict_8.c,
      	* gcc.target/aarch64/sve/reduc_strict_9.c: ...these new tests.
      	Test for scalable vectors instead of 256-bit vectors.
      
      From-SVN: r277681
      Richard Sandiford committed
    • [AArch64] Fix build for non-default languages · 6ff0cdeb
      The SVE PCS support broke go, D and Ada because those languages don't
      call TARGET_INIT_BUILTINS.  We therefore ended up trying to get the
      TYPE_MAIN_VARIANT of a null __SVBool_t.
      
      We shouldn't really need to apply TYPE_MAIN_VARIANT there anyway,
      since the ABI-defined types are (and need to be) their own main
      variants.  This patch asserts for that instead.
      
      2019-10-31  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* config/aarch64/aarch64-sve-builtins.cc (register_builtin_types):
      	Assert that the type we store in abi_vector_types is its own
      	main variant.
      	(svbool_type_p): Don't apply TYPE_MAIN_VARIANT here.
      
      From-SVN: r277680
      Richard Sandiford committed
    • re PR fortran/92284 (Subroutine with bind(c) attribute causing varied problems) · aaa80941
      	PR fortran/92284
      	* gfortran.dg/bind_c_array_params_3_aux.c: Include
      	../../../libgfortran/ISO_Fortran_binding.h rather than
      	ISO_Fortran_binding.h.
      
      From-SVN: r277679
      Jakub Jelinek committed
    • Ensure that gfortran.dg/achar_2.f90 can fail · ffff4877
              * gfortran.dg/achar_2.f90: Remove bogus line from
              last commit.
      
      From-SVN: r277678
      Tobias Burnus committed
    • [arm] Avoid using negative offsets for 'immediate' addresses when compiling for Thumb2 · a2f9e6e3
      Thumb2 code now uses the Arm implementation of legitimize_address.
      That code has a case to handle addresses that are absolute CONST_INT
      values, which is a common use case in deeply embedded targets (eg:
      void *p = (void*)0x12345678).  Since thumb has very limited negative
      offsets from a constant, we want to avoid forming a CSE base that will
      then be used with a negative value.
      
      This was reported upstream originally in
      https://gcc.gnu.org/ml/gcc-help/2019-10/msg00122.html
      
      For example,
      
      void test1(void) {
        volatile uint32_t * const p = (uint32_t *) 0x43fe1800;
      
        p[3] = 1;
        p[4] = 2;
        p[1] = 3;
        p[7] = 4;
        p[0] = 6;
      }
      
      With the new code, instead of 
      
              ldr     r3, .L2
              subw    r2, r3, #2035
              movs    r1, #1
              str     r1, [r2]
              subw    r2, r3, #2031
              movs    r1, #2
              str     r1, [r2]
              subw    r2, r3, #2043
              movs    r1, #3
              str     r1, [r2]
              subw    r2, r3, #2019
              movs    r1, #4
              subw    r3, r3, #2047
              str     r1, [r2]
              movs    r2, #6
              str     r2, [r3]
              bx      lr
      
      
      We now get
      
              ldr     r3, .L2
              movs    r2, #1
              str     r2, [r3, #2060]
              movs    r2, #2
              str     r2, [r3, #2064]
              movs    r2, #3
              str     r2, [r3, #2052]
              movs    r2, #4
              str     r2, [r3, #2076]
              movs    r2, #6
              str     r2, [r3, #2048]
              bx      lr
      
      
      	* config/arm/arm.c (arm_legitimize_address): Don't form negative
      	offsets from a CONST_INT address when TARGET_THUMB2.
      
      From-SVN: r277677
      Richard Earnshaw committed
    • [arm] Pattern match insns for a + ~b + Carry · d84b9ad5
      On ARM, the SBC instruction is defined as
      
        Ra - Rb - ~C
      
      where C is the carry flag.  But -Rb = ~Rb + 1, so this is equivalent to
      
        Ra + ~Rb + 1 - ~C
      
      which then simplifies to
      
        Ra + ~Rb + C
      
      which is essentially an add-with-carry with one operand inverted.  We
      can define RTL patterns to match this.  In thumb2 we can only match
      when the operands are both registers, but in Arm state we can also use
      RSC to match when Rn is either a constant or a shifted operand.
      
      This overall simplifies some cases of 64-bit arithmetic, for example, 
      
      int64_t f (int64_t a, int64_t b) { return a + ~b; }
      
      will now compile to
      
        MVN  R2, R2
        ADDS R0, R0, R2
        SBC  R1, R1, R3
      
      	* config/arm/arm.md (add_not_cin): New insn.
      	(add_not_shift_cin): Likewise.
      
      From-SVN: r277676
      Richard Earnshaw committed
    • Remove dead code in IPA ICF. · 946b4a68
      2019-10-31  Martin Liska  <mliska@suse.cz>
      
      	* ipa-icf-gimple.c (func_checker::compare_tree_ssa_label): Remove.
      	* ipa-icf-gimple.h: Remove declaration from compare_tree_ssa_label
      	and compare_memory_operand.
      
      From-SVN: r277675
      Martin Liska committed
    • Ensure that gfortran.dg/achar_2.f90 can fail · 1a9e325f
              * gfortran.dg/achar_2.f90: Print 'DONE' and add dg-output.
      
      From-SVN: r277674
      Tobias Burnus committed
    • Improve tests for std::add_pointer · b9ff4d7c
      The type trait depends on is_void so the tests should check those cases.
      
      	* testsuite/20_util/add_pointer/value.cc: Check void types.
      
      From-SVN: r277672
      Jonathan Wakely committed
    • Remove PR 92268 workaround and fix new test failures · b3ffa117
      With the compiler bug fixed we can simplify the __sizable concept to use
      a return-type-requirement again. I also realised it was redundantly
      re-checking a subset of the sized_sentinel_for requirements.
      
      The compiler fix also revealed bugs in two tests which started to fail
      and are fixed by this patch.
      
      	* include/bits/range_access.h (__sizable): Rename to __sentinel_size.
      	Remove workaround for PR c++/92268 and remove redundant requirements
      	that are already checked by sized_sentinel_for.
      	* testsuite/std/ranges/access/cend.cc: Fix failures.
      	* testsuite/std/ranges/access/end.cc: Likewise.
      
      From-SVN: r277667
      Jonathan Wakely committed
    • Fix handling of arrays in range access customization points · beaecb2d
      This combines the overloads for arrays with the non-array overloads,
      using if-constexpr to choose between the cases, and also enforces the
      following:
      
      - ADL should only be used for class types and enumeration types.
      - ranges::begin should be ill-formed for rvalue arrays.
      - ranges::end should be ill-formed for rvalue arrays, unbounded
        arrays, and arrays of incomplete type.
      - ranges::size should be ill-formed for unbounded arrays.
      
      	* include/bits/range_access.h (ranges::begin): Combine array and
      	non-array overloads into one function template. Only use ADL for
      	classes and enums
      	(ranges::end, ranges::size): Likewise. Make unbounded arrays
      	ill-formed.
      	(ranges::rbegin, ranges::rend): Only use ADL for classes and enums.
      	Reformat _S_noexcept() functions to mirror operator() structure.
      	* testsuite/std/ranges/access/begin.cc: Check incomplete array.
      	* testsuite/std/ranges/access/end_neg.cc: New test.
      	* testsuite/std/ranges/access/size.cc: Check array of incomplete type.
      	* testsuite/std/ranges/access/size_neg.cc: New test.
      
      From-SVN: r277666
      Jonathan Wakely committed
    • [testsuite] Fix wrong order of dg-additional-options · d9a6144c
      gcc/testsuite/ChangeLog:
      2019-10-31  Andre Vieira  <andre.simoesdiasvieira@arm.com>
      
      	* gcc.target/aarch64/sve/reduc_strict_3.c: Fix option order.
      	* gcc.target/i386/avx-vzeroupper-19.c: Likewise.
      	* gcc.target/i386/avx2-vect-mask-store-move1.c: Likewise.
      	* gcc.target/i386/avx512f-gather-2.c: Likewise.
      	* gcc.target/i386/avx512f-gather-5.c: Likewise.
      	* gcc.target/i386/l_fma_double_1.c: Likewise.
      	* gcc.target/i386/l_fma_double_2.c: Likewise.
      	* gcc.target/i386/l_fma_double_3.c: Likewise.
      	* gcc.target/i386/l_fma_double_4.c: Likewise.
      	* gcc.target/i386/l_fma_double_5.c: Likewise.
      	* gcc.target/i386/l_fma_double_6.c: Likewise.
      	* gcc.target/i386/l_fma_float_1.c: Likewise.
      	* gcc.target/i386/l_fma_float_2.c: Likewise.
      	* gcc.target/i386/l_fma_float_3.c: Likewise.
      	* gcc.target/i386/l_fma_float_4.c: Likewise.
      	* gcc.target/i386/l_fma_float_5.c: Likewise.
      	* gcc.target/i386/l_fma_float_6.c: Likewise.
      	* gcc.target/i386/mask-pack.c: Likewise.
      	* gcc.target/i386/mask-unpack.c: Likewise.
      
      From-SVN: r277664
      Andre Vieira committed
    • Fortran] PR92284 – gfc_desc_to_cfi_desc fixes · fc5a9708
              gcc/fortran/
              PR fortran/92284.
              * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Free CFI descriptor
              at the end; partial revised revert of Rev. 277502.
      
              libgfortran/
              PR fortran/92284.
              * runtime/ISO_Fortran_binding.c (gfc_desc_to_cfi_desc):
      
              gcc/testsuite/
              PR fortran/92284.
              * gfortran.dg/bind-c-intent-out.f90: Update expected dump;
              extend comment.
              * gfortran.dg/bind_c_array_params_3.f90: New.
              * gfortran.dg/bind_c_array_params_3_aux.c: New.
      
      From-SVN: r277663
      Tobias Burnus committed
    • configure.ac: Compute and substitute omp_device_properties and omp_device_property_deps. · 9ba66bf5
      	* configure.ac: Compute and substitute omp_device_properties and
      	omp_device_property_deps.
      	* Makefile.in (generated_files): Add omp-device-properties.h.
      	(omp-general.o): Depend on omp-device-properties.h.
      	(omp_device_properties): New make variable.
      	(omp-device-properties.h, s-omp-device-properties-h,
      	install-omp-device-properties): New goals.
      	(install): Depend on install-omp-device-properties for accelerators.
      	* target.def (TARGET_OMP_DEVICE_KIND_ARCH_ISA): New target hook.
      	* target.h (enum omp_device_kind_arch_isa): New enum.
      	* doc/tm.texi.in: Add placeholder for TARGET_OMP_DEVICE_KIND_ARCH_ISA
      	documentation.
      	* omp-general.c: Include omp-device-properties.h.
      	(omp_max_simt_vf): Expect OFFLOAD_TARGET_NAMES to be separated by
      	colon instead of comma.
      	(omp_offload_device_kind_arch_isa, omp_maybe_offloaded): New
      	functions.
      	(omp_context_selector_matches): Implement device set arch/isa
      	selectors, improve device set kind selector handling.
      	* config/i386/i386-options.h (ix86_omp_device_kind_arch_isa): Declare.
      	* config/i386/i386.c (TARGET_SIMD_CLONE_ADJUST,
      	TARGET_SIMD_CLONE_USABLE): Formatting fix.
      	(TARGET_OMP_DEVICE_KIND_ARCH_ISA): Redefine to
      	ix86_omp_device_kind_arch_isa.
      	* config/i386/i386-options.c (struct ix86_target_opts): Move type
      	definition from ix86_target_string to file scope.
      	(isa2_opts, isa_opts): Moved arrays from ix86_target_string function
      	to file scope.
      	(ix86_omp_device_kind_arch_isa): New function.
      	(ix86_target_string): Moved struct ix86_target_opts, isa2_opts and
      	isa_opts definitions to file scope.
      	* config/i386/t-intelmic (omp-device-properties): New goal.
      	* config/nvptx/t-nvptx (omp-device-properties): Likewise.
      	* config/nvptx/nvptx.c (nvptx_omp_device_kind_arch_isa): New function.
      	(TARGET_OMP_DEVICE_KIND_ARCH_ISA): Redefine to
      	nvptx_omp_device_kind_arch_isa.
      	* configure: Regenerate.
      	* doc/tm.texi: Regenerate.
      testsuite/
      	* c-c++-common/gomp/declare-variant-9.c: New test.
      	* c-c++-common/gomp/declare-variant-10.c: New test.
      
      From-SVN: r277662
      Jakub Jelinek committed
    • Fortran] PR92277 - Fix assumed-rank array with bind(C) · 6409a3c0
              gcc/fortran/
              PR fortran/92277
              * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Fix DECL_ARTIFICIAL
              checking.
      
              gcc/testsuite/
              PR fortran/92277
              * fortran.dg/pr92277.f90: New.
      
      From-SVN: r277661
      Tobias Burnus committed
    • re PR middle-end/92231 (ICE in gimple_fold_stmt_to_constant_1) · 6773658a
      	PR middle-end/92231
      	* tree.h (fndecl_built_in_p): Use fndecl_built_in_p instead of
      	DECL_BUILT_IN in comment.  Remove redundant ()s around return
      	argument.
      	* tree.c (free_lang_data_in_decl): Check if var is FUNCTION_DECL
      	before calling fndecl_built_in_p.
      	* gimple-fold.c (gimple_fold_stmt_to_constant_1): Check if
      	TREE_OPERAND (fn, 0) is a FUNCTION_DECL before calling
      	fndecl_built_in_p on it.
      lto/
      	* lto-lang.c (handle_const_attribute): Don't call fndecl_built_in_p
      	on *node that is not FUNCTION_DECL.
      testsuite/
      	* gcc.c-torture/compile/pr92231.c: New test.
      
      From-SVN: r277660
      Jakub Jelinek committed
    • [vect]Make vect-epilogues-nomask=1 default · 1297712f
      This patch turns epilogue vectorization on by default for all targets.  The
      following test strategy was chosen for this:
      
      1) Disable epilogue vectorization for all tests that failed due to
      scan-tree-dump failures for aarch64, arm and x86_64 inside:
        - gcc.dg/vect
        - gcc.target/i386
        - gcc.target/aarch6
        - gfortran.dg/vect
      
      2) Add the Bugzilla's reported testcase but xfail the scan for
      "EPILOGUE VECTORIZED" for arm*-*-* as that target does not vectorize the
      epilogue.
      
      gcc/ChangeLog:
      2019-10-31  Andre Vieira  <andre.simoesdiasvieira@arm.com>
      
      	* params.def (PARAM_VECT_EPILOGUES_NOMASK): Enable by default.
      
      gcc/testsuite/ChangeLog:
      2019-10-31  Andre Vieira  <andre.simoesdiasvieira@arm.com>
      
      	* gcc.dg/vect/vect-epilogues.c: New test.
      	* gcc.dg/vect/fast-math-vect-call-1.c: Disable for epilogue
      	vectorization.
      	* gcc.dg/vect/no-fast-math-vect16.c: Likewise.
      	* gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c: Likewise.
      	* gcc.dg/vect/no-scevccp-vect-iv-3.c: Likewise.
      	* gcc.dg/vect/no-section-anchors-vect-31.c: Likewise.
      	* gcc.dg/vect/no-section-anchors-vect-64.c: Likewise.
      	* gcc.dg/vect/no-section-anchors-vect-66.c: Likewise.
      	* gcc.dg/vect/no-section-anchors-vect-68.c: Likewise.
      	* gcc.dg/vect/no-vfa-vect-dv-2.c: Likewise.
      	* gcc.dg/vect/pr33804.c: Likewise.
      	* gcc.dg/vect/pr53773.c: Likewise.
      	* gcc.dg/vect/pr65947-1.c: Likewise.
      	* gcc.dg/vect/pr65947-13.c: Likewise.
      	* gcc.dg/vect/pr65947-14.c: Likewise.
      	* gcc.dg/vect/pr65947-4.c: Likewise.
      	* gcc.dg/vect/pr80631-1.c: Likewise.
      	* gcc.dg/vect/pr80631-2.c: Likewise.
      	* gcc.dg/vect/slp-23.c: Likewise.
      	* gcc.dg/vect/slp-25.c: Likewise.
      	* gcc.dg/vect/slp-reduc-2.c: Likewise.
      	* gcc.dg/vect/slp-reduc-5.c: Likewise.
      	* gcc.dg/vect/slp-reduc-6.c: Likewise.
      	* gcc.dg/vect/slp-reduc-sad-2.c: Likewise.
      	* gcc.dg/vect/slp-widen-mult-half.c: Likewise.
      	* gcc.dg/vect/trapv-vect-reduc-4.c: Likewise.
      	* gcc.dg/vect/vect-103.c: Likewise.
      	* gcc.dg/vect/vect-109.c: Likewise.
      	* gcc.dg/vect/vect-119.c: Likewise.
      	* gcc.dg/vect/vect-24.c: Likewise.
      	* gcc.dg/vect/vect-26.c: Likewise.
      	* gcc.dg/vect/vect-27.c: Likewise.
      	* gcc.dg/vect/vect-29.c: Likewise.
      	* gcc.dg/vect/vect-42.c: Likewise.
      	* gcc.dg/vect/vect-44.c: Likewise.
      	* gcc.dg/vect/vect-48.c: Likewise.
      	* gcc.dg/vect/vect-50.c: Likewise.
      	* gcc.dg/vect/vect-52.c: Likewise.
      	* gcc.dg/vect/vect-54.c: Likewise.
      	* gcc.dg/vect/vect-56.c: Likewise.
      	* gcc.dg/vect/vect-58.c: Likewise.
      	* gcc.dg/vect/vect-60.c: Likewise.
      	* gcc.dg/vect/vect-72.c: Likewise.
      	* gcc.dg/vect/vect-75-big-array.c: Likewise.
      	* gcc.dg/vect/vect-75.c: Likewise.
      	* gcc.dg/vect/vect-77-alignchecks.c: Likewise.
      	* gcc.dg/vect/vect-77-global.c: Likewise.
      	* gcc.dg/vect/vect-78-alignchecks.c: Likewise.
      	* gcc.dg/vect/vect-78-global.c: Likewise.
      	* gcc.dg/vect/vect-89-big-array.c: Likewise.
      	* gcc.dg/vect/vect-89.c: Likewise.
      	* gcc.dg/vect/vect-91.c: Likewise.
      	* gcc.dg/vect/vect-92.c: Likewise.
      	* gcc.dg/vect/vect-96.c: Likewise.
      	* gcc.dg/vect/vect-cond-reduc-3.c: Likewise.
      	* gcc.dg/vect/vect-cond-reduc-4.c: Likewise.
      	* gcc.dg/vect/vect-live-1.c: Likewise.
      	* gcc.dg/vect/vect-live-2.c: Likewise.
      	* gcc.dg/vect/vect-live-3.c: Likewise.
      	* gcc.dg/vect/vect-live-4.c: Likewise.
      	* gcc.dg/vect/vect-live-slp-1.c: Likewise.
      	* gcc.dg/vect/vect-live-slp-2.c: Likewise.
      	* gcc.dg/vect/vect-live-slp-3.c: Likewise.
      	* gcc.dg/vect/vect-multitypes-3.c: Likewise.
      	* gcc.dg/vect/vect-multitypes-4.c: Likewise.
      	* gcc.dg/vect/vect-multitypes-6.c: Likewise.
      	* gcc.dg/vect/vect-peel-1-epilogue.c: Likewise. New test.
      	* gcc.dg/vect/vect-peel-1-src.c: Likewise. New test.
      	* gcc.dg/vect/vect-peel-1.c: Likewise.
      	* gcc.dg/vect/vect-peel-3-epilogue.c: Likewise. New test.
      	* gcc.dg/vect/vect-peel-3-src.c: Likewise. New test.
      	* gcc.dg/vect/vect-peel-3.c: Likewise.
      	* gcc.dg/vect/vect-peel-4-epilogue.c: Likewise. New test.
      	* gcc.dg/vect/vect-peel-4-src.c: Likewise. New test.
      	* gcc.dg/vect/vect-peel-4.c: Likewise.
      	* gcc.dg/vect/vect-reduc-6.c: Likewise.
      	* gcc.dg/vect/vect-reduc-dot-s16a.c: Likewise.
      	* gcc.dg/vect/vect-reduc-dot-s8a.c: Likewise.
      	* gcc.dg/vect/vect-reduc-dot-s8b.c: Likewise.
      	* gcc.dg/vect/vect-reduc-dot-u16b.c: Likewise.
      	* gcc.dg/vect/vect-reduc-dot-u8a.c: Likewise.
      	* gcc.dg/vect/vect-reduc-dot-u8b.c: Likewise.
      	* gcc.dg/vect/vect-reduc-pattern-1a.c: Likewise.
      	* gcc.dg/vect/vect-reduc-pattern-1b-big-array.c: Likewise.
      	* gcc.dg/vect/vect-reduc-pattern-1c-big-array.c: Likewise.
      	* gcc.dg/vect/vect-reduc-pattern-2a.c: Likewise.
      	* gcc.dg/vect/vect-reduc-pattern-2b-big-array.c: Likewise.
      	* gcc.dg/vect/vect-reduc-sad.c: Likewise.
      	* gcc.dg/vect/vect-widen-mult-const-s16.c: Likewise.
      	* gcc.dg/vect/vect-widen-mult-const-u16.c: Likewise.
      	* gcc.dg/vect/vect-widen-mult-half-u8.c: Likewise.
      	* gcc.dg/vect/vect-widen-mult-half.c: Likewise.
      	* gcc.dg/vect/vect-widen-mult-u16.c: Likewise.
      	* gcc.dg/vect/vect-widen-mult-u8-s16-s32.c: Likewise.
      	* gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c: Likewise.
      	* gcc.target/aarch64/sve/reduc_strict_3.c: Likewise.
      	* gcc.target/i386/avx-vzeroupper-19.c: Likewise.
      	* gcc.target/i386/avx2-vect-mask-store-move1.c: Likewise.
      	* gcc.target/i386/avx512f-gather-2.c: Likewise.
      	* gcc.target/i386/avx512f-gather-5.c: Likewise.
      	* gcc.target/i386/l_fma_double_1.c: Likewise.
      	* gcc.target/i386/l_fma_double_2.c: Likewise.
      	* gcc.target/i386/l_fma_double_3.c: Likewise.
      	* gcc.target/i386/l_fma_double_4.c: Likewise.
      	* gcc.target/i386/l_fma_double_5.c: Likewise.
      	* gcc.target/i386/l_fma_double_6.c: Likewise.
      	* gcc.target/i386/l_fma_float_1.c: Likewise.
      	* gcc.target/i386/l_fma_float_2.c: Likewise.
      	* gcc.target/i386/l_fma_float_3.c: Likewise.
      	* gcc.target/i386/l_fma_float_4.c: Likewise.
      	* gcc.target/i386/l_fma_float_5.c: Likewise.
      	* gcc.target/i386/l_fma_float_6.c: Likewise.
      	* gcc.target/i386/mask-pack.c: Likewise.
      	* gcc.target/i386/mask-unpack.c: Likewise.
      	* gfortran.dg/vect/vect-4.f90: Likewise.
      
      From-SVN: r277659
      Andre Vieira committed
    • Check precondition for std::ssize(const Container&) · 164abd67
      This precondition is the subject of a national body comment on the C++20
      CD. This just adds a test to ensure we enforce the precondition.
      
      Also move existing 24_iterator/range_access*.cc tests to a dedicated
      directory for the [iterator.range] subclause.
      
      	* testsuite/24_iterators/range_access*.cc: Move to ...
      	* testsuite/24_iterators/range_access/range_access*.cc: ... here.
      	* testsuite/24_iterators/range_access/range_access_cpp20_neg.cc: New
      	test.
      
      From-SVN: r277658
      Jonathan Wakely committed
    • Remove missing usage of cgraph_local_info in arm,bfin and c6x. · 83f58fe3
      2019-10-31  Martin Liska  <mliska@suse.cz>
      
      	* config/arm/arm.c (arm_get_pcs_model): Remove usage
      	of cgraph_local_info and use local_info_node instead.
      	* config/bfin/bfin.c (bfin_load_pic_reg): Likewise.
      	(bfin_function_ok_for_sibcall): Likewise.
      	* config/c6x/c6x.c (c6x_function_ok_for_sibcall): Likewise.
      	(must_reload_pic_reg_p): Likewise.
      
      From-SVN: r277657
      Martin Liska committed
    • re PR c++/90947 (Simple lookup table of array of strings is miscompiled) · fbdbe8b0
      	PR c++/90947
      	* tree.h (type_initializer_zero_p): Remove.
      	* tree.c (type_initializer_zero_p): Remove.
      cp/
      	* cp-tree.h (type_initializer_zero_p): Declare.
      	* decl.c (reshape_init_array_1): Formatting fix.
      	* tree.c (type_initializer_zero_p): New function.  Moved from
      	../tree.c, use next_initializable_field, formatting fix.  Return
      	false for TYPE_NON_AGGREGATE_CLASS types.
      
      From-SVN: r277656
      Jakub Jelinek committed
    • PR c++/84810 - constraints on lambdas · e4c43126
      Attached is a patch that adds parsing of the optional requires-clause in a
      lambda-expression and lambda-declarator. Additionally, shorthand constraints
      from the template-parameter-list are now actually applied and constrain the
      synthesized operator().
      
      Previously we were not parsing the requires clauses at all and not saving
      the shorthand constraints in the place expected by grokfndecl.
      
      The trailing requires-clause is now also used to suppress synthesis of the
      conversion to function pointer for non-capturing non-generic lambdas as per
      expr.prim.lambda.closure/7.
      
      This includes a fix to template_class_depth. Previously it was computing the
      wrong depth for lambdas in the initializer of a static member of a class
      template, exhibited by the concepts-lambda4 test which currently fails on
      trunk. The bug was causing grokfndecl to use the constraints from the
      template class for the lambda.
      
      gcc/cp/
      2019-10-30  Jeff Chapman II  <jchapman@lock3software.com>
      
      	PR c++/84810 - constraints on lambdas
      	* lambda.c (maybe_add_lambda_conv_op): Do not synthesize
      	conversion if the call operator does not satisfy its constraints.
      	* parser.c (cp_parser_lambda_declarator_opt): Parse
      	requires-clause on generic lambdas; combine with shorthand
      	constraints. Parse trailing requires-clause and attach to the
      	synthesized call operator.
      	* pt.c (template_class_depth): Only inspect
      	LAMBDA_TYPE_EXTRA_SCOPE if it is present. This fixes an
      	incorrect depth calculation for lambdas inside the initializer
      	of a static data member of a template class.
      
      gcc/testsuite/
      2019-10-30  Jeff Chapman II  <jchapman@lock3software.com>
      
      	PR c++/84810 - constraints on lambdas
      	* g++.dg/cpp2a/concepts-lambda2.C: New test.
      	* g++.dg/cpp2a/concepts-lambda3.C: Ditto.
      	* g++.dg/cpp2a/concepts-lambda4.C: Ditto.
      	* g++.dg/cpp2a/concepts-pr84810.C: Ditto.
      
      From-SVN: r277655
      Jeff Chapman II committed
    • PR c++/92268 - hard error satisfying return-type-requirement · 56e0346d
      Previously we would put the template arguments for the concept-check in a
      TEMPLATE_ID and then also pass them to constraints_satisfied_p, which meant
      that we would try to normalize the concept-check with the fully instantiated
      arguments, leading to sadness.  Simply not passing the args to
      constraints_satisfied_p fixes the problem.
      
      I also noticed that we weren't detecting substitution failure in the
      constraints, but were silently treating it as success.
      
      	* constraint.cc (type_deducible_p): Check for substitution failure.
      	(diagnose_compound_requirement): Adjust diagnostic.
      	* pt.c (do_auto_deduction): Don't pass cargs to
      	constraints_satisfied_p.
      
      From-SVN: r277654
      Jason Merrill committed
    • Daily bump. · d11368e6
      From-SVN: r277653
      GCC Administrator committed
  2. 30 Oct, 2019 13 commits
    • PR c++/91369 - Implement P0784R7: constexpr new · cf650568
      	PR c++/91369 - Implement P0784R7: constexpr new
      	* constexpr.c (cxx_replaceable_global_alloc_fn): Don't return true
      	for placement new.
      	(cxx_placement_new_fn, is_std_construct_at): New functions.
      	(cxx_eval_call_expression): Allow placement new in std::construct_at.
      	(potential_constant_expression_1): Likewise.
      
      	* g++.dg/cpp2a/constexpr-new5.C: New test.
      
      From-SVN: r277649
      Jakub Jelinek committed
    • typeck.c (decl_in_std_namespace_p): Return true also for decls in inline… · 97ccc60e
      typeck.c (decl_in_std_namespace_p): Return true also for decls in inline namespaces inside of std namespace.
      
      	* typeck.c (decl_in_std_namespace_p): Return true also for decls
      	in inline namespaces inside of std namespace.
      
      	* g++.dg/cpp0x/Wpessimizing-move6.C: New test.
      
      From-SVN: r277648
      Jakub Jelinek committed
    • re PR c++/92024 (crash in check_local_shadow) · e0d91792
      2019-10-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              * doc/invoke.texi (-Wshadow, -Wshadow=global
              -Wshadow=local, -Wshadow=compatible-local): Update documentation.
      
      cp:
      2019-10-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              PR c++/92024
              * name-lookup.c (check_local_shadow): Shadowing TYPE_DECLs
              is always a -Wshadow=compatible-local warning, unless
              -Wshadow is used.
      
      testsuite:
      2019-10-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              PR c++/92024
              * g++.dg/parse/crash70.C: New test.
              * c-c++-common/Wshadow-1.c: New test.
      
      From-SVN: r277643
      Bernd Edlinger committed
    • Fortran] PR 92208 don't use function-result dummy variable as actual argument · 6b7a9826
              PR fortran/92208
              * trans-array.c (gfc_conv_array_parameter): Only copy
              string-length backend_decl if expression is not a function.
      
              PR fortran/92208
              * gfortran.dg/pr92208.f90: New.
      
      From-SVN: r277639
      Tobias Burnus committed
    • * cxx-pretty-print.c (get_fold_operator): Use OVL_OP_INFO. · c7667624
      From-SVN: r277637
      Jason Merrill committed
    • PR c++/92134 - constinit malfunction in static data member. · d54faccc
      I wasn't properly setting LOOKUP_CONSTINIT in grokfield and so we didn't
      detect a non-const initializer.
      
      	* decl2.c (grokfield): Set LOOKUP_CONSTINIT.
      
      	* g++.dg/cpp2a/constinit14.C: New test.
      
      From-SVN: r277636
      Marek Polacek committed
    • Use if-constexpr instead of overloading for customization point · ce001b30
      This combines two of the std::ranges::swap.operator() overloads into a
      single function template. Using if-constexpr to choose between
      implementations should give the compiler less work to do than using
      overloading.
      
      	* include/std/concepts (std::ranges::swap): Use a single overload for
      	the non-array cases, and switch using if-constexpr.
      
      From-SVN: r277635
      Jonathan Wakely committed
    • Fix another compilation error with Clang · 41167956
      	* include/bits/stl_iterator.h (__normal_iterator::iterator_concept):
      	Guard with __cpp_lib_concepts macro.
      
      From-SVN: r277634
      Jonathan Wakely committed
    • Fix some missing/incorrect feature test macros · 0d58d88d
      	* include/std/bit (__cpp_lib_bitops): Define.
      	* include/std/version (__cpp_lib_constexpr): Remove.
      	(__cpp_lib_bitops, __cpp_lib_constexpr_dynamic_alloc): Define.
      	* testsuite/26_numerics/bit/header.cc: New test.
      	* testsuite/26_numerics/bit/header-2.cc: New test.
      	* testsuite/20_util/allocator_traits/header.cc: New test.
      	* testsuite/20_util/allocator_traits/header-2.cc: New test.
      
      From-SVN: r277633
      Jonathan Wakely committed
    • [C++ PATCH] Feature macros are long · 43f1814c
      https://gcc.gnu.org/ml/gcc-patches/2019-10/msg02157.html
      	* c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
      	macros.
      
      From-SVN: r277632
      Nathan Sidwell committed
    • Fortran/OpenMP] Don't create "alloc:" for 'target exit data' · 91ae0a46
              gcc/
              * gimplify.c (gimplify_scan_omp_clauses): Remove FE-generated
              GOMP_MAP_TO_PSET and GOMP_MAP_POINTER mapping for 'target update'
              and 'target exit data'.
      
              libgomp/
              * testsuite/libgomp.fortran/target9.f90: New.
      
      From-SVN: r277631
      Tobias Burnus committed
    • Remove some more using-declarations from namespace __gnu_cxx · d03eca30
      Similar to some recent patches, this removes using-declarations for
      names from namespace std, so that they are not redeclared in __gnu_cxx.
      
      	* include/bits/stl_iterator.h (namespace __gnu_cxx): Remove
      	using-declarations for std::iterator and std::iterator_traits.
      	(__gnu_cxx::__normal_iterator): Qualify iterator_traits.
      	* include/ext/algorithm (namespace __gnu_cxx): Remove
      	using-declarations for std names and qualify those names when used.
      	Also refer to std::min in parentheses to protect against function-like
      	macros.
      	* include/ext/rc_string_base.h: Qualify iterator_traits.
      	* include/ext/sso_string_base.h: Qualify iterator_traits.
      
      From-SVN: r277630
      Jonathan Wakely committed
    • Apply C++20 changes to various iterator types · 9aeb3bef
      This ensures that __normal_iterator<T*, C> satisfies the
      contiguous_iterator concept, by defining the iterator_concept member
      type.
      
      Also update vector<bool>'s iterators, reverse_iterator,
      istreambuf_iterator and ostreambuf_iterator to meet the C++20
      requirements.
      
      	PR libstdc++/92272
      	* include/bits/stl_bvector.h (_Bit_iterator::pointer)
      	(_Bit_const_iterator::pointer): Define as void for C++20.
      	* include/bits/stl_iterator.h (reverse_iterator::operator->()): Add
      	constraints for C++20.
      	(__normal_iterator::iterator_concept): Define for C++20.
      	* include/bits/streambuf_iterator.h (istreambuf_iterator::pointer):
      	Define as void for C++20.
      	(ostreambuf_iterator::difference_type): Define as ptrdiff_t for C++20.
      	(ostreambuf_iterator::ostreambuf_iterator()): Add default constructor
      	for C++20.
      	* testsuite/23_containers/vector/bool/iterator_c++20.cc: New test.
      	* testsuite/24_iterators/bidirectional/concept.cc: New test.
      	* testsuite/24_iterators/bidirectional/tag.cc: New test.
      	* testsuite/24_iterators/contiguous/concept.cc: New test.
      	* testsuite/24_iterators/contiguous/tag.cc: New test.
      	* testsuite/24_iterators/forward/concept.cc: New test.
      	* testsuite/24_iterators/forward/tag.cc: New test.
      	* testsuite/24_iterators/input/concept.cc: New test.
      	* testsuite/24_iterators/input/tag.cc: New test.
      	* testsuite/24_iterators/istreambuf_iterator/requirements/typedefs.cc:
      	New test.
      	* testsuite/24_iterators/ostreambuf_iterator/requirements/typedefs.cc:
      	New test.
      	* testsuite/24_iterators/output/concept.cc: New test.
      	* testsuite/24_iterators/output/tag.cc: New test.
      	* testsuite/24_iterators/random_access/concept.cc: New test.
      	* testsuite/24_iterators/random_access/tag.cc: New test.
      	* testsuite/24_iterators/range_operations/advance_debug_neg.cc: New
      	test.
      	* testsuite/24_iterators/random_access_iterator/26020.cc: Move to ...
      	* testsuite/24_iterators/operations/26020.cc: ... here.
      	* testsuite/24_iterators/random_access_iterator/
      	string_vector_iterators.cc: Move to ...
      	* testsuite/24_iterators/random_access/string_vector_iterators.cc: ...
      	here.
      
      From-SVN: r277629
      Jonathan Wakely committed