Commit Graph

168187 Commits

Author SHA1 Message Date
Jonathan Wakely a7f8aa3ee7 Change wording of -fipa-icf documentation
* doc/invoke.texi (Optimize Options): Change "Nevertheless" to
	"Although" in -fipa-icf documentation.

From-SVN: r270260
2019-04-10 15:55:01 +01:00
Jonathan Wakely 9cadd6bd4d Fix typo in effective-target check
* testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
	typo.

From-SVN: r270259
2019-04-10 15:46:03 +01:00
Nick Clifton 6fe6bd7c08 Fix a stack exhaustion bug in libiberty's demangler when decoding a pathalogically constructed mangled name.
PR 89394
	* cp-demangle.c (cplus_demangle_fill_name): Reject negative
	lengths.
	(d_count_templates_scopes): Replace num_templates and num_scopes
	parameters with a struct d_print_info pointer parameter.  Adjust
	body of the function accordingly.  Add recursion counter and check
	that the recursion limit is not reached.
	(d_print_init): Pass dpi parameter to d_count_templates_scopes.
	Reset recursion counter afterwards, unless the recursion limit was
	reached.

From-SVN: r270258
2019-04-10 14:44:47 +00:00
Jonathan Wakely 07c2fa4665 Clearly document behaviour of multiple -g options
This copies the wording from the -O options to clearly state what
happens if more than one -g option is used.

	* doc/invoke.texi (Debugging Options): Explicitly state the semantics
	of using multiple -g options.

From-SVN: r270257
2019-04-10 15:39:59 +01:00
Martin Liska 620626daa5 Make gcov docs more precise (PR gcov-profile/89959).
2019-04-10  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/89959
	* doc/gcov.texi: Make documentation of -x option
	more precise.

From-SVN: r270251
2019-04-10 11:44:08 +00:00
Richard Biener f95b759770 tree-vectorizer.h (_stmt_vec_info): Remove same_dr_stmt member.
2019-04-10  Richard Biener  <rguenther@suse.de>

	* tree-vectorizer.h (_stmt_vec_info): Remove same_dr_stmt
	member.
	(DR_GROUP_SAME_DR_STMT): Remove.
	* tree-vect-stmts.c (vectorizable_load): Remove unreachable code.
	* tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise,
	replace with assert.
	(vect_analyze_data_ref_accesses): Fix INTEGER_CST comparison.
	(vect_record_grouped_load_vectors): Remove unreachable code.

From-SVN: r270250
2019-04-10 11:25:10 +00:00
Jonathan Wakely 4a3f7992d2 PR libstdc++/89851 Add testcase for std::variant equality
Add a test for the regression introduced with r269422 and fixed with
r270056.

	PR libstdc++/89851
	* testsuite/20_util/variant/89851.cc: New test.

From-SVN: r270249
2019-04-10 11:43:39 +01:00
Richard Earnshaw 1feb075a76 [aarch64] PR90016 - aarch64: reference to undeclared N in help for command line option
'to N' is now redundant and misleading given the earlier change to use
<number>.

Removed.

	PR target/90016
	* config/aarch64/aarch64.opt (msve-vector-bits): Remove redundant and
	obsolete reference to N.

From-SVN: r270248
2019-04-10 09:51:16 +00:00
Jakub Jelinek 9d40923511 re PR middle-end/90025 (botan2 miscompilation on s390x-linux since r268957)
PR middle-end/90025
	* expr.c (store_expr): Set properly size on the MEM passed to
	clear_storage.

	* gcc.c-torture/execute/pr90025.c: New test.

From-SVN: r270247
2019-04-10 09:28:05 +02:00
Jakub Jelinek c9c5e18883 re PR c++/90010 (valgrind error with snprintf and -Wall)
PR c++/90010
	* gimple-ssa-sprintf.c (target_to_host): Fix handling of targstr
	with strlen in between hostsz-3 and hostsz-1 inclusive when no
	translation is needed, and when translation is needed, only append
	... if the string length is hostsz or more bytes long.  Avoid using
	strncpy or strcat.

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

