Commit Graph

152523 Commits

Author SHA1 Message Date
Richard Biener da2ce5f993 re PR tree-optimization/80122 (__builtin_va_arg_pack() and __builtin_va_arg_pack_len() does not work correctly)
2017-03-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80122
	* tree-inline.c (copy_bb): Do not expans va-arg packs or
	va_arg_pack_len when the inlined call stmt requires pack
	expansion itself.
	* tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.

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

From-SVN: r246313
2017-03-21 11:42:22 +00:00
Andreas Schwab 8c00ae2406 Fix search_line_fast for aarch64/ILP32
* lex.c (search_line_fast) [__ARM_NEON && __ARM_64BIT_STATE]:
	Convert 64-bit value to boolean before passing to
	__builtin_expect.

From-SVN: r246312
2017-03-21 11:10:17 +00:00
Toma Tabacu 9d60683aa0 Skip gcc.dg/pic-2.c and gcc.dg/pie-2.c for MIPS.
gcc/testsuite/

	* gcc.dg/pic-2.c: Skip for MIPS.
	* gcc.dg/pie-2.c: Skip for MIPS.

From-SVN: r246311
2017-03-21 11:07:19 +00:00
Paolo Carlini d3e19c2c97 re PR c++/77752 (ICE on C++ code on x86_64-linux-gnu (internal compiler error: Segmentation fault, build_list_conv, implicit_conversion))
/cp
2017-03-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/77752
	* name-lookup.c (pushtag_1): Add check for bogus, non template,
	std::initializer_list.

/testsuite
2017-03-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/77752
	* g++.dg/cpp0x/initlist97.C: New.
	* g++.dg/cpp0x/initlist85.C: Update.

From-SVN: r246310
2017-03-21 10:18:51 +00:00
Jakub Jelinek 3ed67fbf3d re PR sanitizer/78158 (Strange data race detection with thread sanitizer)
PR sanitizer/78158
	* tsan.c (instrument_builtin_call): If the memory model argument
	is not a constant, assume it is valid.

From-SVN: r246306
2017-03-21 09:22:57 +01:00
Jakub Jelinek 9f30dff0ee re PR middle-end/67338 (fold-const sanitizer runtime error in roundup_loc)
PR c/67338
	* fold-const.c (round_up_loc): Negate divisor in unsigned type to
	avoid UB.

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

From-SVN: r246305
2017-03-21 09:10:30 +01:00
Marek Polacek 9da12bea7d Fix CL.
From-SVN: r246304
2017-03-21 07:50:14 +00:00
Jakub Jelinek 8bee092e7f re PR c++/35878 ([LWG 2302] Useless NULL pointer check when constructing object)
PR c++/35878
	* init.c (std_placement_new_fn_p, build_new_1): Formatting fixes.

	* g++.dg/init/pr35878_1.C: Rewrite directives to scan optimized
	dump instead of assembler.
	* g++.dg/init/pr35878_2.C: Likewise.
	* g++.dg/init/pr35878_3.C: Likewise.

From-SVN: r246303
2017-03-21 08:30:48 +01:00
Jakub Jelinek 4d1b8e70fa re PR c/80097 (internal compiler error in c_fully_fold_internal with std=c89 and -fsanitize=float-divide-by-zero)
PR c/80097
	* c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
	optional COMPOUND_EXPR with ubsan instrumentation.

	* gcc.dg/ubsan/pr80097.c: New test.

From-SVN: r246302
2017-03-21 08:01:05 +01:00
Ville Voutilainen ece3b7e65a re PR c++/35878 ([LWG 2302] Useless NULL pointer check when constructing object)
gcc/

PR c++/35878
* cp/init.c (std_placement_new_fn_p): New.
(build_new_1): Call it.

testsuite/

PR c++/35878
* g++.dg/init/pr35878_1.C: New.
* g++.dg/init/pr35878_2.C: Likewise.
* g++.dg/init/pr35878_3.C: Likewise.

