Commit Graph

144658 Commits

Author SHA1 Message Date
Jakub Jelinek
da3d46cba8 re PR libgomp/69555 (libgomp.c++/target-6.C fails because of undefined behaviour)
PR libgomp/69555
	* gimplify.c (gimplify_decl_expr): For decls with REFERENCE_TYPE, also
	gimplify_type_sizes the type they refer to.
	(omp_notice_variable): Handle reference vars to VLAs.
	* omp-low.c (lower_omp_target): Emit setup of OMP_CLAUSE_PRIVATE reference
	to VLA decls in the second pass instead of first pass.

	* testsuite/libgomp.c++/pr69555-1.C: New test.
	* testsuite/libgomp.c++/pr69555-2.C: New test.

From-SVN: r233913
2016-03-02 20:16:14 +01:00
Jeff Law
268bc32008 re PR middle-end/69987 (internal compiler error: in verify_loop_structure, at cfgloop.c:1639)
PR tree-optimization/69987
	* gfortran.dg/pr69987.f90: Use "-w" to avoid failures when the
	target does not support -fprefetch-loop-arrays.

From-SVN: r233912
2016-03-02 11:45:26 -07:00
Max Ostapenko
26ac52dba5 elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to avoid possible crash.
libbacktrace/

2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>

	* elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
	avoid possible crash.
	(elf_add): Don't set *fileline_fn to elf_nodebug value in case of
	missing debug info anymore.

From-SVN: r233911
2016-03-02 18:32:55 +02:00
Uros Bizjak
171f7de552 bmi2-bzhi-2.c: Change to runtime test.
* gcc.target/i386/bmi2-bzhi-2.c: Change to runtime test.

From-SVN: r233910
2016-03-02 16:38:21 +01:00
Tom de Vries
640fef7f41 Handle addr_expr and component_ref in graphite-ast-to-ast
2016-03-02  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/68659
	* graphite-isl-ast-to-gimple.c (collect_all_ssa_names): Handle
	new_expr == NULL_TREE.
	(get_new_name): Handle ADDR_EXPR.

From-SVN: r233909
2016-03-02 15:10:34 +00:00
Bin Cheng
c790887195 Correct ChangeLog for revision 233907.
From-SVN: r233908
2016-03-02 14:16:00 +00:00
Bin Cheng
192912db8a re PR rtl-optimization/69052 (Performance regression after r229402.)
PR tree-optimization/69052
	* loop-invariant.c (canonicalize_address): New function.
	(inv_can_prop_to_addr_use): Check validity of address expression
	which is canonicalized by above function.

	gcc/testsuite/ChangeLog
	PR tree-optimization/69052
	* gcc.target/i386/pr69052.c: New test.

From-SVN: r233907
2016-03-02 14:10:56 +00:00
Alan Modra
90a7a40b65 decl alignment not respected
This patch cures a problem with ICF of read-only variables at the
intersection of -fsection-anchors, -ftree-loop-vectorize, and targets
with alignment restrictions.

What happens with the testcase is:
- "c" is referenced in a constructor, thus make_decl_rtl for "c",
- make_decl_rtl puts "c" in an anchor block (-fsection-anchors),
- anchor block contents can't move, so "c" alignment can't change by
  ipa_increase_alignment (-ftree-loop-vectorize),
- however "a" alignment can be increased,
- ICF aliases "a" to "c".
So we have a decl for "a" saying it is aligned to 128 bits, using mem
for "c" which is only 16 bit aligned.

	PR ipa/69990
gcc/
	* ipa-icf.c (sem_variable::merge): Do not merge an alias with
	larger alignment.
gcc/testsuite/
	gcc.dg/pr69990.c: New.

From-SVN: r233906
2016-03-03 00:35:21 +10:30
Jakub Jelinek
de752fb0d2 re PR c/68062 (ICE when comparing vectors)
PR c/68062
	* c-c++-common/vector-compare-4.c: Add -Wno-psabi to dg-options.

	PR middle-end/70022
	* gcc.dg/pr70022.c: Add -w -Wno-psabi to dg-options.

