Commit Graph

162403 Commits

Author SHA1 Message Date
Jonathan Wakely cd7ec27c3f Add std::__is_byte<std::byte> specialization
* include/bits/cpp_type_traits.h [__cplusplus >= 201703]
	(__is_byte<byte>): Define specialization for std::byte.

From-SVN: r262182
2018-06-27 11:30:52 +01:00
Eric Botcazou ed510b16a0 gimple.h (gimple_return_retbnd): Delete.
* gimple.h (gimple_return_retbnd): Delete.
	(gimple_return_set_retbnd): Likewise.
	* cgraphunit.c (cgraph_node::expand_thunk): Remove call to
	gimple_return_set_retbnd.
	* gimple-pretty-print.c (dump_gimple_return): Remove call to
	gimple_return_retbnd and adjust.
	* tree-inline.h (struct copy_body_data): Remove retbnd field.
	* tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
	Explicitly return NULL in a couple more cases.  Move assertion
	on debug statements and remove unreachable code.
	(reset_debug_binding): Do not test id->retbnd.
	(expand_call_inline): Do not set it.

From-SVN: r262181
2018-06-27 10:26:06 +00:00
Rasmus Villemoes 1765b02310 add support for --disable-gcov
For some targets (in my case VxWorks 5.5), libgcov does not compile due
to missing functions and macros such as getpid() and F_OK.

Incidentally, gcc/Makefile.in already contains comments such as

# Install gcov if it was compiled.

but there is no logic in place to actually allow gcov to not be
compiled.

So add an option for disabling build and install of libgcov and the
related host tools.

From-SVN: r262180
2018-06-27 10:04:25 +00:00
Kyrylo Tkachov ed4e2a1786 [arm] Add support for Arm Cortex-A76
The Cortex-A76 is an Armv8.2-A processor with dotproduct and FP16 support.
It can be paired with the Cortex-A55 and hence the option
-mcpu/-mtune=cortex-a76.cortex-a55 is also introduced.

Bootstrapped and tested on arm-none-linux-gnueabihf.

	* config/arm/arm-cpus.in (cortex-a76): New entry.
	(cortex-a76.cortex-a55): Likewise.
	* config/arm/arm-tables.opt: Regenerate.
	* config/arm/arm-tune.md: Likewise.
	* config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
	* doc/invoke.texi (ARM Options): Document cortex-a76 and
	cortex-a76.cortex-a55.

From-SVN: r262179
2018-06-27 09:54:40 +00:00
Tamar Christina d89fe63e58 Add SIMD to REG pattern for movhf without armv8.2-a support for AArch64
This fixes a regression where we don't have an instruction for pre Armv8.2-a
to do a move of an fp16 value from a GP reg to a SIMD reg.

This patch adds that pattern to movhf_aarch64 using a dup and only selectes it
using a very low priority.

This fixes an ICE at -O0.

gcc/
2018-06-20  Tamar Christina  <tamar.christina@arm.com>

	PR target/85769
	* config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.

gcc/testsuite/
2018-06-20  Tamar Christina  <tamar.christina@arm.com>

	PR target/85769
	* gcc.target/aarch64/f16_mov_immediate_3.c: New.

From-SVN: r262178
2018-06-27 08:08:48 +00:00
Rasmus Villemoes 0e97b84bfc fixincludes: Add missing hunk to tests/base/ioLib.h
When adding the vxworks_iolib_include_unistd hack I failed to add the
appropriate hunk to the tests/base/ioLib.h file, causing "make
check-fixincludes" to fail.

From-SVN: r262177
2018-06-27 07:59:23 +00:00
Siddhesh Poyarekar 643ef95719 [aarch64] Fix obsolete comment about X30
r217431 changed X30 as caller-saved in CALL_USE_REGISTERS because of
which this comment about X30 not being marked as call-clobbered is no
longer accurate.  Fixed to describe the current state more accurately.

	* config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
	comment.
	(EPILOGUE_USES): Likewise.

