144920 Commits

Author SHA1 Message Date
Kirill Yukhin
380d99c9aa Remove duplicated AVX-512VL bit check.
gcc/
	* config/i386/i386.c (def_builtin): Remove duplicated functionality.

From-SVN: r234400
2016-03-22 13:17:11 +00:00
Ilya Enkovich
6cedf92249 re PR target/70290 (-mavx512vl breaks parsing of C++ vector condition)
gcc/cp/

	PR target/70290
	* call.c (build_conditional_expr_1): Always use original
	condition type for vector type checks and build.

gcc/testsuite/

	PR target/70290
	* g++.dg/ext/pr70290.C: New test.

From-SVN: r234399
2016-03-22 12:31:12 +00:00
Martin Liska
7d36fe985c Fix ChangeLog entries for PR ipa/70306
From-SVN: r234398
2016-03-22 11:31:53 +00:00
Kirill Yukhin
cd6c27ac21 re PR target/70325 (ICE on __builtin_ia32_storedquqi256_mask)
PR target/70325
gcc/
	* config/i386/i386.c (def_builtin): Handle
	OPTION_MASK_ISA_AVX512VL to be and-ed with other
	bits.
	(const struct builtin_description bdesc_special_args[]):
	Remove duplicate ISA bits.
gcc/testsuite/
	* gcc.target/i386/pr70325.c: New test.

From-SVN: r234395
2016-03-22 11:09:03 +00:00
Jakub Jelinek
b01915ed16 re PR target/70329 (wrong code with -mavx512bw and 64byte vectors)
PR target/70329
	* config/i386/i386.c (ix86_expand_vecop_qihi): Don't bother computing
	d.perm[i] for i >= d.nelt.  If not full_interleave, compute d.perm[i]
	in a way that works also for AVX512BW.

	* gcc.target/i386/avx512bw-pr70329-1.c: New test.
	* gcc.target/i386/avx512bw-pr70329-2.c: New test.

From-SVN: r234394
2016-03-22 09:28:49 +01:00
Jakub Jelinek
4e3e2cf17d re PR target/70300 (ICE: in extract_constrain_insn, at recog.c:2190 (insn does not satisfy its constraints) with -mtune=amdfam10 -mavx512bw)
PR target/70300
	* config/i386/i386.md (cvtsd2ss splitter): Unpack in destination
	instead of source if operands[1] is xmm16 and above and
	!TARGET_AVX512VL.  Use avx512f_vec_dupv16sf_1 instead of
	vec_interleave_lowv4sf if we need to unpack xmm16 and above.

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

From-SVN: r234393
2016-03-22 09:14:24 +01:00
Jakub Jelinek
4cde512c84 re PR c++/70295 (bogus -Wnonnull-compare for "dynamic_cast<const FuSelection *>(this) != nullptr")
PR c++/70295
	* gimplify.c (gimplify_modify_expr): Call gimple_set_no_warning
	on assign if (*from_p) is a comparison, set it to
	TREE_NO_WARNING (*from_p).

	* c-c++-common/nonnull-1.c (func): Remove parens around cp4 != 0.
	(func2): New function for cond with parens, xfail warning for c++.
	* g++.dg/warn/Wnonnull-compare-8.C: New test.

From-SVN: r234392
2016-03-22 09:11:14 +01:00
Patrick Palka
16f6d7dc5c Fix PR c++/70096 (wrong code for pointer-to-member-function copy)
gcc/cp/ChangeLog:

	PR c++/70096
	* pt.c (tsubst_decl): Clear the DECL_MODE of the new decl.

gcc/testsuite/ChangeLog:

	PR c++/70096
	* g++.dg/template/ptrmem30.C: New test.

From-SVN: r234391
2016-03-22 02:02:01 +00:00
Patrick Palka
a3e2b43831 Fix PR c++/70204 (ICE in non_const_var_error)
gcc/cp/ChangeLog:

	PR c++/70204
	* constexpr.c (non_const_var_error): Check
	DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.

