2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-03-22 21:51:39 +08:00

144551 Commits

Author SHA1 Message Date
Patrick Palka
76d881bfdd Fix PR c++/69961 (invalid ctor call with dependent args)
gcc/cp/ChangeLog:

	PR c++/68948
	PR c++/69961
	* pt.c (tsubst_baselink): Reinstate the check for an invalid
	constructor call.

gcc/testsuite/ChangeLog:

	PR c++/69961
	* g++.dg/template/pr69961a.C: New test.
	* g++.dg/template/pr69961b.C: New test.

From-SVN: r233838
2016-03-01 01:24:44 +00:00
David Malcolm
7168133a37 PR preprocessor/69985: fix ICE with long lines in -Wformat
gcc/testsuite/ChangeLog:
	PR preprocessor/69985
	* gcc.dg/cpp/pr69985.c: New test case.

libcpp/ChangeLog:
	PR preprocessor/69985
	(linemap_position_for_loc_and_offset): Rename param from "offset"
	to "column_offset".  Right-shift the column_offset by m_range_bits
	of the pertinent ordinary map whenever offsetting a
	source_location.  For clarity, offset the column by the column
	offset, rather than the other way around.

From-SVN: r233836
2016-03-01 01:02:49 +00:00
Eric Botcazou
f3c7a94580 re PR target/69706 (internal compiler error: in extract_constrain_insn, at recog.c:2246)
PR target/69706
	* config/sparc/sparc.c (NWORDS_UP): Rename to...
	(CEIL_NWORDS): ...this.  Use CEIL macro.
	(compute_fp_layout): Adjust to above renaming.
	(function_arg_union_value): Likewise.
	(sparc_arg_partial_bytes): Likewise.
	(sparc_function_arg_advance): Likewise.

From-SVN: r233833
2016-03-01 00:22:26 +00:00
GCC Administrator
9cb37fca64 Daily bump.
From-SVN: r233832
2016-03-01 00:16:15 +00:00
Jeff Law
e66f219b03 re PR tree-optimization/70005 (wrong code at -O2 and -O3 on x86_64-linux-gnu)
PR tree-optimization/70005
	* tree-ssa-uncprop.c (associate_equivalences_with_edges): Handle case
	where an object with a boolean range is compared against a value
	outside [0..1].

	PR tree-optimization/70005
	* gcc.c-torture/execute/pr70005.c New test.

From-SVN: r233829
2016-02-29 17:04:48 -07:00
Jeff Law
0c6072a3fc re PR tree-optimization/69999 (ICE in verify_loop_structure, at cfgloop.c:1639 (error: loop with header 3 not in loop tree) at -O3 or -Ofast)
PR tree-optimization/69999
	* gimple-ssa-split-paths.c (split_paths): When duplicating a block
	with an outgoing edge marked with EDGE_IRREDUCIBLE_LOOP, schedule
	loop cleanups.

	PR tree-optimization/69999
	* gcc.c-torture/compile/pr69999.c: New test.

From-SVN: r233824
2016-02-29 15:45:41 -07:00
Joseph Myers
8cfb576a28 * sv.po: Update.
From-SVN: r233820
2016-02-29 20:48:24 +00:00
Martin Liska
56c091abef Poison ENABLE_CHECKING macro
* system.h: Poison ENABLE_CHECKING macro.

From-SVN: r233817
2016-02-29 15:40:20 +00:00
Richard Biener
ce40915e90 re PR target/69994 (test case gfortran.dg/reassoc_6.f fails starting with r233669)
2016-02-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69994
	* tree-ssa-reassoc.c (gimple_nop_conversion_p): New function.
	(get_unary_op): Look through nop conversions.
	(ops_equal_values_p): New function, look for equality diregarding
	nop conversions.
	(eliminate_plus_minus_pair): Use ops_equal_values_p
	(repropagate_negates): Do not use get_unary_op here.

From-SVN: r233816
2016-02-29 15:30:50 +00:00
Martin Liska
4232ebbbc9 Replace ENABLE_CHECKING macro with flag_checking in GNAT
* gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
	Replace ENABLE_CHECKING macro with flag_checking.

From-SVN: r233815
2016-02-29 15:30:08 +00:00
Martin Liska
2998cb96c8 HSA: reduce dump output w/o -details flag
* hsa-gen.c (gen_body_from_gimple): Dump only if TDF_DETAILS
	is presented in dump flags.
	* hsa-regalloc.c (linear_scan_regalloc): Likewise.
	(hsa_regalloc): Likewise.