From-SVN: r233905
2016-03-02 14:11:21 +01:00
Jakub Jelinek
69fa742f51 re PR target/70028 (Error: operand size mismatch for `kmovw' (wrong assembly generated) with -mavx512bw -masm=intel)
PR target/70028
	* config/i386/i386.md (kmovw): Move m constraint to 2nd alternative.
	(*movhi_internal): Put mask moves from and to memory separately
	from moves from/to GPRs.

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

From-SVN: r233904
2016-03-02 14:10:36 +01:00
Richard Biener
c954de7f5c genmatch.c (dt_node::gen_kids): Fix match code-gen for embedded GENERIC expressions in GIMPLE.
2016-03-02  Richard Biener  <rguenther@suse.de>

	* genmatch.c (dt_node::gen_kids): Fix match code-gen for embedded
	GENERIC expressions in GIMPLE.

From-SVN: r233902
2016-03-02 12:44:15 +00:00
Richard Biener
04c5ee2430 i386.c (type_natural_mode): Fix typo.
2016-03-02  Richard Biener  <rguenther@suse.de>

	* config/i386/i386.c (type_natural_mode): Fix typo.

From-SVN: r233901
2016-03-02 10:04:43 +00:00
Nick Clifton
868ae3b3a7 * config.gcc (mep-*-elf): Add newlib-stdint.h to tm_file.
From-SVN: r233900
2016-03-02 09:53:05 +00:00
Maxim Kuvyrkov
7c65bd5682 Print markers to stderr to avoid races with sanitizer output
* c-c++-common/asan/swapcontext-test-1.c,
	* c-c++-common/tsan/thread_leak.c,
	* g++.dg/tsan/aligned_vs_unaligned_race.C,
	* g++.dg/tsan/benign_race.C,
	* g++.dg/tsan/fd_close_norace.C,
	* g++.dg/tsan/fd_close_norace2.C: Print markers to stderr to avoid
	races with sanitizer output

From-SVN: r233899
2016-03-02 09:38:09 +00:00
Richard Biener
37d9822023 re PR target/67278 (ICE: verify_gimple failed on darwin 14.5 x86_64)
2016-03-02  Richard Biener  <rguenther@suse.de>
	Uros Bizjak  <ubizjak@gmail.com>

	PR target/67278
	* config/i386/i386.c (type_natural_mode): Handle XFmode vectors.

	* gcc.dg/simd-8.c: New testcase.

Co-Authored-By: Uros Bizjak <ubizjak@gmail.com>

From-SVN: r233898
2016-03-02 08:55:42 +00:00
Richard Biener
218db463e0 re PR target/67278 (ICE: verify_gimple failed on darwin 14.5 x86_64)
2016-03-02  Richard Biener  <rguenther@suse.de>

	PR middle-end/67278
	* tree-cfg.c (verify_expr): Adjust BIT_FIELD_REF case.

	* gcc.dg/simd-7.c: New testcase.

From-SVN: r233897
2016-03-02 08:16:16 +00:00
Eric Botcazou
22c72158a4 * gcc.target/i386/pr70007.c: Tweak.
From-SVN: r233894
2016-03-02 07:57:17 +00:00
Dominik Vogt
22e3fa19cb S/390: Ada: Enable Stack_Check_Probes.
gcc/ada/ChangeLog

	* system-linux-s390.adsx: Enable Stack_Check_Probes.
	* system-linux-s390.ads: Likewise.

From-SVN: r233893
2016-03-02 07:50:29 +00:00
Dominik Vogt
9a790cccab S/390: Reduce accuracy of bessel_6.f90.
gcc/testsuite/ChangeLog

	* gfortran.dg/bessel_6.f90: Reduce accuracy for S/390.

From-SVN: r233892
2016-03-02 07:47:49 +00:00
Marek Polacek
bd02f00fcf re PR c/67854 (Missing diagnostic for passing bool to va_arg)
PR c/67854
	* gimplify.c (gimplify_va_arg_expr): Use expanded location for the
	"is promoted to" warning.

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

From-SVN: r233891
2016-03-02 07:24:19 +00:00
Jakub Jelinek
1e840f3974 re PR middle-end/70025 (Miscompilation of gc-7.4.2 on s390x starting with r227382)
PR middle-end/70025
	* gcc.dg/torture/pr70025.c: New test.

From-SVN: r233889
2016-03-02 07:58:05 +01:00
Venkataramanan Kumar
bca002411e Adjust test case in PR68621 to compile with -fpic.
2016-03-02  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>

        PR tree-optimization/68621
        * gcc.dg/tree-ssa/ifc-8.c: Adjust test.

From-SVN: r233888
2016-03-02 06:14:43 +00:00
DJ Delorie
d15bd5bbdb MAINTAINERS (mep): Remove myself as MeP maintainer.
* MAINTAINERS (mep): Remove myself as MeP maintainer.
* config.gcc: Deprecate mep-*.

From-SVN: r233887
2016-03-01 23:41:58 -05:00
Jason Merrill
5c969cb8ca re PR c++/70036 ([concepts] ICE with a dependent sizeof in a concept)
PR c++/70036

	* parser.c (cp_parser_requires_clause): Call
	check_for_bare_parameter_packs.

From-SVN: r233886
2016-03-01 21:55:23 -05:00
Jason Merrill
e57b697d63 * gcc/cp/call.c: Mark as C++ for emacs.
From-SVN: r233885
2016-03-01 21:47:15 -05:00
Jason Merrill
c8a66fc97b re PR c++/51489 (constexpr not working consistently)
PR c++/51489

	* constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
	the operands.

From-SVN: r233878
2016-03-01 21:32:44 -05:00
Jason Merrill
7f0e23e931 re PR c++/69995 ([C++14] Invalid result when evaluating constexpr function)
PR c++/69995

	* constexpr.c (cxx_eval_call_expression): Unshare arg.
	(cxx_eval_constant_expression) [DECL_EXPR]: Unshare init.
	[TARGET_EXPR]: Unshare init.

From-SVN: r233877
2016-03-01 21:32:38 -05:00
Vladimir Makarov
4be9717cf8 re PR middle-end/70025 (Miscompilation of gc-7.4.2 on s390x starting with r227382)
2016-03-01  Vladimir Makarov  <vmakarov@redhat.com>

	PR middle-end/70025
	* lra-constraints.c (regno_val_use_in): New.
	(match_reload): Use it instead of regno_use_in.

From-SVN: r233876
2016-03-02 01:39:30 +00:00
GCC Administrator
af5108bcde Daily bump.
From-SVN: r233874
2016-03-02 00:16:16 +00:00
Jeff Law
eab2541b86 re PR tree-optimization/69196 (code size regression with jump threading at -O2)
PR tree-optimization/69196
	* tree-ssa-threadbackward.c (fsm_find_control_statement_thread_paths):
	Appropriately clamp the number of statements to copy when the
	thread path does not traverse a loop backedge.

	PR tree-optimization/69196
	* gcc.dg/tree-ssa/pr69196.c: New test.

From-SVN: r233870
2016-03-01 16:12:10 -07:00
Eric Botcazou
0bca04b822 re PR rtl-optimization/70007 (wrong code with -mbmi2)
PR rtl-optimization/70007
	* gcse.c (compute_ld_motion_mems): Tidy up and also invalidate memory
	references present in REG_EQUAL notes attached to non-SET patterns.

From-SVN: r233867
2016-03-01 22:31:52 +00:00
Jeff Law
2a9afc8680 re PR tree-optimization/69196 (code size regression with jump threading at -O2)
PR tree-optimization/69196
	* tree-ssa-threadbackward.c (fsm_find_control_statement_thread_paths):
	Do count some PHIs in the thread path against the insn count.  Decrease
	final statement count by one as the control statement in the last
	block will get removed.  Remove special cased code for handling PHIs		in the last block.

	PR tree-optimization/69196
	* gcc.dg/tree-ssa/vrp46.c: Twiddle threading params to keep it from
	duplicating code and spoiling the expected output.

From-SVN: r233866
2016-03-01 14:46:58 -07:00
Michael Meissner
0d39977e34 re PR target/70033 (PowerPC power9 tests don't have guard for power9 support)
2016-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/70033
	* gcc.target/powerpc/p9-lxvx-stxvx-1.c: Make sure compiler
	supports power9 before doing tests.
	* gcc.target/powerpc/p9-lxvx-stxvx-2.c: Likewise.
	* gcc.target/powerpc/p9-lxvx-stxvx-3.c: Likewise.
	* gcc.target/powerpc/p9-permute.c: Likewise.

From-SVN: r233865
2016-03-01 21:31:47 +00:00
Uros Bizjak
a0c0699d05 re PR target/70027 (invalid assembly syntax generated with -fno-plt -masm=intel)
PR target/70027
	* config/i386/i386.c (ix86_output_call_insn): Add -masm=intel
	asm dialect alternatives to explicit GOTPCREL calls.

testsuite/ChangeLog:

	PR target/70027
	* gcc.target/i386/pr70027.c: New test.

From-SVN: r233864
2016-03-01 21:11:19 +01:00
Eric Botcazou
0ae3ef4765 Fix date
From-SVN: r233863
2016-03-01 20:05:31 +00:00
Eric Botcazou
355a43a19f re PR ada/70017 (c52103x and c52104x test failure on s390x)
PR ada/70017
	* ira.c (do_reload): Issue warning for generic stack checking here...
	* reload1.c (reload): ...instead of here and streamline it.

From-SVN: r233862
2016-03-01 20:04:01 +00:00
Jakub Jelinek
686e2237f3 re PR c/69796 (ICE on invalid code in useless_type_conversion_p, at gimple-expr.c:83)
PR c/69796
	PR c/69974
	* c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
	of incomplete decls to error_mark_node.

	* gcc.dg/pr69796.c: New test.
	* gcc.dg/pr69974.c: New test.

From-SVN: r233861
2016-03-01 19:27:21 +01:00
Eric Botcazou
f8e4188cae * gnat.dg/stack_usage3.adb: Robustify and enable for all targets.
From-SVN: r233859
2016-03-01 17:33:51 +00:00
Nick Clifton
db48a9e352 * config.gcc (cr16-*-elf): Add newlib-stdint.h to tm_file.
From-SVN: r233858
2016-03-01 16:52:37 +00:00
Jeff Law
5e3f1c7c70 re PR middle-end/69987 (internal compiler error: in verify_loop_structure, at cfgloop.c:1639)
PR tree-optimization/69987
	* gfortran.dg/pr69987.f90: New test.

	PR tree-optimization/69989
	* gcc.c-torture/compile/pr69989-2.c: New test.

From-SVN: r233857
2016-03-01 09:22:51 -07:00
Richard Biener
e546907cd9 re PR middle-end/69983 (FAIL: gcc.dg/graphite/scop-sor.c scan-tree-dump-times graphite "number of SCoPs: 1" 1)
2016-03-01  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69983
	* tree-chrec.c (eq_evolutions_p): Handle conversions, compare
	types and fall back to operand_equal_p.

From-SVN: r233856
2016-03-01 15:58:25 +00:00
Marek Polacek
1be56bc542 re PR c++/69795 (g++ ICE on invalid code on x86_64-linux-gnu in "reject_gcc_builtin")
PR c++/69795
	* c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
	any DECL.

	* g++.dg/parse/invalid1.C: New test.

From-SVN: r233855
2016-03-01 15:30:42 +00:00
Andreas Krebbel
db340c730f S/390: Revert setmem pattern folding
This does not work without:
https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01575.html

2016-03-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	Revert
	2016-03-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/constraints.md ("jm8"): New constraint.
	* config/s390/predicates.md ("const_int_8bitset_operand"): New predicate.
	* config/s390/s390.md ("*setmem_long", "*setmem_long_and"): Merge
	into ...
	("*setmem_long<setmem_and>"): New pattern.
	("*setmem_long_31z", "*setmem_long_and_31z"): Merge
	into ...
	("*setmem_long_31z<setmem_and>"): New pattern.
	* config/s390/subst.md ("setmem_31z_subst", "setmem_and_subst"):
	New substitution rules with the required attributes.

From-SVN: r233854
2016-03-01 14:53:29 +00:00
Andreas Krebbel
a7ba15ca58 Revert recent gensupport change.
2016-03-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	Revert
	2016-03-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* gensupport.c (process_substs_on_one_elem): Split loop to
	complete mark_operands_used_in_match_dup on all expressions in the
	vector first.
	(adjust_operands_numbers): Inline into process_substs_on_one_elem
	and remove function.

From-SVN: r233853
2016-03-01 14:51:17 +00:00
Richard Biener
1b19470d14 re PR middle-end/70022 (ICE: in tree_to_shwi, at tree.c:7328 with out-of-bounds vector index)
2016-03-01  Richard Biener  <rguenther@suse.de>

	PR middle-end/70022
	* fold-const.c (fold_indirect_ref_1): Fix range checking for
	vector BIT_FIELD_REF extract.

	* gcc.dg/pr70022.c: New testcase.

From-SVN: r233852
2016-03-01 13:32:13 +00:00
Richard Biener
366298bdda re PR target/69994 (test case gfortran.dg/reassoc_6.f fails starting with r233669)
2016-03-01  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69994
	* tree-ssa-reassoc.c (ops_equal_values_p): Handle missing case.

From-SVN: r233851
2016-03-01 12:50:41 +00:00
Ilya Enkovich
3ae0661a71 re PR tree-optimization/69956 (Wrong vector type @ fold-const)
gcc/

	PR tree-optimization/69956
	* tree-vect-stmts.c (supportable_widening_operation): Support
	multi-step conversion of boolean vectors.
	(supportable_narrowing_operation): Likewise.

gcc/testsuite/

	PR tree-optimization/69956
	* gcc.dg/pr69956.c: New test.

From-SVN: r233850
2016-03-01 11:17:44 +00:00
Andreas Krebbel
c64181a8c8 S/390: Disallow SImode in s390_decompose_address
After Y is never used anymore with SImode operands we can finally
disallow SImode (if != Pmode) in s390_decompose_address.  In fact that
was the whole point of the patch series.

gcc/ChangeLog:

2016-03-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/s390.c (s390_decompose_address): Don't accept SImode
	anymore.

From-SVN: r233849
2016-03-01 09:27:10 +00:00
Andreas Krebbel
708c0910a8 S/390: Use define_subst for the setmem patterns.
While trying to get rid of the Y constraint in the setmem patterns I
noticed that for these patterns it isn't even a problem since these
always only use the constraint with a Pmode match_operand.  But while
being at it I've tried to fold some of the patterns a bit.

gcc/ChangeLog:

2016-03-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/constraints.md ("jm8"): New constraint.
	* config/s390/predicates.md ("const_int_8bitset_operand"): New predicate.
	* config/s390/s390.md ("*setmem_long", "*setmem_long_and"): Merge
	into ...
	("*setmem_long<setmem_and>"): New pattern.
	("*setmem_long_31z", "*setmem_long_and_31z"): Merge
	into ...
	("*setmem_long_31z<setmem_and>"): New pattern.
	* config/s390/subst.md ("setmem_31z_subst", "setmem_and_subst"):
	New substitution rules with the required attributes.

From-SVN: r233848
2016-03-01 09:26:20 +00:00
Andreas Krebbel
674a959cd5 S/390: Get rid of Y constraint in vector.md.
This finally removes the Y constraint from the vector patterns while
folding some of them using a code iterator.

gcc/ChangeLog:

2016-03-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/subst.md (DSI_VI): New mode iterator.
	("addr_style_op_subst"): Use DSI_VI instead of DSI.
	* config/s390/vector.md ("vec_set<mode>"): Move expander before
	the insn definition.
	("*vec_set<mode>"): Change predicate and add alternative to
	support only either register or const_int operands as element
	selector.
	("*vec_set<mode>_plus"): New pattern to support reg + const_int
	operands.
	("vec_extract<mode>"): New expander.
	("*vec_extract<mode>"): New insn definition supporting reg and
	const_int element selectors.
	("*vec_extract<mode>_plus"): New insn definition supporting
	reg+const_int element selectors.
	("rotl<mode>3", "ashl<mode>3", "ashr<mode>3"): Merge into the
	following expander+insn definition.
	("<vec_shifts_name><mode>3"): New expander.
	("*<vec_shifts_name><mode>3<addr_style_op>"): New insn definition.

From-SVN: r233847
2016-03-01 09:25:23 +00:00