gcc/testsuite/ChangeLog:

	PR c++/70204
	* g++.dg/cpp0x/constexpr-70204a.C: New test.
	* g++.dg/cpp0x/constexpr-70204b.C: New test.

From-SVN: r234390
2016-03-22 00:30:57 +00:00
GCC Administrator
b9bcad15fb Daily bump.
From-SVN: r234389
2016-03-22 00:16:14 +00:00
Richard Henderson
ad77920598 re PR middle-end/70273 (FAIL: g++.dg/ext/label13a.C -std=gnu++98 execution test / scan-assembler _ZN1CC4Ev)
PR c++/70273

  * decl.c (notice_forced_label_r): New.
  (cp_finish_decl): Use it.

From-SVN: r234386
2016-03-21 16:03:56 -07:00
Jason Merrill
683b810150 re PR c++/70285 (ICE on valid code on x86_64-linux-gnu: verify_gimple failed)
PR c++/70285
	* cp-gimplify.c (cp_fold) [COND_EXPR]: Handle bit-fields.

From-SVN: r234384
2016-03-21 17:13:06 -04:00
Jakub Jelinek
11b6a02e91 re PR rtl-optimization/70326 (ICE: RTL check: expected elt 3 type 'e' or 'u', have '0' (rtx note) in PATTERN, at rtl.h:1440)
PR middle-end/70326
	* lra.c (restore_scratches): Ignore deleted insns.

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

From-SVN: r234383
2016-03-21 22:04:32 +01:00
Marc Glisse
b94078834d re PR tree-optimization/70317 (folding x<=x to true for large vectors, ignoring nans)
PR tree-optimization/70317
	* match.pd (cmp @0 @0): Pass @0 instead of TYPE_MODE (TREE_TYPE (@0))
	to HONOR_NANS.

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

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r234382
2016-03-21 22:03:44 +01:00
Uros Bizjak
4a148e19be re PR target/70327 (ICE: in extract_insn, at recog.c:2287 (unrecognizable insn) with -mavx512ifma and v4ti argument)
PR target/70327
	* config/i386/i386.md (movxi): Use ix86_expand_vector_move instead
	of ix86_expand_move.
	(movoi): Ditto.
	(movti): Use general_operand for operand 1 predicate.

testsuite/ChangeLog:

	PR target/70327
	* gcc.target/i386/pr70327.c: New test.

From-SVN: r234380
2016-03-21 20:56:50 +01:00
Martin Liska
60d15bae0c HSA: enhance dump output
* hsa-dump.c (dump_hsa_insn_1): dump default branch of SBR
	insns.
	(dump_hsa_symbol): Dump BRIG offset of hsa_symbols.

From-SVN: r234379
2016-03-21 19:39:27 +00:00
Martin Liska
2a85ddbbf1 Skip static ctors/dtors in IPA ICF (PR ipa/70306)
* gcc.dg/ipa/pr70306.c: New test.
	* ipa-icf.c (sem_function::parse): Skip static
	constructors and destructors.

From-SVN: r234378
2016-03-21 19:33:33 +00:00
Andre Vieira
9a72f5f6df attr-align1.c: Skip if M-profile.
2016-03-21  Andre Vieira  <andre.simoesdiasvieira@arm>

    gcc/testsuite/
    * gcc.target/arm/attr-align1.c: Skip if M-profile.
    * gcc.target/arm/attr-align3.c: Likewise.
    * gcc.target/arm/attr_arm.c: Likewise.
    * gcc.target/arm/flip-thumb.c: Likewise.

