Commit Graph

30056 Commits

Author SHA1 Message Date
Martin Sebor 13e6ec34a8 Adjust dg-bogus pattern to match the text of the changed diagnostic.
gcc/testsuite:
	* gcc.dg/pr40340-3.c: Adjust directive pattern.
	* gcc.dg/pr40340-4.c: Same.

From-SVN: r246827
2017-04-10 17:26:17 -06:00
Nicolas Koenig a2cb1196cf re PR fortran/69498 (ICE on disjunct cases with displaced or incomplete embedded statement)
2017-04-10  Nicolas Koenig  <koenigni@student.ethz.ch>
            Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/69498 
	* module.c (gfc_match_submodule): Add error
	if function is called in the wrong state.

2017-04-10  Nicolas Koenig  <koenigni@student.ethz.ch>

	PR fortran/69498 
	* gfortran.dg/submodule_unexp.f90: Modified test
	to account for new error.
	* gfortran.dg/submodule_twice.f90: New Test


Co-Authored-By: Paul Thomas <pault@gcc.gnu.org>

From-SVN: r246826
2017-04-10 20:58:21 +00:00
Jakub Jelinek b447b28c5e re PR c++/80176 (cannot bind reference to static member function using object access expression)
PR c++/80176
	* tree.c (lvalue_kind): For COMPONENT_REF with BASELINK second
	operand, if it is a static member function, recurse on the
	BASELINK.

	* g++.dg/init/ref23.C: New test.

From-SVN: r246825
2017-04-10 22:49:11 +02:00
Thomas Koenig 3bbd6768bd re PR tree-optimization/80304 (Wrong result with do concurrent)
2017-04-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR tree-optimization/80304
	* gfortran.dg/do_concurrent_4.f90:  New test case.

From-SVN: r246824
2017-04-10 20:40:48 +00:00
Janus Weil 99827b5ca0 re PR fortran/80046 ([F03] Explicit interface required: pointer argument)
2017-04-10  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/80046
	* expr.c (gfc_check_pointer_assign): Check if procedure pointer
	components in a pointer assignment need an explicit interface.

2017-04-10  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/80046
	* gfortran.dg/proc_ptr_comp_48.f90: New test case.

From-SVN: r246823
2017-04-10 22:28:23 +02:00
David Edelsohn 7db31bc20c * g++.dg/torture/pr79905.C: Add -maltivec option.
From-SVN: r246820
2017-04-10 15:50:33 -04:00
Jeff Law 9058a2c5c5 re PR tree-optimization/80374 (ICE in fold_convert_loc, at fold-const.c:2384)
PR tree-optimization/80374
	* tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to
	record anything if we can not convert integer_zero_node to the
	desired type.

	PR tree-optimization/80374
	* g++.dg/pr80374.c: New test.

From-SVN: r246819
2017-04-10 13:19:42 -06:00
Kelvin Nilsen bd8f86429e re PR target/80108 (ICE in aggregate_value_p at function.c:2028)
gcc/ChangeLog:

2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR target/80108
	* config/rs6000/rs6000.c (rs6000_option_override_internal):
	Enhance special handling given to the TARGET_P9_MINMAX option in
	relation to certain other options.

gcc/testsuite/ChangeLog:

2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR target/80108
	* gcc.target/powerpc/ppc-fortran/ppc-fortran.exp: New file.
	* gcc.target/powerpc/ppc-fortran/pr80108-1.f90: New test.

From-SVN: r246818
2017-04-10 19:01:37 +00:00
Uros Bizjak f634dd47d6 unroll-7.c: Declare "a" as a pointer to external array.
* gcc.dg/unroll-7.c: Declare "a" as a pointer to external array.

From-SVN: r246817
2017-04-10 20:58:34 +02:00
Uros Bizjak 065ba17919 re PR testsuite/79356 (XPASS in attr-alloc_size-11.c)
PR testsuite/79356
	* gcc.dg/attr-alloc_size-11.c: Don't xfail on alpha.

From-SVN: r246816
2017-04-10 20:51:42 +02:00
Daniel Santos 71b838d035 re PR testsuite/79867 ([cygwin] LD_LIBRARY_PATH ignored, contaminating (nearly?) all test results)
2017-04-10  Daniel Santos <daniel.santos@pobox.com>

	PR testsuite/79867
	* lib/target-libpath.exp: Merge in cygwin fix from libffi.