From-SVN: r270246
2019-04-10 09:27:20 +02:00
GCC Administrator 7e1ab2dc3f Daily bump.
From-SVN: r270245
2019-04-10 00:16:21 +00:00
Eric Botcazou 53a3f61425 c-ada-spec.c (print_destructor): Deal with deleting destructors.
* c-ada-spec.c (print_destructor): Deal with deleting destructors.
	(dump_ada_declaration) <FUNCTION_DECL>: Likewise.

From-SVN: r270239
2019-04-09 19:29:17 +00:00
Jonathan Wakely 9d89b73c06 Add comments and style fixes to <variant>
* include/std/variant: Adjust whitespace. Add comments.
	(_Multi_array): Leave primary template undefined.
	(_Multi_array<_Tp>): Define partial specialization for base case of
	recursion.
	(__gen_vtable_impl, __gen_vtable): Remove redundant && from type
	which is always a reference.
	(__gen_vtable::_S_apply()): Remove function, inline body into
	default member initializer.
	* testsuite/20_util/variant/visit.cc: Test with noncopyable types.

From-SVN: r270238
2019-04-09 19:50:48 +01:00
Jonathan Wakely 8701cb5e0d Fix std::visit to support arbitrary callables
The __visitor_result_type helper didn't use std::invoke and so didn't
compile when the visitor was a pointer-to-member rather than a function
object. Use std::invoke_result instead.

	* include/std/variant (__variant_idx_cookie): Add member type.
	(__visitor_result_type): Remove.
	(__do_visit): Use invoke_result instead of __visitor_result_type.
	* testsuite/20_util/variant/visit.cc: New test.

From-SVN: r270237
2019-04-09 19:50:43 +01:00
Jonathan Wakely bc203bf0da PR libstdc++/90008 remove unused capture from variant rel ops
PR libstdc++/90008
	* include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
	unused capture.
	* testsuite/20_util/variant/90008.cc: New test.

From-SVN: r270236
2019-04-09 19:50:39 +01:00
Uros Bizjak 51d63c036b * gcc.target/i386/ifcvt-onecmpl-abs-1.c
(dg-options): Use -O2 -fdump-rtl-ce1.
	(dg-final): Scan ce1 RTL dump instead of asm dump.

From-SVN: r270234
2019-04-09 20:16:14 +02:00
Thomas Rodgers 0360f9ad40 Add PSTL internal namespace qualifications
* include/pstl/algorithm_impl.h: Add namespace qualification.
	* include/pstl/execution_defs.h: Add namespace qualification.
	* include/pstl/execution_impl.h: Add namespace qualification.
	* include/pstl/numeric_impl.h: Add namespace qualification.
	* include/pstl/parallel_backend_tbb.h: Add namespace qualification.
	* include/pstl/unseq_backend_simd.h: Add namespace qualification.
	* include/pstl/parallel_backend_utils.h: Include <cassert>.

From-SVN: r270231
2019-04-09 15:45:26 +00:00
Jakub Jelinek 8a22feb67a re PR translation/90011 (trailing space in diagnostic)
PR translation/90011
	* typeck2.c (check_narrowing): Remove trailing space from diagnostics.

From-SVN: r270229
2019-04-09 15:19:16 +02:00
Matthew Malcomson e009dfb320 Hi there,
The "*neon_mov<mode>" patterns for 128 bit sized quantities uses the "Dn"
constraint to match vmov.f32 and vmov.i<vec-width> patterns.
This constraint boils down to using the `neon_immediate_valid` function.
Once the constraint has matched, the output C statement asserts that function
passes.