From-SVN: r246301
2017-03-21 08:36:22 +02:00
GCC Administrator 5b9e0383cc Daily bump.
From-SVN: r246300
2017-03-21 00:16:18 +00:00
Segher Boessenkool e091a0fe07 combine: Fix 79910
If the dest of an I0 or I1 is used in an insn before I2, as can happen
in various uncommon cases, and we manage to do the combination, the set
is moved to I2, which is wrong.  Don't allow combining the insns in this
case.


	PR rtl-optimization/79910
	* combine.c (can_combine_p): Do not allow combining an I0 or I1
	if its dest is used by an insn before I2 (other than the combined
	insns themselves, which are properly handled already).

From-SVN: r246297
2017-03-21 00:08:16 +01:00
Segher Boessenkool 366e944696 Revert:
2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>

	* combine.c (record_used_regs): New static function.
	(try_combine): Handle situations where there is an additional
	instruction between I2 and I3 which needs to have a LOG_LINK
	updated.

	Revert:
	2017-03-17  Jim Wilson  <jim.wilson@linaro.org>

	* combine.c (try_combine): Delete redundant i1 test.  Call
	prev_nonnote_nondebug_insn instead of prev_nonnote_insn.

From-SVN: r246296
2017-03-21 00:06:35 +01:00
Joseph Myers 497e615007 * de.po, fr.po: Update.
From-SVN: r246295
2017-03-20 22:17:50 +00:00
François Dumont fe62dd045e stl_deque.h (deque): Access allocator value_type only if concept checks are enabled.
2017-03-20  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/stl_deque.h (deque): Access allocator value_type only if
	concept checks are enabled.
	* include/bits/stl_stack.h (stack): Likewise.
	* include/bits/stl_vector.h (vector): Likewise.
	* include/bits/stl_list.h (list): Likewise and check
	_SGIAssignableConcept only in C++03.
	* include/bits/stl_map.h (map): Likewise.
	* include/bits/stl_set.h (set): Likewise.
	* include/bits/stl_multimap.h (multimap): Likewise.
	* include/bits/stl_multiset.h (multiset): Likewise.
	* include/bits/stl_queue.h (queue, priority_queue): Likewise.

From-SVN: r246294
2017-03-20 20:51:40 +00:00
Aaron Sawdey 92279d5f85 re PR target/80083 (libgomp doacross2.f90 regtest fails with -mcpu=power9 -O1)
2017-03-20  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>

	PR target/80083
	* config/rs6000/rs6000.md (*movsi_internal1): Fix constraints for
	alternatives 13/14.

From-SVN: r246293
2017-03-20 15:43:44 -05:00
Jason Merrill 55b11c6090 PR c++/80096 - ICE with C++17 non-type auto.
* pt.c (tsubst): Delay tsubst of type of template non-type
	parameter.

From-SVN: r246292
2017-03-20 16:36:54 -04:00
Jason Merrill 18f73c5f24 PR c++/79519 - ICE with deleted template friend.
* decl.c (grokdeclarator): Complain about misplaced function
	definition using =, as well.

From-SVN: r246291
2017-03-20 16:36:46 -04:00
Bill Schmidt c34923c44c re PR tree-optimization/80054 (ICE in verify_ssa with -O3 -march=broadwell/skylake-avx512)
[gcc]

2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/80054
	* gimple-ssa-strength-reduction.c (all_phi_incrs_profitable): Fail
	the optimization if a PHI or any of its arguments is not dominated
	by the candidate's basis.  Use gphi* rather than gimple* as
	appropriate.
	(replace_profitable_candidates): Clean up a gimple* variable that
	should be a gphi* variable.

[gcc/testsuite]

2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/80054
	* g++.dg/torture/pr80054.C: New file.

From-SVN: r246290
2017-03-20 20:04:25 +00:00
Jason Merrill 8afd9c45b6 PR c++/79640 - infinite recursion with generic lambda.
* pt.c (tsubst_copy) [VAR_DECL]: Register the dummy instantiation
	before substituting its initializer.

