Commit Graph

144902 Commits

Author SHA1 Message Date
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
Patrick Palka 753a8910a4 Fix PR c++/70218 (illegal access to private field succeeds)
gcc/cp/ChangeLog:

	PR c++/70218
	* parser.c (cp_parser_lambda_expression): Move call to
	pop_deferring_access_checks ahead of the call to
	cp_parser_end_tentative_firewall.

gcc/testsuite/ChangeLog:

	PR c++/70218
	* g++.dg/cpp0x/lambda/lambda-70218.C: New test.

From-SVN: r234316
2016-03-18 01:23:26 +00:00
GCC Administrator 4a8e35b32c Daily bump.
From-SVN: r234315
2016-03-18 00:16:13 +00:00
Jakub Jelinek fcc2b74fde re PR middle-end/70280 (-fcompare-debug failure (length) with --param=integer-share-limit=4016 -mavx512bw)
PR c/70280
	* c-typeck.c (composite_type): Don't count void_list_node
	into len, if the list is terminated by void_list_node, start
	with void_list_node instead of NULL for newargs.  Stop
	at void_list_node.

From-SVN: r234312
2016-03-18 00:00:04 +01:00
Cary Coutant 1b858e7638 Sync top-level configure.ac with binutils-gdb.
2016-03-17  Cary Coutant  <ccoutant@gmail.com>

	* configure.ac: Add mips and s390 to the gold target check.
	* configure: Regenerate.

From-SVN: r234309
2016-03-17 15:54:19 -07:00
John David Anglin ecd71a9e48 re PR target/70188 (gcc 4.9+ miscompiles code on hppa)
PR target/70188
	* config/pa/constraints.md: Revert 2015-02-13 change.  Use
	define_constraint for "Q" and "T" constraints.

From-SVN: r234308
2016-03-17 22:49:15 +00:00
Evandro Menezes 220379df22 Tweak the pipeline model for Exynos M1
* gcc/config/aarch64/aarch64.c
	(exynosm1_tunings): Enable the weak prefetching model.

From-SVN: r234307
2016-03-17 21:20:50 +00:00
Marek Polacek 14ba7b28a8 re PR c/69407 (-Wunused-value on __atomic_fetch_OP and __atomic_OP_fetch)
PR c/69407
	* c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
	operations.

	* gcc.dg/atomic-op-6.c: New test.

From-SVN: r234304
2016-03-17 18:43:08 +00:00
David Malcolm ded6091379 PR c/70264: fix crash in compatible_locations_p with BUILTINS_LOCATION
In r234088 my fix for PR c++/70105 didn't allow for the possibility that
when comparing a pair of macro expansion histories that one of the
macros in the history might not be located within a line-map, and
PR c/70264 reports a crash due to encountering BUILTINS_LOCATION within
the traversal.

Fixed thusly.

Successfully bootstrapped on x86_64-pc-linux-gnu; adds 4 PASS results
to gcc.sum and 12 to g++.sum.

gcc/ChangeLog:
	PR c/70264
	* diagnostic-show-locus.c (compatible_locations_p): Handle the case
	where one or both locations aren't within a line_map.

gcc/testsuite/ChangeLog:
	PR c/70264
	* c-c++-common/pr70264.c: New test case.

From-SVN: r234303
2016-03-17 18:27:47 +00:00
Jakub Jelinek 17366700d4 re PR tree-optimization/70144 (g++ ICE at -O1 and above on valid code on x86_64-linux-gnu in "copy_reference_ops_from_ref")
PR c++/70144
	* cp-tree.h (magic_varargs_p): Return int instead of bool.
	* call.c (magic_varargs_p): Return int instead of bool, return 2 for
	Cilk+ reductions, otherwise 1 for magic varargs and 0 for normal
	varargs.
	(build_over_call): If magic_varargs_p == 2, call reject_gcc_builtin,
	if magic_varargs_p == 1, call decay_conversion
	instead of mark_type_use.  Don't store error_mark_node arguments to
	argarray, instead return error_mark_node.

	* c-c++-common/pr70144-1.c: New test.
	* c-c++-common/pr70144-2.c: New test.

From-SVN: r234297
2016-03-17 16:58:22 +01:00
Jakub Jelinek a3aad0e69c re PR c++/70272 (-flifetime-dse miscompilation starting with r217967)
PR c++/70272
	* decl.c (begin_destructor_body): Don't insert clobber if
	is_empty_class (current_class_type).

	* g++.dg/opt/flifetime-dse5.C (main): Remove extra semicolon.
	* g++.dg/opt/flifetime-dse6.C: New test.
	* g++.dg/tree-ssa/ehcleanup-1.C: Adjust unreachable count.

