Commit Graph

29732 Commits

Author SHA1 Message Date
Jakub Jelinek 3bb4311904 re PR c++/79655 (ICE on invalid c++ code in cxx_eval_store_expression in cp/constexpr.c:3464)
PR c++/79655
	* constexpr.c (cxx_eval_array_reference): Diagnose negative subscript.

	* g++.dg/cpp1y/constexpr-79655.C: New test.

From-SVN: r245636
2017-02-21 18:57:23 +01:00
Jakub Jelinek 664beaf2c1 re PR c++/79639 (ICE with -O and constexpr)
PR c++/79639
	* constexpr.c (cxx_eval_store_expression): If *valp is a PTRMEM_CST,
	call cplus_expand_constant on it first.

	* g++.dg/cpp1y/constexpr-79639.C: New test.

From-SVN: r245635
2017-02-21 18:48:57 +01:00
Jakub Jelinek 956d3e61a0 re PR target/79633 (ICE in gimple_call_arg, at gimple.h:3163)
PR target/79633
	* tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
	is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
	Use gimple_call_builtin_p.

	* gcc.target/i386/mpx/pr79633.c: New test.

From-SVN: r245634
2017-02-21 18:46:42 +01:00
Jakub Jelinek d4cbfca47f re PR target/79570 (ICE in sel-sched-ir.c:4534 in pr69956.c)
PR target/79570
	* sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
	on temporarily removed DEBUG_INSNs.

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

From-SVN: r245633
2017-02-21 17:56:11 +01:00
Jakub Jelinek 00bc9de3fe re PR c++/79641 (ICE with const variable and attribute)
PR c++/79641
	* c-attribs.c (handle_mode_attribute): Use build_qualified_type to
	preserve quals.

	* c-c++-common/pr79641.c: New test.

From-SVN: r245632
2017-02-21 17:55:00 +01:00
Jakub Jelinek d002d099b0 re PR middle-end/79649 (Memset pattern in named address space crashes compiler or generates wrong code)
PR tree-optimization/79649
	* tree-loop-distribution.c (classify_partition): Give up on
	non-generic address space loads/stores.

	* gcc.target/i386/pr79649.c: New test.

From-SVN: r245631
2017-02-21 17:29:37 +01:00
Jakub Jelinek 2f3ec56d60 re PR target/79494 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2330)
PR target/79494
	* config/i386/i386.c (ix86_expand_split_stack_prologue): Call
	make_reg_eh_region_note_nothrow_nononlocal on call_insn.
	* config/rs6000/rs6000.c: Include except.h.
	(rs6000_expand_split_stack_prologue): Call
	make_reg_eh_region_note_nothrow_nononlocal on the call insn.

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

From-SVN: r245629
2017-02-21 15:39:21 +01:00
Segher Boessenkool e6655a5f98 Add -Wno-psabi to diagnostic-test-expressions-1.c options
Without this the test fails on 32-bit PowerPC.


gcc/testsuite/
	* gcc.dg/plugin/diagnostic-test-expressions-1.c: Add -Wno-psabi
	to dg-options.

From-SVN: r245625
2017-02-21 13:12:55 +01:00
Kyrylo Tkachov 319633cd76 Skip gcc.dg/gimplefe-26.c on non-c99 runtime targets
* gcc.dg/gimplefe-26.c: Require c99_runtime.

From-SVN: r245622
2017-02-21 10:09:20 +00:00
Kelvin Nilsen 027a9dd509 re PR target/78056 (build failure on Power7)
gcc/testsuite/ChangeLog:

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

	PR target/78056
	* gcc.target/powerpc/pr78056-8.c: Remove.

From-SVN: r245607
2017-02-20 16:43:03 +00:00
Marek Polacek 85ade8d640 re PR sanitizer/79558 (ICE: Segfault in ubsan_type_descriptor, at ubsan.c:412)
PR sanitizer/79558
	* ubsan.c (ubsan_type_descriptor): Check if TYPE_MAX_VALUE is null.

	* c-c++-common/ubsan/bounds-14.c: New test.

From-SVN: r245605
2017-02-20 15:50:23 +00:00
Marek Polacek 80480ceee9 re PR middle-end/79537 (ICE in gimplify_expr, at gimplify.c:12009)
PR middle-end/79537
	* gimplify.c (gimplify_expr): Handle unused *&&L;.

	* gcc.dg/comp-goto-4.c: New.

