Commit Graph

152787 Commits

Author SHA1 Message Date
Marek Polacek
1ef532f452 re PR sanitizer/80348 (UBSAN: compile time crash in ubsan_instrument_division)
PR sanitizer/80348
	* typeck.c (cp_build_binary_op): Convert COP[01] to ORIG_TYPE.

	* g++.dg/ubsan/div-by-zero-2.C: New test.

From-SVN: r246770
2017-04-07 17:51:55 +00:00
Jeff Law
29d8aae6bd Makefile.in: Swap definition of LIBGCC_LINKS and inclusion of target makefile fragment.
* Makefile.in: Swap definition of LIBGCC_LINKS and inclusion of
	target makefile fragment.
	* config/sh/t-sh (unwind-dw2-Os-4-200.o): Depend on LIBGCC_LINKS.

From-SVN: r246766
2017-04-07 10:11:57 -06:00
Vladimir Makarov
7879aabea7 re PR rtl-optimization/70703 (Regression in register usage on x86)
2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70703
	* ira-color.c (update_conflict_hard_regno_costs): Use
	int64_t instead of HOST_WIDE_INT.

From-SVN: r246765
2017-04-07 16:06:28 +00:00
Vladimir Makarov
057da7af80 re PR rtl-optimization/70478 ([LRA] S/390: Performance regression - superfluous stack frame)
2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70478
	* lra-constraints.c (process_alt_operands): Disfavor alternative
	insn memory operands.

2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70478
	* gcc.target/s390/pr70478.c: New.

From-SVN: r246764
2017-04-07 16:01:50 +00:00
Jeff Law
e3d1043293 iq2000.c (final_prescan_insn): Do not separate a CALL and NOTE_INSN_CALL_ARG_LOCATION.
* config/iq2000/iq2000.c (final_prescan_insn): Do not separate a
	CALL and NOTE_INSN_CALL_ARG_LOCATION.

From-SVN: r246761
2017-04-07 08:26:05 -06:00
Martin Liska
3b6cb9e37e Error message on target attribute on aarch64 target (PR target/79889).
2017-04-07  Martin Liska  <mliska@suse.cz>

	PR target/79889
	* g++.dg/ext/mv8.C: Add aarch64* targets.
2017-04-07  Martin Liska  <mliska@suse.cz>

	PR target/79889
	* config/aarch64/aarch64.c (aarch64_process_target_attr):
	Show error message instead of an ICE.

From-SVN: r246760
2017-04-07 11:20:01 +00:00
Martin Liska
70cd23c019 Add function part to a same comdat group (PR ipa/80212).
2017-04-07  Martin Liska  <mliska@suse.cz>

	PR ipa/80212
	* g++.dg/ipa/pr80212.C: New test.
2017-04-07  Martin Liska  <mliska@suse.cz>

	PR ipa/80212
	* ipa-split.c (split_function): Add function part to a same comdat
	group.

From-SVN: r246759
2017-04-07 10:36:21 +00:00
Thomas Preud'homme
fe6bb25f9e [testsuite] Require c99_runtime for pr79800.c
2017-04-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/testsuite/
    * gcc.dg/tree-ssa/pr79800.c: Require c99_runtime.

From-SVN: r246758
2017-04-07 09:44:33 +00:00
Richard Biener
bf7b869abb re PR tree-optimization/80334 (Segfault when taking address of copy of unaligned struct)
2017-04-07  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80334
	* g++.dg/torture/pr80334.C: Use __BIGGEST_ALIGNMENT__ for
	alignas on stack.

From-SVN: r246757
2017-04-07 08:47:43 +00:00
Richard Biener
2d143ba8cf re PR middle-end/80341 (gcc miscompiles division of signed char)
2017-04-07  Richard Biener  <rguenther@suse.de>

	PR middle-end/80341
	* tree.c (get_unwidened): Also handle ! for_type case for
	INTEGER_CSTs.
	* convert.c (do_narrow): Split out from ...
	(convert_to_integer_1): ... here.  Do not pass final truncation
	type to get_unwidened for TRUNC_DIV_EXPR.

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

