aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2019-11-01Daily bump.GCC Administrator1-1/+1
From-SVN: r277703
2019-10-31Test --help=common for full sentencesAlexandre Oliva2-2/+5
The portion of help.exp that checks that help output contains full sentences failed to cover common options. for gcc/testsuite/ChangeLog * gcc.misc-tests/help.exp: Test --help=common for full sentences. From-SVN: r277686
2019-10-31re PR preprocessor/92296 (internal compiler error: Segmentation fault ↵Jakub Jelinek3-0/+121
#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
2019-10-31devices-main.c: Move to devices subdirectory.Jozef Lawrynowicz31-29/+69
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
2019-10-31[AArch64] Fix g++.target/aarch64/sve/vcond_1_run.CRichard Sandiford2-1/+5
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
2019-10-31[AArch64] Split gcc.target/aarch64/sve/vcond_4*Richard Sandiford7-132/+299
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
2019-10-31[AArch64] Split gcc.target/aarch64/sve/reduc_strict_3.cRichard Sandiford8-116/+155
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
2019-10-31[AArch64] Fix build for non-default languagesRichard Sandiford2-2/+9
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
2019-10-31re PR fortran/92284 (Subroutine with bind(c) attribute causing varied problems)Jakub Jelinek2-3/+9
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
2019-10-31Ensure that gfortran.dg/achar_2.f90 can failTobias Burnus2-1/+5
* gfortran.dg/achar_2.f90: Remove bogus line from last commit. From-SVN: r277678
2019-10-31[arm] Avoid using negative offsets for 'immediate' addresses when compiling ↵Richard Earnshaw2-7/+15
for Thumb2 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
2019-10-31[arm] Pattern match insns for a + ~b + CarryRichard Earnshaw2-0/+40
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
2019-10-31Remove dead code in IPA ICF.Martin Liska3-14/+6
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
2019-10-31Ensure that gfortran.dg/achar_2.f90 can failTobias Burnus2-0/+10
* gfortran.dg/achar_2.f90: Print 'DONE' and add dg-output. From-SVN: r277674
2019-10-31[testsuite] Fix wrong order of dg-additional-optionsAndre Vieira20-38/+60
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
2019-10-31Fortran] PR92284 – gfc_desc_to_cfi_desc fixesTobias Burnus6-6/+91
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
2019-10-31configure.ac: Compute and substitute omp_device_properties and ↵Jakub Jelinek18-136/+665
omp_device_property_deps. * 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
2019-10-31Fortran] PR92277 - Fix assumed-rank array with bind(C)Tobias Burnus4-2/+48
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
2019-10-31re PR middle-end/92231 (ICE in gimple_fold_stmt_to_constant_1)Jakub Jelinek8-5/+40
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
2019-10-31[vect]Make vect-epilogues-nomask=1 defaultAndre Vieira118-148/+524
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
2019-10-31Remove missing usage of cgraph_local_info in arm,bfin and c6x.Martin Liska4-18/+27
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
2019-10-31re PR c++/90947 (Simple lookup table of array of strings is miscompiled)Jakub Jelinek8-76/+97
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
2019-10-30PR c++/84810 - constraints on lambdasJeff Chapman II7-3/+270
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
2019-10-30PR c++/92268 - hard error satisfying return-type-requirementJason Merrill9-13/+43
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
2019-10-31Daily bump.GCC Administrator1-1/+1
From-SVN: r277653
2019-10-30PR c++/91369 - Implement P0784R7: constexpr newJakub Jelinek4-2/+150
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
2019-10-30typeck.c (decl_in_std_namespace_p): Return true also for decls in inline ↵Jakub Jelinek4-2/+157
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
2019-10-30re PR c++/92024 (crash in check_local_shadow)Bernd Edlinger7-32/+92
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
2019-10-30Fortran] PR 92208 don't use function-result dummy variable as actual argumentTobias Burnus4-1/+51
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
2019-10-30* cxx-pretty-print.c (get_fold_operator): Use OVL_OP_INFO.Jason Merrill2-46/+6
From-SVN: r277637
2019-10-30PR c++/92134 - constinit malfunction in static data member.Marek Polacek4-0/+26
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
2019-10-30[C++ PATCH] Feature macros are longNathan Sidwell2-66/+71
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
2019-10-30Fortran/OpenMP] Don't create "alloc:" for 'target exit data'Tobias Burnus2-0/+17
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
2019-10-30Edges to interposable calles are possibly_call_in_translation_unit_pMartin Jambor2-1/+7
2019-10-30 Martin Jambor <mjambor@suse.cz> ipa/92278 * cgraph.c (cgraph_edge::possibly_call_in_translation_unit_p): Fix availability comparison. From-SVN: r277627
2019-10-30msp430.c (msp430_expand_helper): Support expansion of calls to __mspabi_mpy* ↵Jozef Lawrynowicz3-14/+110
functions. 2019-10-30 Jozef Lawrynowicz <jozef.l@mittosystems.com> * config/msp430/msp430.c (msp430_expand_helper): Support expansion of calls to __mspabi_mpy* functions. * config/msp430/msp430.md (mulhisi3): New define_expand. (umulhisi3): New define_expand. (*mulhisi3_inline): Use old mulhisi3 define_insn. (*umulhisi3_inline): Use old umulhisi3 define_insn. From-SVN: r277624
2019-10-30msp430.c (msp430_check_index_not_high_mem): New.Jozef Lawrynowicz4-6/+82
gcc/ChangeLog: 2019-10-30 Jozef Lawrynowicz <jozef.l@mittosystems.com> * config/msp430/msp430.c (msp430_check_index_not_high_mem): New. (msp430_check_plus_not_high_mem): New. (msp430_op_not_in_high_mem): Use new functions to check if the operand might be in low memory. Indicate that a 16-bit absolute address is in lower memory. gcc/testsuite/ChangeLog: 2019-10-30 Jozef Lawrynowicz <jozef.l@mittosystems.com> * gcc.target/msp430/mlarge-use-430-insn.c: New test. From-SVN: r277623
2019-10-30Fix a call to ultimate_alias_targetMartin Jambor2-1/+6
2019-10-30 Martin Jambor <mjambor@suse.cz> * ipa-prop.c (ipa_compute_jump_functions_for_bb): Fix the call to ultimate_alias_target. From-SVN: r277622
2019-10-30re PR tree-optimization/92275 (ICE: error: definition in block 11 does not ↵Richard Biener4-23/+70
dominate use in block 15 since r277566) 2019-10-30 Richard Biener <rguenther@suse.de> PR tree-optimization/92275 * tree-vect-loop-manip.c (slpeel_update_phi_nodes_for_loops): Copy all loop-closed PHIs. * gcc.dg/torture/pr92275.c: New testcase. From-SVN: r277621
2019-10-30* g++.dg/gomp/declare-variant-6.C: New test.Jakub Jelinek2-0/+30
From-SVN: r277620
2019-10-30Use const_tree more in IPA ICF.Martin Liska3-19/+26
2019-10-30 Martin Liska <mliska@suse.cz> * ipa-icf-gimple.c (func_checker::compare_ssa_name): Use const_tree as function argument. (func_checker::compare_decl): Likewise. (func_checker::operand_equal_p): Likewise. (func_checker::compare_variable_decl): Likewise. (func_checker::parse_labels): Likewise. * ipa-icf-gimple.h: Likewise. From-SVN: r277619
2019-10-30Remove alias set comparison.Martin Liska6-15/+14
2019-10-30 Martin Liska <mliska@suse.cz> * ipa-icf-gimple.c (func_checker::compatible_types_p): Do not compare alias sets. It's handled by operand_equal_p. 2019-10-30 Martin Liska <mliska@suse.cz> * c-c++-common/Wstringop-truncation-4.c: Disable IPA ICF. * gcc.dg/tree-ssa/pr64910-2.c: Likewise. * gcc.dg/tree-ssa/pr79352.c: Likewise. From-SVN: r277618
2019-10-30Remove comparison for polymorphic types.Martin Liska4-23/+9
2019-10-30 Martin Liska <mliska@suse.cz> * ipa-icf-gimple.c (func_checker::func_checker): Do not initialize m_compare_polymorphic. (func_checker::compare_decl): Do not compare polymorphic types. * ipa-icf-gimple.h (m_compare_polymorphic): Remove. * ipa-icf.c (sem_function::equals_private): Do not call compare_polymorphic_p. From-SVN: r277617
2019-10-30IPA ICF: remove dead codeMartin Liska5-160/+18
2019-10-30 Martin Liska <mliska@suse.cz> * ipa-icf-gimple.c (func_checker::compare_ssa_name): Call compare_operand. (func_checker::compare_memory_operand): Remove. (func_checker::compare_cst_or_decl): Remove. (func_checker::operand_equal_valueize): Do not handle FIELD_DECL. (func_checker::compare_gimple_call): Call compare_operand. (func_checker::compare_gimple_assign): Likewise. * ipa-icf-gimple.h: Remove compare_cst_or_decl. * ipa-icf.c (sem_function::icf_handled_component_p): Remove. * ipa-icf.h (icf_handled_component_p): Remove. From-SVN: r277616
2019-10-30Integrate that for IPA ICF.Martin Liska4-152/+107
2019-10-30 Martin Liska <mliska@suse.cz> * ipa-icf-gimple.c (func_checker::hash_operand): New. (func_checker::compare_cst_or_decl): Remove handling of FIELD_DECL. (func_checker::compare_operand): Transform to ... (func_checker::operand_equal_p): ... this. * ipa-icf-gimple.h (class func_checker): Add operand_equal_p and hash_operand. * ipa-icf.c (sem_function::equals_private): Fix pushing and popping of cfun. From-SVN: r277615
2019-10-30Come up with an abstraction.Martin Liska4-302/+376
2019-10-30 Martin Liska <mliska@suse.cz> * fold-const.c (operand_equal_p): Move to ... (operand_compare::operand_equal_p): ... here. (operand_compare::verify_hash_value): New. (add_expr): Move to ... (operand_compare::hash_operand): ... here. * fold-const.h (operand_equal_p): Move to the class. (class operand_compare): New. * tree.c (add_expr): Remove. From-SVN: r277614
2019-10-30cp-tree.h (omp_declare_variant_finalize, [...]): Declare.Jakub Jelinek14-24/+691
* cp-tree.h (omp_declare_variant_finalize, build_local_temp): Declare. * decl.c: Include omp-general.h. (declare_simd_adjust_this): Add forward declaration. (omp_declare_variant_finalize_one, omp_declare_variant_finalize): New function. (cp_finish_decl, finish_function): Call omp_declare_variant_finalize. * parser.c (cp_finish_omp_declare_variant): Adjust parsing of the variant id-expression and propagate enough information to omp_declare_variant_finalize_one in the attribute so that it can finalize it. * class.c (finish_struct): Call omp_declare_variant_finalize. * tree.c (build_local_temp): No longer static, remove forward declaration. * c-c++-common/gomp/declare-variant-2.c: Add a test with , before match clause. * c-c++-common/gomp/declare-variant-6.c: Expect diagnostics also from C++ FE and adjust regexp so that it handles C++ pretty printing of function names. * g++.dg/gomp/declare-variant-1.C: New test. * g++.dg/gomp/declare-variant-2.C: New test. * g++.dg/gomp/declare-variant-3.C: New test. * g++.dg/gomp/declare-variant-4.C: New test. * g++.dg/gomp/declare-variant-5.C: New test. From-SVN: r277613
2019-10-30operand_equal_p: add support for OBJ_TYPE_REF.Martin Liska3-0/+29
2019-10-30 Martin Liska <mliska@suse.cz> * fold-const.c (operand_equal_p): Support OBJ_TYPE_REF. * tree.c (add_expr): Hash parts of OBJ_TYPE_REF. From-SVN: r277612
2019-10-30typeck.c (cp_build_modify_expr): Prefer error + inform to error + error in ↵Paolo Carlini5-15/+31
one place. /cp 2019-10-30 Paolo Carlini <paolo.carlini@oracle.com> * typeck.c (cp_build_modify_expr): Prefer error + inform to error + error in one place. (get_delta_difference_1): Likewise. (get_delta_difference): Likewise, in two places. /testsuite 2019-10-30 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/conversion/ptrmem2.C: Adjust for error + inform. * g++.dg/gomp/tpl-atomic-2.C: Likewise. From-SVN: r277610
2019-10-30Use symtab_node::order in LTO sections with body.Martin Liska21-65/+175
2019-10-30 Martin Liska <mliska@suse.cz> PR lto/91393 PR lto/88220 * cgraph.c (cgraph_node::get_create): Overwrite node->order from a first_clone in order to get proper LTO section in LTO stream. (cgraph_node::get_untransformed_body): Use lto_get_section_data where symtab_node::order must be provided. * cgraphclones.c (cgraph_node::find_replacement): Update also symbol order. * ipa-fnsummary.c (ipa_fn_summary_read): Use new function lto_get_summary_section_data. * ipa-hsa.c (ipa_hsa_read_summary): Likewise. * ipa-icf.c (sem_item_optimizer::read_summary): Likewise. * ipa-prop.c (ipa_prop_read_jump_functions): Likewise. (ipcp_read_transformation_summaries): Likewise. * ipa-sra.c (ipa_sra_read_summary): Likewise. * lto-cgraph.c (input_node): Add also order_base. (input_varpool_node): Likewise. (input_cgraph_1): Assign the order_base. (input_cgraph_opt_summary): Use new lto_get_summary_section_data. * lto-opts.c (lto_write_options): Pass new argument. * lto-section-in.c (lto_get_section_data): Add new argumente order. (lto_get_summary_section_data): New. (lto_get_raw_section_data): Add order argument. (lto_create_simple_input_block): Likewise. * lto-section-out.c (lto_destroy_simple_output_block): Likewise. * lto-streamer-in.c (lto_input_toplevel_asms): Use lto_get_summary_section_data. (lto_input_mode_table): Likewise. * lto-streamer-out.c (produce_asm): Pass symtab_node::order. (lto_output_toplevel_asms): Pass new argument. (copy_function_or_variable): Likewise. (produce_lto_section):Likewise. (produce_symtab): Likewise. (lto_write_mode_table): Likewise. (produce_asm_for_decls): Likewise. * lto-streamer.c (lto_get_section_name): Concat symbol name and symbol order. * lto-streamer.h (lto_get_section_data): Add order argument. (lto_get_summary_section_data): New. (lto_get_raw_section_data): Add order argument. (lto_get_section_name): Likewise. * varpool.c (varpool_node::get_constructor): Pass order argument. 2019-10-30 Martin Liska <mliska@suse.cz> PR lto/91393 PR lto/88220 * lto-common.c (lto_file_finalize): Use lto_get_summary_section_data. (get_section_data): Add order argument. 2019-10-30 Martin Liska <mliska@suse.cz> PR lto/91393 PR lto/88220 * gcc.dg/lto/pr91393_0.c: New test. From-SVN: r277607
2019-10-30re PR tree-optimization/92262 (ICE: verify_gimple failed (error: incorrect ↵Jakub Jelinek4-40/+136
sharing of tree nodes)) PR tree-optimization/92262 * tree-ssa-loop-ivopts.c (get_debug_computation_at): Don't unshare ubase or cbase here. (remove_unused_ivs): Unshare comp before using it. * g++.dg/opt/pr92262.C: New test. From-SVN: r277605