From-SVN: r245604
2017-02-20 15:05:53 +00:00
Jakub Jelinek 705d3b776d re PR target/79568 (ICE in extract_insn, at recog.c:2311 for pr70325.c (with -mavx512bw))
PR target/79568
	* config/i386/i386.c (ix86_expand_builtin): Handle
	OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
	ix86_builtins_isa[fcode].isa as a requirement of those
	flags and any other flag in the bitmask.
	(ix86_init_mmx_sse_builtins): Use 0 instead of
	~OPTION_MASK_ISA_64BIT as mask.
	* config/i386/i386-builtin.def (__builtin_ia32_rdtsc,
	__builtin_ia32_rdtscp, __builtin_ia32_pause, __builtin_ia32_bsrsi,
	__builtin_ia32_rdpmc, __builtin_ia32_rolqi, __builtin_ia32_rolhi,
	__builtin_ia32_rorqi, __builtin_ia32_rorhi): Likewise.

	* gcc.target/i386/pr79568-1.c: New test.
	* gcc.target/i386/pr79568-2.c: New test.
	* gcc.target/i386/pr79568-3.c: New test.

From-SVN: r245602
2017-02-20 13:52:21 +01:00
Paul Thomas dc42a736c9 re PR fortran/79382 (DTIO ICE)
2017-02-16  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79382
	* decl.c (access_attr_decl): Test for presence of generic DTIO
	interface and emit error if not present.

2017-02-16  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79382
	* io/transfer.c (check_dtio_proc): New function.
	(formatted_transfer_scalar_read): Use it.
	(formatted_transfer_scalar_write): ditto.

2017-02-16  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79382
	* gfortran.dg/dtio_10.f90 : Change test of error message.
	* gfortran.dg/dtio_23.f90 : New test.
	* gfortran.dg/dtio_24.f90 : New test.

From-SVN: r245596
2017-02-20 10:52:50 +00:00
Paul Thomas 1ca6a74f89 re PR fortran/79434 ([submodules] separate module procedure breaks encapsulation)
2017-02-20  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79434
	* parse.c (check_component, parse_union): Whitespace.
	(set_syms_host_assoc): For a derived type, check if the module
	in which it was declared is one of the submodule ancestors. If
	it is, make the components public. Otherwise, reset attribute
	'host_assoc' and set 'use-assoc' so that encapsulation is
	preserved.

2017-02-20  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79434
	* gfortran.dg/submodule_25.f08 : New test.

From-SVN: r245595
2017-02-20 09:42:48 +00:00
Paul Thomas 63af1586ca re PR fortran/79447 ([F08] gfortran rejects valid & accepts invalid internal subprogram in a submodule)
2017-02-19  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79447
	* decl.c (gfc_set_constant_character_len): Whitespace.
	(gfc_match_end): Catch case where a procedure is contained in
	a module procedure and ensure that 'end procedure' is the
	correct termination.

2017-02-19  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79447
	* gfortran.dg/submodule_24.f08 : New test.

From-SVN: r245582
2017-02-19 19:59:20 +00:00
Andre Vehreschild 4ca4d1e95e re PR fortran/79229 (ICE in gfc_trans_assignment_1 with -fcheck=mem)
gcc/testsuite/ChangeLog:

2017-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/79229
	* gfortran.dg/class_allocate_24.f90: New test.


gcc/fortran/ChangeLog:

2017-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/79229
	* trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
	compiling with -fcheck=mem to check the pointer and not the data.

From-SVN: r245581
2017-02-19 19:43:49 +01:00
Paul Thomas dea71ad06f re PR fortran/79402 (ICE with submodules: module procedure interface defined in parent module)
2017-02-19  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79402
	* resolve.c (fixup_unique_dummy): New function.
	(gfc_resolve_expr): Call it for dummy variables with a unique
	symtree name.

2017-02-19  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79402
	* gfortran.dg/submodule_23.f90: New test.

From-SVN: r245580
2017-02-19 18:27:14 +00:00
Paolo Carlini f46e2bc923 re PR c++/79380 (ICE on C++11 code with illegal alignas specifier on x86_64-linux-gnu: unexpected expression ‘f’ of kind overload)
/cp
2017-02-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/79380
	* typeck.c (cxx_alignas_expr): Reject a non-integral alignas
	argument.

/testsuite
2017-02-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/79380
	* g++.dg/cpp0x/alignas8.C: New.