From-SVN: r234373
2016-03-21 15:58:41 +00:00
Jakub Jelinek
6b36694859 re PR target/70296 (Incorrect handling of vector X; if X is function-like macro)
PR target/70296
	* include/cpplib.h (cpp_fun_like_macro_p): New prototype.
	* macro.c (cpp_fun_like_macro_p): New function.

	* config/rs6000/rs6000-c.c (rs6000_macro_to_expand): If IDENT is
	function-like macro, peek following token(s) if it is followed
	by CPP_OPEN_PAREN token with optional padding in between, and
	if not, don't treat it like a macro.

	* gcc.target/powerpc/altivec-36.c: New test.

From-SVN: r234371
2016-03-21 16:41:13 +01:00
Thomas Schwinge
c600d691f3 [nvptx] Don't emit sorry for the stabs debug format
* config/nvptx/nvptx.c (nvptx_option_override): Don't emit sorry
	for the stabs debug format.

Co-Authored-By: Alexander Monakov <amonakov@ispras.ru>

From-SVN: r234370
2016-03-21 16:31:50 +01:00
Richard Biener
2fac8c142e re PR tree-optimization/70310 (wrong code with vector compare at -O0)
2016-03-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70310
	* tree-vect-generic.c (expand_vector_condition): Fold the built
	condition.

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

From-SVN: r234369
2016-03-21 13:50:50 +00:00
Kirill Yukhin
e9bde85499 re PR target/70293 ([ICE, AVX-512] Wrong reg constraints in vec_dup)
PR target/70293

gcc/
	* config/i386 (define_insn "*vec_dup<mode>"/AVX2): Block
	third alternative for AVX-512VL target,

gcc/testsuite/
	* gcc.target/i386/pr70293.c: New test.

From-SVN: r234363
2016-03-21 10:51:04 +00:00
Martin Liska
c1db25ac14 Retry to emit global variables in HSA (PR hsa/70234)
PR hsa/70234
	* hsa-brig.c (emit_function_directives): Mark unemitted
	global variables for emission.
	* hsa-gen.c (hsa_symbol::hsa_symbol): Initialize a new flag.
	(get_symbol_for_decl): Likewise.
	* hsa.h (struct hsa_symbol): New flag.

From-SVN: r234362
2016-03-21 10:27:53 +00:00
Richard Biener
56bbfaf62c re PR tree-optimization/70288 (ICE with -O1 -fno-tree-dominator-opts)
2016-03-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70288
	* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Make sure
	we do not estimate unsimplified all-constant conditionals or
	switches as optimized away.

	* gcc.dg/torture/pr70288-1.c: New testcase.
	* gcc.dg/torture/pr70288-2.c: Likewise.

From-SVN: r234361
2016-03-21 09:11:37 +00:00
Andrey Belevantsev
3eee49ed0d re PR rtl-optimization/69307 (wrong code with -O2 -fselective-scheduling @ armv7a)
PR rtl-optimization/69307
        * gcc.target/arm/pr69307.c: New test.

From-SVN: r234360
2016-03-21 10:54:36 +03:00
Andrey Belevantsev
8e7816b466 re PR rtl-optimization/69102 (ICE: in move_op_ascend, at sel-sched.c:6138 with -fselective-scheduling2)
gcc/
        PR rtl-optimization/69102
        * sched-deps.c (sched_analyze_insn): Do not set last_args_size field
        when we have a readonly dependency context.

testsuite/

        PR rtl-optimization/69102
        * gcc.c-torture/compile/pr69102.c: New test.

From-SVN: r234359
2016-03-21 10:52:05 +03:00
GCC Administrator
d816052f17 Daily bump.
From-SVN: r234358
2016-03-21 00:16:25 +00:00
GCC Administrator
75b4aa92d3 Daily bump.
From-SVN: r234355
2016-03-20 00:16:15 +00:00
Jerry DeLisle
5803aa7c28 re PR fortran/69043 (Trying to include a directory causes an infinite loop)
2016-03-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/69043
	* scanner.c (load_file): Update to use S_ISREG macro.