From-SVN: r262176
2018-06-27 05:28:06 +00:00
Jason Merrill 307193b82c PR c++/86320 - memory-hog with std::array of pair
* typeck2.c (process_init_constructor_array): Only compute a
	constant initializer once.

In this PR, we have a large std::array of pairs.  Since the C array is
wrapped in a class we don't go to build_vec_init, so we end up with
digest_init wanting to build up the element initializer for each element of
the array.

In the more general case, like 80272, we have a data structure problem: we
don't currently have a good way of expressing the same dynamic
initialization of many elements within a CONSTRUCTOR.  RANGE_EXPR probably
ought to work, but will need more work at genericize or gimplify time.

But in this case, the initialization for each element reduces to constant
0, so we don't even need to add anything to the CONSTRUCTOR.  We just need
to realize that if the initializer for one element is 0, the others will be
as well, and we don't need to iterate over the whole array.

For the trunk, I also use a RANGE_EXPR to handle constant initialization by
a value other than 0.

void foo ()
{
  std::array<std::pair<int, int>, 1024 * 1024> arr {};
}

From-SVN: r262173
2018-06-26 22:59:44 -04:00
Jason Merrill 6147a53a9c PR c++/80290 - memory-hog with std::pair.
* pt.c (fn_type_unification): Add convs parameter.
	(check_non_deducible_conversion): Remember conversion.
	(check_non_deducible_conversions): New.  Do checks here.
	(type_unification_real): Not here.  Remove flags parm.
	* call.c (add_function_candidate): Make convs a parameter.
	Don't recalculate the conversion if it's already set.
	(add_template_candidate_real): Allocate convs here.
	(good_conversion, conv_flags): New.

When the std::pair constructors got more complex to handle, it aggravated a
preexisting algorithmic problem in template overload resolution:

As part of template argument deduction in a call, once we've deduced all
the template arguments we can but before we substitute them to form an
actual declaration, for any function parameters that don't involve template
parameters we need to check that it's possible to convert the argument to
the parameter type (wg21.link/cwg1391).

As a result, we end up calculating the conversion twice: once here, and
then again in add_function_candidate as part of normal overload resolution.
Normally this isn't a big deal, but when the argument is a multiply-nested
initializer list, doubling the conversion processing at each level leads to
combinatorial explosion.

The patch for trunk avoids the duplication by remembering the conversion we
calculate at deduction time and then reusing it in overload resolution
rather than calculating it again.

From-SVN: r262172
2018-06-26 22:59:38 -04:00
GCC Administrator b8d636f00d Daily bump.
From-SVN: r262171
2018-06-27 00:17:03 +00:00
Jonathan Wakely db9e7b2a12 Declare some explicit instantiations for strings in Debug Mode
The empty reps and the I/O functions do not need to be implicitly
instantiated to enable assertions, so declare the explicit
instantiations when _GLIBCXX_EXTERN_TEMPLATE == -1 (i.e. when
_GLIBCXX_ASSERTIONS is defined).

	PR libstdc++/86138
	* include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
	Declare explicit instantiations of COW empty reps and I/O functions.

From-SVN: r262167
2018-06-27 01:11:53 +01:00
Jeff Law 3beb455a05 v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn on -mbig-switch by default.
* common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
	on -mbig-switch by default.