From-SVN: r245578
2017-02-19 17:43:41 +00:00
Jonathan Wakely 7dfa657b5b PR c++/69523 make -Wliteral-suffix control warning
gcc:

	PR c++/69523
	* doc/invoke.texi (C++ Dialect Options) [-Wliteral-suffix]: Update
	description.

gcc/cp:

2017-02-19  Eric Fiselier  <eric@efcs.ca>
	    Jonathan Wakely  <jwakely@redhat.com>

	PR c++/69523
	* parser.c (cp_parser_unqualified_id): Use OPT_Wliteral_suffix to
	control warning about literal suffix identifiers without a leading
	underscore.

gcc/testsuite:

2017-02-19  Eric Fiselier  <eric@efcs.ca>
	    Jonathan Wakely  <jwakely@redhat.com>

	PR c++/69523
	* g++.dg/cpp0x/Wliteral-suffix2.C: New test.

From-SVN: r245574
2017-02-19 14:13:53 +00:00
Prathamesh Kulkarni eab1f16915 gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format for FMA_EXPR.
2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	* gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format
	for FMA_EXPR.

c/
	* gimple-parser.c (c_parser_gimple_postfix_expression): Handle
	FMA_EXPR.

testsuite/
	* gcc.dg/gimplefe-26.c: New test.

From-SVN: r245570
2017-02-19 09:06:30 +00:00
John David Anglin 47e16d83e9 thread_local-order2.C: xfail on hppa*-*-hpux*.
* g++.dg/tls/thread_local-order2.C: xfail on hppa*-*-hpux*.

From-SVN: r245562
2017-02-18 14:24:35 +00:00
Jakub Jelinek c28fcc601c re PR target/79569 (Unrecognized command line option ‘-m3dnowa’)
PR target/79569
	* config/i386/i386.opt (m3dnowa): Replace Undocumented with Report.
	* common/config/i386/i386-common.c (OPTION_MASK_ISA_3DNOW_A_SET): Define.
	(ix86_handle_option): Handle OPT_m3dnowa.
	* doc/invoke.texi (-m3dnowa): Document.
	* doc/extend.texi (__builtin_ia32_pmulhuw, __builtin_ia32_pf2iw): Use
	-m3dnowa instead of -m3dnow -march=athlon.

	* gcc.target/i386/3dnowA-3.c: New test.

From-SVN: r245561
2017-02-18 14:14:43 +01:00
Jakub Jelinek c26159516d re PR target/79559 (ICE in ix86_print_operand, at config/i386/i386.c:18189)
PR target/79559
	* config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
	instead of gcc_assert for K, r and R code checks.  Formatting fixes.

	* gcc.target/i386/pr79559.c: New test.

From-SVN: r245560
2017-02-18 14:13:43 +01:00
Joseph Myers 97fcf7446c Restore DECIMAL_DIG macro to C99/C11 value.
By extending the set of floating types, TS 18661-3 thereby affected
the definition of DECIMAL_DIG, which is defined in terms of the
"widest supported floating type".  This is not conditional on whether
__STDC_WANT_IEC_60559_TYPES_EXT__ is defined when <float.h> is
included.

I raised this possible incompatibility with C11 (an implementation
should be able to conform simultaneously with C11, and with C11 + TS
18661) in DR#501.  This is not yet resolved, but the latest proposal
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2108.pdf> would
obsolete DECIMAL_DIG with the intention of limiting it to the C11
types (so making it equivalent to LDBL_DECIMAL_DIG).  (This proposal
is intended to go along with a corresponding change to TS 18661-3 to
avoid the new types and non-arithmetic interchange encodings affecting
the value of DECIMAL_DIG.)

To avoid releasing GCC 7 with a wider-than-C11 value of DECIMAL_DIG
and possibly reverting back to a C11 value in a future release, this
patch reverts back to the C11 value now.  If the proposed resolution
to DR#501 changes again so that DECIMAL_DIG *should* have a
wider-than-C11 value, we can move back to a wider-than-C11 value in
GCC 8.

Bootstrapped with no regressions on x86_64-pc-linux-gnu.

gcc/c-family:
	* c-cppbuiltin.c (builtin_define_float_constants): Define
	__DECIMAL_DIG__ to the value for long double.