From-SVN: r246756
2017-04-07 08:20:24 +00:00
Richard Biener
5291ab733b tree-affine.c (wide_int_ext_for_comb): Take type rather than aff_tree.
2017-04-07  Richard Biener  <rguenther@suse.de>

	* tree-affine.c (wide_int_ext_for_comb): Take type rather
	than aff_tree.
	(aff_combination_const): Adjust.
	(aff_combination_scale): Likewise.
	(aff_combination_add_elt): Likewise.
	(aff_combination_add_cst): Likewise.
	(aff_combination_convert): Likewise.
	(add_elt_to_tree): Likewise.  Remove unused argument.
	(aff_combination_to_tree): Adjust calls to add_elt_to_tree.

From-SVN: r246755
2017-04-07 08:04:32 +00:00
Sebastian Huber
1ca92bdca0 ARM: Introduce ARM_DEFAULT_SHORT_ENUMS
Allow targets to define the default for the short enums option.

gcc/

	* config/arm/arm.h (ARM_DEFAULT_SHORT_ENUMS): Provide default
	definition.
	* config/arm/arm.c (arm_default_short_enums): Use
	ARM_DEFAULT_SHORT_ENUMS.
	* config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS): Define.

From-SVN: r246753
2017-04-07 07:02:07 +00:00
Alan Modra
2bdf7fc6e6 [RS6000] Out-of-line register save functions can't be used from crtend.o
PR target/45053
	* config/rs6000/t-crtstuff (CRTSTUFF_T_CFLAGS): Add -O2.

From-SVN: r246749
2017-04-07 11:00:43 +09:30
GCC Administrator
ba7865c179 Daily bump.
From-SVN: r246748
2017-04-07 00:16:13 +00:00
Jakub Jelinek
ed3cd38d63 re PR debug/80234 (ICE in splice_child_die at dwarfout.c:5265)
PR debug/80234
	* dwarf2out.c (gen_member_die): Handle C++17 inline static data
	members with redundant out-of-class redeclaration.

	* g++.dg/debug/dwarf2/pr80234-1.C: New test.
	* g++.dg/debug/dwarf2/pr80234-2.C: New test.