From-SVN: r233814
2016-02-29 15:15:27 +00:00
Yuri Rumyantsev
fd9fbdb339 re PR tree-optimization/69652 ([ICE] verify_ssa fail w/ -O2 -ffast-math -ftree-vectorize)
gcc/testsuite/

2016-02-29  Yuri Rumyantsev  <ysrumyan@gmail.com>

	PR tree-optimization/69652
	* gcc.dg/torture/pr69652.c: Delete test.
	* gcc.dg/vect/pr69652.c: New test.

From-SVN: r233811
2016-02-29 14:32:24 +00:00
Jason Merrill
7574c916ae re PR c++/69995 ([C++14] Invalid result when evaluating constexpr function)
PR c++/69995
	* constexpr.c (cxx_eval_store_expression): Unshare init.

From-SVN: r233810
2016-02-29 09:25:57 -05:00
Richard Biener
cbd400b43e re PR tree-optimization/69980 (Supposedly wrong SLP code emitted)
2016-02-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69980
	* tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Update
	permutation of those we need to keep.

	* gfortran.dg/vect/pr69980.f90: New testcase.

From-SVN: r233809
2016-02-29 13:24:24 +00:00
Eric Botcazou
84ea0f5850 re PR target/69706 (internal compiler error: in extract_constrain_insn, at recog.c:2246)
PR target/69706
	* config/sparc/sparc.c (ROUND_ADVANCE): Rename to...
	(NWORDS_UP): ...this
	(init_cumulative_args): Minor tweaks.
	(sparc_promote_function_mode): Likewise.
	(scan_record_type): Delete.
	(traverse_record_type): New function template.
	(classify_data_t): New structure type.
	(classify_registers): New inline function.
	(function_arg_slotno): In 64-bit mode, bail out early if FP slots are
	exhausted.  Instantiate traverse_record_type on classify_registers and
	deal with the case of a structure passed in slot  with no FP field
	in the first word.
	(assign_data_t): New structure type.
	(compute_int_layout): New static function.
	(compute_fp_layout): Likewise.
	(count_registers): New inline function.
	(assign_int_registers): New static function.
	(assign_fp_registers): Likewise.
	(assign_registers): New inline function.
	(function_arg_record_value_1): Delete.
	(function_arg_record_value_2): Likewise.
	(function_arg_record_value_3): Likewise.
	(function_arg_record_value): Adjust to above changes.  Instantiate
	traverse_record_type on count_registers to first count the number of
	registers to be used and then on assign_registers to assign them.
	(function_arg_union_value): Adjust to above renaming.
	(sparc_function_arg_1); Minor tweaks.  Remove commented out code.
	(sparc_arg_partial_bytes): Adjust to above renaming.  Deal with the
	case of a structure passed in slot 
	(sparc_function_arg_advance): Likewise.
	(function_arg_padding): Minor tweak.

From-SVN: r233808
2016-02-29 10:20:31 +00:00
Eric Botcazou
8ea456b94a decl.c (gnat_to_gnu_entity): Retrofit handling of unconstrained array types as designated types into common...
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
	handling of unconstrained array types as designated types into common
	processing.  Also handle array types as incomplete designated types.

From-SVN: r233807
2016-02-29 09:30:09 +00:00
Eric Botcazou
68ec561342 decl.c (gnat_to_gnu_entity): In ASIS mode, fully lay out the minimal record type.
* gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
	ASIS mode, fully lay out the minimal record type.

From-SVN: r233806
2016-02-29 09:21:12 +00:00
Eric Botcazou
5d2a63dc7b trans.c (finalize_nrv_r): Remove obsolete code.
* gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
	(build_return_expr): Likewise.
	(Call_to_gnu): If this is a function call and there is no target,
	create a temporary for the return value for all aggregate types,
	but never create it for a return statement.  Push a binding level
	around the call in more cases.  Remove obsolete code.

