Commit Graph

29930 Commits

Author SHA1 Message Date
Rainer Orth f0d7b52d4f Adjust c-c++-common/Wimplicit-fallthrough-7.c etc. line numbers
* c-c++-common/Wimplicit-fallthrough-7.c: Adjust dg-warning
	etc. line numbers.
	* gcc.dg/Walloca-1.c: Likewise.
	* gcc.dg/Walloca-2.c: Likewise.
	* gcc.dg/Wvla-larger-than-2.c: Likewise.

From-SVN: r246440
2017-03-24 12:57:14 +00:00
Bill Schmidt 635684c4cf re PR tree-optimization/80158 (ICE in all_phi_incrs_profitable)
2017-03-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/80158
	* gimple-ssa-strength-reduction.c (replace_mult_candidate): When
	replacing a candidate statement, also replace it for the
	candidate's alternate interpretation.
	(replace_rhs_if_not_dup): Likewise.
	(replace_one_candidate): Likewise.

	* gfortran.fortran-torture/compile/pr80158.f: New file.

From-SVN: r246439
2017-03-24 12:34:19 +00:00
Richard Biener 76afddf36b re PR tree-optimization/80167 (ICE in translate_isl_ast_to_gimple::is_valid_rename at gcc/graphite-isl-ast-to-gimple.c:1139)
2017-03-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80167
	* graphite-isl-ast-to-gimple.c
	(translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
	properly.
	(translate_isl_ast_to_gimple::get_rename): Likewise.

	* gcc.dg/graphite/pr80167.c: New testcase.

From-SVN: r246438
2017-03-24 12:16:43 +00:00
Tom de Vries c2e389bf38 Require effective target global_constructor for two testcases
2017-03-24  Tom de Vries  <tom@codesourcery.com>

	PR testsuite/80092
	* gcc.dg/no_profile_instrument_function-attr-1.c: Add
	dg-require-effective-target global_constructor.
	* gcc.dg/tls/emutls-2.c: Same.

From-SVN: r246436
2017-03-24 06:29:06 +00:00
Tom de Vries a72821b44f Require effective target indirect_jump in Wimplicit-fallthrough-34.c
2017-03-24  Tom de Vries  <tom@codesourcery.com>

	PR testsuite/80092
	* c-c++-common/Wimplicit-fallthrough-34.c: Add
	dg-require-effective-target indirect_jumps.

From-SVN: r246435
2017-03-24 06:28:53 +00:00
Tom de Vries 1658def9bd Require effective target nonlocal_goto in pr79244.c
2017-03-24  Tom de Vries  <tom@codesourcery.com>

	PR testsuite/80092
	* gcc.dg/torture/pr79244.c: Add dg-require-effective-target
	nonlocal_goto.

From-SVN: r246434
2017-03-24 06:28:42 +00:00
Tom de Vries 90e0269253 Add missing dg-require-effective-target alloca in gcc testsuite
2017-03-24  Tom de Vries  <tom@codesourcery.com>

	PR testsuite/80092
	* gcc.dg/Walloca-7.c: Add dg-require-effective-target alloca.
	* gcc.dg/Walloca-12.c: Same.
	* gcc.dg/attr-alloc_size-8.c: Same.
	* gcc.dg/Walloca-4.c: Same.
	* gcc.dg/Walloca-8.c: Same.
	* gcc.dg/Walloca-13.c: Same.
	* gcc.dg/Walloca-14.c: Same.
	* gcc.dg/attr-alloc_size-9.c: Same.
	* gcc.dg/Walloca-1.c: Same.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Same.
	* gcc.dg/Walloca-5.c: Same.
	* gcc.dg/Walloca-10.c: Same.
	* gcc.dg/Walloca-9.c: Same.
	* gcc.dg/attr-alloc_size-6.c: Same.
	* gcc.dg/Wvla-larger-than-1.c: Same.
	* gcc.dg/torture/pr71881.c: Same.
	* gcc.dg/torture/pr71901.c: Same.
	* gcc.dg/torture/pr78742.c: Same.
	* gcc.dg/builtin-alloc-size.c: Same.
	* gcc.dg/Walloca-2.c: Same.
	* gcc.dg/Walloca-6.c: Same.
	* gcc.dg/Walloca-11.c: Same.
	* gcc.dg/attr-alloc_size-7.c: Same.
	* gcc.dg/Wvla-larger-than-2.c: Same.
	* gcc.dg/Walloca-3.c: Same.
	* c-c++-common/Wimplicit-fallthrough-7.c: Same.
	* gcc.c-torture/compile/pr79413.c: Same.
	* gcc.c-torture/compile/pr78439.c: Same.

From-SVN: r246433
2017-03-24 06:28:12 +00:00
Kelvin Nilsen 842392c856 p9-options-1.c: New test.
gcc/testsuite/ChangeLog:

2017-03-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	* gcc.target/powerpc/p9-options-1.c: New test.

gcc/ChangeLog:

2017-03-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	* config/rs6000/rs6000.c (rs6000_option_override_internal): Change
	handling of certain combinations of target options, including the
	combinations -mpower8-vector vs. -mno-vsx, -mpower9-vector vs.
	-mno-power8-vector, and -mpower9_dform vs. -mno-power9-vector.

From-SVN: r246428
2017-03-23 22:12:06 +00:00
Kyrylo Tkachov de2b3f5ca9 [ARM] PR target/71436: Restrict *load_multiple pattern till after LRA
PR target/71436
	* config/arm/arm.md (*load_multiple): Add reload_completed to
	matching condition.

	* gcc.c-torture/compile/pr71436.c: New test.

From-SVN: r246419
2017-03-23 14:55:48 +00:00
William Schmidt 2e6315ef8c re PR tree-optimization/79908 (ICE in gimplify_expr (gimplify.c:12155) gimplification failed)
[gcc]

2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
            Richard Biener  <rguenth@suse.com>

	PR tree-optimization/79908
	PR tree-optimization/80136
	* tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
	been cast away, gimplify_and_add suffices.

[gcc/testsuite]

2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
            Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79908
	PR tree-optimization/80136
	* gcc.dg/torture/pr79908.c: New file.

From-SVN: r246418
2017-03-23 13:13:44 +00:00
Nicolas Koenig 9cdf036303 re PR fortran/39239 (Reject SAVEd variables EQUIVALENCEd to a COMMON)
2017-03-22 Nicolas Koenig <koenigni@student.ethz.ch>

	PR fortran/39239
	* gfortran.dg/equiv_constraint_bind_c.f90: New test.

From-SVN: r246405
2017-03-22 19:08:36 +00:00
Nicolas Koenig e59a225fe0 ChangeLog: Add forgotten entry for r246322.
2017-03-21  Nicolas Koenig  <koenigni@student.ethz.ch>

	* fortran/ChangeLog: Add forgotten entry for r246322.
	* testsuite/ChangeLog: Likewise.

From-SVN: r246404
2017-03-22 19:03:50 +00:00
Jakub Jelinek f13e9cd513 re PR c++/80141 (ICE with pragma omp declare)
PR c++/80141
	* semantics.c (finish_omp_clause) <case OMP_CLAUSE_SIMDLEN,
	case OMP_CLAUSE_ALIGNED>: Call maybe_constant_value only when not
	processing_template_decl.

	* g++.dg/gomp/pr80141.C: New test.

From-SVN: r246403
2017-03-22 19:53:47 +01:00
Jakub Jelinek 68ed2ba0a7 re PR c++/80129 (wrong code with ternary struct assignment to const)
PR c++/80129
	* gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
	TREE_READONLY on result if writing it more than once.

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

From-SVN: r246401
2017-03-22 19:45:48 +01:00
Jakub Jelinek f3dd574e54 re PR sanitizer/80110 (error: statement marked for throw, but doesn’t w/ -fsanitize=thread)
PR sanitizer/80110
	* tsan.c: Include tree-eh.h.
	(instrument_builtin_call): Call maybe_clean_eh_stmt or
	maybe_clean_or_replace_eh_stmt where needed.
	(instrument_memory_accesses): Add cfg_changed argument.
	Call gimple_purge_dead_eh_edges on each block and set *cfg_changed
	if it returned true.
	(tsan_pass): Adjust caller.  Return TODO_cleanup_cfg if cfg_changed.

	* g++.dg/tsan/pr80110.C: New test.

From-SVN: r246399
2017-03-22 19:34:44 +01:00
Thomas Koenig 918b6c9ec2 re PR fortran/80142 (Warning: No location in expression ... with -O / -ffrontend-optimize)
2017-03-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/80142
	* frontend-passes.c (combine_array_constructor): Take
	location of new expression from constructor expression instead
	of constructor.

2017-03-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/80142
	* gfortran.dg/any_loc.f90: New test case.

From-SVN: r246388
2017-03-22 15:20:17 +00:00
Thomas Preud'homme bf634d1c4c Fix PR80082: LDRD erronously used for 64bit load on ARMv7-R
2017-03-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR target/80082
    * config/arm/arm-isa.h (isa_bit_lpae): New feature bit.
    (ISA_ARMv7ve): Add isa_bit_lpae to the definition.
    * config/arm/arm-protos.h (arm_arch7ve): Rename into ...
    (arm_arch_lpae): This.
    * config/arm/arm.c (arm_arch7ve): Rename into ...
    (arm_arch_lpae): This.  Define it in term of isa_bit_lpae.
    * config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
    arm_arch_lpae.

    gcc/testsuite/
    PR target/80082
    * gcc.target/arm/atomic_loaddi_10.c: New testcase.
    * gcc.target/arm/atomic_loaddi_11.c: Likewise.

From-SVN: r246365
2017-03-22 11:35:15 +00:00
Martin Liska f7325b95de Error message on target attribute on power target (PR target/79906)
2017-03-22  Martin Liska  <mliska@suse.cz>

	PR target/79906
	* config/rs6000/rs6000.c (rs6000_inner_target_options): Show
	error message instead of an ICE.
2017-03-22  Martin Liska  <mliska@suse.cz>

	PR target/79906
	* g++.dg/ext/mv8.C: Add power* targets.

From-SVN: r246345
2017-03-22 09:21:56 +00:00
Martin Sebor 3f01b620a7 PR c++/79548 - missing -Wunused-variable on a typedef'd variable in a function template
gcc/c-family/ChangeLog:

	PR c++/79548
	* c-common.c (set_underlying_type): Mark type used only when
	original del is declared unused.

gcc/testsuite/ChangeLog:

	PR c++/79548
	* g++.dg/warn/Wunused-var-26.C: New test.

From-SVN: r246335
2017-03-21 16:33:39 -06:00
Bill Schmidt 1cefb0511e re PR tree-optimization/79908 (ICE in gimplify_expr (gimplify.c:12155) gimplification failed)
[gcc]

2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/79908
	* tree-stdarg.c (expand_ifn_va_arg_1): Revert the following
	change: For a VA_ARG whose LHS has been cast away, use
	force_gimple_operand to construct the side effects.

[gcc/testsuite]

2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/79908
	* gcc.dg/torture/pr79908.c: Revert addition of new file.

From-SVN: r246330
2017-03-21 18:14:42 +00:00
Marek Polacek edc1747f1f re PR tree-optimization/80109 (ICE in get_range_info, at tree-ssanames.c:375)
PR tree-optimization/80109
	* gimple-ssa-warn-alloca.c (alloca_call_type): Only call get_range_info
	on INTEGRAL_TYPE_P.

	* gcc.dg/Walloca-14.c: New test.

Co-Authored-By: Martin Sebor <msebor@redhat.com>

From-SVN: r246325
2017-03-21 16:21:14 +00:00
Jakub Jelinek 85106b8757 re PR target/80125 (r246297 causes segfault in reg_used_between_p())
PR target/80125
	* combine.c (can_combine_p): Revert the 2017-03-20 change, only
	check reg_used_between_p between insn and one of succ or succ2
	depending on if succ is artificial insn not inserted into insn
	stream.

	* gcc.target/powerpc/pr80125.c: New test.

Co-Authored-By: Segher Boessenkool <segher@kernel.crashing.org>

From-SVN: r246323
2017-03-21 15:49:51 +01:00
Bill Schmidt 0ffe60b505 re PR tree-optimization/79908 (ICE in gimplify_expr (gimplify.c:12155) gimplification failed)
[gcc]

2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
            Richard Biener  <rguenth@suse.com>

	PR tree-optimization/79908
	* tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
	been cast away, use force_gimple_operand to construct the side
	effects.

[gcc/testsuite]

2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
            Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79908
	* gcc.dg/torture/pr79908.c: New file.


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

From-SVN: r246319
2017-03-21 13:57:20 +00:00
Senthil Kumar Selvaraj 54eb90fe8a Fix failing overflow-1.c for avr
The test assumes 32 bit ints, and expects a constant in the
dump that is only valid for 32 bit ints. Fix by explicitly
specifying __UINT32_TYPE__.

gcc/testsuite/

2017-03-21  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

	* gcc.dg/tree-ssa/overflow-1.c: Use __UINT32_TYPE__ for targets
	with sizeof(int) < 4.

From-SVN: r246318
2017-03-21 12:05:09 +00:00
Martin Liska 5611c45690 Fix dg-error for a test
2017-03-21  Martin Liska  <mliska@suse.cz>

	* gcc.target/i386/pr65044.c: Add '.' in order to catch
	apostrophes.

From-SVN: r246316
2017-03-21 12:01:40 +00:00
Richard Biener e650ea2a5e re PR tree-optimization/80032 (C++ excessive stack usage (no stack reuse))
2017-03-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80032
	* gimplify.c (gimple_push_cleanup): Add force_uncond parameter,
	if set force the cleanup to happen unconditionally.
	(gimplify_target_expr): Push inserted clobbers with force_uncond
	to avoid them being removed by control-dependent DCE.

	* g++.dg/opt/pr80032.C: New testcase.

From-SVN: r246314
2017-03-21 11:43:45 +00:00
Richard Biener da2ce5f993 re PR tree-optimization/80122 (__builtin_va_arg_pack() and __builtin_va_arg_pack_len() does not work correctly)
2017-03-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80122
	* tree-inline.c (copy_bb): Do not expans va-arg packs or
	va_arg_pack_len when the inlined call stmt requires pack
	expansion itself.
	* tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.

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

From-SVN: r246313
2017-03-21 11:42:22 +00:00
Toma Tabacu 9d60683aa0 Skip gcc.dg/pic-2.c and gcc.dg/pie-2.c for MIPS.
gcc/testsuite/

	* gcc.dg/pic-2.c: Skip for MIPS.
	* gcc.dg/pie-2.c: Skip for MIPS.

From-SVN: r246311
2017-03-21 11:07:19 +00:00
Paolo Carlini d3e19c2c97 re PR c++/77752 (ICE on C++ code on x86_64-linux-gnu (internal compiler error: Segmentation fault, build_list_conv, implicit_conversion))
/cp
2017-03-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/77752
	* name-lookup.c (pushtag_1): Add check for bogus, non template,
	std::initializer_list.

/testsuite
2017-03-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/77752
	* g++.dg/cpp0x/initlist97.C: New.
	* g++.dg/cpp0x/initlist85.C: Update.

From-SVN: r246310
2017-03-21 10:18:51 +00:00
Jakub Jelinek 9f30dff0ee re PR middle-end/67338 (fold-const sanitizer runtime error in roundup_loc)
PR c/67338
	* fold-const.c (round_up_loc): Negate divisor in unsigned type to
	avoid UB.

	* gcc.dg/pr67338.c: New test.

From-SVN: r246305
2017-03-21 09:10:30 +01:00
Jakub Jelinek 8bee092e7f re PR c++/35878 ([LWG 2302] Useless NULL pointer check when constructing object)
PR c++/35878
	* init.c (std_placement_new_fn_p, build_new_1): Formatting fixes.

	* g++.dg/init/pr35878_1.C: Rewrite directives to scan optimized
	dump instead of assembler.
	* g++.dg/init/pr35878_2.C: Likewise.
	* g++.dg/init/pr35878_3.C: Likewise.

From-SVN: r246303
2017-03-21 08:30:48 +01:00
Jakub Jelinek 4d1b8e70fa re PR c/80097 (internal compiler error in c_fully_fold_internal with std=c89 and -fsanitize=float-divide-by-zero)
PR c/80097
	* c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
	optional COMPOUND_EXPR with ubsan instrumentation.

	* gcc.dg/ubsan/pr80097.c: New test.

From-SVN: r246302
2017-03-21 08:01:05 +01:00
Bill Schmidt c34923c44c re PR tree-optimization/80054 (ICE in verify_ssa with -O3 -march=broadwell/skylake-avx512)
[gcc]

2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/80054
	* gimple-ssa-strength-reduction.c (all_phi_incrs_profitable): Fail
	the optimization if a PHI or any of its arguments is not dominated
	by the candidate's basis.  Use gphi* rather than gimple* as
	appropriate.
	(replace_profitable_candidates): Clean up a gimple* variable that
	should be a gphi* variable.

[gcc/testsuite]

2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/80054
	* g++.dg/torture/pr80054.C: New file.

From-SVN: r246290
2017-03-20 20:04:25 +00:00
Kelvin Nilsen b0ba96c2f1 re PR target/79963 (vec_eq_any extracts wrong CR bit when compiling with -mcpu=power9)
gcc/testsuite/ChangeLog:

2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR target/79963
	* gcc.target/powerpc/vsu/vec-any-eq-10.c: Add scan-assembler
	directive to assure selection of proper bit using rlwinm insn.
	* gcc.target/powerpc/vsu/vec-any-eq-14.c: Likewise.
	* gcc.target/powerpc/vsu/vec-any-eq-7.c: Likewise.
	* gcc.target/powerpc/vsu/vec-any-eq-8.c: Likewise.
	* gcc.target/powerpc/vsu/vec-any-eq-9.c: Likewise.

gcc/ChangeLog:

2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR target/79963
	* config/rs6000/altivec.h (vec_all_ne): Under __cplusplus__ and
	__POWER9_VECTOR__ #ifdef control, change template definition to
	use Power9-specific built-in function.
	(vec_any_eq): Likewise.
	* config/rs6000/vector.md (vector_ae_v2di_p): Change the flag used
	to control outcomes from this test.
	(vector_ae_<mode>p): For VEC_F modes, likewise.

From-SVN: r246287
2017-03-20 18:05:00 +00:00
Marek Polacek 92377255c1 PR c++/80059 - ICE with noexcept and __transaction_atomic
PR c++/80059 - ICE with noexcept and __transaction_atomic
	* except.c (build_must_not_throw_expr): Call
	instantiate_non_dependent_expr_sfinae.

	* g++.dg/tm/pr80059-2.C: New test.
	* g++.dg/tm/pr80059.C: New test.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r246279
2017-03-20 15:02:09 +00:00
Martin Liska 243e28bfb9 MPX: fix PR middle-end/79753
2017-03-20  Martin Liska  <mliska@suse.cz>

	PR middle-end/79753
	* tree-chkp.c (chkp_build_returned_bound): Do not build
	returned bounds for a LHS that's not a BOUNDED_P type.
2017-03-20  Martin Liska  <mliska@suse.cz>

	PR middle-end/79753
	* gcc.target/i386/mpx/pr79753.c: New test.

From-SVN: r246276
2017-03-20 10:06:00 +00:00
Martin Liska 918112d378 Fix *_CST ICEs connected to MPX.
2017-03-20  Martin Liska  <mliska@suse.cz>

	PR target/79769
	PR target/79770
	* tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
	COMPLEX_CST and VECTOR_CST.
2017-03-20  Martin Liska  <mliska@suse.cz>

	PR target/79769
	PR target/79770
	* g++.dg/pr79769.C: New test.
	* gcc.target/i386/mpx/pr79770.c: New test.

From-SVN: r246275
2017-03-20 10:04:06 +00:00
Andreas Krebbel e325aba2a7 S/390: PR78857: Don't use load and test if result is live.
The FP load and test instruction should not be used for a comparison
if the target operand is being used afterwards.  It unfortunately
turns SNaNs into QNaNs.

gcc/ChangeLog:

2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/78857
	* config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
	target operand.  A new splitter adds the clobber statement in case
	the target operand is dead anyway.

gcc/testsuite/ChangeLog:

2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/78857
	* gcc.target/s390/load-and-test-fp-1.c: New test.
	* gcc.target/s390/load-and-test-fp-2.c: New test.

From-SVN: r246274
2017-03-20 09:33:11 +00:00
Paul Thomas 91d2c04ced re PR fortran/79676 ([submodules] Compilation/linking error when module procedures PRIVATE)
2017-03-18  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79676
	* module.c (mio_symbol_attribute): Remove reset of the flag
	'no_module_procedures'.
	(check_for_module_procedures): New function. Move declaration
	of 'no_module_procedures' to above it.
	(gfc_dump_module): Traverse namespace calling new function.

2017-03-18  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79676
	* gfortran.dg/submodule_28.f08 : New test.

From-SVN: r246256
2017-03-18 12:38:02 +00:00
Paul Thomas c7e4107b53 re PR fortran/71838 (ICE with OpenCoarrays on submodule)
2017-03-18  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/71838
	* symbol.c (check_conflict): A dummy procedure in a submodule,
	module procedure is not an error.
	(gfc_add_flavor): Ditto.

2017-03-18  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/71838
	* gfortran.dg/submodule_26.f08 : New test.
	* gfortran.dg/submodule_27.f08 : New test.

From-SVN: r246255
2017-03-18 11:53:53 +00:00
Pat Haugen d8fe28be76 re PR target/79951 (ICE in extract_insn, at recog.c:2311 on ppc64le with -mno-cmpb)
PR target/79951
	* config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
	for VECTOR_UNIT_VSX_P (<MODE>mode) too.
	* gcc.target/powerpc/pr79951.c: New.

From-SVN: r246228
2017-03-17 16:42:29 +00:00
Bernd Schmidt 4a17943d36 re PR rtl-optimization/79910 (wrong code with -O -fweb)
PR rtl-optimization/79910
	* combine.c (record_used_regs): New static function.
	(try_combine): Handle situations where there is an additional
	instruction between I2 and I3 which needs to have a LOG_LINK
	updated.

	PR rtl-optimization/79910
	* gcc.dg/torture/pr79910.c: New test.

From-SVN: r246226
2017-03-17 09:10:13 -06:00
Jeff Law 7f166d9447 re PR tree-optimization/71437 (Performance regression after r235817)
PR tree-optimization/71437
	* tree-vrp.c (simplify_stmt_for_jump_threading): Lookup the
	conditional in the hash table first.
	(vrp_dom_walker::before_dom_children): Extract condition from
	ASSERT_EXPR.  Record condition, its inverion and any implied
	conditions as well.

	PR tree-optimization/71437
	* gcc.dg/tree-ssa/pr71437.c: New test.
	* gcc.dg/tree-ssa/20040305-1.c: Test earlier dump.
	* gcc.dg/tree-ssa/ssa-dom-thread-4.c: Adjust for jump threads
	now caught by VRP, but which were previously caught by DOM.

From-SVN: r246225
2017-03-17 09:01:56 -06:00
Richard Biener 12c4f7dcaf re PR c++/80075 (ICE: "statement marked for throw, but doesn’t" with -fnon-call-exceptions)
2017-03-17  Richard Biener  <rguenther@suse.de>

	PR middle-end/80075
	* tree-eh.c (stmt_could_throw_1_p): Only handle gimple assigns.
	Properly verify the LHS before the RHS possibly claims to be
	handled.
	(stmt_could_throw_p): Hande gimple conds fully here.  Clobbers
	do not throw.

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

From-SVN: r246223
2017-03-17 12:48:56 +00:00
Michael Meissner 207f34233c re PR target/71294 (ICE in gen_add2_insn, at optabs.c:4442 on powerpc64le-linux)
[gcc]
2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/71294
	* config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Allow a
	SPLAT operation on ISA 2.07 64-bit systems that have direct move,
	but no MTVSRDD support, by doing MTVSRD and XXPERMDI.

[gcc/testsuite]
2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/71294
	* g++.dg/pr71294.C: New test.

From-SVN: r246209
2017-03-16 20:09:21 +00:00
Segher Boessenkool 9fc900af68 Fix tree-prof/pr66295.c
This testcase can only ever be built on x86 (it needs the "avx*"
attributes).  This patch skips the test elsewhere.


gcc/testsuite/
	* gcc.dg/tree-prof/pr66295.c: Skip unless on an x86 target.

From-SVN: r246206
2017-03-16 19:18:58 +01:00
Jakub Jelinek e711928b48 re PR fortran/80010 (diagnostics: typo $!)
PR fortran/80010
	* parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
	and ST_OACC_END_ATOMIC, instead of !ACC.
	* trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
	* openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
	gfc_resolve_oacc_declare): Likewise.

	* gfortran.dg/goacc/asyncwait-3.f95: Adjust expected diagnostic.

