Commit Graph

153452 Commits

Author SHA1 Message Date
Janus Weil ef28b00460 backport: re PR fortran/81770 (Bogus warning: Pointer in pointer assignment might outlive the pointer target)
2017-09-02  Janus Weil  <janus@gcc.gnu.org>

	Backport from trunk
	PR fortran/81770
	* expr.c (gfc_check_pointer_assign): Improve the check whether pointer
	may outlive pointer target.


2017-09-02  Janus Weil  <janus@gcc.gnu.org>

	Backport from trunk
	PR fortran/81770
	* gfortran.dg/warn_target_lifetime_3.f90: Fix a typo.
	* gfortran.dg/warn_target_lifetime_4.f90: New testcase.

From-SVN: r251618
2017-09-02 21:04:08 +02:00
GCC Administrator cfe5b1dbea Daily bump.
From-SVN: r251616
2017-09-02 00:16:14 +00:00
Marek Polacek 71a835084a re PR c++/82040 (ICE with -Wbool-operation and ~)
PR c++/82040
	* typeck.c (cp_build_unary_op): Avoid re-entering reporting routines.

	* g++.dg/warn/Wbool-operation-1.C: New test.

From-SVN: r251582
2017-09-01 09:24:54 +00:00
GCC Administrator 2525ae2ebd Daily bump.
From-SVN: r251579
2017-09-01 00:16:12 +00:00
Bill Schmidt 38babcc9c2 backport: re PR target/81504 (gcc-7 regression: vec_st in loop misoptimized)
2017-08-31  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	Backport from mainline
	2017-08-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/81504
	* config/rs6000/rs6000.c (find_alignment_op): Add reference
	parameter and_insn and return it.
	(recombine_lvx_pattern): Insert a copy to ensure availability of
	the base register of the copied masking operation at the point of
	the instruction replacement.
	(recombine_stvx_pattern): Likewise.

From-SVN: r251575
2017-08-31 20:28:17 +00:00
GCC Administrator 967320300d Daily bump.
From-SVN: r251552
2017-08-31 00:16:16 +00:00
Michael Meissner b0aa433921 backport: re PR target/81593 (Optimize PowerPC vector set from vector extract)
2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>

	Back port from trunk
	2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/81593
	* gcc.target/powerpc/vsx-extract-6.c: New tests for optimzing
	vector inserts from vector extracts.
	* gcc.target/powerpc/vsx-extract-7.c: Likewise.