From-SVN: r234352
2016-03-19 20:28:38 +00:00
GCC Administrator
1ee37b83cc Daily bump.
From-SVN: r234350
2016-03-19 00:16:17 +00:00
Jason Merrill
86461cad6f re PR c++/70139 (-fno-elide-constructor makes static std::regex to throw)
PR c++/70139
	* constexpr.c (cxx_eval_call_expression): Fix trivial copy.

From-SVN: r234345
2016-03-18 16:16:05 -04:00
Jeff Law
14d7d4be52 re PR rtl-optimization/70263 (ICE at -O1 and above in both 32-bit and 64-bit modes on x86_64-linux-gnu (segmentation fault))
PR rtl-optimization/70263
	* ira.c (memref_used_between_p): Assert we found END in the insn chain.
	(update_equiv_regs): When trying to move a store to after the insn
	that sets the source of the store, make sure the store occurs after
	the insn that sets the source of the store.  When successful note
	the REG_EQUIV note created in the dump file.

	PR rtl-optimization/70263
	* gcc.c-torture/compile/pr70263-1.c: New test.
	* gcc.target/i386/pr70263-2.c: New test.

From-SVN: r234344
2016-03-18 13:30:20 -06:00
David Wohlferd
0249ef0bfa David Wohlferd's patch to document more issues with basic asms
* doc/extend.texi: Document more potential problems with basic asms.

From-SVN: r234343
2016-03-18 19:12:10 +00:00
Bernd Schmidt
5c6a601cd2 Fix PR70278, a problem with the previous split_reg change
PR rtl-optimization/70278
	* lra-constraints.c (split_reg): Handle the case where biggest_mode is
	VOIDmode.

testsuite/
	* gcc.dg/torture/pr70278.c: New test.
	* gcc.target/arm/pr70278.c: New test.

From-SVN: r234342
2016-03-18 19:09:08 +00:00
David Malcolm
4bbf545b8b PR c/70281: C FE: fix uninitialized range for __builtin_types_compatible_p
gcc/c/ChangeLog:
	PR c/70281
	* c-parser.c (c_parser_postfix_expression): Set the source range
	for uses of "__builtin_types_compatible_p".

gcc/testsuite/ChangeLog:
	PR c/70281
	* gcc.dg/plugin/diagnostic-test-expressions-1.c
	(test_builtin_types_compatible_p): New test function.
	* gcc.dg/pr70281.c: New test case.

From-SVN: r234340
2016-03-18 17:45:42 +00:00
Uros Bizjak
f2f48c6c60 * libsupc++/guard.cc: Revert my last commit.
From-SVN: r234336
2016-03-18 16:44:44 +01:00
Jason Merrill
b5a28d8031 PR c++/70147 - handle primary virtual bases
* class.c (vptr_via_virtual_p): New.
	(most_primary_binfo): Factor out of build_rtti_vtbl_entries.
	* cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Don't clear
	a vptr from any virtual base in a not-in-charge 'structor.

From-SVN: r234335
2016-03-18 11:31:35 -04:00
Jason Merrill
bf08acdaa5 Avoid clobbering primary virtual base when not in charge.
* decl.c (build_clobber_this): Factor out of
	start_preparsed_function and begin_destructor_body.  Handle
	virtual bases better.

From-SVN: r234334
2016-03-18 11:31:29 -04:00
Jason Merrill
eb0dbdc723 class.c (build_if_in_charge): Split out from build_base_path.
* class.c (build_if_in_charge): Split out from build_base_path.

	* init.c (expand_virtual_init, expand_default_init): Use it.
	* call.c (build_special_member_call): Use it.

From-SVN: r234333
2016-03-18 11:31:24 -04:00
Jason Merrill
07c10d8f2e * calls.c (load_register_parameters): Fix zero size sibcall logic.
From-SVN: r234332
2016-03-18 11:31:18 -04:00
Uros Bizjak
09d8f35943 Revert:
2015-07-02  Uros Bizjak  <ubizjak@gmail.com>

	* libsupc++/guard.cc (__test_and_acquire): Use __p after __atomic_load
	to avoid unused variable warning.
	(__set_and_release): Use __p after __atomic_store to avoid unused
	variable warning.