gcc/testsuite:
	* gcc.dg/c11-float-2.c: New test.
	* gcc.dg/torture/float128-floath.c,
	gcc.dg/torture/float128x-floath.c,
	gcc.dg/torture/float16-floath.c, gcc.dg/torture/float32-floath.c,
	gcc.dg/torture/float32x-floath.c, gcc.dg/torture/float64-floath.c,
	gcc.dg/torture/float64x-floath.c: Do not test comparison of
	*_DECIMAL_DIG macros with DECIMAL_DIG.

From-SVN: r245555
2017-02-17 23:04:14 +00:00
Bill Schmidt a530e18167 re PR target/79261 (vec_xxpermdi appears to have endian issues)
[gcc]

2017-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/79261
	* config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
	support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
	* config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
	generator for vsx_xxpermdi_<mode>_be.
	* config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
	force big-endian semantics.
	(vsx_xxpermdi_<mode>_be): New define_expand with same
	implementation as previous version of vsx_xxpermdi_<mode>.

[gcc/testsuite]

2017-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/79261
	* gcc.target/powerpc/vec-xxpermdi.c: New file.

From-SVN: r245545
2017-02-17 19:11:06 +00:00
Julia Koval 1d516992d1 i386-common.c (OPTION_MASK_ISA_RDPID_SET): New.
* common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New.
	(OPTION_MASK_ISA_PKU_UNSET): New.
	(ix86_handle_option): Handle -mrdpid.
	* config/i386/cpuid.h (bit_RDPID): New.
	* config/i386/driver-i386.c (host_detect_local_cpu):
	Detect RDPID feature.
	* config/i386/i386-builtin.def (__builtin_ia32_rdpid): New.
	* config/i386/i386-c.c (ix86_target_macros_internal):
	Handle RDPID flag.
	* config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts.
	(ix86_valid_target_attribute_inner_p): Add "rdpid".
	(ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
	* config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New.
	* config/i386/i386.md (define_insn "rdpid"): New.
	* config/i386/i386.opt Add -mrdpid.
	* config/i386/immintrin.h (_rdpid_u32): New.

testsuite/ChangeLog:

	* gcc.target/i386/rdpid.c New test.
	* gcc.target/i386/sse-12.c: Add -mrdpid.
	* gcc.target/i386/sse-13.c: Ditto.
	* gcc.target/i386/sse-14.c: Ditto.
	* gcc.target/i386/sse-22.c: Ditto.
	* gcc.target/i386/sse-23.c: Ditto.
	* g++.dg/other/i386-2.C: Ditto.
	* g++.dg/other/i386-3.C: Ditto.

From-SVN: r245540
2017-02-17 19:11:28 +01:00
Segher Boessenkool 3185712c77 testsuite: pr59833.c and pr61441.c should use -fsignaling-nans
The testcases pr59833.c and pr61441.c check whether signaling NaNs as
input to some operation result in quiet NaNs.  Without -fsignaling-nans
this is not guaranteed to happen.  So, this patch add this option to
these testcases.


	* gcc.dg/pr59833.c: Add -fsignaling-nans to options.
	* gcc.dg/pr61441.c: Ditto.

From-SVN: r245533
2017-02-17 15:51:40 +01:00
Martin Liska a261ee4913 Use HOST_WIDE_INT for a param calculation (PR rtl-optimization/79574).
2017-02-17  Martin Liska  <mliska@suse.cz>

	PR rtl-optimization/79574
	* gcc.dg/pr79574.c: New test.
2017-02-17  Martin Liska  <mliska@suse.cz>

	PR rtl-optimization/79574
	* gcse.c (want_to_gcse_p): Prevent integer overflow.

From-SVN: r245531
2017-02-17 14:46:14 +00:00
Marek Polacek 5bf69d74ab re PR middle-end/79536 (ICE in fold_binary_loc, at fold-const.c:9060)
PR middle-end/79536
	* fold-const.c (fold_negate_expr_1): Renamed from fold_negate_expr.
	(fold_negate_expr): New wrapper.

	* gcc.dg/torture/pr79536.c: New test.

From-SVN: r245526
2017-02-17 09:51:38 +00:00
Alan Modra a72b242eac re PR rtl-optimization/79286 (ira and lra wrong code at -O2 and -Os on i686-linux)
2017-02-16  Alan Modra  <amodra@gmail.com>

	PR rtl-optimization/79286
	* ira.c (def_dominates_uses): New function.
	(update_equiv_regs): Don't create an equivalence for insns that
	may trap where the register def does not dominate the use.

	* gcc.c-torture/execute/pr79286.c: New.

From-SVN: r245521
2017-02-16 15:56:51 -07:00
Jakub Jelinek bcac0b4dac re PR c++/79512 (ICE: Segfault in gimple_build_call_1, at gimple.c:218)
PR c++/79512
c/
	* c-parser.c (c_parser_omp_target): For -fopenmp-simd
	ignore #pragma omp target even when not followed by identifier.
cp/
	* parser.c (cp_parser_omp_target): For -fopenmp-simd
	ignore #pragma omp target even when not followed by identifier.
testsuite/
	* c-c++-common/gomp/pr79512.c: New test.

From-SVN: r245504
2017-02-16 13:02:24 +01:00
Martin Sebor 945c17d8c1 PR c++/79363 - ICE with NSDMI and array
gcc/cp/ChangeLog:

	PR c++/79363
	* init.c (maybe_reject_flexarray_init): New function.
	(perform_member_init): Call it.

gcc/testsuite/ChangeLog:

	PR c++/79363
	* g++.dg/ext/flexary12.C: Adjust.
	* g++.dg/ext/flexary20.C: Same.
	* g++.dg/ext/flexary21.C: Same.
	* g++.dg/ext/flexary22.C: New test.

From-SVN: r245494
2017-02-15 13:28:32 -07:00
Bin Cheng 25c9985047 re PR tree-optimization/79347 (vect_do_peeling is messing up profile)
PR tree-optimization/79347
	* tree-vect-loop-manip.c (vect_do_peeling): Maintain profile
	counters during peeling.

	gcc/testsuite
	* gcc.dg/vect/pr79347.c: New test.

From-SVN: r245490
2017-02-15 17:16:29 +00:00
Jakub Jelinek e72028574f re PR c++/79301 (With -Werror=pedantic outside C++17 mode, __has_cpp_attribute(fallthrough) is nonzero but [[fallthrough]] fails)
PR c++/79301
	* parser.c (cp_parser_std_attribute): Don't pedwarn about
	[[deprecated]] with -std=c++11 and [[fallthrough]] with
	-std=c++11 and -std=c++14.

	* g++.dg/cpp1y/feat-cxx11-neg.C: Remove (with pedwarn) from
	[[deprecated]] comment.
	* g++.dg/cpp1y/feat-cxx98-neg.C: Likewise.
	* g++.dg/cpp1y/feat-cxx11.C: Likewise.
	* g++.dg/cpp1y/attr-deprecated-neg.C: Don't expect warnings for
	[[deprecated]] in -std=c++11.
	* g++.dg/cpp0x/fallthrough2.C: Don't expect warnings for
	[[fallthrough]] in -std=c++11 and -std=c++14.

From-SVN: r245489
2017-02-15 18:10:40 +01:00
Jakub Jelinek 4f5e5fcba8 re PR c++/79288 (TLS model wrong for static data members since r241137)
PR c++/79288
	* decl.c (grokdeclarator): For static data members, handle thread_p
	only after handling inline.

	* g++.dg/tls/pr79288.C: New test.

From-SVN: r245488
2017-02-15 18:09:18 +01:00
Marek Polacek c7545f1cb3 re PR c/79515 (ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in do_warn_double_promotion, at c-family/c-warn.c:1867)
PR c/79515
	* c-warn.c (do_warn_double_promotion): Don't warn if an invalid
	conversion has occured.

	* gcc.dg/dfp/pr79515.c: New.

From-SVN: r245485
2017-02-15 16:14:19 +00:00
David Edelsohn 1114b39cdf * g++.dg/cpp0x/pr79296.C: Move dg-do compile directive first.
From-SVN: r245484
2017-02-15 10:37:33 -05:00
Thomas Schwinge 93b87d1ddf Restore Graphite fuse-*.c testing
* Makefile.tpl: Remove HOST_ISLVER.
	(HOST_EXPORTS): Remove ISLVER.
	* Makefile.in: Regenerate.
	gcc/
	* Makefile.in (site.exp): Remove "set ISLVER".
	gcc/testsuite/
	* gcc.dg/graphite/graphite.exp: Merge "fuse_files" into
	"opt_files".

From-SVN: r245483
2017-02-15 15:43:42 +01:00
Jakub Jelinek fa8db6eaf2 re PR target/79487 (Invalid _Decimal32 comparison on s390x)
PR target/79487
	* real.c (real_from_integer): Call real_convert even for decimal.

	* gcc.dg/dfp/pr79487.c: New test.
	* c-c++-common/ubsan/float-cast-overflow-8.c (TEST): Revert
	2017-02-13 change.

From-SVN: r245477
2017-02-15 13:19:53 +01:00
Carl Love 8722316bd6 rs6000.c: Add case statement entry to make the xvcvuxdsp built-in argument unsigned.
gcc/ChangeLog:

2017-02-14  Carl Love  <cel@us.ibm.com>

	* config/rs6000/rs6000.c: Add case statement entry to make the
	xvcvuxdsp built-in argument unsigned.
	* config/rs6000/vsx.md: Fix the source and return operand types so they
	match the instruction definitions from the ISA document.  Fix typo
	in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
	statement.

gcc/testsuite/ChangeLog:

2017-01-14  Carl Love  <cel@us.ibm.com>

	* gcc.target/powerpc/vsx-builtin-3.c: Add missing test case for the
	xvcvsxdsp and xvcvuxdsp instructions.

From-SVN: r245460
2017-02-14 23:11:19 +00:00
Segher Boessenkool 2932fe90d5 rs6000: Fix the vec-adde* testcases once more
David found the vec-adde{,c}-int128.c testcases fail on AIX.  Those
tests should only run on targets that have int128.

This also changes the non-int128 testcases to check for the hardware
they require.


gcc/testsuite/
	* gcc.target/powerpc/vec-adde-int128.c: Only run if int128 exists.
	* gcc.target/powerpc/vec-addec-int128.c: Ditto.
	* gcc.target/powerpc/vec-adde.c: Require vsx_hw, don't require a
	64-bit default target.
	* gcc.target/powerpc/vec-addec.c: Require p8vector_hw, don't require
	a 64-bit default target.

From-SVN: r245453
2017-02-14 21:27:54 +01:00
Jakub Jelinek 63d0903380 re PR target/79481 (AVX512PF: unmasked gather prefetch intrinsics missing)
PR target/79481
	* config/i386/avx512pfintrin.h (_mm512_prefetch_i32gather_pd,
	_mm512_prefetch_i32gather_ps, _mm512_prefetch_i64gather_pd,
	_mm512_prefetch_i64gather_ps): New inline functions and macros.

	* gcc.target/i386/sse-14.c (test_2vx): Add void return type.
	(test_3vx): Change return type from int to void. 
	(_mm512_prefetch_i32gather_ps, _mm512_prefetch_i32scatter_ps,
	_mm512_prefetch_i64gather_ps, _mm512_prefetch_i64scatter_ps,
	_mm512_prefetch_i32gather_pd, _mm512_prefetch_i32scatter_pd,
	_mm512_prefetch_i64gather_pd, _mm512_prefetch_i64scatter_pd): New
	tests.
	* gcc.target/i386/sse-22.c (test_2vx): Add void return type.
	(test_3vx): Change return type from int to void.
	(_mm512_prefetch_i32gather_ps, _mm512_prefetch_i32scatter_ps,
	_mm512_prefetch_i64gather_ps, _mm512_prefetch_i64scatter_ps,
	_mm512_prefetch_i32gather_pd, _mm512_prefetch_i32scatter_pd,
	_mm512_prefetch_i64gather_pd, _mm512_prefetch_i64scatter_pd): New
	tests.
	* gcc.target/i386/avx512pf-vgatherpf0dpd-1.c: Add non-masked
	intrinsic.  Change scan-assembler-times number from 1 to 2.
	* gcc.target/i386/avx512pf-vgatherpf0dps-1.c: Likewise.
	* gcc.target/i386/avx512pf-vgatherpf0qpd-1.c: Likewise.
	* gcc.target/i386/avx512pf-vgatherpf0qps-1.c: Likewise.
	* gcc.target/i386/avx512pf-vgatherpf1dpd-1.c: Likewise.
	* gcc.target/i386/avx512pf-vgatherpf1dps-1.c: Likewise.
	* gcc.target/i386/avx512pf-vgatherpf1qpd-1.c: Likewise.
	* gcc.target/i386/avx512pf-vgatherpf1qps-1.c: Likewise.

From-SVN: r245444
2017-02-14 20:39:17 +01:00
Uros Bizjak 8668fae0b7 re PR middle-end/61225 (Several new failures after r210458 on x86_64-*-* with -m32)
PR middle-end/61225
	* gcc.target/i386/pr49095.c: Add -fno-shrink-wrap to dg-options.
	Use dg-additional-options for ia32 target.  Remove XFAIL.

From-SVN: r245442
2017-02-14 18:54:01 +01:00
Uros Bizjak 95d966091d re PR target/79495 (ICE in extract_constrain_insn, at recog.c:2213)
PR target/79495
	* config/i386/i386.md (*movxf_internal): Add (o,rC) alternative.

testsuite/ChangeLog:

2017-02-14  Uros Bizjak  <ubizjak@gmail.com>

	PR target/79495
	* gcc.target/i386/pr79495.c: New test.

From-SVN: r245441
2017-02-14 18:52:37 +01:00
Marek Polacek 6f207d5810 re PR c++/79420 (ICE on invalid C++ code on x86_64-linux-gnu: in tsubst_copy, at cp/pt.c:14573)
PR c++/79420
	PR c++/79463
	* parser.c (cp_parser_postfix_dot_deref_expression): Avoid
	clobbering if the postfix expression isn't an EXPR_P.

	* g++.dg/cpp1y/pr79463.C: New.
	* g++.dg/template/incomplete10.C: New.
	* g++.dg/template/incomplete9.C: New.

From-SVN: r245440
2017-02-14 17:33:21 +00:00
H.J. Lu ee139af532 Properly store 128-bit constant in large model
When converting TI store with CONST_INT to V1TI store with CONST_VECTOR
in large model, an extra instruction may be needed to load CONST_VECTOR
into a register.  Insert the extra instruction to the right place.

gcc/

	PR target/79498
	* config/i386/i386.c (timode_scalar_chain::convert_insn): Insert
	the extra instruction to the right place to store 128-bit constant
	when needed.

gcc/testsuite/

	PR target/79498
	* gcc.target/i386/pr79498.c: New test.

From-SVN: r245438
2017-02-14 08:53:22 -08:00
Martin Sebor bf00c9e080 PR middle-end/79448 - unhelpful -Wformat-truncation=2 warning
gcc/testsuite/ChangeLog:

	PR middle-end/79448
	* gcc.dg/tree-ssa/builtin-snprintf-warn-3.c: New test.
	* gcc.dg/tree-ssa/pr79448-2.c: New test.
	* gcc.dg/tree-ssa/pr79448.c: New test.

gcc/ChangeLog:

	PR middle-end/79448
	* gimple-ssa-sprintf.c (format_directive): Avoid issuing INT_MAX
	  warning for strings of unknown length.

From-SVN: r245437
2017-02-14 09:51:24 -07:00
Jeff Law 6c022f732a re PR tree-optimization/79095 (spurious stringop-overflow warning)
PR tree-optimization/79095
	* tree-vrp.c (extract_range_from_binary_expr_1): For EXACT_DIV_EXPR,
	if the numerator has the range ~[0,0] make the resultant range ~[0,0].
	(extract_range_from_binary_expr): For MINUS_EXPR with no derived range,
	if the operands are known to be not equal, then the resulting range
	is ~[0,0].
	(intersect_ranges): If the new range is ~[0,0] and the old range is
	wide, then prefer ~[0,0].
	* tree-vrp.c (overflow_comparison_p_1): New function.
	(overflow_comparison_p): New function.
	* tree-vrp.c (register_edge_assert_for_2): Register additional asserts
	if NAME is used in an overflow test.
	(vrp_evaluate_conditional_warnv_with_ops): If the ops represent an
	overflow check that can be expressed as an equality test, then adjust
	ops to be that equality test.

	PR tree-optimization/79095
	* g++.dg/pr79095-1.C: New test
	* g++.dg/pr79095-2.C: New test
	* g++.dg/pr79095-3.C: New test
	* g++.dg/pr79095-4.C: New test
	* g++.dg/pr79095-5.C: New test
	* gcc.c-torture/execute/arith-1.c: Update with more cases.
	* gcc.dg/tree-ssa/pr79095-1.c: New test.

From-SVN: r245434
2017-02-14 08:54:09 -07:00
James Greenhalgh b719f884b4 [Patch AArch64] Use 128-bit vectors when autovectorizing 16-bit float types
gcc/

	* config/aarch64/aarch64.c (aarch64_simd_container_mode): Handle
	HFmode.

gcc/testsuite/

	* gcc.target/aarch64/vect_fp16_1.c: New.

From-SVN: r245429
2017-02-14 14:48:33 +00:00