From-SVN: r234296
2016-03-17 16:56:19 +01:00
H.J. Lu b57e6e182c Properly set flag_pie and flag_pic
We can't set flag_pie to the default when flag_pic == 0, which may be
set by -fno-pic or -fno-PIC, since the default value of flag_pie is
non-zero when GCC is configured with --enable-default-pie.  We need
to initialize flag_pic to -1 so that we can tell if -fpic, -fPIC,
-fno-pic or -fno-PIC is used.

Since Darwin defaults to PIC (__PIC__ == 2) and the PIC setting can't
be changed, skip tests of default __PIC__ and __PIE__ setting for
*-*-darwin* targets.

gcc/

	PR driver/70192
	* opts.c (finish_options): Don't set flag_pie to the default if
	-fpic, -fPIC, -fno-pic or -fno-PIC is used.  Set flag_pic to 0
	if it is -1.

gcc/testsuite/

	PR driver/70192
	* gcc.dg/pic-1.c: New test.
	* gcc.dg/pic-2.c: Likewise.
	* gcc.dg/pic-3.c: Likewise.
	* gcc.dg/pic-4.c: Likewise.
	* gcc.dg/pie-1.c: Likewise.
	* gcc.dg/pie-2.c: Likewise.
	* gcc.dg/pie-3.c: Likewise.
	* gcc.dg/pie-4.c: Likewise.
	* gcc.dg/pie-5.c: Likewise.
	* gcc.dg/pie-6.c: Likewise.

From-SVN: r234295
2016-03-17 08:11:35 -07:00
Thomas Schwinge 91106e8435 Rename GOMP_MAP_FORCE_DEALLOC to GOMP_MAP_DELETE
Also rename the Fortran OMP_MAP_FORCE_DEALLOC to OMP_MAP_DELETE.

	include/
	* gomp-constants.h (enum gomp_map_kind): Rename
	GOMP_MAP_FORCE_DEALLOC to GOMP_MAP_DELETE.  Adjust all users.

	gcc/fortran/
	* gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
	to OMP_MAP_DELETE.  Adjust all users.

From-SVN: r234294
2016-03-17 16:07:54 +01:00
Tom de Vries b38ba58bde Add goacc/kernels-alias-{3,4}.f95
2016-03-17  Tom de Vries  <tom@codesourcery.com>

	* gfortran.dg/goacc/kernels-alias-3.f95: New test.
	* gfortran.dg/goacc/kernels-alias-4.f95: New test.

From-SVN: r234292
2016-03-17 14:56:43 +00:00
Joern Rennecke 3a8b0de169 i386.md (*movv4qicc_insn+1..36): Pass true as ALL_REGS argument to replace_rtx.
* config/i386/i386.md (*movv4qicc_insn+1..36): Pass
        true as ALL_REGS argument to replace_rtx.

From-SVN: r234290
2016-03-17 14:10:39 +00:00
Richard Biener 6931b3b79d re PR debug/70271 (internal compiler error: in dwarf2out_finish, at dwarf2out.c:27346)
2016-03-17  Richard Biener  <rguenther@suse.de>

	PR debug/70271
	* dwarf2out.c (dwarf2out_early_finish): Process deferred_asm_name
	last.

	* g++.dg/debug/pr70271.C: New testcase.

From-SVN: r234289
2016-03-17 13:43:01 +00:00
Jakub Jelinek 9bc057c8da re PR middle-end/70245 (Miscompilation of ICU on i386 with atom tuning starting with r227382)
PR target/70245
	* rtl.h (replace_rtx): Add ALL_REGS argument.
	* rtlanal.c (replace_rtx): Likewise.  If true, use REGNO
	equality and assert mode is the same, instead of just rtx pointer
	equality.
	* config/i386/i386.md (mov + arithmetics with load peephole): Pass
	true as ALL_REGS argument to replace_rtx.

From-SVN: r234285
2016-03-17 12:53:53 +01:00
H.J. Lu ea913779b0 Set flag_pic to flag_pie for PIE in LTO
Since PIE implies PIC, we should set flag_pic to flag_pie for PIE in
LTO.

	PR lto/70258
	* lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
	PIE.

From-SVN: r234284
2016-03-17 04:07:10 -07:00
Ilya Enkovich 0c8b64cb58 match.pd (A + (B vcmp C ? 1 : 0) -> A - (B vcmp C)): Apply for boolean vector with vector mode only.
gcc/

	* match.pd (A + (B vcmp C ? 1 : 0) -> A - (B vcmp C)): Apply
	for boolean vector with vector mode only.
	(A - (B vcmp C ? 1 : 0) -> A + (B vcmp C)): Likewise.

gcc/testsuite/

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

From-SVN: r234283
2016-03-17 10:58:26 +00:00