The output C statement calls `neon_immediate_valid` with the mode taken from the
iterator, while the constraint takes the mode from the operand.
This can cause a discrepency when the operand is a CONST_INT, as the constraint
passes VOIDmode which `neon_immediate_valid` treats as DImode, while the C
statement passes the mode of the iterator which can be TImode.
When this happens, the `neon_immediate_valid` can fail in the second call (if
e.g. the CONST_INT is a valid immediate in DImode but not TImode) which would
trigger the assertion.

The testcase added with this patch triggers this when compiled with an arm cross
compiler using the command line below.
gcc -march=armv8-a -c neon-immediate-timode.c -O1 -mfloat-abi=hard -mfpu=neon-fp-armv8

This patch splits the original "Dn" constraint into three new constraints, "DN"
for TImode CONST_INT, "Dn" for DImode CONST_INT, and "Dm" for CONST_VECTOR.
Splitting things up this way requires using one extra alternative in the
"*neon_mov<mode>" patterns, but makes it clear from the constraint what mode is
being used.

We also remove the behaviour of treating VOIDmode as DImode in
`neon_valid_immediate` since the original "Dn" constraint was the only place
that functionality was used.  VOIDmode is now never passed to that function.
An assertion has been added to the function to ensure this problem is caught
earlier on.

Bootstrapped on arm-none-linux-gnueabihf
Regtested on cross-compiler arm-none-eabi

gcc/ChangeLog:

2019-04-09  Matthew Malcomson  <matthew.malcomson@arm.com>

	PR target/90024
	* config/arm/arm.c (neon_valid_immediate): Disallow VOIDmode parameter.
	* config/arm/constraints.md (Dm, DN, Dn): Split previous Dn constraint
	into three.
	* config/arm/neon.md (*neon_mov<mode>): Account for TImode and DImode
	differences directly.
	(*smax<mode>3_neon, vashl<mode>3, vashr<mode>3_imm): Use Dm constraint.

gcc/testsuite/ChangeLog:

2019-04-09  Matthew Malcomson  <matthew.malcomson@arm.com>

	PR target/90024
	* gcc.dg/torture/neon-immediate-timode.c: New test.

From-SVN: r270226
2019-04-09 11:39:59 +00:00
Jakub Jelinek 765f8786cf re PR translation/90011 (trailing space in diagnostic)
PR translation/90011
	* ipa-devirt.c (compare_virtual_tables): Remove two trailing spaces
	from diagnostics.
	* config/arm/freebsd.h (LINK_SPEC): Remove trailing space from -p
	diagnostics.
	* config/riscv/freebsd.h (LINK_SPEC): Likewise.
	* config/aarch64/aarch64-freebsd.h (FBSD_TARGET_LINK_SPEC): Likewise.
	* config/darwin.h (DRIVER_SELF_SPECS, ASM_FINAL_SPEC): Remove
	trailing space from -gsplit-dwarf diagnostics.

From-SVN: r270225
2019-04-09 12:27:14 +02:00
Jakub Jelinek a73468e8c7 re PR middle-end/89998 (ICE: verify_gimple failed in printf-return-value)
PR tree-optimization/89998
	* gimple-ssa-sprintf.c (try_substitute_return_value): Use lhs type
	instead of integer_type_node if possible, don't add ranges if return
	type is not compatible with int.
	* gimple-fold.c (gimple_fold_builtin_sprintf,
	gimple_fold_builtin_snprintf): Use lhs type instead of hardcoded
	integer_type_node.

	* gcc.c-torture/compile/pr89998-1.c: New test.
	* gcc.c-torture/compile/pr89998-2.c: New test.

From-SVN: r270224
2019-04-09 12:26:13 +02:00
Martin Liska 1c67e69c0d Come up with bootstrap-lto-lean config.
2019-04-09  Martin Liska  <mliska@suse.cz>

	* Makefile.in: Regenerate.
	* Makefile.tpl: Pass GENERATOR_CFLAGS
	in all stages.
2019-04-09  Martin Liska  <mliska@suse.cz>

	* bootstrap-lto-lean.mk: New file.