From-SVN: r246813
2017-04-10 17:45:35 +00:00
Marek Polacek 98a7a34e26 re PR sanitizer/80348 (UBSAN: compile time crash in ubsan_instrument_division)
PR sanitizer/80348
	* typeck.c (cp_build_binary_op): Use NULL_TREE instead of NULL.  Set
	ORIG_TYPE earlier and not only when shortening.

	* g++.dg/ubsan/div-by-zero-3.C: New test.

From-SVN: r246812
2017-04-10 17:18:15 +00:00
Bin Cheng aac69a62a1 re PR tree-optimization/80153 (ivopt generate wrong code)
PR tree-optimization/80153
	* tree-affine.c (aff_combination_to_tree): Get base pointer from
	the first element of pointer type aff_tree.  Build result expr in
	aff_tree's type.
	(add_elt_to_tree): Convert to type unconditionally.  Remove other
	fold_convert calls.
	* tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
	(rewrite_use_nonlinear_expr): Check invariant using iv information.
	gcc/testsuite
	PR tree-optimization/80153
	* gcc.c-torture/execute/pr80153.c: New.

From-SVN: r246810
2017-04-10 16:51:44 +00:00
Richard Biener 737237c9b8 re PR middle-end/80362 (gcc miscompiles arithmetic with signed char)
2017-04-10  Richard Biener  <rguenther@suse.de>

	PR middle-end/80362
	* fold-const.c (fold_binary_loc): Look at unstripped ops when
	looking for NEGATE_EXPR in -A / -B to A / B folding.

	* gcc.dg/torture/pr80362.c: New testcase.

From-SVN: r246805
2017-04-10 13:02:12 +00:00
Richard Biener ba6ee9fc83 re PR tree-optimization/80304 (Wrong result with do concurrent)
2017-04-10  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80304
	* tree-ssa-loop-im.c (ref_indep_loop_p_1): Also recurse
	for safelen.

	* gcc.dg/torture/pr80304.c: New testcase.

From-SVN: r246803
2017-04-10 11:27:05 +00:00
Nathan Sidwell 4d1a05f138 re PR target/79905 (ICE in canonical types differ for identical types __vector(4) int and V4i {aka __vector(4) int})
PR target/79905
	* config/rs6000/rs6000.c (rs6000_vector_type): New.
	(rs6000_init_builtins): Use it.

	PR target/79905
	* g++.dg/torture/pr79905.C: New.

From-SVN: r246802
2017-04-10 11:25:44 +00:00
Martin Liska 3ee0fb02bb Evaluate a SAVE_EXPR before an UBSAN check (PR sanitizer/80350).
2017-04-10  Martin Liska  <mliska@suse.cz>

	PR sanitizer/80350
	* c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
	doing an UBSAN check.
2017-04-10  Martin Liska  <mliska@suse.cz>

	PR sanitizer/80350
	* c-c++-common/ubsan/pr80350.c: New test.

From-SVN: r246799
2017-04-10 07:29:29 +00:00
Jakub Jelinek 167a5b7797 re PR target/80324 (_mm512_reduce_xxx type instrinsics are missing)
PR target/80324
	* config/i386/avx512fintrin.h (_mm512_reduce_add_epi32,
	_mm512_reduce_mul_epi32, _mm512_reduce_and_epi32,
	_mm512_reduce_or_epi32, _mm512_mask_reduce_add_epi32,
	_mm512_mask_reduce_mul_epi32, _mm512_mask_reduce_and_epi32,
	_mm512_mask_reduce_or_epi32, _mm512_reduce_min_epi32,
	_mm512_reduce_max_epi32, _mm512_reduce_min_epu32,
	_mm512_reduce_max_epu32, _mm512_mask_reduce_min_epi32,
	_mm512_mask_reduce_max_epi32, _mm512_mask_reduce_min_epu32,
	_mm512_mask_reduce_max_epu32, _mm512_reduce_add_ps,
	_mm512_reduce_mul_ps, _mm512_mask_reduce_add_ps,
	_mm512_mask_reduce_mul_ps, _mm512_reduce_min_ps, _mm512_reduce_max_ps,
	_mm512_mask_reduce_min_ps, _mm512_mask_reduce_max_ps,
	_mm512_reduce_add_epi64, _mm512_reduce_mul_epi64,
	_mm512_reduce_and_epi64, _mm512_reduce_or_epi64,
	_mm512_mask_reduce_add_epi64, _mm512_mask_reduce_mul_epi64,
	_mm512_mask_reduce_and_epi64, _mm512_mask_reduce_or_epi64,
	_mm512_reduce_min_epi64, _mm512_reduce_max_epi64,
	_mm512_mask_reduce_min_epi64, _mm512_mask_reduce_max_epi64,
	_mm512_reduce_min_epu64, _mm512_reduce_max_epu64,
	_mm512_mask_reduce_min_epu64, _mm512_mask_reduce_max_epu64,
	_mm512_reduce_add_pd, _mm512_reduce_mul_pd, _mm512_mask_reduce_add_pd,
	_mm512_mask_reduce_mul_pd, _mm512_reduce_min_pd, _mm512_reduce_max_pd,
	_mm512_mask_reduce_min_pd, _mm512_mask_reduce_max_pd): New intrinsics.

	* gcc.target/i386/avx512f-reduce-op-1.c: New test.