From-SVN: r233805
2016-02-29 09:16:57 +00:00
Eric Botcazou
93e708f9c3 ada-tree.h (DECL_RETURN_VALUE_P): New macro.
* gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
	* gcc-interface/gigi.h (gigi): Remove useless attribute.
	(gnat_gimplify_expr): Likewise.
	(gnat_to_gnu_external): Declare.
	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
	code dealing with the expression of external constants into...
	Invoke gnat_to_gnu_external instead.
	<E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
	when not for a definition.  Deal with COMPOUND_EXPR and variables with
	DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
	'reference to a function call in a renaming.  Remove obsolete test and
	adjust associated comment.
	* gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
	temporaries created to hold the return value, if any.
	(gnat_to_gnu_external): ...this.  New function.
	* gcc-interface/utils.c (create_var_decl): Detect a constant created
	to hold 'reference to function call.
	* gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
	for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.

From-SVN: r233804
2016-02-29 09:02:46 +00:00
Richard Biener
6512bc9314 re PR tree-optimization/69720 (wrong code at -O3 on x86_64-linux-gnu)
2016-02-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69720
	* tree-vect-loop.c (get_initial_def_for_reduction): Avoid
	the adjustment_def path for possibly vectorized defs.
	(vect_create_epilog_for_reduction): Handle vectorized initial
	defs properly.

	* gcc.dg/vect/vect-outer-pr69720.c: New testcase.

From-SVN: r233803
2016-02-29 08:45:17 +00:00
GCC Administrator
a34a94c3ed Daily bump.
From-SVN: r233801
2016-02-29 00:16:13 +00:00
Thomas Koenig
7b201a88a3 re PR fortran/68147 (Potential incorrect code generation for string self-assignment)
2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/68147
	PR fortran/47674
	* frontend-passes.c (realloc_string_callback): Don't set
	walk_subtrees.

2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/68147
	PR fortran/47674
	* gfortran.dg/realloc_on_assign_26.f90:  New test case.

From-SVN: r233797
2016-02-28 22:27:55 +00:00
Thomas Koenig
3070e826ba dump-parse-tree.c (show_code_node): Print association list of a block if present.
2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* dump-parse-tree.c (show_code_node):  Print association
	list of a block if present.  Handle EXEC_END_BLOCK.

From-SVN: r233796
2016-02-28 22:24:27 +00:00
Harald Anlauf
b2fd537394 re PR fortran/56007 (Remarkably bad error message with DO array=1,2)
2016-02-28  Harald Anlauf <anlauf@gmx.de>
	    Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/56007
	* match.c (gfc_match_iterator): Add diagnostic for array variable
	as do loop index.

	* gfortran.dg/coarray_8.f90: Adjust error message.
	* gfortran.dg/pr56007.f90: New test.
	* gfortran.dg/pr56007.f: New test.

Co-Authored-By: Jerry DeLisle <jvdelisle@gcc.gnu.org>

From-SVN: r233795
2016-02-28 19:07:42 +00:00
H.J. Lu
cdc1a2c805 Add a test for PR tree-optimization/69989
PR tree-optimization/69989
	* gcc.dg/torture/pr69989.c: New test.

From-SVN: r233792
2016-02-28 09:41:45 -08:00
Eric Botcazou
33505bcf10 * config/i386/cygming.h (STACK_REALIGN_DEFAULT): Define.
From-SVN: r233791
2016-02-28 14:36:41 +00:00
Harald Anlauf
524bfb1973 re PR fortran/60126 (Internal compiler error with code using pointer reshaping (gfortran 4.8.2))
2016-02-28  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/60126
	* gfortran.dg/pr60126.f90: New test.

From-SVN: r233790
2016-02-28 14:39:39 +01:00
Jeff Law
bd54250843 Revert
2016-02-26  Richard Biener  <rguenther@suse.de>
		    Jeff Law  <law@redhat.com>

	PR tree-optimization/69740
	* cfghooks.c (remove_edge): Request loop fixups if we delete
	an edge that might turn an irreducible loop into a natural
	loop.

	Revert
	2016-02-26  Richard Biener  <rguenther@suse.de>
		    Jeff Law  <law@redhat.com>

	PR tree-optimization/69740
	* gcc.c-torture/compile/pr69740-1.c: New test.
	* gcc.c-torture/compile/pr69740-2.c: New test.

From-SVN: r233787
2016-02-27 23:34:20 -07:00
GCC Administrator
460006a230 Daily bump.
From-SVN: r233786
2016-02-28 00:16:17 +00:00
Jerry DeLisle
5fb67f8b59 2016-02-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Fix ChangeLogs

