Commit Graph

155475 Commits

Author SHA1 Message Date
Richard Sandiford
963aeaad25 PR81815: Invalid conditional reduction
We weren't checking whether the phi in a conditional reduction was
used by the condition itself (which isn't a case we handle).

2017-08-11  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
	PR tree-optimization/81835
	* tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
	the phi SSA_NAME.  Check that the condition in a COND_EXPR does
	not depend on the phi.

gcc/testsuite/
	PR tree-optimization/81835
	* gcc.dg/vect/pr81815.c: New test.

From-SVN: r251117
2017-08-16 07:51:13 +00:00
Alan Modra
60e095de00 [RS6000] Delete code made dead by r250482
* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Delete
	dead code.

From-SVN: r251116
2017-08-16 10:58:04 +09:30
Alan Modra
bce59dcb63 [RS6000] Merge rs6000_reg_live_or_pic_offset_p into save_reg_p
rs6000_reg_live_or_pic_offset_p is just save_reg_p with special
handling for the pic register and eh_return.  This merge also
simplifies the eh_return handling.  The intent of
https://gcc.gnu.org/ml/gcc-patches/2010-09/msg01838.html was to say
the PIC reg needed to be saved for eh_return, not all gprs.  Of
course, it doesn't hurt to say all gprs need to be saved for eh_return
as that is what the target-independent code does by setting DF live,
but it's unnecessary in the backend.

	* config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Merge..
	(save_reg_p): ..into this.  Update all callers.
	(first_reg_to_save): Simplify.

From-SVN: r251115
2017-08-16 10:49:59 +09:30
Alan Modra
973d3f1905 [RS6000] Don't restore fixed regs
* config/rs6000/rs6000.c (rs6000_savres_strategy): Don't restore
	fixed regs.

From-SVN: r251114
2017-08-16 10:36:35 +09:30
GCC Administrator
9171123bfc Daily bump.
From-SVN: r251113
2017-08-16 00:18:45 +00:00
Joseph Myers
aaf46c35d3 Limit SH strncmp inline expansion (PR target/78460).
GCC mainline built for sh4-linux-gnu runs out of memory building a
glibc test, which calls strncmp with very large constant size
argument, resulting in the SH inline strncmp expansion trying to
inline a fully unrolled expansion of strncmp for that size.

This patch limits that fully unrolled expansion to the case of less
than 32 bytes.  This is explicitly *not* trying to be optimal in any
way (very likely a lower threshold makes sense), just to limit enough
to avoid the out-of-memory issue in the glibc testsuite.

I have *not* run the GCC testsuite for SH.  I have verified that this
allows the glibc testsuite to build OK, with both GCC mainline and GCC
7 branch (and that the included test builds quickly with patched GCC,
runs out of memory with unpatched GCC).

	PR target/78460
	PR target/67712
gcc:
	* config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
	constant count if that count is less than 32.

gcc/testsuite:
	* gcc.c-torture/compile/string-large-1.c: New test.

From-SVN: r251108
2017-08-16 00:42:23 +01:00
Joseph Myers
6b789c7f5a Update .po files.
* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
	ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
	zh_TW.po: Update.

From-SVN: r251106
2017-08-15 21:38:31 +01:00
Nathan Sidwell
466e6e8dfc gcc.c (execute): Emit friendlier message if inferior is killed by an external cause.
* gcc.c (execute): Emit friendlier message if inferior is killed
	by an external cause.

From-SVN: r251104
2017-08-15 12:44:58 +00:00
Richard Biener
204b99cd9c re PR tree-optimization/81790 (ICE in vn_nary_build_or_lookup_1, at tree-ssa-sccvn.c:1738)
2017-08-15  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81790
	* tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
	CONSTRUCTORs from simplifying and VN.

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

From-SVN: r251103
2017-08-15 11:26:32 +00:00
Martin Sebor
c0ff19d57c builtin-attrs.def: Add comments.
gcc/ChangeLog:

	* builtin-attrs.def: Add comments.

From-SVN: r251101
2017-08-14 15:32:07 -06:00
Martin Sebor
27be025d19 PR c/81117 - Improve buffer overflow checking in strncpy - part 2
gcc/ChangeLog:

	PR c/81117
	* doc/extend.texi (attribute nonstring): Document new attribute.

gcc/c-family/ChangeLog:

	PR c/81117
	* c-attribs.c (c_common_attribute_table): Add nonstring entry.
	(handle_nonstring_attribute): New function.

gcc/testsuite/ChangeLog:

	PR c/81117
	* c-c++-common/attr-nonstring-1.c: New test.

From-SVN: r251100
2017-08-14 14:21:44 -06:00
Martin Sebor
da67acb9b3 PR c/81117 - Improve buffer overflow checking in strncpy - part 1
gcc/ChangeLog:

        PR c/81117
	* tree-diagnostic.c (default_tree_printer): Handle %G.
	* gimple-pretty-print.h (percent_G_format): Declare new function.
	* gimple-pretty-print.c (percent_G_format): Define.
	* tree-pretty-print.c (percent_K_format): Add argument.

gcc/c/ChangeLog:

	PR c/81117
	* c-objc-common.c (c_objc_common_init): Handle 'G'.

gcc/c-family/ChangeLog:

	PR c/81117
	* c-format.h (T89_G): New macro.
	* c-format.c (local_gcall_ptr_node): New variable.
	(init_dynamic_diag_info): Initialize it.

gcc/cp/ChangeLog:

	PR c/81117
	* error.c (cp_printer): Handle 'G'.

gcc/testsuite/ChangeLog:

	PR c/81117
	* gcc.dg/format/gcc_diag-10.c: Exercise %G.

From-SVN: r251098
2017-08-14 12:35:13 -06:00
David Edelsohn
9e3b1778b6 ucnid-5.c: Skip on AIX.
* gcc.dg/ucnid-5.c: Skip on AIX.
        * gcc.target/powerpc/pr79909.c: Skip on AIX.

From-SVN: r251097
2017-08-14 14:04:31 -04:00
Martin Sebor
3a66f91348 PR translation/79998 - typo in diagnostic "specified bound %wu"
gcc/ChangeLog:
	* gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
	Remove a stray space.

From-SVN: r251096
2017-08-14 10:47:40 -06:00
Uros Bizjak
2912db04c1 re PR target/46091 (missed optimization: x86 bt/btc/bts instructions)
PR target/46091
	* config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
	(*iordi_1_bts): Ditto.
	(*xordi_1_btc): Ditto.

testsuite/ChangeLog:

	PR target/46091
	* gcc.target/i386/pr46091-1.c: New test.
	* gcc.target/i386/pr46091-2.c: Ditto.
	* gcc.target/i386/pr46091-3.c: Ditto.

From-SVN: r251095
2017-08-14 18:42:15 +02:00
Wilco Dijkstra
c7fd21762d [AArch64] Fix longbranch test
Fix longbranch test so it still generates long tbz branches.

    gcc/testsuite/
	PR target/81643
	* gcc.target/aarch64/long_branch_1.c: Improve testcase.

From-SVN: r251094
2017-08-14 16:18:37 +00:00
Bill Schmidt
a72a7e3972 re PR target/79845 (rs6000: make code in rs6000.c more i18n-friendly)
[gcc]

2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/79845
	* config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	Likewise.
	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
	quoted strings, and make more translator-friendly.
	(darwin_rs6000_override_options): Likewise.
	(rs6000_option_override_internal): Likewise.
	(rs6000_return_in_memory): Fix overlong line.
	(init_cmulative_args): Use quoted strings, and make more
	translator-friendly.
	(rs6000_pass_by_reference): Fix overlong line.
	(def_builtin): Use quoted strings.
	(altivec_expand_predicate_builtin): Use quoted strings, and make
	more translator-friendly.
	(htm_expand_builtin): Use quoted strings.
	(cpu_expand_builtin): Use quoted strings, and make more
	translator-friendly.
	(altivec_expand_builtin): Likewise.
	(paired_expand_predicate_builtin): Likewise.
	(rs6000_invalid_builtin): Likewise.
	(builtin_function_type): Use quoted strings.
	(rs6000_expand_split_stack_prologue): Use quoted strings, and make
	more translator-friendly.
	(rs6000_trampoline_init): Likewise.
	(rs6000_handle_altivec_attribute): Likewise.
	(rs6000_inner_target_options): Use quoted strings.
	(rs6000_disable_incompatible_switches): Likewise.
	* config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
	strings, and make more translator-friendly.
	(SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.

[gcc/testsuite]

2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/79845
	* g++.dg/ext/altivec-cell-5.C: Adjust diagnostic strings.
	* gcc.target/powerpc/altivec-cell-5.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-2.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-extract-exp-1.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-extract-exp-4.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-extract-exp-5.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-extract-sig-1.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-extract-sig-4.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-extract-sig-5.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-1.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-10.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-11.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-4.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-7.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-test-data-class-11.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-test-data-class-6.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-test-data-class-7.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-test-neg-2.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-test-neg-3.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-test-neg-5.c: Likewise.
	* gcc.target/powerpc/bfp/vec-extract-exp-2.c: Likewise.
	* gcc.target/powerpc/bfp/vec-extract-exp-3.c: Likewise.
	* gcc.target/powerpc/bfp/vec-extract-sig-2.c: Likewise.
	* gcc.target/powerpc/bfp/vec-extract-sig-3.c: Likewise.
	* gcc.target/powerpc/bfp/vec-insert-exp-2.c: Likewise.
	* gcc.target/powerpc/bfp/vec-insert-exp-3.c: Likewise.
	* gcc.target/powerpc/bfp/vec-insert-exp-6.c: Likewise.
	* gcc.target/powerpc/bfp/vec-insert-exp-7.c: Likewise.
	* gcc.target/powerpc/bfp/vec-test-data-class-2.c: Likewise.
	* gcc.target/powerpc/bfp/vec-test-data-class-3.c: Likewise.
	* gcc.target/powerpc/byte-in-either-range-1.c: Likewise.
	* gcc.target/powerpc/byte-in-range-1.c: Likewise.
	* gcc.target/powerpc/byte-in-set-1.c: Likewise.
	* gcc.target/powerpc/byte-in-set-2.c: Likewise.
	* gcc.target/powerpc/cmpb-3.c: Likewise.
	* gcc.target/powerpc/crypto-builtin-2.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-1.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-11.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-16.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-21.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-26.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-31.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-36.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-41.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-46.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-51.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-56.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-6.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-61.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-66.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-71.c: Likewise.
	* gcc.target/powerpc/dfp/dtstsfi-76.c: Likewise.
	* gcc.target/powerpc/no-r11-3.c: Likewise.
	* gcc.target/powerpc/pr80098-1.c: Likewise.
	* gcc.target/powerpc/pr80098-2.c: Likewise.
	* gcc.target/powerpc/pr80098-3.c: Likewise.
	* gcc.target/powerpc/pr80098-4.c: Likewise.
	* gcc.target/powerpc/vsu/vec-all-nez-7.c: Likewise.
	* gcc.target/powerpc/vsu/vec-any-eqz-7.c: Likewise.
	* gcc.target/powerpc/vsu/vec-cmpnez-7.c: Likewise.
	* gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: Likewise.
	* gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: Likewise.
	* gcc.target/powerpc/vsu/vec-xl-len-12.c: Likewise.
	* gcc.target/powerpc/vsu/vec-xl-len-13.c: Likewise.
	* gcc.target/powerpc/vsu/vec-xlx-7.c: Likewise.
	* gcc.target/powerpc/vsu/vec-xrx-7.c: Likewise.
	* gcc.target/powerpc/vsu/vec-xst-len-12.c: Likewise.
	* gcc.target/powerpc/vsu/vec-xst-len-13.c: Likewise.

From-SVN: r251092
2017-08-14 14:26:33 +00:00
Bin Cheng
8d2d0de9f7 re PR tree-optimization/81799 (ICE on valid code at -O3: verify_gimple failed)
PR tree-optimization/81799
	* tree-loop-distribution.c (version_loop_by_alias_check): Force
	cond_expr to simple gimple operand.

	gcc/testsuite
	* gcc.dg/tree-ssa/pr81799.c: New.

From-SVN: r251088
2017-08-14 11:46:03 +00:00
Wilco Dijkstra
5316dd1b63 Add check_effective_target_autoincdec.
Add check_effective_target_autoincdec that returns true if a target
runs the auto_inc_dec optimization pass.

    gcc/
	* doc/sourcebuild.texi (autoincdec): Add autoincdec description.

    gcc/testsuite/
	PR middle-end/46932
	* gcc.dg/pr46932.c: Use dg-require-effective-target autoincdec.
	* lib/target-supports.exp: Add check_effective_target_autoincdec.

From-SVN: r251087
2017-08-14 11:18:50 +00:00
Szabolcs Nagy
250db3f9b2 [AArch64] Fix dbl_mov_immediate_1.c test
gcc/testsuite:

	* gcc.target/aarch64/dbl_mov_immediate_1.c: Add
	-mno-pc-relative-literal-loads.

From-SVN: r251086
2017-08-14 10:28:45 +00:00
Georg-Johann Lay
7f2d3c4f93 re PR target/81754 (Building of cross compiler avr-elf is broken)
gcc/
	PR target/81754
	PR target/81268
	* config/avr/avr.opt (mgas-isr-prologues): New Var
	avr_gasisr_prologues.
	* config/avr/avr.md (gasisr, *gasisr): Use it instead of
	TARGET_GASISR_PROLOGUES.
	* config/avr/avr.c (avr_option_override): Same.
	(avr_pass_pre_proep::execute): Same.

From-SVN: r251085
2017-08-14 09:14:16 +00:00
GCC Administrator
4e5065e142 Daily bump.
From-SVN: r251080
2017-08-14 00:17:20 +00:00
H.J. Lu
15879ef7ac i386: Replace frame pointer with stack pointer in debug insns
When we eliminate frame pointer, we should also replace frame pointer
with stack pointer - UNITS_PER_WORD in debug insns.  This patch fixed:

FAIL: gcc.dg/guality/pr58791-5.c   -Os  line pr58791-5.c:20 b1 == 9
FAIL: gcc.dg/guality/pr58791-5.c   -Os  line pr58791-5.c:20 b2 == 73
FAIL: gcc.dg/guality/pr58791-5.c   -Os  line pr58791-5.c:20 b3 == 585
FAIL: gcc.dg/guality/pr58791-5.c   -Os  line pr58791-5.c:20 b4 == 4681
FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:17 s1.f == 5.0
FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:17 s1.g == 6.0
FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:17 s2.g == 6.0
FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:20 s1.f == 5.0
FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:20 s1.g == 6.0
FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:20 s2.f == 5.0
FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:20 s2.g == 6.0

on Linux/i386.

	PR target/81820
	* config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
	frame pointer with stack pointer - UNITS_PER_WORD in debug insns.

From-SVN: r251076
2017-08-13 11:31:39 -07:00
Uros Bizjak
cfc72af0fb i386.md (*load_tp_<mode>): Redefine as define_insn_and_split.
* config/i386/i386.md (*load_tp_<mode>): Redefine as
	define_insn_and_split.  Split to a memory load from 0 in
	DEFAULT_TLS_SEG_REG address space.  Merge with *load_tp_x32
	using PTR mode iterator.
	(*load_tp_x32_zext"): Redefine as define_insn_and_split.
	Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
	(*add_tp_<mode>): Redefine as define_insn_and_split.
	Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
	address space.  Merge with *add_tp_x32 using PTR mode iterator.
	(*add_tp_x32_zext"): Redefine as define_insn_and_split.
	Split to an add with a  memory load from 0 in
	DEFAULT_TLS_SEG_REG address space.

From-SVN: r251075
2017-08-13 18:08:25 +02:00
Thomas Koenig
04c4bb307f gfortran.texi: Document format of unformatted sequential files.
2017-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* gfortran.texi: Document format of unformatted sequential files.

From-SVN: r251074
2017-08-13 10:29:34 +00:00
Andrew Pinski
e42e4a0db3 aarch64-option-extensions.def (rdma): Fix feature string to what Linux prints out in /proc/cpuinfo.
2017-08-12  Andrew Pinski  <apinski@cavium.com>

        * config/aarch64/aarch64-option-extensions.def (rdma):
        Fix feature string to what Linux prints out in /proc/cpuinfo.

From-SVN: r251073
2017-08-12 17:18:39 -07:00
GCC Administrator
5e7f03168f Daily bump.
From-SVN: r251072
2017-08-13 00:16:57 +00:00
Rainer Orth
0d9255af20 Require -static support in gcc.dg/pie-static-[12].c (PR testsuite/81793)
PR testsuite/81793
	* gcc.dg/pie-static-1.c: Require both static and pie support.
	* gcc.dg/pie-static-2.c: Likewise.

From-SVN: r251067
2017-08-12 16:00:00 +00:00
Pierre-Marie de Rodat
7a7b545f8e [PR79542][Ada] Fix ICE in dwarf2out.c with nested func. inlining
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79542 reports an ICE in
dwarf2out.c for an Ada testcase built with optimization.

This crash happens during the late generation pass because
add_gnat_descriptive_type cannot find the type DIE corresponding to some
descriptive type after having tried to generate it. This is because the
DIE was generated during the early generation pass, but then pruned by
the type pruning machinery. So why was it pruned?

We are in a situation where we have cloned types (because of inlining,
IIUC) whose TYPE_NAME have non-null DECL_ABSTRACT_ORIGIN attributes. As
a consequence:

  * In modified_type_die, the "handle C typedef types" part calls
    gen_type_die on the cloned type.

  * gen_type_die matches a typedef variant, and then calls gen_decl_die
    on its TYPE_NAME, which will end up calling gen_typedef_die.

  * gen_typedef_die checks decl_ultimate_origin for this TYPE_DECL, and
    finds one, so it only adds a DW_AT_abstract_origin attribute to the
    DW_TAG_typedef DIE, but the cloned type itself does not get its own
    DIE.

  * Back in modified_type_die, the call to lookup_type_die on the type
    passed to gen_type_die returns NULL.

In the end, whole type trees, i.e. the ones referenced by
DECL_ABSTRACT_ORIGIN attributes, are never referenced from type pruning
"roots" and are thus pruned. The descriptive type at stake here is one
of them, hence the assertion failure.

This patch attemps to fix that with what seems to be the most sensible
thing to do in my opinion: updating the "handle C typedef types" part in
modified_type_die to check decl_ultimate_origin before calling
gen_type_die: if that function returns something not null, then we know
that gen_type_die/gen_typedef_die will not generate a DIE for the input
type, so we try to process the ultimate origin instead. It also updates
in a similar way gen_type_die_with_usage, assert that when
gen_typedef_die is called on nodes that have an ultimate origin, this
origin is themselves.

gcc/
	PR ada/79542
	* dwarf2out.c (modified_type_die): For C typedef types that have
	an ultimate origin, process the ultimate origin instead of the
	input type.
	(gen_typedef_die): Assert that input DECLs have no ultimate
	origin.
	(gen_type_die_with_usage): For typedef variants that have an
	ultimate origin, just call gen_decl_die on the original DECL.
	(process_scope_var): Avoid creating DIEs for local typedefs and
	concrete static variables.

gcc/testsuite/

	PR ada/79542
	* gnat.dg/debug13.ads, gnat.dg/debug13.adb: New testcase.

From-SVN: r251066
2017-08-12 09:07:12 +00:00
Alan Modra
ff97dd826e [RS6000] linux startfile/endfile
These need to match the gnu-user.h definitions to support
--enable-default-pie.  Otherwise we end up linking the wrong startup
files when defaulting to PIE.

	PR target/81170
	PR target/81295
	* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
	match gnu-user.h startfile.
	(ENDFILE_LINUX_SPEC): Similarly.

From-SVN: r251065
2017-08-12 09:58:04 +09:30
GCC Administrator
9567c62efb Daily bump.
From-SVN: r251064
2017-08-12 00:16:31 +00:00
Marek Polacek
bb85aa74f0 re PR c/81795 (Stray "originally defined here" when using -Wc++-compat with #pragma GCC diagnostic push/pop)
PR c/81795
	* c-decl.c (pushtag): Only print inform if the warning was printed.
	(grokdeclarator): Likewise.

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

From-SVN: r251056
2017-08-11 18:02:18 +00:00
Thomas Koenig
27c33b8fa5 invoke.texi: Actually commit change about -Ofast.
2017-08-11  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* invoke.texi:  Actually commit change about -Ofast.

From-SVN: r251055
2017-08-11 17:48:45 +00:00
Thomas Koenig
c4fa898440 re PR fortran/60355 ([F08] constraint C519 for BIND attribute not enforced)
2017-08-11  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/60355
	* resolve.c (resolve_symbol): Adjust (and reformat)
	comment.  Perform check if a BIND(C) is declared
	at module level regardless of whether it is typed
	implicitly or not.

2017-08-11  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/60355
	* gfortran.dg (bind_c_usage_30): New test.

From-SVN: r251054
2017-08-11 17:45:36 +00:00
Thomas Schwinge
0a29142da6 [PR lto/81430] Revert "Add nvptx_override_options_after_change"
This reverts r250421; properly fixed by r250852.

	PR lto/81430
	* config/nvptx/nvptx.c (nvptx_override_options_after_change):
	Remove function.
	(TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.

From-SVN: r251053
2017-08-11 17:37:14 +02:00
William Schmidt
f158348e0f Correct invalid ChangeLog entry
From-SVN: r251052
2017-08-11 14:11:22 +00:00
Tamar Christina
701170a4a6 aarch64.md (mov<mode>): Change.
2017-08-11  Tamar Christina  <tamar.christina@arm.com>
	* config/aarch64/aarch64.md (mov<mode>): Change.
	(*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
	aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
	* config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.

From-SVN: r251051
2017-08-11 13:47:57 +00:00
Eric Botcazou
89e18b1a7b tree-sra.c (build_access_from_expr_1): Use more precise diagnostics for storage order barriers.
* tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
	for storage order barriers.

From-SVN: r251050
2017-08-11 13:06:43 +00:00
Martin Liska
fe8a99d8cd Do not instrument void variables with MPX (PR tree-opt/79987).
2017-08-11  Martin Liska  <mliska@suse.cz>

	PR tree-opt/79987
	* tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
	variables of void type.
2017-08-11  Martin Liska  <mliska@suse.cz>

	PR tree-opt/79987
	* gcc.target/i386/mpx/pr79987.c: New test.

From-SVN: r251049
2017-08-11 10:01:13 +00:00
Martin Liska
a8b522b483 Introduce TARGET_SUPPORTS_ALIASES
2017-08-11  Martin Liska  <mliska@suse.cz>

	* c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
	TARGET_SUPPORTS_ALIASES.
2017-08-11  Martin Liska  <mliska@suse.cz>

	* asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
	TARGET_SUPPORTS_ALIASES.
	* cgraph.c (cgraph_node::create_same_body_alias): Likewise.
	* ipa-visibility.c (can_replace_by_local_alias): Likewise.
	(optimize_weakref): Likewise.
	* symtab.c (symtab_node::noninterposable_alias): Likewise.
	* varpool.c (varpool_node::create_extra_name_alias): Likewise.
	* defaults.h: Introduce TARGET_SUPPORTS_ALIASES.
2017-08-11  Martin Liska  <mliska@suse.cz>

	* decl2.c (get_tls_init_fn): Replace ASM_OUTPUT_DEF with
	TARGET_SUPPORTS_ALIASES.
	(handle_tls_init): Likewise.
	(note_mangling_alias): Likewise.  Remove ATTRIBUTE_UNUSED for
	both arguments.
	* optimize.c (can_alias_cdtor): Likewise.

From-SVN: r251048
2017-08-11 08:14:54 +00:00
Martin Liska
4c71a171ed Fix ifunc and resolver (PR ipa/81213).
2017-08-11  Martin Liska  <mliska@suse.cz>

	PR ipa/81213
	* config/i386/i386.c (make_resolver_func): Do complete
	refactoring of the function.
2017-08-11  Martin Liska  <mliska@suse.cz>

	PR ipa/81213
	* gcc.target/i386/pr81213.c: New test.

From-SVN: r251047
2017-08-11 08:10:42 +00:00
Jason Merrill
5675808f5c PR c++/81671 - nullptr_t template parameter
* pt.c (convert_nontype_argument): Fix nullptr_t check.

From-SVN: r251046
2017-08-11 01:35:39 -04:00
GCC Administrator
81f2064e41 Daily bump.
From-SVN: r251045
2017-08-11 00:17:26 +00:00
Jonathan Wakely
1ea93d89a9 PR libstdc++/81808 skip test if reading directory doesn't fail
PR libstdc++/81808
	* testsuite/27_io/basic_fstream/53984.cc: Adjust test for targets
	that allow opening a directory as a FILE and reading from it.

From-SVN: r251041
2017-08-11 01:14:57 +01:00
Uros Bizjak
e1769bdd4c re PR target/81708 (The x86 stack canary location should be customizable)
PR target/81708
	* config/i386/i386.opt (mstack-protector-guard-symbol=): New option
	* config/i386/i386.c (ix86_stack_protect_guard): Use
	ix86_stack_protect_guard_symbol_str to generate varible declaration.
	* doc/invoke.texi (x86 Options): Document
	-mstack-protector-guard-symbol= option.

testsuite/ChangeLog:

	PR target/81708
	* gcc.target/i386/stack-prot-sym.c: New test.

From-SVN: r251040
2017-08-10 22:59:10 +02:00
Uros Bizjak
f18f68226c Rename ix86_split_stack_boundary to ix86_split_stack_guard.
From-SVN: r251039
2017-08-10 22:52:50 +02:00
Richard Sandiford
adc8403799 PR81738: Split vect-alias-check-6.c
The second loop in the testcase only vectorises if we can reverse
a vector and if aligned loads aren't required.

2017-08-10  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/testsuite/
	PR testsuite/81738
	* gcc.dg/vect/vect-alias-check-6.c: Move second function to...
	* gcc.dg/vect/vect-alias-check-7.c: ...this new file.  Require
	vect_perm and vect_element_align for vectorization.

From-SVN: r251037
2017-08-10 19:58:16 +00:00
Jason Merrill
339922f4e1 PR c++/81359 - Unparsed NSDMI error from SFINAE context.
* method.c (synthesized_method_walk): Don't diagnose lack of
	operator delete.

From-SVN: r251036
2017-08-10 15:55:48 -04:00
Jason Merrill
4ce8c5dea5 PR c++/80452 - Core 1579, implicit move semantics on return/throw
* cp-tree.h (LOOKUP_PREFER_RVALUE): Now means that we've already
	tentatively changed the lvalue to an rvalue.
	* call.c (reference_binding): Remove LOOKUP_PREFER_RVALUE handling.
	(build_over_call): If LOOKUP_PREFER_RVALUE, check that the first
	parameter is an rvalue reference.
	* except.c (build_throw): Do maybe-rvalue overload resolution twice.
	* typeck.c (check_return_expr): Likewise.

From-SVN: r251035
2017-08-10 15:07:30 -04:00
Uros Bizjak
a0a10c6def * config/i386/i386.c (ix86_split_stack_boundary): Add comment.
From-SVN: r251033
2017-08-10 20:40:39 +02:00