2019-04-09  Martin Liska  <mliska@suse.cz>

	* Makefile.in: Use GENERATOR_CFLAGS for all generators.
	* doc/install.texi: Document the new config.

From-SVN: r270223
2019-04-09 08:49:14 +00:00
Richard Sandiford 6c0b8df123 SVE fallout from PR90006
2019-04-08  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vect-data-refs.c (vect_get_smallest_scalar_type): Always
	use gimple_expr_type for load and store calls.  Skip over the
	condition argument in a conditional internal function.
	Protect use of TREE_INT_CST_LOW.

From-SVN: r270222
2019-04-09 07:50:51 +00:00
Jakub Jelinek 31215daa9b re PR target/90015 (riscv: typo "intterupt" in diagnostic)
PR target/90015
	* config/riscv/riscv.c (riscv_get_interrupt_type): Fix comment typo.
	(riscv_merge_decl_attributes): Fix typo in diagnostics.  Remove
	trailing period from it too.

	* gcc.target/riscv/interrupt-conflict-mode.c (foo): Adjust expected
	diagnostics.

From-SVN: r270221
2019-04-09 08:38:07 +02:00
Ian Lance Taylor 3fa176b767 compiler: sort packages in export data more deterministically
We can have multiple packages with the same name, so also sort by pkgpath.
    To avoid an inconsistent sort, sort by symbol and pointer address if
    we somehow get two different packages with the same name and pkgpath.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/171032

From-SVN: r270220
2019-04-09 04:36:51 +00:00
GCC Administrator ad7d66abe9 Daily bump.
From-SVN: r270219
2019-04-09 00:16:18 +00:00
Ville Voutilainen 3d01c7c2f2 Fix visit<R> for variant.
* include/std/variant (__do_visit): Add a template parameter
for enforcing same return types for visit.
(__gen_vtable_impl): Likewise.
(_S_apply_single_alt): Adjust.
(__visit_invoke_impl): New. Handle casting to void.
(__do_visit_invoke): New. Enforces same return types.
(__do_visit_invoke_r): New. Converts return types.
(__visit_invoke): Adjust.
(__gen_vtable):  Add a template parameter for enforcing
same return types for visit.
* testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
different return types.
* testsuite/20_util/variant/visit_neg.cc: New. Ensures that
visitors with different return types don't accidentally
compile with regular visitation.

From-SVN: r270216
2019-04-08 22:45:48 +03:00
Marek Polacek 15f4769a12 typeck2.c (digest_init_r): Don't condition the object slicing warning on flag_checking.
* typeck2.c (digest_init_r): Don't condition the object slicing warning
	on flag_checking.

From-SVN: r270215
2019-04-08 19:31:00 +00:00
Ian Lance Taylor 04862afe9f libgo: update to Go 1.12.2
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170706

From-SVN: r270214
2019-04-08 18:36:25 +00:00
wu yuan 8108dfde82 [AArch64] Add tsv110 pipeline scheduling
Committed on behalf of Wu Yuan:

2019-04-04  wu yuan <wuyuan5@huawei.com>

	* config/aarch64/aarch64-cores.def (tsv1100): Change scheduling model.
	* config/aarch64/aarch64.md : Add "tsv110.md"
	* config/aarch64/tsv110.md: New file.

From-SVN: r270212
2019-04-08 17:08:32 +00:00
Richard Biener a265c9a929 re PR tree-optimization/90006 (gcc loops indefinitely around vect_get_constant_vectors on -O2 -ftree-slp-vectorize -fno-math-errno)
2019-04-08  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/90006
	* tree-vect-data-refs.c (vect_get_smallest_scalar_type): Handle
	calls like lrint.

	* gcc.dg/vect/bb-slp-pr90006.c: New testcase.