From-SVN: r233783
2016-02-27 22:04:08 +00:00
Jerry DeLisle
dd1291e050 re PR fortran/69910 (ICE with NEWUNIT)
2016-02-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
	    Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/69110
	* io.c (gfc_match_open): Check that open status is an expression
	constant before comparing string to 'scratch' with NEWUNIT.

	* gfortran.dg/newunit_4.f90: New test.

Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>

From-SVN: r233782
2016-02-27 19:07:13 +00:00
Jakub Jelinek
5cfefb592a re PR target/69613 (wrong code with -O and simple 128bit arithmetics and vectors @ aarch64)
PR target/69613
	PR rtl-optimization/69886
	* gcc.dg/torture/pr69886.c: Add -w -Wno-psabi to dg-options.
	* gcc.dg/torture/pr69613.c: Likewise.  Guard -mavx with avx_runtime
	target.

From-SVN: r233781
2016-02-27 14:31:39 +01:00
Alessandro Fanfarillo
83aa73e7f8 Right size for events
From-SVN: r233779
2016-02-27 04:57:16 -07:00
Jakub Jelinek
bd522678f0 re PR rtl-optimization/69896 (wrong code with -frename-registers @ x64_64)
PR rtl-optimization/69896
	* tree-vect-generic.c (get_compute_type): Avoid single element
	vector types.

From-SVN: r233777
2016-02-27 07:43:20 +01:00
GCC Administrator
532638bbc9 Daily bump.
From-SVN: r233775
2016-02-27 00:16:15 +00:00
Evandro Menezes
0c30e0f316 Rename the tuning option and related functions to enable the Newton series for the reciprocal square root to reflect its approximative characteristic.
gcc/
	* config/aarch64/aarch64-protos.h (aarch64_emit_swrsqrt): Rename
	function to "aarch64_emit_approx_rsqrt".
	* config/aarch64/aarch64-tuning-flags.def: Rename tuning flag to
	AARCH64_EXTRA_TUNE_APPROX_RSQRT.
	* config/aarch64/aarch64.c (exynosm1_tunigs): Use new flag name.
	(xgene1_tunings): Likewise.
	(use_rsqrt_p): Likewise.
	(aarch64_emit_swrsqrt): Use new function name.
	* config/aarch64/aarch64-simd.md (aarch64_rsqrts_*): Likewise.
	* config/aarch64/aarch64.opt (mlow-precision-recip-sqrt): Reword the
	text explaining this option.
	* doc/invoke.texi (-mlow-precision-recip-sqrt): Likewise.

From-SVN: r233772
2016-02-26 23:41:53 +00:00
Martin Sebor
20ba5f3318 PR tree-optimization/15826 - don't use "if" to extract a single bit
PR tree-optimization/15826 - don't use "if" to extract a single bit
	bit-field
2016-02-26  Martin Sebor  <msebor@redhat.com>

        PR tree-optimization/15826
        * gcc.dg/tree-ssa/pr15826.c: New test.

From-SVN: r233771
2016-02-26 16:24:29 -07:00
Jakub Jelinek
e6fb01b00c re PR target/69969 (Function attribute no-vsx)
PR target/69969
	* config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
	complain about -mallow-movmisalign without -mvsx if
	TARGET_ALLOW_MOVMISALIGN was not set explicitly.

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

From-SVN: r233767
2016-02-26 23:35:00 +01:00
Martin Sebor
e3e0cf6446 PR c++/15766 - bad parse error recovery (2 bugs)
gcc/testsuite/ChangeLog:
2016-02-26  Martin Sebor  <msebor@redhat.com>

	PR c++/15766
	* g++.old-deja/g++.other/decl5.C: Add a test case.

From-SVN: r233765
2016-02-26 14:50:15 -07:00
Joel Sherrill
7d081272f6 config-list.mk: Add aarch64-rtems and x86_64-rtems
2016-02-26  Joel Sherrill <joel@rtems.org>

	* config-list.mk: Add aarch64-rtems and x86_64-rtems

From-SVN: r233763
2016-02-26 20:03:19 +00:00
Joel Sherrill
df674f74a5 config.host: Add x86_64-*-rtems*.
2016-02-26  Joel Sherrill <joel@rtems.org>

	* config.host: Add x86_64-*-rtems*.

From-SVN: r233762
2016-02-26 20:02:28 +00:00
Joel Sherrill
d6944908c0 config.gcc: Add x86_64-*-rtems*.
2016-02-26  Joel Sherrill <joel@rtems.org>

	* config.gcc: Add x86_64-*-rtems*.
	* gcc/config/i386/rtems-64.h: New file.