From-SVN: r246743
2017-04-06 22:46:29 +02:00
Uros Bizjak
926e747845 re PR target/80286 (AVX2 _mm_cvtsi128_si32 doesn't return a proper 32bits int)
PR target/80286
	* config/i386/sse.md (*vec_extractv4si_0_zext_sse4): New pattern.
	* config/i386/i386.md (*zero_extendsidi2):
	Add (?*x,*x) and (?*v,*v) alternatives.

From-SVN: r246741
2017-04-06 21:22:02 +02:00
Uros Bizjak
e5f5658166 re PR target/79733 (ICE in int_mode_for_mode, at stor-layout.c:406)
PR target/79733
	* config/i386/i386.c (ix86_expand_builtin)
	<case IX86_BUILTIN_K{,OR}TEST{C,Z}{8,16,32,64}>: Determine insn operand
	mode from insn data. Convert operands to insn operand mode.
	Copy operands that don't satisfy insn predicate to a register.

testsuite/ChangeLog:

	PR target/79733
	* gcc.target/i386/pr79733.c: New test.

From-SVN: r246739
2017-04-06 20:49:43 +02:00
Uros Bizjak
a5211c800e re PR target/80298 (<x86intrin.h> incompatible with -mno-sse)
PR target/80298
	* gcc.target/i386/pr80298-1.c: New test.
	* gcc.target/i386/pr80298-2.c: Ditto.

From-SVN: r246737
2017-04-06 20:34:18 +02:00
Sam Thursfield
04dc9e453c x-aix: Increase memory limit for genautomata on AIX.
2017-04-06  Sam Thursfield  <sam.thursfield@codethink.co.uk>

	* config/rs6000/x-aix: Increase memory limit for genautomata on AIX.
	Update comments.

From-SVN: r246735
2017-04-06 10:56:49 -06:00
Thomas Preud'homme
db086c9685 [ARM] Compile atomic_loaddi_11 for Cortex-R5
2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com

    gcc/testsuite/
    PR target/80082
    * gcc.target/arm/atomic_loaddi_11.c: Target Cortex-R5 instead of
    ARMv7-R.

From-SVN: r246733
2017-04-06 14:53:22 +00:00
Richard Biener
09b63f67a1 re PR tree-optimization/80334 (Segfault when taking address of copy of unaligned struct)
2017-04-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80334
	* tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
	preserve alignment of accesses.

	* g++.dg/torture/pr80334.C: New testcase.

From-SVN: r246731
2017-04-06 13:56:35 +00:00
Martin Liska
d9f8c5af8b Cherry-pick upstream r299036 from libsanitizer (PR sanitizer/80166).
2017-04-06  Martin Liska  <mliska@suse.cz>

	PR sanitizer/80166
	* sanitizer_common/sanitizer_common_interceptors.inc (INTERCEPTOR):
	Cherry-pick upstream r299036.
2017-04-06  Martin Liska  <mliska@suse.cz>

	PR sanitizer/80166
	* gcc.dg/asan/pr80166.c: New test.

From-SVN: r246730
2017-04-06 13:42:24 +00:00
Rainer Orth
1b68991f4d Fix gcc.target/i386/pr79390.c for Solaris as
PR tree-optimization/79390
	* gcc.target/i386/pr79390.c: Allow for cmovl.a.

From-SVN: r246729
2017-04-06 13:11:21 +00:00
Richard Biener
0f78434635 re PR middle-end/80262 (address space gets lost in memory access)
2017-04-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80262
	* tree-sra.c (build_ref_for_offset): Preserve address-space
	information.
	* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
	Drop useless address-space information on MEM_REF offsets.

	* gcc.target/i386/pr80262.c: New testcase.

From-SVN: r246728
2017-04-06 12:31:05 +00:00
Richard Biener
23a429c2b2 re PR tree-optimization/80281 (Wrong constant folding)
2017-04-06  Richard Biener  <rguenther@suse.de>

	PR middle-end/80281
	* gcc.dg/tree-ssa/pr40921.c: Add -fp-contract=off.

From-SVN: r246726
2017-04-06 11:25:35 +00:00
GCC Administrator
d905d6ae10 Daily bump.
From-SVN: r246724
2017-04-06 00:16:16 +00:00
Andreas Schwab
762d53e7de * builtins.def (BUILT_IN_UPDATE_SETJMP_BUF): Fix type.
From-SVN: r246720
2017-04-05 19:29:26 +00:00
Jakub Jelinek
98568e0337 re PR c++/80309 (ICE: canonical types differ for identical types _Args2 and _Args2)
PR c++/80309
	* pt.c (canonical_type_parameter): Use vec_safe_grow_cleared instead
	of a loop doing vec_safe_push of NULL.  Formatting fixes.
	(rewrite_template_parm): Copy TEMPLATE_PARM_PARAMETER_PACK from oldidx
	to newidx before calling canonical_type_parameter on newtype.

From-SVN: r246717
2017-04-05 21:10:17 +02:00
Joseph Myers
37d6671d07 * gcc.pot: Regenerate.
From-SVN: r246713
2017-04-05 18:53:55 +01:00
Joseph Myers
1f60a10003 * de.po, es.po, fr.po: Update.
From-SVN: r246712
2017-04-05 18:47:40 +01:00
Vladimir Makarov
ff216a48b7 re PR rtl-optimization/70703 (Regression in register usage on x86)
2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70703
	* ira-color.c (update_conflict_hard_regno_costs): Use
	HOST_WIDE_INT instead of long.

From-SVN: r246711
2017-04-05 16:14:28 +00:00
Uros Bizjak
891b30ac8d re PR target/80298 (<x86intrin.h> incompatible with -mno-sse)
PR target/80298
	* config/i386/mmintrin.h: Add -msse target option when __SSE__ is
	not defined for x86_64 target.  Add -mmmx target option when __SSE2__
	is not defined.
	* config/i386/mm3dnow.h: Add -msse target when __SSE__ is not defined
	for x86_64 target.  Handle -m3dnowa option.

From-SVN: r246708
2017-04-05 17:33:49 +02:00
Vladimir Makarov
e2323a2b77 re PR rtl-optimization/70703 (Regression in register usage on x86)
2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70703
	* ira-color.c (update_costs_from_allocno): Use the smallest mode.
	(update_conflict_hard_regno_costs): Use long instead of unsigned
	arithmetic for cost calculation.

2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70703
	* gcc.target/i386/pr70703.c: New.

From-SVN: r246707
2017-04-05 15:07:51 +00:00
Jakub Jelinek
47a113429b re PR sanitizer/80308 (asan crash on big-endian powerpc-linux target)
PR sanitizer/80308
	* asan.c (asan_store_shadow_bytes): Fix location of last_chunk_value
	for big endian.

	* c-c++-common/asan/pr80308.c: New test.

Co-Authored-By: Bernd Edlinger <bernd.edlinger@hotmail.de>

From-SVN: r246703
2017-04-05 15:17:15 +02:00
Eric Botcazou
5f5c5e0f07 re PR target/78002 (gcc.target/aarch64/stack-checking.c ICEs with -mabi=ilp32)
PR target/78002
	* config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Replace
	ptr_mode with Pmode throughout.
	* config/aarch64/aarch64.md (probe_stack_range_<PTR:mode): Rename
	into probe_stack_range and use DImode.

From-SVN: r246702
2017-04-05 11:48:02 +00:00
Dominik Vogt
d0ee17a526 PR target/79890: S/390: Fix crash.
builtin_eh_return requires the return address to be saved on the
stack.  The patch prevents using an FPR for that.

gcc/ChangeLog:

2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>

	PR target/79890
	* config/s390/s390.c (s390_register_info_gprtofpr): Return if
	call_eh_return is true.

gcc/testsuite/ChangeLog:

2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>

	PR target/79890
	* gcc.target/s390/pr79890.c: New test case.

From-SVN: r246701
2017-04-05 08:28:18 +00:00
Andreas Krebbel
b88a6a8818 S/390: Initialize variable to avoid warning
gcc/ChangeLog:

2017-04-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/s390-c.c (s390_resolve_overloaded_builtin):
	Initialize last_match_fntype_index.

From-SVN: r246700
2017-04-05 08:24:34 +00:00
Jakub Jelinek
36f896c772 re PR target/80310 (Bogus -Wpsabi warning with -fsanitize=signed-integer-overflow)
PR target/80310
	* tree-nvr.c: Include internal-fn.h.
	(pass_return_slot::execute): Ignore internal calls without
	direct optab.

	* c-c++-common/ubsan/pr80310.c: New test.

From-SVN: r246699
2017-04-05 07:25:18 +02:00
GCC Administrator
451522116c Daily bump.
From-SVN: r246698
2017-04-05 00:16:16 +00:00
Ian Lance Taylor
cf26173d18 re PR go/80302 (FAIL: time on systems with tzdata2017b installed)
PR go/80302
    time: make the ParseInLocation test more robust
    
    This is a backport of https://golang.org/cl/37964 from the gc toolchain.
    
    Original description:
    
        The tzdata 2017a update (2017-02-28) changed the abbreviation of the
        Asia/Baghdad time zone (used in TestParseInLocation) from 'AST' to the
        numeric '+03'.
    
        Update the test so that it skips the checks if we're using a recent
        tzdata release.
    
    Updates golang/go#19457
    Fixes GCC PR 80302.
    
    Reviewed-on: https://go-review.googlesource.com/39470

From-SVN: r246695
2017-04-04 19:37:22 +00:00
Jakub Jelinek
e1201dff2f re PR c++/80297 (Compiler time crash: type mismatch in binary expression)
PR c++/80297
	* genmatch.c (capture::gen_transform): For GENERIC unshare_expr
	captures used multiple times, except for the last use.
	* generic-match-head.c: Include gimplify.h.

	* g++.dg/torture/pr80297.C: New test.

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

From-SVN: r246693
2017-04-04 21:14:47 +02:00
Jakub Jelinek
d16e2ddd26 re PR tree-optimization/79390 (10% performance drop in SciMark2 LU after r242550)
PR tree-optimization/79390
	* target.h (struct noce_if_info): Declare.
	* targhooks.h (default_noce_conversion_profitable_p): Declare.
	* target.def (noce_conversion_profitable_p): New target hook.
	* ifcvt.h (struct noce_if_info): New type, moved from ...
	* ifcvt.c (struct noce_if_info): ... here.
	(noce_conversion_profitable_p): Renamed to ...
	(default_noce_conversion_profitable_p): ... this.  No longer
	static nor inline.
	(noce_try_store_flag_constants, noce_try_addcc,
	noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
	noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
	instead of noce_conversion_profitable_p.
	* config/i386/i386.c: Include ifcvt.h.
	(ix86_option_override_internal): Don't override
	PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
	(ix86_noce_conversion_profitable_p): New function.
	(TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
	* config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
	* doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
	* doc/tm.texi: Regenerated.

	* gcc.target/i386/pr79390.c: New test.
	* gcc.dg/ifcvt-4.c: Use -mtune-ctrl=^one_if_conv_insn for i?86/x86_64.

From-SVN: r246686
2017-04-04 19:52:27 +02:00
Bill Schmidt
e2b2c4b9fb extend.texi (PowerPC AltiVec Built-in Functions): Grammar correction.
2017-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* doc/extend.texi (PowerPC AltiVec Built-in Functions): Grammar
	correction.

From-SVN: r246684
2017-04-04 16:31:58 +00:00
Volker Reichelt
c0ea338bd2 re PR c++/80296 (Broken diagnostic 'unary_plus_expr' not supported by expression)
PR c++/80296
        * cxx-pretty-print.c (cxx_pretty_printer::expression): Add
        UNARY_PLUS_EXPR case.

        * g++.dg/cpp0x/alias-decl-80296.C: New test.

From-SVN: r246683
2017-04-04 16:30:44 +00:00
Thomas Preud'homme
a1527a93a6 [ARM] Fix small multiply feature
2017-04-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR target/80307
    * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
    instructions for small multiply cores.

    gcc/testsuite/
    PR target/80307
    * gcc.target/arm/small-multiply-m0-1.c: Do not skip test if not
    targeting any CPU or architecture.
    * gcc.target/arm/small-multiply-m0-2.c: Likewise.
    * gcc.target/arm/small-multiply-m0-3.c: Likewise.
    * gcc.target/arm/small-multiply-m0plus-1.c: Likewise.
    * gcc.target/arm/small-multiply-m0plus-2.c: Likewise.
    * gcc.target/arm/small-multiply-m0plus-3.c: Likewise.
    * gcc.target/arm/small-multiply-m1-1.c: Likewise.
    * gcc.target/arm/small-multiply-m1-2.c: Likewise.
    * gcc.target/arm/small-multiply-m1-3.c: Likewise.

From-SVN: r246682
2017-04-04 16:24:18 +00:00
Jeff Law
8734bc7232 mips.c (mips_multi_add): Zero initialize the newly added member.
* config/mips/mips.c (mips_multi_add): Zero initialize the newly
	added member.
	(mips_expand_vec_perm_const): Initialize elements in orig_perm
	that are not set by the loop over the elements.

From-SVN: r246681
2017-04-04 09:30:30 -06:00
Jason Merrill
e43073896c * semantics.c (finish_template_type): Check CLASSTYPE_TEMPLATE_INFO.
From-SVN: r246680
2017-04-04 11:25:21 -04:00
Nicolas Koenig
15f12d9677 [multiple changes]
2017-03-18  Nicolas Koenig  <koenigni@student.ethz.ch> 
		PR fortran/69498
		* symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
		everything before it.

2017-03-18  Nicolas Koenig  <koenigni@student.ethz.ch>
		PR fortran/69498
		* gfortran.dg/submodule_unexp.f90: New test.

From-SVN: r246679
2017-04-04 13:41:41 +00:00
Andreas Krebbel
d90175a4bb [Ada][S/390] Fix Memory_Size definition.
-m31 -mzarch uses 64 as word size instead of 32.  This must not affect
the Address type definition which is based on Memory_Size.

gcc/ada/ChangeLog:

2017-04-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* system-linux-s390.ads: Use Long_Integer'Size to define
	Memory_Size.

From-SVN: r246678
2017-04-04 11:45:37 +00:00
Jonathan Wakely
54fa703332 * ansidecl.h (ATTRIBUTE_PACKED): Fix typo in comment.
From-SVN: r246677
2017-04-04 12:19:47 +01:00