From-SVN: r270210
2019-04-08 13:54:02 +00:00
Martin Liska b8e214c6b3 LOCAL_PATCHES: Add revision.
From-SVN: r270209
2019-04-08 13:09:26 +00:00
Martin Liska 17cf909024 Add missing libsanitizer extra patch (r259664) (PR sanitizer/89941).
2019-04-08  Martin Liska  <mliska@suse.cz>

	PR sanitizer/89941
	* sanitizer_common/sanitizer_platform_limits_linux.cc (defined):
	Reapply patch from r259664.
	* sanitizer_common/sanitizer_platform_limits_posix.h (defined):
	Likewise.

From-SVN: r270208
2019-04-08 13:08:30 +00:00
Andrea Corallo 450dd8b3ab The fma_forest, fma_root_node and func_fma_steering classes lack a copy constructor.
The fma_forest, fma_root_node and func_fma_steering classes lack a
copy constructor.  However, they contain pointers to allocated memory
so this omission can be regarded as poor style.  We don't need to copy
such objects, so declare the copy constructor private to inhibit
accidental copying.

2019-04-08  Andrea Corallo  <andrea.corallo@arm.com>

	PR target/83033
	* config/aarch64/cortex-a57-fma-steering.c (fma_forest): Prohibit copy
	construction.
	(fma_root_node): Likewise.
	(func_fma_steering): Likewise.

From-SVN: r270207
2019-04-08 12:59:24 +00:00
Jakub Jelinek 0d0f212a51 re PR rtl-optimization/89865 (FAIL: gcc.target/i386/pr49095.c scan-assembler-times \\\\), % 45)
PR rtl-optimization/89865
	* config/i386/i386.md: Add peepholes for z = x; x ^= y; x != z.

	* gcc.target/i386/pr49095.c: Don't expect any RMW sequences.

From-SVN: r270206
2019-04-08 14:36:58 +02:00
Jakub Jelinek 8ad68a6d87 re PR rtl-optimization/89865 (FAIL: gcc.target/i386/pr49095.c scan-assembler-times \\\\), % 45)
PR rtl-optimization/89865
	* config/i386/i386.md
	(SWI12 peephole for mem {+,-,&,|,^}= x; mem != 0): Fix up operand
	numbers not to clash with the additional operands[4].
	(peepholes for mem {+,-,&,|,^}= x; mem != 0): New peephole2s
	with extra register copy in the middle.

	* gcc.target/i386/pr49095.c: Adjust number of expected RMW spots
	on ia32.

From-SVN: r270205
2019-04-08 14:35:22 +02:00
Martin Liska 99603e9044 Add data_file to GCOV interm. format (PR gcov-profile/89961).
2019-04-08  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/89961
	* doc/gcov.texi: Document data_file.
	* gcov.c (generate_results): Add data_info into JSON output.

From-SVN: r270204
2019-04-08 12:16:15 +00:00
Bin Cheng d6366157de re PR middle-end/89725 (ICE in get_fnname_from_decl, at varasm.c:1723)
2019-04-01  Bin Cheng  <bin.cheng@linux.alibaba.com>

	PR tree-optimization/89725
	* tree-chrec.c (chrec_contains_symbols): New parameter.  Handle outer
	loop's chrec as invariant symbol.
	* tree-chrec.h (chrec_contains_symbols): New parameter.
	* tree-data-ref.c (analyze_miv_subscript): Pass new argument.
	(build_classic_dist_vector_1, add_other_self_distances): Bypass access
	function of loops not in DDR's loop_nest.
	* tree-data-ref.h (index_in_loop_nest): Add unreachable check.

	* gcc.dg/tree-ssa/pr89725.c: New test.

From-SVN: r270203
2019-04-08 11:52:18 +00:00
Martin Liska 145f764aae Fix expected scanned pattern.
2019-04-08  Martin Liska  <mliska@suse.cz>

	* gcc.target/riscv/arch-1.c: Fix expected scanned pattern.