From-SVN: r251446
2017-08-30 01:14:05 +00:00
Michael Meissner 5eebe567c3 backport: re PR target/81593 (Optimize PowerPC vector set from vector extract)
[gcc]
2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>

	Back port from trunk
	2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/81593
	* config/rs6000/vsx.md (vsx_concat_<mode>_1): New combiner insns
	to recognize inserting into a vector from a double word element
	that was extracted from another vector, and eliminate extra
	XXPERMDI instructions.
	(vsx_concat_<mode>_2): Likewise.
	(vsx_concat_<mode>_3): Likewise.
	(vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
	concat to allow optimizing inserts from previous extracts.

[gcc/testsuite]
2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>

	Back port from trunk
	2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/81593
	* gcc.target/powerpc/vec-setup.h: New tests to test various
	combinations of setting up vectors of 2 double word elements.
	* gcc.target/powerpc/vec-setup-long.c: Likewise.
	* gcc.target/powerpc/vec-setup-double.c: Likewise.
	* gcc.target/powerpc/vec-setup-be-long.c: Likewise.
	* gcc.target/powerpc/vec-setup-be-double.c: Likewise.

From-SVN: r251445
2017-08-30 01:12:21 +00:00
GCC Administrator c2a251cd90 Daily bump.
From-SVN: r251443
2017-08-30 00:16:14 +00:00
Alan Modra f3235b72ec [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: r251403
2017-08-29 17:53:44 +09:30
Alan Modra 82cd399fbe PR driver/81523: Make -static override -pie
-static and -pie together behave differently depending on whether GCC is
configured with --enable-default-pie.  On x86, "-static -pie" fails to
create executable when --enable-default-pie isn't used, but creates a
static executable when --enable-default-pie is used.  This patch makes
-static completely override -pie to create a static executable, regardless
if --enable-default-pie is used to configure GCC.

	PR target/81170
	PR target/81295
	PR driver/81523
	* gcc.c (NO_PIE_SPEC): Delete.
	(PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
	exclusion..
	(LINK_PIE_SPEC): ..to here.
	(LINK_COMMAND_SPEC): Support -no-pie.
	* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
	chain of crtbegin*.o selection, update for PIE_SPEC changes and
	format.
	(GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
	* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
	(ENDFILE_CRTEND_SPEC): Similarly.

From-SVN: r251402
2017-08-29 17:52:44 +09:30
Richard Biener 897c0169ea backport: re PR tree-optimization/81977 (Issue with inline memcpy with optimizations enabled)
2017-08-29  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2017-08-28  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81977
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
	memcpy.

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

	2017-08-28  Richard Biener  <rguenther@suse.de>

	PR debug/81993
	* dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
	Do nothing for removed DIEs.

From-SVN: r251399
2017-08-29 07:06:46 +00:00
GCC Administrator cf496a34a3 Daily bump.
From-SVN: r251394
2017-08-29 00:16:35 +00:00
Richard Biener 8dc7f6cba5 backport: [multiple changes]
2017-08-28  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2017-06-14  Richard Biener  <rguenther@suse.de>

	PR middle-end/81088
	* fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
	literal constants.
	(fold_binary_loc): When associating do not treat pre-existing
	TREE_OVERFLOW on literal constants as a reason to allow
	TREE_OVERFLOW on associated literal constants.

	* c-c++-common/ubsan/pr81088.c: New testcase.

	2017-06-13  Richard Biener  <rguenther@suse.de>

	PR middle-end/81065
	* fold-const.c (extract_muldiv_1): Remove bogus distribution
	case of C * (x * C2 + C3).
	(fold_addr_of_array_ref_difference): Properly fold index difference.

	* c-c++-common/ubsan/pr81065.c: New testcase.

	2017-06-08  Marek Polacek  <polacek@redhat.com>

	PR sanitize/80932
	* c-c++-common/ubsan/pr80932.c: Test with ints, not with long ints.

	2017-06-07  Marek Polacek  <polacek@redhat.com>

	PR sanitizer/80932
	* fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
	TYPE_OVERFLOW_WRAPS check. 

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

From-SVN: r251381
2017-08-28 12:49:55 +00:00
Richard Biener 9563a3d30a backport: [multiple changes]
2017-08-28  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2017-08-21  Richard Biener  <rguenther@suse.de>

	PR middle-end/81884
	* tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
	at struct end conservatively when comparing common bases.

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

	2017-05-04  Richard Biener  <rguenther@suse.de>
 
	* tree.c (array_at_struct_end_p): Handle arrays at struct
	end with flexarrays more conservatively.  Refactor and treat
	arrays of arrays or aggregates more strict.  Fix
	VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
	* tree.h (array_at_struct_end_p): Adjust prototype.
	* gimple-fold.c (get_range_strlen): Likewise.
	* tree-chkp.c (chkp_may_narrow_to_field): Likewise.

From-SVN: r251379
2017-08-28 12:16:06 +00:00
Richard Biener 2377f9833d backport: [multiple changes]
2017-08-28  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2017-08-01  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81181
	* tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
	(compute_antic): ... end of iteration here.

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

	2017-08-08  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81723
	* tree-vect-slp.c (struct bst_traits): New hash traits.
	(bst_fail): New global.
	(vect_build_slp_tree_2): New worker, split out from ...
	(vect_build_slp_tree): ... this now wrapping it with using
	bst_fail set to cache SLP tree build fails.  Properly handle
	max_tree_size.
	(vect_analyze_slp_instance): Allocate and free bst_fail.

	* gfortran.dg/pr81723.f: New testcase.

	2017-08-24  Richard Biener  <rguenther@suse.de>

	PR target/81921
	* config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
	and ipa-inline.h.
	(ix86_can_inline_p): When ix86_fpmath flags do not match
	check whether the callee uses FP math at all.

	* gcc/testsuite/gcc.target/i386/pr81921.c: New testcase.

From-SVN: r251376
2017-08-28 10:19:17 +00:00
GCC Administrator bf5f5dd0f1 Daily bump.
From-SVN: r251372
2017-08-28 00:16:24 +00:00
GCC Administrator 451123e448 Daily bump.
From-SVN: r251366
2017-08-27 00:16:37 +00:00
GCC Administrator 621482e770 Daily bump.
From-SVN: r251361
2017-08-26 00:16:42 +00:00
Marek Polacek 9bdbbf52ac re PR c++/81607 (Conditional operator: "type mismatch in shift expression" error)
PR c++/81607
	* cp-gimplify.c (cp_fold): If folding exposed a branch of
	a COND_EXPR, convert it to the original type of the COND_EXPR, if
	they differ.

From-SVN: r251358
2017-08-25 16:31:50 +00:00
GCC Administrator 55f4f24476 Daily bump.
From-SVN: r251345
2017-08-25 00:16:29 +00:00
Uros Bizjak 9c1c75946f backport: target-supports.exp (check_avx2_hw_available): Fix breakage due NULL being undefined.
Backport from mainline
	2017-08-23  Daniel Santos  <daniel.santos@pobox.com>

	* lib/target-supports.exp (check_avx2_hw_available):
	Fix breakage due NULL being undefined.

From-SVN: r251336
2017-08-24 16:30:51 +02:00
GCC Administrator 6de5fdb3d8 Daily bump.
From-SVN: r251324
2017-08-24 00:16:23 +00:00
Peter Bergner cd53429f1d backport: re PR target/72804 (Poor code gen with -mvsx-timode)
gcc/
	Backport from mainline
	2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>

	PR target/72804
	* config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
	operands residing in integer registers.
	(*vsx_le_perm_load_<mode>): Likewise.
	(*vsx_le_perm_store_<mode>): Likewise.
	(define_peephole2): Add peepholes to optimize the above.

gcc/testsuite/
	Backport from mainline
	2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>

	PR target/72804
	* gcc.target/powerpc/pr72804.c: New test.

From-SVN: r251318
2017-08-23 15:03:46 -05:00
Jerry DeLisle d684a9bb4b backport: re PR fortran/81296 (derived type I/o problem)
2017-08-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	Backport from trunk
	PR fortran/81296
	* trans-io.c (get_dtio_proc): Add check for format label and set
	formatted flag accordingly. Reorganize the code a little.

	* gfortran.dg/dtio_12.f90: Update test.

From-SVN: r251301
2017-08-23 00:41:10 +00:00
GCC Administrator f4abc808dc Daily bump.
From-SVN: r251299
2017-08-23 00:16:18 +00:00
Peter Bergner 8bd5889eaa backport: re PR target/80210 (ICE in in extract_insn, at recog.c:2311 on ppc64 for with __builtin_pow)
gcc/
	Backport from mainline
	2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>

	PR target/80210
	* config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
	(rs6000_set_current_function): Rewrite function to use it.

gcc/testsuite/
	Backport from mainline
	2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>

	PR target/80210
	* gcc.target/powerpc/pr80210.c: New test.

From-SVN: r251293
2017-08-22 15:13:11 -05:00
Sebastian Huber 70f0aa4d6d [PowerPC/RTEMS] Enable -mcmodel option
gcc/
	* config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
	* config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
	(DOT_SYMBOLS): Likewise.
	(MINIMAL_TOC_SECTION_ASM_OP): Likewise.
	(RELOCATABLE_NEEDS_FIXUP): Likewise.
	(RS6000_ABI_NAME): Likewise.
	(TARGET_CMODEL): Likewise.
	(TOC_SECTION_ASM_OP): Likewise.
	(SET_CMODEL): New macro.
	(SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.

From-SVN: r251277
2017-08-22 13:59:37 +00:00
Yvan Roux ae34027b9a backport: re PR c++/80287 (C++ crash with __attribute((may_alias)))
2017-08-22  Yvan Roux  <yvan.roux@linaro.org>

	Backport from mainline
	2017-08-22  Yvan Roux  <yvan.roux@linaro.org>

        PR c++/80287
        * g++.dg/pr80287.C: New test.

From-SVN: r251273
2017-08-22 10:51:52 +00:00
Georg-Johann Lay 4525932d39 backport: re PR target/81910 ([avr] ICE with "address" attribute on type)
gcc/
	Backport from 2017-08-22 trunk r251256.
	PR target/81910
	* config/avr/avr.c (avr_handle_addr_attribute): Early return if
	not VAR_P. Filter attribute warnings with OPT_Wattributes.
	(avr_attribute_table) <io, io_low, address>: Initialize
	.decl_required with true.

From-SVN: r251257
2017-08-22 07:55:34 +00:00
Sebastian Huber 170edbf6e6 [RISC-V/RTEMS] Add missing file
Forgot "svn add".

From-SVN: r251255
2017-08-22 06:16:51 +00:00
GCC Administrator 8ff869f714 Daily bump.
From-SVN: r251252
2017-08-22 00:16:25 +00:00
Joseph Myers 0f813c9bd7 * de.po: Update.
From-SVN: r251229
2017-08-21 15:08:42 +01:00
Georg-Johann Lay 5d6744e9e4 re PR target/79883 (avr i18n: untranslated "interrupt" or "signal")
PR target/79883
	* config/avr/avr.c (avr_set_current_function): Typo in diagnostic.

From-SVN: r251224
2017-08-21 12:42:47 +00:00
GCC Administrator 707bcd1b4f Daily bump.
From-SVN: r251214
2017-08-21 00:16:50 +00:00
John David Anglin 2f9e7a343f re PR testsuite/81056 (FAIL: 17_intro/names.cc (test for excess errors))
PR testsuite/81056
	* testsuite/17_intro/names.cc: Undef 'd' and 'r' on __hpux__.

From-SVN: r251209
2017-08-20 19:00:59 +00:00
John David Anglin 1f55a00daf re PR ipa/77732 (FAIL: gcc.dg/ipa/ipcp-cstagg-7.c scan-ipa-dump-times cp "Discovered an indirect call to a known target" 3)
PR ipa/77732
	* gcc.dg/ipa/ipcp-cstagg-7.c: Xfail on 32-bit hppa.

From-SVN: r251207
2017-08-20 18:40:28 +00:00
GCC Administrator 0b66953d01 Daily bump.
From-SVN: r251204
2017-08-20 00:16:21 +00:00
Uros Bizjak e016034b39 re PR target/81894 (Typo in x86 built-in function list)
PR target/81894
	* doc/extend.texi (x86 Built-in Functions): Correct the name of
	__builtin_ia32_lzcnt_u16.

From-SVN: r251198
2017-08-19 10:22:54 +02:00
GCC Administrator 61ad471aed Daily bump.
From-SVN: r251195
2017-08-19 00:16:24 +00:00
Jerry DeLisle 1ddec7a687 backport: re PR fortran/80164 (ICE in gfc_format_decoder at gcc/fortran/error.c:933)
2017-08-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	Backport from trunk
	PR fortran/80164
	* trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
	as warning/error locus.

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

From-SVN: r251189
2017-08-18 21:36:50 +00:00
GCC Administrator 30a5b0f9bd Daily bump.
From-SVN: r251177
2017-08-18 00:16:29 +00:00
Uros Bizjak 7355ab54e2 backport: re PR target/81861 (ASan pr64820.c testcase segfaults with LTO and -fstack-protector-strong)
Backport from mainline
	2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>

	PR target/81861
	* config/i386/i386.c (ix86_option_override_internal): Save target
	specific options after ix86_stack_protector_guard_reg was changed.

From-SVN: r251162
2017-08-17 21:37:06 +02:00
GCC Administrator e139883715 Daily bump.
From-SVN: r251138
2017-08-17 00:16:33 +00:00
Joseph Myers c07643f221 * fr.po: Update.
From-SVN: r251132
2017-08-16 21:21:48 +01:00
Bill Schmidt 05d98180cc backport: re PR tree-optimization/81354 (Segmentation fault in SSA Strength Reduction using -O3)
[gcc]

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

	Backport from mainline
	2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/81354
	* gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
	Insert on edges rather than explicitly creating landing pads.
	(analyze_candidates_and_replace): Commit edge inserts.


[gcc/testsuite]

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

	Backport from mainline
	2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/81354
	* g++.dg/torture/pr81354.C: New file.

From-SVN: r251120
2017-08-16 14:09:15 +00:00
GCC Administrator 2d3a77b853 Daily bump.
From-SVN: r251112
2017-08-16 00:18:35 +00:00
Joseph Myers 52caeae857 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: r251109
2017-08-16 00:43:11 +01:00
Joseph Myers 17cc49fdaf 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: r251107
2017-08-15 21:39:11 +01:00
Jonathan Wakely 639c1cfb7d PR libstdc++/81751 don't call fflush(NULL)
Backport from mainline
2017-08-09  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/79820
	PR libstdc++/81751
	* config/io/basic_file_stdio.cc (sys_open(FILE*, ios_base::openmode)):
	Call fflush on the stream instead of calling sync() while _M_cfile is
	null. Restore original value of errno.
	* testsuite/ext/stdio_filebuf/char/79820.cc: New.
	* testsuite/ext/stdio_filebuf/char/81751.cc: New.

From-SVN: r251090
2017-08-14 13:14:09 +01:00