From-SVN: r246289
2017-03-20 14:49:10 -04:00
Martin Sebor 9f5af26dac PR c++/52477 - Wrong initialization order __attribute__((constructor)) vs static data access
* doc/extend.texi (attribute constructor): Document present limitation.

From-SVN: r246288
2017-03-20 12:33:31 -06:00
Kelvin Nilsen b0ba96c2f1 re PR target/79963 (vec_eq_any extracts wrong CR bit when compiling with -mcpu=power9)
gcc/testsuite/ChangeLog:

2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR target/79963
	* gcc.target/powerpc/vsu/vec-any-eq-10.c: Add scan-assembler
	directive to assure selection of proper bit using rlwinm insn.
	* gcc.target/powerpc/vsu/vec-any-eq-14.c: Likewise.
	* gcc.target/powerpc/vsu/vec-any-eq-7.c: Likewise.
	* gcc.target/powerpc/vsu/vec-any-eq-8.c: Likewise.
	* gcc.target/powerpc/vsu/vec-any-eq-9.c: Likewise.

gcc/ChangeLog:

2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR target/79963
	* config/rs6000/altivec.h (vec_all_ne): Under __cplusplus__ and
	__POWER9_VECTOR__ #ifdef control, change template definition to
	use Power9-specific built-in function.
	(vec_any_eq): Likewise.
	* config/rs6000/vector.md (vector_ae_v2di_p): Change the flag used
	to control outcomes from this test.
	(vector_ae_<mode>p): For VEC_F modes, likewise.

From-SVN: r246287
2017-03-20 18:05:00 +00:00
Ian Lance Taylor dd629845b0 i386.c (ix86_function_regparm): Save an extra register for -fsplit-stack with DECL_STATIC_CHAIN.
* config/i386/i386.c (ix86_function_regparm): Save an extra
	register for -fsplit-stack with DECL_STATIC_CHAIN.

From-SVN: r246286
2017-03-20 17:43:08 +00:00
Nicolas Koenig 8026a5ae9c re PR fortran/39239 (Reject SAVEd variables EQUIVALENCEd to a COMMON)
2017-03-12 Nicolas Koenig <koenigni@student.ethz.ch>

	PR fortran/39239
	* symbol.c (check_conflict): report an error if an EQUIVALENCE variable is BIND(C).

2017-03-12 Nicolas Koenig <koenigni@student.ethz.ch>

	PR fortran/39239
	* gfortran.dg/equiv_constraint_bind_c.f90: New test.

From-SVN: r246284
2017-03-20 16:50:00 +00:00
Palmer Dabbelt 801f04e010 RISC-V: Don't prefer FP_REGS for integers
On RISC-V we can't store integers in floating-point registers as this is
forbidden by the ISA.  We've always disallowed this, but we were
setting the preferred mode to FP_REGS for some integer modes.  This
caused the LRA to blow up with some hard to read error messages.

This patch removes the prefered mode hook, as the right thing to do here
is nothing.

Thanks to Kito for finding the bug, and mpf for the fix.  See also
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79912>.

PR target/79912

From-SVN: r246283
2017-03-20 16:43:21 +00:00
Palmer Dabbelt e05a9f8e56 Use more conservative fences on RISC-V
The RISC-V memory model is still in the process of being formally
specified, so for now we're going to be safe and add the I/O bits to
userspace fences because there's no way to know if userspace is touching
memory-mapped I/O regions at compile time.

This will have no impact on existing microarchitecutres because they
treat all fences conservatively.

gcc/ChangeLog:

2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>

        * config/riscv/riscv.c (riscv_print_operand): Use "fence
        iorw,ow".
        * config/riscv/sync.mc (mem_thread_fence_1): Use "fence
        iorw,iorw".

From-SVN: r246282
2017-03-20 16:43:17 +00:00
Palmer Dabbelt 3611534e1f Disable test inapplicable to RISC-V
The test is coupled to the branch cost model.

gcc/testsuite/ChangeLog:

	* gcc.dg/tree-ssa/ssa-thread-14.c: Adjust target selector.