From-SVN: r246798
2017-04-10 08:53:28 +02:00
Martin Liska d691b7e406 Revert r246759.
From-SVN: r246785
2017-04-08 17:09:58 +00:00
Jakub Jelinek c98b00166a avx512f-vgetmantps-2.c: Add -mfpmath=sse to dg-options.
* gcc.target/i386/avx512f-vgetmantps-2.c: Add -mfpmath=sse to
	dg-options.
	* gcc.target/i386/avx512f-vgetmantpd-2.c: Likewise.

From-SVN: r246775
2017-04-07 21:23:24 +02:00
Jakub Jelinek dcb2c52718 re PR target/80322 (convert intrinsics missing)
PR target/80322
	PR target/80323
	PR target/80325
	PR target/80326
	* config/i386/avxintrin.h (_mm256_cvtsd_f64, _mm256_cvtss_f32): New
	intrinsics.
	* config/i386/avx512fintrin.h (_mm512_int2mask, _mm512_mask2int,
	_mm512_abs_ps, _mm512_mask_abs_ps, _mm512_abs_pd, _mm512_mask_abs_pd,
	_mm512_cvtsd_f64, _mm512_cvtss_f32): Likewise.

	* gcc.target/i386/avx512f-undefined-1.c: New test.
	* gcc.target/i386/avx512f-cvtsd-1.c: New test.
	* gcc.target/i386/avx-cvtsd-1.c: New test.
	* gcc.target/i386/avx512f-cvtss-1.c: New test.
	* gcc.target/i386/avx512f-abspd-1.c: New test.
	* gcc.target/i386/avx-cvtss-1.c: New test.
	* gcc.target/i386/avx512f-absps-1.c: New test.
	* gcc.target/i386/avx512f-int2mask-1.c: New test.
	* gcc.target/i386/avx512f-mask2int-1.c: New test.

From-SVN: r246774
2017-04-07 21:22:00 +02:00
Marek Polacek 2166aeb3ab re PR c++/80095 (ICE with this pointer in NSDMI)
PR c++/80095
	* call.c (build_over_call): Don't check cxx_dialect.
	* cp-gimplify.c (cp_gimplify_init_expr): Don't check cxx_dialect nor
	whether SUB is a CONSTRUCTOR.
	* init.c (build_new_1): Don't check cxx_dialect.
	* tree.c (replace_placeholders): Add a function comment.  Return if
	not in C++14, or if the object isn't a (member of a) class.
	* typeck2.c (store_init_value): Don't check cxx_dialect nor whether
	TYPE is CLASS_TYPE_P.

	* g++.dg/cpp1y/nsdmi-aggr8.C: New test.

From-SVN: r246772
2017-04-07 18:09:55 +00:00
Marek Polacek 1ef532f452 re PR sanitizer/80348 (UBSAN: compile time crash in ubsan_instrument_division)
PR sanitizer/80348
	* typeck.c (cp_build_binary_op): Convert COP[01] to ORIG_TYPE.

	* g++.dg/ubsan/div-by-zero-2.C: New test.

From-SVN: r246770
2017-04-07 17:51:55 +00:00
Vladimir Makarov 057da7af80 re PR rtl-optimization/70478 ([LRA] S/390: Performance regression - superfluous stack frame)
2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70478
	* lra-constraints.c (process_alt_operands): Disfavor alternative
	insn memory operands.