From-SVN: r262166
2018-06-26 14:22:59 -06:00
Eric Botcazou 053f9fede1 tree-inline.c (remap_location): New function extracted from...
* tree-inline.c (remap_location): New function extracted from...
	(copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
	(copy_phis_for_bb): ...here.  Call remap_location.
	(copy_cfg_body): Adjust call to copy_edges_for_bb.

From-SVN: r262165
2018-06-26 20:16:28 +00:00
David Edelsohn 18338e9eee sample-2.cc: Add TLS DejaGNU directives.
* testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
        directives.
        * testsuite/experimental/algorithm/shuffle.cc: Likewise.

From-SVN: r262163
2018-06-26 15:17:08 -04:00
Kelvin Nilsen 5f31555c4f builtins-1.c: Correct a comment.
gcc/testsuite/ChangeLog:

2018-06-26  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	* gcc.target/powerpc/builtins-1.c: Correct a comment.

From-SVN: r262162
2018-06-26 18:55:34 +00:00
Aaron Sawdey 31369f5a35 rs6000-string.c (expand_block_clear): Don't use unaligned vsx for 16B memset.
2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>

	* config/rs6000/rs6000-string.c (expand_block_clear): Don't use
	unaligned vsx for 16B memset.

From-SVN: r262158
2018-06-26 11:46:51 -05:00
Segher Boessenkool 12169ac796 I typoed the PR numnber, correct is:
PR target/86285
	* config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
	ieee128_float_type_node to long_double_type_node unless
	TARGET_LONG_DOUBLE_128 is set.

From-SVN: r262156
2018-06-26 18:08:30 +02:00
Will Schmidt d5e545a7cc fold-vec-neg-int.p8.c: Specify powerpc_p8vector_ok requirement for this test.
[testsuite]

2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/fold-vec-neg-int.p8.c: Specify powerpc_p8vector_ok
	requirement for this test.
	* gcc.target/powerpc/fold-vec-neg-int.c: Specify powerpc_p8vector_ok
	requirement, and -mpower8-vector compile option.

From-SVN: r262153
2018-06-26 15:26:14 +00:00
Segher Boessenkool 54647e7b72 rs6000: Set up ieee128_float_type_node correctly (PR82625)
We shouldn't init __ieee128 to be the same as long double if the
latter is not even a 128-bit type.

This also reorders the nearby __ibm128 code so both types use similar
logic.


	PR target/82625
	* config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
	ieee128_float_type_node to long_double_type_node unless
	TARGET_LONG_DOUBLE_128 is set.

From-SVN: r262152
2018-06-26 17:16:58 +02:00
David Malcolm 4f5b9c803a Introduce dump_location_t
gcc/ChangeLog:
	* cfgloop.c (get_loop_location): Convert return type from
	location_t to dump_user_location_t, replacing INSN_LOCATION lookups
	by implicit construction from rtx_insn *, and using
	dump_user_location_t::from_function_decl for the fallback case.
	* cfgloop.h (get_loop_location): Convert return type from
	location_t to dump_user_location_t.
	* cgraphunit.c (walk_polymorphic_call_targets): Update call to
	dump_printf_loc to pass in a dump_location_t rather than a
	location_t, via the gimple stmt.
	* coverage.c (get_coverage_counts): Update calls to
	dump_printf_loc to pass in dump_location_t rather than a
	location_t.
	* doc/optinfo.texi (Dump types): Convert example of
	dump_printf_loc from taking "locus" to taking "insn".  Update
	description of the "_loc" calls to cover dump_location_t.
	* dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
	"selftest.h".
	(dump_user_location_t::dump_user_location_t): New constructors,
	from gimple *stmt and rtx_insn *.
	(dump_user_location_t::from_function_decl): New function.
	(dump_loc): Make static.
	(dump_gimple_stmt_loc): Convert param "loc" from location_t to
	const dump_location_t &.
	(dump_generic_expr_loc): Delete.
	(dump_printf_loc): Convert param "loc" from location_t to
	const dump_location_t &.
	(selftest::test_impl_location): New function.
	(selftest::dumpfile_c_tests): New function.
	* dumpfile.h: Include "profile-count.h".
	(class dump_user_location_t): New class.
	(struct dump_impl_location_t): New struct.
	(class dump_location_t): New class.
	(dump_printf_loc): Convert 2nd param from source_location to
	const dump_location_t &.
	(dump_generic_expr_loc): Delete.
	(dump_gimple_stmt_loc): Convert 2nd param from source_location to
	const dump_location_t &.
	* gimple-fold.c (fold_gimple_assign): Update call to
	dump_printf_loc to pass in a dump_location_t rather than a
	location_t, via the gimple stmt.
	(gimple_fold_call): Likewise.
	* gimple-loop-interchange.cc
	(loop_cand::analyze_iloop_reduction_var): Update for change to
	check_reduction_path.
	(tree_loop_interchange::interchange): Update for change to
	find_loop_location.
	* graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
	change in return-type of find_loop_location.
	(graphite_regenerate_ast_isl): Likewise.
	* graphite-optimize-isl.c (optimize_isl): Likewise.
	* graphite.c (graphite_transform_loops): Likewise.
	* ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
	pass in a dump_location_t rather than a location_t, via the
	gimple stmt.
	* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
	* ipa.c (walk_polymorphic_call_targets): Likewise.
	* loop-unroll.c (report_unroll): Convert "locus" param from
	location_t to dump_location_t.
	(decide_unrolling): Update for change to get_loop_location's
	return type.
	* omp-grid.c (struct grid_prop): Convert field "target_loc" from
	location_t to dump_user_location_t.
	(grid_find_single_omp_among_assignments_1): Updates calls to
	dump_printf_loc to pass in a dump_location_t rather than a
	location_t, via the gimple stmt.
	(grid_parallel_clauses_gridifiable): Convert "tloc" from
	location_t to dump_location_t.  Updates calls to dump_printf_loc
	to pass in a dump_location_t rather than a location_t, via the
	gimple stmt.
	(grid_inner_loop_gridifiable_p): Likewise.
	(grid_dist_follows_simple_pattern): Likewise.
	(grid_gfor_follows_tiling_pattern): Likewise.
	(grid_target_follows_gridifiable_pattern): Likewise.
	(grid_attempt_target_gridification): Convert initialization
	of local "grid" from memset to zero-initialization; FIXME: does
	this require C++11?  Update call to dump_printf_loc to pass in a
	optinfo_location rather than a location_t, via the gimple stmt.
	* profile.c (read_profile_edge_counts): Updates call to
	dump_printf_loc to pass in a dump_location_t rather than a
	location_t
	(compute_branch_probabilities): Likewise.
	* selftest-run-tests.c (selftest::run_tests): Call
	dumpfile_c_tests.
	* selftest.h (dumpfile_c_tests): New decl.
	* tree-loop-distribution.c (pass_loop_distribution::execute):
	Update for change in return type of find_loop_location.
	* tree-parloops.c (parallelize_loops): Likewise.
	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
	"locus" from location_t to dump_user_location_t.
	(canonicalize_loop_induction_variables): Likewise.
	* tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
	for change in return type of find_loop_location.
	* tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
	to dump_printf_loc to pass in a dump_location_t rather than a
	location_t, via the stmt.
	* tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
	Likewise.
	* tree-vect-loop-manip.c (find_loop_location): Convert return
	type from source_location to dump_user_location_t.
	(vect_do_peeling): Update for above change.
	(vect_loop_versioning): Update for change in type of
	vect_location.
	* tree-vect-loop.c (check_reduction_path): Convert "loc" param
	from location_t to dump_user_location_t.
	(vect_estimate_min_profitable_iters): Update for change in type
	of vect_location.
	* tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
	location_t to dump_location_t.
	(vect_slp_bb): Update for change in type of vect_location.
	* tree-vectorizer.c (vect_location): Convert from source_location
	to dump_user_location_t.
	(try_vectorize_loop_1): Update for change in vect_location's type.
	(vectorize_loops): Likewise.
	(increase_alignment): Likewise.
	* tree-vectorizer.h (vect_location): Convert from source_location
	to dump_user_location_t.
	(find_loop_location): Convert return type from source_location to
	dump_user_location_t.
	(check_reduction_path): Convert 1st param from location_t to
	dump_user_location_t.
	* value-prof.c (check_counter): Update call to dump_printf_loc to
	pass in a dump_user_location_t rather than a location_t; update
	call to error_at for change in type of "locus".
	(check_ic_target): Update call to dump_printf_loc to
	pass in a dump_user_location_t rather than a location_t, via the
	call_stmt.

From-SVN: r262149
2018-06-26 13:34:59 +00:00
Jonathan Wakely 3da2f26ca4 Add missing noexcept on definition to match declaration
* include/bits/regex.tcc (regex_iterator::operator==): Add missing
	noexcept.

From-SVN: r262146
2018-06-26 13:24:47 +01:00
Robin Dapp 4723f0fb4e S/390: Fix mtune default.
When building with --with-tune=zEC12 and calling the resulting gcc
with --march=z13 (no extra -mtune), the binary would unexpectedly be compiled
with -march=z13 -mtune=zEC12.  This patch avoids using the default tune
parameter if -march is specified as argument but the user can still
explicitly state -march=z13 -mtune=zEC12.

gcc/ChangeLog:

2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>

	* config/s390/s390.h (enum processor_flags): Do not use
	default tune parameter when -march was specified.

From-SVN: r262143
2018-06-26 11:50:09 +00:00
Jakub Jelinek d37a91e5c5 re PR target/86314 (GCC 7.x and 8.x zero out "eax" before using "rax" in "lock bts")
PR target/86314
	* config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
	Check reg_overlap_mentioned_p in addition to reg_set_p with the same
	operands.

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

From-SVN: r262141
2018-06-26 13:35:52 +02:00
Jakub Jelinek f03915116b re PR c++/86291 (OpenMP incorrect for-loop collapsing with iterators and at least 5 nested loops)
PR c++/86291
	* parser.c (cp_parser_omp_for_loop_init): Change for_block argument
	type from vec<tree, va_gc> * to vec<tree, va_gc> *&.

	* testsuite/libgomp.c++/pr86291.C: New test.

From-SVN: r262137
2018-06-26 12:40:50 +02:00
Jakub Jelinek 2a73b8e713 re PR debug/86257 (Program compiled with fPIC crashes while stepping over thread-local variable GDB)
PR debug/86257
	* gcc.target/i386/pr86257.c: Add -mtls-dialect=gnu to dg-options.

From-SVN: r262136
2018-06-26 12:36:19 +02:00
Rainer Orth 2a40ece695 Require 64-bit in gcc.target/i386/pr86257.c
* gcc.target/i386/pr86257.c: Require 64-bit.

From-SVN: r262135
2018-06-26 09:14:12 +00:00
Rainer Orth ce9407ad5f Require IBM1047 support in g++.dg/pr86082.C
* g++.dg/pr86082.C: Require IBM1047 support.

From-SVN: r262134
2018-06-26 09:10:15 +00:00
Rasmus Villemoes 71d4011418 Add myself to MAINTAINERS file
From-SVN: r262133
2018-06-26 08:58:18 +00:00
Richard Biener 9ae91886f6 re PR tree-optimization/86287 (AddressSanitizer: heap-use-after-free on bootstrap with -O3)
2018-06-26  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/86287
	PR bootstrap/86316
	* tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
	(vect_analyze_loop): Initialize n_stmts.

From-SVN: r262132
2018-06-26 06:42:46 +00:00
Richard Biener 7d0c13523c re PR ipa/86271 (ICE due to size mismatch when inlining)
2018-06-26  Richard Biener  <rguenther@suse.de>

	PR middle-end/86271
	* fold-const.c (fold_convertible_p): Pointer extension
	isn't valid.

	* gcc.dg/pr86271.c: New testcase.

From-SVN: r262131
2018-06-26 06:40:43 +00:00
Alexandre Oliva 27b1bf1ec4 [PR86064] split single cross-partition range with nonzero locviews
We didn't split cross-partition ranges in loclists to output a
whole-function location expression, but with nonzero locviews, we
force loclists, and then we have to split to avoid cross-partition
list entries.

for  gcc/ChangeLog

	PR debug/86064
	* dwarf2out.c (loc_list_has_views): Adjust comments.
	(dw_loc_list): Split single cross-partition range with
	nonzero locview.

for  gcc/testsuite/ChangeLog

	PR debug/86064
	* gcc.dg/pr86064.c: New.

From-SVN: r262130
2018-06-26 05:44:26 +00:00
Jeff Law d54ca450d2 * lib/target-supports.exp
(check_effective_target_logical_op_short_circuit): Add v850.

From-SVN: r262129
2018-06-25 23:19:15 -06:00
GCC Administrator fa614da6ff Daily bump.
From-SVN: r262127
2018-06-26 00:16:56 +00:00
Jeff Law 446514afce predicates.md (const_float_1_operand): Fix match_code test.
* config/v850/predicates.md (const_float_1_operand): Fix match_code
	test.
	(const_float_0_operand): Remove unused predicate.
	* config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
	(define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
	(recipsf2): New expander.  Original pattern now called
	(recipsf2_insn).
	(recipdf2, recipdf2_insn): Similarly.
	(rsqrtsf2, rsqrtsf2_insn): Similarly
	(rsqrtdf2, rsqrtdf2_insn): Similarly

From-SVN: r262123
2018-06-25 17:45:05 -06:00
Gerald Pfeifer 0402566feb stddef.h: Remove an obsolete comment on FreeBSD 5.
* ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
	Simplify logic for FreeBSD (twice).

From-SVN: r262121
2018-06-25 22:29:55 +00:00
Ian Lance Taylor 787732cdd1 compiler: improve escape analysis
This CL ports recent enhancements of the escape analysis in the
    gc compiler to gofrontend.
    
    - CL 99335: unnamed receiver should not escape.
    
    - CL 105257: propagate loop depth to field. This prevents it
      from escaping when a field's address is taken inside a loop
      (but not otherwise escape).
    
    - CL 107597: use element type for "indirection" of slice/string.
      This prevents the slice/string from escaping when only the
      element, in case that it is pointerless, flows to outer scope.
    
    Reviewed-on: https://go-review.googlesource.com/120760

From-SVN: r262120
2018-06-25 22:23:49 +00:00
Jonathan Wakely 4fdb6fb6ae PR libstdc++/86112 fix printers for Python 2.6
Dict comprehensions are only supported since Python 2.7, so use an
alternative syntax that is backwards compatible.

	PR libstdc++/86112
	* python/libstdcxx/v6/printers.py (add_one_template_type_printer):
	Replace dict comprehension.

From-SVN: r262115
2018-06-25 22:03:49 +01:00
Martin Sebor b36bc89e32 PR tree-optimization/86204 - wrong strlen result after prior strnlen
gcc/ChangeLog:

	PR tree-optimization/86204
	* tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
	a strnlen result if it's less than the length of the string.

gcc/testsuite/ChangeLog:

	PR tree-optimization/86204
	* gcc.dg/strlenopt-46.c: New test.

From-SVN: r262114
2018-06-25 14:46:45 -06:00
Jonathan Wakely 03cd7d3fa2 Update powerpc64-linux-gnu/baseline_symbols.txt
PR libstdc++/81092
	* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r262112
2018-06-25 21:36:51 +01:00
Martin Sebor eec5f615cb PR tree-optimization/85700 - Spurious -Wstringop-truncation warning with strncat
gcc/ChangeLog:

	PR tree-optimization/85700
	* gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
	* tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
	(maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.

gcc/testsuite/ChangeLog:

	PR tree-optimization/85700
	* gcc.dg/Wstringop-truncation-4.c: New test.

From-SVN: r262110
2018-06-25 14:33:28 -06:00
Martin Sebor 2bcd87a7b5 extend.texi (Zero-length arrays): Update and clarify.
gcc/ChangeLog:

	* doc/extend.texi (Zero-length arrays): Update and clarify.

From-SVN: r262109
2018-06-25 13:46:14 -06:00
Michael Meissner 214486ebe2 config.gcc (powerpc64le*): Revert January 16th...
2018-06-25  Michael Meissner  <meissner@linux.ibm.com>

	* config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
	added IEEE/IBM long double multilib support on PowerPC little
	endian Linux systems.
	* config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
	(MULTILIB_DEFAULTS): Likewise.
	* config/rs6000/rs6000.c (rs6000_option_override_internal):
	Likewise.
	* config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
	* config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
	* config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.

From-SVN: r262105
2018-06-25 18:59:55 +00:00
Fritz Reese d66a58d333 Fix -finit-derived for c_ptr and c_funptr in programs which use
iso_c_binding.

    gcc/fortran/ChangeLog:

    2018-06-25  Fritz Reese  <fritzoreese@gmail.com>

	PR fortran/82972
        PR fortran/83088
        PR fortran/85851
	* expr.c (component_initializer): Assign init expr to c->initializer.
	(generate_isocbinding_initializer): New.
	(gfc_generate_initializer): Call generate_isocbinding_initializer to
	generate initializers for c_ptr and c_funptr with -finit-derived.

    gcc/testsuite/ChangeLog:

    2018-06-25  Fritz Reese  <fritzoreese@gmail.com>

	PR fortran/82972
        PR fortran/83088
        PR fortran/85851
	* gfortran.dg/init_flag_17.f90: New testcase.

From-SVN: r262104
2018-06-25 18:33:11 +00:00
Alexander Monakov 21925ac173 gcc_qsort: avoid overlapping memcpy (PR 86311)
PR middle-end/86311
	* sort.cc (REORDER_23): Avoid memcpy with same destination and source.
	(REORDER_45): Likewise.

From-SVN: r262092
2018-06-25 20:44:15 +03:00
Jonathan Wakely 3685dcd7fb PR libstdc++/86292 fix exception safety of std::vector<InputIterator> constructor
PR libstdc++/86292
	* include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
	Add try-catch block.
	* testsuite/23_containers/vector/cons/86292.cc: New.

From-SVN: r262029
2018-06-25 17:46:33 +01:00
Jonathan Wakely b03f3a94e6 * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
From-SVN: r262025
2018-06-25 17:42:28 +01:00
Jonathan Wakely 37cb7887f8 Add experimental::sample and experimental::shuffle from N4531
The additions to <experimental/random> were added in 2015 but the new
algorithms in <experimental/algorithm> were not. This adds them.

	* include/experimental/algorithm (sample, shuffle): Add new overloads
	using per-thread random number engine.
	* testsuite/experimental/algorithm/sample.cc: Simpify and reduce
	dependencies by using __gnu_test::test_container.
	* testsuite/experimental/algorithm/sample-2.cc: New.
	* testsuite/experimental/algorithm/shuffle.cc: New.

From-SVN: r262024
2018-06-25 17:23:49 +01:00
Carl Love 10e68fe44f p9-extract-1.c: Make second argument of vec_extract a signed int.
gcc/testsuite/ChangeLog:

2018-06-25  Carl Love  <cel@us.ibm.com>

	* gcc.target/powerpc/p9-extract-1.c: Make second argument of
 	vec_extract a signed int. Add vec_extract tests for bool char
	and bool int.
	* gcc.target/powerpc/p9-extract-4.c:  New test file for long long
	vec_extract tests.

From-SVN: r262023
2018-06-25 16:04:14 +00:00
Jeff Law ad111b8eb9 v850.md (divmodhi4): Make sure to sign extend the dividend to 32 bits.
* config/v850/v850.md (divmodhi4): Make sure to sign extend the
	dividend to 32 bits.  Adjust length.
	(udivmodhi4): Cleanup output template.  Fix length.

From-SVN: r262022
2018-06-25 10:02:16 -06:00
Tom de Vries 3e85d88526 [testsuite/guality] Fix tcl error on gdb -v failure
2018-06-25  Tom de Vries  <tdevries@suse.de>

	* lib/gcc-gdb-test.exp (report_gdb): Handle gdb -v failure.

From-SVN: r262021
2018-06-25 15:56:13 +00:00