From-SVN: r246281
2017-03-20 16:43:13 +00:00
Palmer Dabbelt 5a05e11d96 Add RISC-V Maintainers
2017-03-20  Palmer Dabbelt  <palmer@dabbelt.com>

        * MAINTAINERS (CPU Port Maintainers): Add Kito Cheng, Palmer Dabbelt,
        and Andrew Waterman as the RISC-V maintainers.

From-SVN: r246280
2017-03-20 16:11:32 +00:00
Marek Polacek 92377255c1 PR c++/80059 - ICE with noexcept and __transaction_atomic
PR c++/80059 - ICE with noexcept and __transaction_atomic
	* except.c (build_must_not_throw_expr): Call
	instantiate_non_dependent_expr_sfinae.

	* g++.dg/tm/pr80059-2.C: New test.
	* g++.dg/tm/pr80059.C: New test.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r246279
2017-03-20 15:02:09 +00:00
Marek Polacek a74560ebeb re PR sanitizer/80063 (gcc/asan.c: PVS-Studio: Incorrect Block Delimitation (CWE-483))
PR sanitizer/80063
	* asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0).

From-SVN: r246278
2017-03-20 13:31:28 +00:00
Richard Biener 32fa36234d re PR tree-optimization/80113 (ICE in set_var_live_on_entry at tree-ssa-live.c:1018)
2017-03-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80113
	* graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not
	allocate extra SSA name for PHI def.
	(add_close_phis_to_outer_loops): Likewise.
	(add_close_phis_to_merge_points): Likewise.
	(copy_loop_close_phi_args): Likewise.
	(copy_cond_phi_nodes): Likewise.

From-SVN: r246277
2017-03-20 13:06:58 +00:00
Martin Liska 243e28bfb9 MPX: fix PR middle-end/79753
2017-03-20  Martin Liska  <mliska@suse.cz>

	PR middle-end/79753
	* tree-chkp.c (chkp_build_returned_bound): Do not build
	returned bounds for a LHS that's not a BOUNDED_P type.
2017-03-20  Martin Liska  <mliska@suse.cz>

	PR middle-end/79753
	* gcc.target/i386/mpx/pr79753.c: New test.

From-SVN: r246276
2017-03-20 10:06:00 +00:00
Martin Liska 918112d378 Fix *_CST ICEs connected to MPX.
2017-03-20  Martin Liska  <mliska@suse.cz>

	PR target/79769
	PR target/79770
	* tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
	COMPLEX_CST and VECTOR_CST.
2017-03-20  Martin Liska  <mliska@suse.cz>

	PR target/79769
	PR target/79770
	* g++.dg/pr79769.C: New test.
	* gcc.target/i386/mpx/pr79770.c: New test.

From-SVN: r246275
2017-03-20 10:04:06 +00:00
Andreas Krebbel e325aba2a7 S/390: PR78857: Don't use load and test if result is live.
The FP load and test instruction should not be used for a comparison
if the target operand is being used afterwards.  It unfortunately
turns SNaNs into QNaNs.

gcc/ChangeLog:

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

	PR target/78857
	* config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
	target operand.  A new splitter adds the clobber statement in case
	the target operand is dead anyway.

gcc/testsuite/ChangeLog:

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

	PR target/78857
	* gcc.target/s390/load-and-test-fp-1.c: New test.
	* gcc.target/s390/load-and-test-fp-2.c: New test.

From-SVN: r246274
2017-03-20 09:33:11 +00:00
Jason Merrill a4dfaae105 PR c++/80084 - wrong C++17 decomposition by reference of parameter.
* decl.c (cp_finish_decomp): Don't pull out the DECL_INITIAL of a
	reference decomposition.

From-SVN: r246273
2017-03-19 22:22:43 -04:00
Jason Merrill c881690892 PR c++/80077 - error with constexpr and -fno-elide-constructors.
* constexpr.c (cxx_eval_call_expression): Set ctx->call while
	expanding trivial constructor.