2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70478
	* gcc.target/s390/pr70478.c: New.

From-SVN: r246764
2017-04-07 16:01:50 +00:00
Martin Liska 3b6cb9e37e Error message on target attribute on aarch64 target (PR target/79889).
2017-04-07  Martin Liska  <mliska@suse.cz>

	PR target/79889
	* g++.dg/ext/mv8.C: Add aarch64* targets.
2017-04-07  Martin Liska  <mliska@suse.cz>

	PR target/79889
	* config/aarch64/aarch64.c (aarch64_process_target_attr):
	Show error message instead of an ICE.

From-SVN: r246760
2017-04-07 11:20:01 +00:00
Martin Liska 70cd23c019 Add function part to a same comdat group (PR ipa/80212).
2017-04-07  Martin Liska  <mliska@suse.cz>

	PR ipa/80212
	* g++.dg/ipa/pr80212.C: New test.
2017-04-07  Martin Liska  <mliska@suse.cz>

	PR ipa/80212
	* ipa-split.c (split_function): Add function part to a same comdat
	group.

From-SVN: r246759
2017-04-07 10:36:21 +00:00
Thomas Preud'homme fe6bb25f9e [testsuite] Require c99_runtime for pr79800.c
2017-04-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/testsuite/
    * gcc.dg/tree-ssa/pr79800.c: Require c99_runtime.

From-SVN: r246758
2017-04-07 09:44:33 +00:00
Richard Biener bf7b869abb re PR tree-optimization/80334 (Segfault when taking address of copy of unaligned struct)
2017-04-07  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80334
	* g++.dg/torture/pr80334.C: Use __BIGGEST_ALIGNMENT__ for
	alignas on stack.

From-SVN: r246757
2017-04-07 08:47:43 +00:00
Richard Biener 2d143ba8cf re PR middle-end/80341 (gcc miscompiles division of signed char)
2017-04-07  Richard Biener  <rguenther@suse.de>

	PR middle-end/80341
	* tree.c (get_unwidened): Also handle ! for_type case for
	INTEGER_CSTs.
	* convert.c (do_narrow): Split out from ...
	(convert_to_integer_1): ... here.  Do not pass final truncation
	type to get_unwidened for TRUNC_DIV_EXPR.

	* gcc.dg/torture/pr80341.c: New testcase.

From-SVN: r246756
2017-04-07 08:20:24 +00:00
Jakub Jelinek ed3cd38d63 re PR debug/80234 (ICE in splice_child_die at dwarfout.c:5265)
PR debug/80234
	* dwarf2out.c (gen_member_die): Handle C++17 inline static data
	members with redundant out-of-class redeclaration.

	* g++.dg/debug/dwarf2/pr80234-1.C: New test.
	* g++.dg/debug/dwarf2/pr80234-2.C: New test.

From-SVN: r246743
2017-04-06 22:46:29 +02:00
Uros Bizjak e5f5658166 re PR target/79733 (ICE in int_mode_for_mode, at stor-layout.c:406)
PR target/79733
	* config/i386/i386.c (ix86_expand_builtin)
	<case IX86_BUILTIN_K{,OR}TEST{C,Z}{8,16,32,64}>: Determine insn operand
	mode from insn data. Convert operands to insn operand mode.
	Copy operands that don't satisfy insn predicate to a register.

testsuite/ChangeLog:

	PR target/79733
	* gcc.target/i386/pr79733.c: New test.

From-SVN: r246739
2017-04-06 20:49:43 +02:00
Uros Bizjak a5211c800e re PR target/80298 (<x86intrin.h> incompatible with -mno-sse)
PR target/80298
	* gcc.target/i386/pr80298-1.c: New test.
	* gcc.target/i386/pr80298-2.c: Ditto.

From-SVN: r246737
2017-04-06 20:34:18 +02:00
Thomas Preud'homme db086c9685 [ARM] Compile atomic_loaddi_11 for Cortex-R5
2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com

    gcc/testsuite/
    PR target/80082
    * gcc.target/arm/atomic_loaddi_11.c: Target Cortex-R5 instead of
    ARMv7-R.

From-SVN: r246733
2017-04-06 14:53:22 +00:00
Richard Biener 09b63f67a1 re PR tree-optimization/80334 (Segfault when taking address of copy of unaligned struct)
2017-04-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80334
	* tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
	preserve alignment of accesses.

	* g++.dg/torture/pr80334.C: New testcase.