From-SVN: r234331
2016-03-18 16:28:54 +01:00
Christophe Lyon
dc28bb6885 re PR target/70113 ([AArch64] -mpc-relative-literal-loads conflicts with fix-cortex-a53-843419)
2016-03-18  Christophe Lyon  <christophe.lyon@linaro.org>

	PR target/70113
	* gcc.target/aarch64/pr63304_1.c: Add -mno-fix-cortex-a53-843419.

From-SVN: r234330
2016-03-18 14:58:32 +01:00
Kirill Yukhin
8d200fad9c sse.md: Use vpbroadcastq for broadcasting DF values to 128b regs.
gcc/
        * config/i386/sse.md: Use vpbroadcastq for broadcasting DF
        values to 128b regs.

From-SVN: r234325
2016-03-18 11:36:30 +00:00
Ilya Enkovich
5e8d6dff27 re PR tree-optimization/70252 (ICE in vect_get_vec_def_for_stmt_copy with -O3 -march=skylake-avx512.)
gcc/

	PR tree-optimization/70252
	* tree-vect-stmts.c (supportable_widening_operation): Check resulting
	boolean vector has a proper number of elements.
	(supportable_narrowing_operation): Likewise.

gcc/testsuite/

	PR tree-optimization/70252
	* gcc.dg/pr70252.c: New test.

From-SVN: r234323
2016-03-18 09:36:32 +00:00
Tom de Vries
d0e7e40319 Add testcases for pr70161
2016-03-18  Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/pr70161-2.c: New test.
	* gcc.dg/pr70161.c: New test.

From-SVN: r234322
2016-03-18 09:17:33 +00:00
Tom de Vries
fa22501afc Set dump_file to NULL in cgraph_node::get_body
2016-03-18  Tom de Vries  <tom@codesourcery.com>

	PR ipa/70269
	* cgraph.c (cgraph_node::get_body): Set dump_file to NULL after save.

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

From-SVN: r234321
2016-03-18 09:17:23 +00:00
Jakub Jelinek
59bc6ce9b3 reload1.c (emit_input_reload_insns): Use simplify_replace_rtx instead of replace_rtx for DEBUG_INSNs.
* reload1.c (emit_input_reload_insns): Use simplify_replace_rtx
	instead of replace_rtx for DEBUG_INSNs.

From-SVN: r234320
2016-03-18 09:25:57 +01:00
Jakub Jelinek
dd12502693 re PR c++/70267 (ICE on invalid code at -O1 and above on x86_64-linux-gnu in propagate_necessity, at tree-ssa-dce.c:924)
PR c++/70267
	* init.c (build_new_1): Complain and return error_mark_node
	if alloc_fn is not _Jv_AllocObject function returning pointer.

	* g++.dg/ext/java-3.C: New test.

From-SVN: r234319
2016-03-18 08:59:36 +01:00
Venkataramanan Kumar
a065dbc9f6 Fix latencies in znver1.md
2016-03-18  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>

        * config/i386/znver1.md : Fix latencies of FP/SSE/AVX
        load type reservations.

From-SVN: r234318
2016-03-18 07:49:00 +00:00
Patrick Palka
91914f0adb Fix PR c++/70205 (ICE on valid call to qualified static member function)
gcc/cp/ChangeLog:

	PR c++/70205
	* search.c (adjust_result_of_qualified_name_lookup): Don't
	update the BASELINK_BINFO of DECL if the second call
	to lookup_base fails.

gcc/testsuite/ChangeLog:

	PR c++/70205
	* g++.dg/lookup/pr70205.C: New test.

From-SVN: r234317
2016-03-18 01:26:50 +00:00