From-SVN: r246272
2017-03-19 22:22:36 -04:00
GCC Administrator a4c9d8017d Daily bump.
From-SVN: r246271
2017-03-20 00:16:15 +00:00
Gerald Pfeifer 323fbc69ca install.texi (Specific): No longer refer to age-old versions of binutils and glibc.
* doc/install.texi (Specific) <sparc-*-linux*>: No longer refer 
	to age-old versions of binutils and glibc.

From-SVN: r246266
2017-03-19 07:34:46 +00:00
Segher Boessenkool 61efa17961 Kill my doppelg\"anger
* doc/contrib.texi (Contributors): Remove duplicate entry for myself.

From-SVN: r246265
2017-03-19 01:30:40 +01:00
GCC Administrator 9b27039f3b Daily bump.
From-SVN: r246264
2017-03-19 00:16:22 +00:00
Nicolas Koenig e04f858c9f MAINTAINERS: Add self to Write After Approval
2017-03-18  Nicolas Koenig  <koenigni@gcc.gnu.org>

	* MAINTAINERS: Add self to Write After Approval

From-SVN: r246261
2017-03-18 21:44:27 +00:00
Gerald Pfeifer ac1d63e341 * doc/contrib.texi (Contributors): Add Segher Boessenkool.
From-SVN: r246260
2017-03-18 21:14:06 +00:00
Gerald Pfeifer e76659d189 appendix_contributing.xml: Convert link to ansi.org to https.
* doc/xml/manual/appendix_contributing.xml: Convert link to
	ansi.org to https.
	Update link to the C++ standard at ansi.org.

	* doc/xml/faq.xml: Remove information redundant with the above;
	instead add a reference.

From-SVN: r246259
2017-03-18 18:39:54 +00:00
Gerald Pfeifer a98cf819ee * config.guess: Import latest from upstream.
From-SVN: r246258
2017-03-18 18:22:06 +00:00
Gerald Pfeifer 9826d1a38a MAINTAINERS (Write After Approval): Remove entries that are already covered under Reviewers.
* MAINTAINERS (Write After Approval): Remove entries that are
	already covered under Reviewers.

From-SVN: r246257
2017-03-18 13:04:43 +00:00
Paul Thomas 91d2c04ced re PR fortran/79676 ([submodules] Compilation/linking error when module procedures PRIVATE)
2017-03-18  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79676
	* module.c (mio_symbol_attribute): Remove reset of the flag
	'no_module_procedures'.
	(check_for_module_procedures): New function. Move declaration
	of 'no_module_procedures' to above it.
	(gfc_dump_module): Traverse namespace calling new function.

2017-03-18  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79676
	* gfortran.dg/submodule_28.f08 : New test.

From-SVN: r246256
2017-03-18 12:38:02 +00:00
Paul Thomas c7e4107b53 re PR fortran/71838 (ICE with OpenCoarrays on submodule)
2017-03-18  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/71838
	* symbol.c (check_conflict): A dummy procedure in a submodule,
	module procedure is not an error.
	(gfc_add_flavor): Ditto.

2017-03-18  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/71838
	* gfortran.dg/submodule_26.f08 : New test.
	* gfortran.dg/submodule_27.f08 : New test.

From-SVN: r246255
2017-03-18 11:53:53 +00:00
Gerald Pfeifer 251daa19a4 install.texi (Specific): Remove old requirement for binutils 2.13.
* doc/install.texi (Specific) <arm-*-eabi>: Remove old
	requirement for binutils 2.13.

From-SVN: r246254
2017-03-18 09:43:47 +00:00
Jim Wilson 2d6568bdcb Fix aarch64 bootstrap compare failure.
gcc/
	* combine.c (try_combine): Delete redundant i1 test.  Call
	prev_nonnote_nondebug_insn instead of prev_nonnote_insn.

From-SVN: r246253
2017-03-17 22:37:52 -07:00
GCC Administrator a2bb525722 Daily bump.
From-SVN: r246252
2017-03-18 00:16:14 +00:00