From-SVN: r246731
2017-04-06 13:56:35 +00:00
Martin Liska d9f8c5af8b Cherry-pick upstream r299036 from libsanitizer (PR sanitizer/80166).
2017-04-06  Martin Liska  <mliska@suse.cz>

	PR sanitizer/80166
	* sanitizer_common/sanitizer_common_interceptors.inc (INTERCEPTOR):
	Cherry-pick upstream r299036.
2017-04-06  Martin Liska  <mliska@suse.cz>

	PR sanitizer/80166
	* gcc.dg/asan/pr80166.c: New test.

From-SVN: r246730
2017-04-06 13:42:24 +00:00
Rainer Orth 1b68991f4d Fix gcc.target/i386/pr79390.c for Solaris as
PR tree-optimization/79390
	* gcc.target/i386/pr79390.c: Allow for cmovl.a.

From-SVN: r246729
2017-04-06 13:11:21 +00:00
Richard Biener 0f78434635 re PR middle-end/80262 (address space gets lost in memory access)
2017-04-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80262
	* tree-sra.c (build_ref_for_offset): Preserve address-space
	information.
	* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
	Drop useless address-space information on MEM_REF offsets.

	* gcc.target/i386/pr80262.c: New testcase.

From-SVN: r246728
2017-04-06 12:31:05 +00:00
Richard Biener 23a429c2b2 re PR tree-optimization/80281 (Wrong constant folding)
2017-04-06  Richard Biener  <rguenther@suse.de>

	PR middle-end/80281
	* gcc.dg/tree-ssa/pr40921.c: Add -fp-contract=off.

From-SVN: r246726
2017-04-06 11:25:35 +00:00
Vladimir Makarov e2323a2b77 re PR rtl-optimization/70703 (Regression in register usage on x86)
2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70703
	* ira-color.c (update_costs_from_allocno): Use the smallest mode.
	(update_conflict_hard_regno_costs): Use long instead of unsigned
	arithmetic for cost calculation.

2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70703
	* gcc.target/i386/pr70703.c: New.

From-SVN: r246707
2017-04-05 15:07:51 +00:00
Jakub Jelinek 47a113429b re PR sanitizer/80308 (asan crash on big-endian powerpc-linux target)
PR sanitizer/80308
	* asan.c (asan_store_shadow_bytes): Fix location of last_chunk_value
	for big endian.

	* c-c++-common/asan/pr80308.c: New test.

Co-Authored-By: Bernd Edlinger <bernd.edlinger@hotmail.de>

From-SVN: r246703
2017-04-05 15:17:15 +02:00
Dominik Vogt d0ee17a526 PR target/79890: S/390: Fix crash.
builtin_eh_return requires the return address to be saved on the
stack.  The patch prevents using an FPR for that.

gcc/ChangeLog:

2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>

	PR target/79890
	* config/s390/s390.c (s390_register_info_gprtofpr): Return if
	call_eh_return is true.

gcc/testsuite/ChangeLog:

2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>

	PR target/79890
	* gcc.target/s390/pr79890.c: New test case.

From-SVN: r246701
2017-04-05 08:28:18 +00:00
Jakub Jelinek 36f896c772 re PR target/80310 (Bogus -Wpsabi warning with -fsanitize=signed-integer-overflow)
PR target/80310
	* tree-nvr.c: Include internal-fn.h.
	(pass_return_slot::execute): Ignore internal calls without
	direct optab.

	* c-c++-common/ubsan/pr80310.c: New test.

From-SVN: r246699
2017-04-05 07:25:18 +02:00
Jakub Jelinek e1201dff2f re PR c++/80297 (Compiler time crash: type mismatch in binary expression)
PR c++/80297
	* genmatch.c (capture::gen_transform): For GENERIC unshare_expr
	captures used multiple times, except for the last use.
	* generic-match-head.c: Include gimplify.h.

	* g++.dg/torture/pr80297.C: New test.

Co-Authored-By: Richard Biener <rguenther@suse.de>