From-SVN: r270202
2019-04-08 08:42:00 +00:00
Paolo Carlini 8d2318ffa3 re PR c++/89914 (ICE in nothrow_spec_p, at cp/except.c:1238)
/cp
2019-04-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/89914
	* semantics.c (trait_expr_value): Don't use TYPE_NOTHROW_P
	when maybe_instantiate_noexcept fails.
	(classtype_has_nothrow_assign_or_copy_p): Likewise.
	* method.c (implicitly_declare_fn): Avoid passing error_mark_node
	to build_exception_variant.

/testsuite
2019-04-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/89914
	* g++.dg/ext/has_nothrow_constructor-3.C: New.

From-SVN: r270201
2019-04-08 08:13:50 +00:00
Christophe Lyon 66d8ee9ce0 [testsuite,libstdc++-v3] Fix 27_io/filesystem/iterators/caching.cc
2019-04-08  Christophe Lyon  <christophe.lyon@linaro.org>

	* testsuite/27_io/filesystem/iterators/caching.cc: Add
	dg-require-filesystem-ts.

From-SVN: r270199
2019-04-08 09:17:30 +02:00
Chenghua Xu 636349faba re PR target/89623 (Can't build mips-wrs-vxworks cross-compiler)
2019-04-08  Chenghua Xu  <paul.hua.gm@gmail.com>

	gcc/
	PR target/89623
	* config/mips/mips.opt (LOONGSON_EXT2): Use Var instead of
	Mask.

From-SVN: r270198
2019-04-08 06:37:00 +00:00
GCC Administrator d9c8519aa9 Daily bump.
From-SVN: r270195
2019-04-08 00:16:15 +00:00
Harald Anlauf c8a5bef346 re PR fortran/89904 (ICE in gfortran starting with r270045)
2019-04-07  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/89904
	* ChangeLog: Correct ChangeLog entry.

From-SVN: r270192
2019-04-07 19:42:05 +00:00
Uros Bizjak 1e157fa312 ChangeLog: Fix whitespace.
* ChangeLog: Fix whitespace.
	* testsuite/ChangeLog: Ditto.

From-SVN: r270191
2019-04-07 21:30:22 +02:00
Uros Bizjak 45acde2fe0 re PR target/89945 (ICE in gen_lowpart_general, at rtlhooks.c:63)
PR target/89945
	* config/i386/i386.md (anddi_1 to andsi_1_zext splitter):
	Avoid calling gen_lowpart with SYMBOL_REF and LABEL_REF operand.

testsuite/ChangeLog:

	PR target/89945
	* gcc.target/i386/pr89945.c: New test.

From-SVN: r270190
2019-04-07 21:19:08 +02:00
Alan Modra 6d31ef2ab1 Regenerate libiberty/functions.texi
This patch just picks up changes made in r231983 (git 2afaef0360)
and r268793 (git 0f7c25df5f).

	* functions.texi: Regenerate.

From-SVN: r270189
2019-04-07 21:00:35 +09:30
Eric Botcazou 22be587359 c-ada-spec.c (is_float128): New predicate extracted from...
c-family/
	* c-ada-spec.c (is_float128): New predicate extracted from...
	(dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
	<REAL_TYPE>: ...here.  Call it.
ada/
	* libgnat/i-cexten.ads (CFloat_128): New type.

From-SVN: r270188
2019-04-07 10:34:19 +00:00
GCC Administrator db9860b1df Daily bump.
From-SVN: r270187
2019-04-07 00:16:16 +00:00
Thomas Koenig b81f7b8363 re PR fortran/87352 (Large stack usage with new gfortran)
2019-04-06  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/87352
	* gfortran.h (gfc_component): Add finalized field.
	* class.c (finalize_component): If the component is already
	finalized, return early.  Set component->finalized on exit.

2019-04-06  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/87352
	* gfortran.dg/finalize_28.f90: Adjust count of __builtin_free.
	* gfortran.dg/finalize_33.f90: Likewise.
	* gfortran.dg/finalize_34.f90: New test.

From-SVN: r270184
2019-04-06 22:10:28 +00:00