From-SVN: r233761
2016-02-26 20:01:34 +00:00
Joel Sherrill
117799996c config.gcc: Add aarch64-*-rtems*.
2016-02-26  Joel Sherrill <joel@rtems.org>

	* config.gcc: Add aarch64-*-rtems*.
	* gcc/config/aarch64/rtems.h: New file.

From-SVN: r233760
2016-02-26 19:59:55 +00:00
Joel Sherrill
7cb065d6a3 config.host: Add aarch64-*-rtems*.
2016-02-26  Joel Sherrill <joel@rtems.org>

	* libgcc/config.host: Add aarch64-*-rtems*.

From-SVN: r233759
2016-02-26 19:59:04 +00:00
Jason Merrill
56cde07776 re PR c++/69958 (sizeof... computes wrong size)
PR c++/69958
	* pt.c (make_argument_pack): New.
	(tsubst_copy) [SIZEOF_EXPR]: Handle partial expansion.
	(tsubst_copy_and_build): Likewise.

From-SVN: r233758
2016-02-26 14:54:33 -05:00
Keith McDaniel
622174b20d [hsa,testsuite] Introduce offload_device_shared_as effective target
2016-02-26  Keith McDaniel <k.allen.mcdaniel@gmail.com>
	    Martin Jambor  <mjambor@suse.cz>

	* testsuite/lib/libgomp.exp
	(check_effective_target_offload_device_shared_as): New proc.
	* testsuite/libgomp.c++/declare_target-1.C: New test.


Co-Authored-By: Martin Jambor <mjambor@suse.cz>

From-SVN: r233757
2016-02-26 20:42:31 +01:00
Paul E. Murphy
47dfdc53cd sfp-machine.h (_FP_DECL_EX): Declare _fpsr as a union of u64 and double.
2016-02-26  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
	    Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/sfp-machine.h (_FP_DECL_EX): Declare _fpsr as a
	union of u64 and double.
	(FP_TRAPPING_EXCEPTIONS): Return a bitmask of trapping exceptions.
	(FP_INIT_ROUNDMODE): Read the fpscr instead of writing a mystery
	value.
	(FP_ROUNDMODE): Update the usage of _fpscr.


Co-Authored-By: Bill Schmidt <wschmidt@linux.vnet.ibm.com>

From-SVN: r233756
2016-02-26 19:20:54 +00:00
Segher Boessenkool
d1f2bea53f powerpc: Handle DImode rotatert implemented with rlwinm (PR69946)
Some DImode rotate-right-and-mask can be implemented best with a rlwinm
instruction: those that could be a lshiftrt instead of a rotatert, while
the mask is not right-aligned.  Why the rotate in the testcase is not
optimised to a plain shift is another question, but we need to handle
it here anyway.  We compute the shift amount for a 64-bit rotate.  This
is 32 too high in this case; if we print using %h that is masked out (and
this doesn't silently let through invalid instructions, everything is
checked by rs6000_is_valid_shift_mask which is much more thorough).


	PR target/69946
	* config/rs6000/rs6000.c (rs6000_insn_for_shift_mask): Print rlwinm
	shift amount using %h.  Add comment.

gcc/testsuite/
	* gcc.target/powerpc/pr69946.c: New file.

From-SVN: r233755
2016-02-26 19:49:18 +01:00
Richard Biener
4a4f9d2bf8 re PR tree-optimization/69740 (gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "verify_loop_structure")
PR tree-optimization/69740
	* cfghooks.c (remove_edge): Request loop fixups if we delete
	an edge that might turn an irreducible loop into a natural
	loop.

        PR tree-optimization/69740
	* gcc.c-torture/compile/pr69740-1.c: New test.
	* gcc.c-torture/compile/pr69740-2.c: New test.

Co-Authored-By: Jeff Law <law@redhat.com>

From-SVN: r233754
2016-02-26 11:17:02 -07:00
Martin Jambor
ad2a27062e [PR 69920] Prevent SRA from leaving a removed SSA_NAME in IL
2016-02-26  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/69920
	* tree-sra.c (sra_modify_assign): Do not remove loads of
	uninitialized aggregates to SSA_NAMEs.

testsuite/
	* gcc.dg/torture/pr69932.c: New test.
	* gcc.dg/torture/pr69936.c: Likewise.

From-SVN: r233753
2016-02-26 19:06:42 +01:00