Commit Graph

167948 Commits

Author SHA1 Message Date
David Edelsohn
8f1d8deb29 xcoffout.h (xcoff_private_rodata_section_name): Declare.
* xcoffout.h (xcoff_private_rodata_section_name): Declare.
        * xcoffout.c (xcoff_private_rodata_section_name): Define.
        * config/rs6000/rs6000.c (rs6000_xcoff_asm_init_sections): Create
        read_only_private_data_section using xcoff_private_rodata_section_name.
        (rs6000_xcoff_file_start): Generate xcoff_private_rodata_section_name.

From-SVN: r270284
2019-04-11 10:14:35 -04:00
Christophe Lyon
f499726a00 [aarch64] PR90016 - aarch64: reference to undeclared N in help for command line option
2019-04-11  Christophe Lyon  <christophe.lyon@linaro.org>

	PR target/90016
	* config/aarch64/aarch64.opt (msve-vector-bits): Add missing final '.'.

From-SVN: r270280
2019-04-11 12:56:08 +02:00
Jakub Jelinek
1b4d15e855 re PR rtl-optimization/89965 (wrong code with -O -mtune=nano-x2 -fcaller-saves -fexpensive-optimizations -fno-tree-dce -fno-tree-ter)
PR rtl-optimization/89965
	* dce.c (sp_based_mem_offset): New function.
	(find_call_stack_args): Use sp_based_mem_offset.

From-SVN: r270278
2019-04-11 11:02:47 +02:00
Jonathan Wakely
ecb3e9a46e Clarify documentation for -flive-patching
* doc/invoke.texi (Optimize Options): Clarify -flive-patching docs.

From-SVN: r270276
2019-04-11 09:52:22 +01:00
Richard Biener
3bab738598 re PR tree-optimization/90020 (-O2 -Os x86-64 wrong code generated for GNU Emacs)
2019-04-11  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/90020
	* tree-ssa-sccvn.c (vn_reference_may_trap): New function.
	* tree-ssa-sccvn.h (vn_reference_may_trap): Declare.
	* tree-ssa-pre.c (compute_avail): Use it to not put
	possibly trapping references after a call that might not
	return into EXP_GEN.
	* gcse.c (compute_hash_table_work): Do not elide
	marking a block containing a call if the call might not
	return.

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

From-SVN: r270275
2019-04-11 07:34:20 +00:00
Richard Biener
2fd579ab53 re PR tree-optimization/90018 (r265453 miscompiled 527.cam4_r in SPEC CPU 2017)
2019-04-11  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/90018
	* tree-vect-data-refs.c (vect_preserves_scalar_order_p):
	Test both SLP and interleaving variants.

	* gcc.dg/vect/pr90018.c: New testcase.

From-SVN: r270273
2019-04-11 07:30:59 +00:00
Robin Dapp
375a6bc674 S/390: Add arch13 pipeline and model number
This patch adds the pipeline description and the CPU model number for
arch13.

From-SVN: r270272
2019-04-11 07:04:03 +00:00
GCC Administrator
c15ec5df62 Daily bump.
From-SVN: r270271
2019-04-11 00:16:32 +00:00
Steve Ellcey
31f06cac29 re PR rtl-optimization/87763 (aarch64 target testcases fail after r265398)
2018-04-10  Steve Ellcey  <sellcey@marvell.com>

	PR rtl-optimization/87763
	* gcc.target/aarch64/combine_bfxil.c: Change some bfxil checks
	to bfi.
	* gcc.target/aarch64/combine_bfi_2.c: New test.

From-SVN: r270267
2019-04-10 20:29:57 +00:00
Steve Ellcey
6a0d393901 re PR rtl-optimization/87763 (aarch64 target testcases fail after r265398)
2018-04-10  Steve Ellcey  <sellcey@marvell.com>

	PR rtl-optimization/87763
	* config/aarch64/aarch64-protos.h (aarch64_masks_and_shift_for_bfi_p):
	New prototype.
	* config/aarch64/aarch64.c (aarch64_masks_and_shift_for_bfi_p):
	New function.
	* config/aarch64/aarch64.md (*aarch64_bfi<GPI:mode>5_shift):
	New instruction.
	(*aarch64_bfi<GPI:mode>5_shift_alt): Ditto.
	(*aarch64_bfi<GPI:mode>4_noand): Ditto.
	(*aarch64_bfi<GPI:mode>4_noand_alt): Ditto.
	(*aarch64_bfi<GPI:mode>4_noshift): Ditto.

From-SVN: r270266
2019-04-10 20:28:19 +00:00
Jonathan Wakely
51d3c11a7c Update documentation regarding bogus memory leaks in libstdc++
* doc/xml/faq.xml: Add information about emergency EH pool.
	* doc/xml/manual/debug.xml: Update list of memory debugging tools.
	Move outdated information on mt_allocator to a separate section.
	* doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
	doesn't affect the default allocator.

From-SVN: r270264
2019-04-10 20:24:04 +01:00
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