From-SVN: r246693
2017-04-04 21:14:47 +02:00
Jakub Jelinek d16e2ddd26 re PR tree-optimization/79390 (10% performance drop in SciMark2 LU after r242550)
PR tree-optimization/79390
	* target.h (struct noce_if_info): Declare.
	* targhooks.h (default_noce_conversion_profitable_p): Declare.
	* target.def (noce_conversion_profitable_p): New target hook.
	* ifcvt.h (struct noce_if_info): New type, moved from ...
	* ifcvt.c (struct noce_if_info): ... here.
	(noce_conversion_profitable_p): Renamed to ...
	(default_noce_conversion_profitable_p): ... this.  No longer
	static nor inline.
	(noce_try_store_flag_constants, noce_try_addcc,
	noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
	noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
	instead of noce_conversion_profitable_p.
	* config/i386/i386.c: Include ifcvt.h.
	(ix86_option_override_internal): Don't override
	PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
	(ix86_noce_conversion_profitable_p): New function.
	(TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
	* config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
	* doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
	* doc/tm.texi: Regenerated.

	* gcc.target/i386/pr79390.c: New test.
	* gcc.dg/ifcvt-4.c: Use -mtune-ctrl=^one_if_conv_insn for i?86/x86_64.

From-SVN: r246686
2017-04-04 19:52:27 +02:00
Volker Reichelt c0ea338bd2 re PR c++/80296 (Broken diagnostic 'unary_plus_expr' not supported by expression)
PR c++/80296
        * cxx-pretty-print.c (cxx_pretty_printer::expression): Add
        UNARY_PLUS_EXPR case.

        * g++.dg/cpp0x/alias-decl-80296.C: New test.

From-SVN: r246683
2017-04-04 16:30:44 +00:00
Thomas Preud'homme a1527a93a6 [ARM] Fix small multiply feature
2017-04-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR target/80307
    * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
    instructions for small multiply cores.

    gcc/testsuite/
    PR target/80307
    * gcc.target/arm/small-multiply-m0-1.c: Do not skip test if not
    targeting any CPU or architecture.
    * gcc.target/arm/small-multiply-m0-2.c: Likewise.
    * gcc.target/arm/small-multiply-m0-3.c: Likewise.
    * gcc.target/arm/small-multiply-m0plus-1.c: Likewise.
    * gcc.target/arm/small-multiply-m0plus-2.c: Likewise.
    * gcc.target/arm/small-multiply-m0plus-3.c: Likewise.
    * gcc.target/arm/small-multiply-m1-1.c: Likewise.
    * gcc.target/arm/small-multiply-m1-2.c: Likewise.
    * gcc.target/arm/small-multiply-m1-3.c: Likewise.

From-SVN: r246682
2017-04-04 16:24:18 +00:00
Nicolas Koenig 15f12d9677 [multiple changes]
2017-03-18  Nicolas Koenig  <koenigni@student.ethz.ch> 
		PR fortran/69498
		* symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
		everything before it.

2017-03-18  Nicolas Koenig  <koenigni@student.ethz.ch>
		PR fortran/69498
		* gfortran.dg/submodule_unexp.f90: New test.

From-SVN: r246679
2017-04-04 13:41:41 +00:00
Jakub Jelinek b1fd967c2c re PR target/80286 (AVX2 _mm_cvtsi128_si32 doesn't return a proper 32bits int)
PR target/80286
	* config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
	int mode, convert_modes it to mode as unsigned, otherwise use
	lowpart_subreg to mode rather than SImode.
	* config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
	ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
	Use DImode instead of SImode for the shift count operand.
	* config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
	Likewise.
testsuite/
	* gcc.target/i386/avx-pr80286.c: New test.
	* gcc.dg/pr80286.c: New test.

From-SVN: r246676
2017-04-04 12:45:55 +02:00
Richard Biener 248179b5fc re PR tree-optimization/80281 (Wrong constant folding)
2017-04-04  Richard Biener  <rguenther@suse.de>

	PR middle-end/80281
	* match.pd (A + (-B) -> A - B): Make sure to preserve unsigned
	arithmetic done for the negate or the plus.  Simplify.
	(A - (-B) -> A + B): Likewise.
	* fold-const.c (split_tree): Make sure to not negate pointers.

	* gcc.dg/torture/pr80281.c: New testcase.

From-SVN: r246674
2017-04-04 09:06:04 +00:00
Richard Biener a577fcf2d5 re PR tree-optimization/80275 (Poor (but valid) code generated by optimizer passing optimizer list to function)
2017-04-04  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80275
	* g++.dg/opt/pr80275.C: Make g static.

From-SVN: r246671
2017-04-04 06:58:45 +00:00