145089 Commits

Author SHA1 Message Date
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
Andreas Schwab
a7ceba7d02 Summary: libffi: define FFI_SIZEOF_JAVA_RAW for aarch64 ILP32
* src/aarch64/ffitarget.h (FFI_SIZEOF_JAVA_RAW) [__ILP32__]:
Define.

From-SVN: r234282
2016-03-17 10:47:58 +00:00
Marek Polacek
b1970801f4 re PR c++/70194 (missing -Waddress on constexpr pointer)
PR c++/70194
	* typeck.c (warn_for_null_address): New function.
	(cp_build_binary_op): Call it.

	* g++.dg/warn/constexpr-70194.C: New test.

From-SVN: r234281
2016-03-17 10:29:36 +00:00
Nick Clifton
b14bb68cce re PR target/70162 ([RX] const_int printing causes wrong code on 32 bit host)
PR target/70162
	* config/rx/rx.c (rx_print_integer): Print negative constants in
	decimal.

From-SVN: r234280
2016-03-17 10:16:38 +00:00
Jakub Jelinek
5adb7c859d re PR rtl-optimization/70261 (r234265 causes fails on rs6000)
PR target/70261
	* rtlanal.c (replace_rtx): Revert 2016-03-16 change.

From-SVN: r234279
2016-03-17 09:01:26 +01:00
Joseph Myers
e7c0c2b0db * fr.po: Update.
From-SVN: r234278
2016-03-17 00:21:09 +00:00
Joseph Myers
3eee7bbaba * fr.po: Update.
From-SVN: r234277
2016-03-17 00:20:21 +00:00
GCC Administrator
f90825ba56 Daily bump.
From-SVN: r234276
2016-03-17 00:16:12 +00:00
Richard Henderson
820c5eaa60 re PR middle-end/70240 (ICE: in gimplify_modify_expr, at gimplify.c:4854 with -ftree-vectorize)
PR middle-end/70240

  * gcc.c-torture/compile/pr70240.c: New.

From-SVN: r234273
2016-03-16 16:53:18 -07:00
Richard Henderson
8f66e7dc9e Revert r231575
PR middle-end/70240
  PR middle-end/68215
  2015-12-11  Eric Botcazou  <ebotcazou@adacore.com>
  * tree-vect-generic.c (tree_vec_extract): Remove GSI parameter.
  Do not gimplify the result.
  (do_unop): Adjust call to tree_vec_extract.
  (do_binop): Likewise.
  (do_compare): Likewise.
  (do_plus_minus): Likewise.
  (do_negate): Likewise.
  (expand_vector_condition): Likewise.
  (do_cond): Likewise.

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

From-SVN: r234272
2016-03-16 16:53:10 -07:00
Richard Henderson
e93ed60e7b Gimplify vec_cond_expr with condition inside
PR middle-end/70240
  PR middle-end/68215
  PR tree-opt/68714
  * gimplify.c (gimplify_expr) [VEC_COND_EXPR]: Gimplify the
  first operand as is_gimple_condexpr.

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

From-SVN: r234271
2016-03-16 16:53:01 -07:00
Richard Henderson
9e0218fcbe re PR target/70048 ([AArch64] Inefficient local array addressing)
PR target/70048

  * config/aarch64/aarch64.c (virt_or_elim_regno_p): New.
  (aarch64_classify_address): Use it.
  (aarch64_legitimize_address): Force all subexpressions of PLUS
  into registers.  Simplify as (sfp+const)+reg or (reg+reg)+const.

From-SVN: r234269
2016-03-16 14:23:05 -07:00
Jason Merrill
c5e003cfe4 re PR c++/70259 (-flifetime-dse=2 bug with empty bases)
PR c++/70259
	* decl.c (start_preparsed_function): Don't clobber an empty base.

From-SVN: r234267
2016-03-16 15:37:22 -04:00
Senthil Kumar Selvaraj
da0ad26300 20151204.c: Skip for avr.
2016-03-16  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

    * gcc.c-torture/compile/20151204.c: Skip for avr.

From-SVN: r234266
2016-03-16 12:09:51 -06:00