From-SVN: r246204
2017-03-16 17:50:27 +01:00
Jakub Jelinek c05c238081 re PR fortran/79886 (ICE in pp_format, at pretty-print.c:681)
PR fortran/79886
	* tree-diagnostic.c (default_tree_printer): No longer static.
	* tree-diagnostic.h (default_tree_printer): New prototype.
fortran/
	* error.c (gfc_format_decoder): Rename plus argument to set_locus,
	remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
	if not a Fortran specific spec.
	* trans-io.c: Include options.h.
	(gfc_build_st_parameter): Temporarily disable -Wpadded around layout
	of artificial IO data structures.
testsuite/
	* gfortran.dg/pr79886.f90: New test.

From-SVN: r246203
2017-03-16 17:27:08 +01:00
Michael Meissner 3231d64b5e re PR target/79038 (Improve PowerPC ISA 3.0 conversion between integers and hardware _Float128)
[gcc]
2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/79038
	* config/rs6000/rs6000.md (float<QHI:mode><IEEE128:mode>2): Define
	insns to convert from signed/unsigned char/short to IEEE 128-bit
	floating point.
	(floatuns<QHI:mode><IEEE128:mode>2): Likewise.

[gcc/testsuite]
2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/79038
	* gcc.target/powerpc/pr79038-1.c: New test.

From-SVN: r246178
2017-03-15 21:17:35 +00:00
Segher Boessenkool 81ef1f5e25 rs6000: Do not xfail nint_2.f90 on Linux systems
It was XFAILed because there was a bug in glibc, but that bug was fixed
nine years ago.  Nowadays everyone uses a version of glibc with the bug
fixed, so we should no longer XFAIL the test.


gcc/testsuite/
	PR fortran/33271
	* gfortran.dg/nint_2.f90: Do not xfail powerpc*-*-linux*.

From-SVN: r246174
2017-03-15 21:48:49 +01:00