Commit Graph

153452 Commits

Author SHA1 Message Date
GCC Administrator 8e3a97d59a Daily bump.
From-SVN: r252050
2017-09-13 00:16:13 +00:00
Bill Schmidt ce1a6c358b backport: re PR target/81833 (PowerPC: VSX: Miscompiles ffmpeg's scalarproduct_int16_vsx at -O1)
[gcc]

2017-09-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

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

	PR target/81833
	* config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
	define_insn to a define_expand.
	(altivec_vsum2sws_direct): New define_insn.
	(altivec_vsumsws): Convert from a define_insn to a define_expand.

[gcc/testsuite]

2017-09-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

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

	PR target/81833
	* gcc.target/powerpc/pr81833-1.c: New file.
	* gcc.target/powerpc/pr81833-2.c: New file.

From-SVN: r252042
2017-09-12 21:02:13 +00:00
Jonathan Wakely e38bde5423 PR libstdc++/70483 make std::experimental::string_view fully constexpr
Backport from mainline
2017-09-12  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/70483
	* include/experimental/bits/string_view.tcc (basic_string_view::find)
	(basic_string_view::rfind, basic_string_view::find_first_of)
	(basic_string_view::find_last_of, basic_string_view::find_first_not_of)
	(basic_string_view::find_last_not_of): Add constexpr specifier.
	* include/experimental/string_view (basic_string_view::remove_prefix)
	(basic_string_view::remove_suffix, basic_string_view::swap)
	(basic_string_view::compare, basic_string_view::find)
	(basic_string_view::rfind, basic_string_view::find_first_of)
	(basic_string_view::find_last_of, basic_string_view::find_first_not_of)
	(basic_string_view::find_last_not_of, operator==, operator!=)
	(operator<, operator>, operator<=, operator>=): Likewise.
	* testsuite/experimental/string_view/operations/compare/char/70483.cc:
	New.

From-SVN: r252032
2017-09-12 17:27:14 +01:00
Jonathan Wakely 53e7178da5 PR libstdc++/70483 make std::string_view fully constexpr
Backport from mainline
2017-09-11  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/70483
	* include/bits/string_view.tcc (basic_string_view::find)
	(basic_string_view::rfind, basic_string_view::find_first_of)
	(basic_string_view::find_last_of, basic_string_view::find_first_not_of)
	(basic_string_view::find_last_not_of): Add constexpr specifier.
	* include/std/string_view (basic_string_view::operator=)
	(basic_string_view::rbegin, basic_string_view::rend)
	(basic_string_view::crbegin, basic_string_view::crend)
	(basic_string_view::remove_prefix, basic_string_view::remove_suffix)
	(basic_string_view::swap, basic_string_view::compare)
	(basic_string_view::find, basic_string_view::rfind)
	(basic_string_view::find_first_of, basic_string_view::find_last_of)
	(basic_string_view::find_first_not_of)
	(basic_string_view::find_last_not_of, basic_string_view::_M_check)
	(basic_string_view::_M_limit, operator==, operator!=, operator<)
	(operator>, operator<=, operator>=): Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
	char/1.cc: Repeat tests in constexpr context.
	* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
	wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
	char/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
	wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operators/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/range_access/char/1.cc: Test
	cbegin, cend, rbegin, rend, crbegin and crend.
	* testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
	Remove trailing whitespace.
	* testsuite/21_strings/basic_string_view/operations/compare/wchar_t/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc:
	New.
	* testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc:
	New.
	* testsuite/21_strings/basic_string_view/operations/compare/char/2.cc:
	New.
	* testsuite/21_strings/basic_string_view/operations/compare/wchar_t/
	2.cc: New.

From-SVN: r252031
2017-09-12 17:27:09 +01:00
Jonathan Wakely 54316fafea Finish implementing P0426R1 "Constexpr for std::char_traits" for C++17
As discussed in PR c++/80265 ("__builtin_{memcmp,memchr,strlen} are
not usable in constexpr functions"), use __builtin_constant_p to tell
whether we can defer to a constexpr algorithm.

I used __always_inline__ just to be thorough.  It isn't really really
necessary as far as I could determine.

Changes like these:

	 if (__n == 0)
	   return 0;
 -	return wmemcmp(__s1, __s2, __n);
 +	else
 +	  return wmemcmp(__s1, __s2, __n);

are necessary otherwise G++ complains that we're calling a
non-constexpr function, which looks like a a manifestation of PR67026
to me.

libstdc++-v3:
2017-06-12  Pedro Alves  <palves@redhat.com>

	* doc/xml/manual/status_cxx2017.xml: Update C++17 constexpr
	char_traits status.
	* doc/html/*: Regenerate.

	* include/bits/char_traits.h (_GLIBCXX_ALWAYS_INLINE): Define if
	not already defined.
	(__cpp_lib_constexpr_char_traits): Uncomment.
	(__constant_string_p, __constant_char_array_p): New.
	(std::char_traits<char>, std::char_traits<wchar_t>): Add
	_GLIBCXX17_CONSTEXPR on compare, length and find and use
	__constant_string_p, __constant_char_array_p and
	__builtin_constant_p to defer to __gnu_cxx::char_traits at compile
	time.

	* testsuite/21_strings/char_traits/requirements/
	constexpr_functions_c++17.cc: Uncomment
	__cpp_lib_constexpr_char_traits tests.  Uncomment
	test_compare<char>, test_length<char>, test_find<char>,
	test_compare<wchar_t>, test_length<wchar_t> and test_find<wchar_t>
	static_assert tests.

From-SVN: r252030
2017-09-12 17:27:01 +01:00
GCC Administrator a13244e8fe Daily bump.
From-SVN: r251995
2017-09-12 00:16:13 +00:00
Max Filippov 7cd44d39d3 xtensa: fix PR target/82181
2017-09-11  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
	Backport from mainline

	* config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
	words of DImode object are reachable by xtensa_uimm8x4 access.

From-SVN: r251987
2017-09-11 21:44:42 +00:00
GCC Administrator 1d56f1768e Daily bump.
From-SVN: r251955
2017-09-11 00:16:12 +00:00
Bill Schmidt cb3903dac5 backport: re PR target/80695 (gratuitous use of stxvx to store multiple pointers)
[gcc]

2017-09-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

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

	PR target/80695
	* config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
	Account for direct move costs for vec_construct of integer
	vectors.

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

	PR target/80695
	* config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
	Reduce cost estimate for direct moves.

[gcc/testsuite]

2017-09-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

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

	PR target/80695
	* gcc.target/powerpc/pr80695-p8.c: New file.
	* gcc.target/powerpc/pr80695-p9.c: New file.

From-SVN: r251952
2017-09-10 21:09:38 +00:00
Eric Botcazou 1d255b97d1 re PR ada/79441 (gnat.dg/pack9.adb fails)
PR ada/79441
	* gnat.dg/pack9.adb: Robustify.

From-SVN: r251950
2017-09-10 17:03:40 +00:00
Jonathan Wakely a37ce68051 PR c++/81852 define feature-test macro for -fthreadsafe-statics
gcc/c-family:

	PR c++/81852
	* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.

gcc/testsuite:

	PR c++/81852
	* g++.dg/cpp1y/feat-cxx11.C: Check __cpp_threadsafe_static_init.
	* g++.dg/cpp1y/feat-cxx14.C: Likewise.
	* g++.dg/cpp1y/feat-cxx98.C: Likewise.
	* g++.dg/cpp1y/feat-neg.C: Likewise.
	* g++.dg/cpp1z/feat-cxx1z.C: Likewise.

From-SVN: r251946
2017-09-10 09:44:04 +01:00
GCC Administrator c319a7a03c Daily bump.
From-SVN: r251944
2017-09-10 00:16:16 +00:00
Eric Botcazou 1dbe491929 decl.c (promote_object_alignment): New function taken from...
* gcc-interface/decl.c (promote_object_alignment): New function taken
	from...
	(gnat_to_gnu_entity) <E_Variable>: ...here.  Invoke it.
	(gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
	create a padding type on success before doing the atomic check.

From-SVN: r251932
2017-09-09 12:30:42 +00:00
Eric Botcazou 5d5372468c decl.c (gnat_to_gnu_entity): Apply the promotion to static memory earlier in the processing.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
	promotion to static memory earlier in the processing.

From-SVN: r251930
2017-09-09 12:19:38 +00:00
Eric Botcazou 2d9534b215 sem_util.ads (Set_Rep_Info): New inline procedure.
* sem_util.ads (Set_Rep_Info): New inline procedure.
	* sem_util.adb (Set_Rep_Info): Implement it.
	* sem_ch3.adb (Process_Subtype): If the case of a constraint present,
	always copy the representation aspects onto the subtype.
	* gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
	and TYPE_BY_REFERENCE_P flags on types after various promotions.
	* gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
	Consider all kinds of entities.

From-SVN: r251928
2017-09-09 12:06:48 +00:00
Eric Botcazou 753161f615 re PR bootstrap/81926 (go/parse.o differs between stage2 and stage3)
PR bootstrap/81926
	* cp-objcp-common.c (struct debug_type_hasher): New class.
	(debug_type_hash): New variable.
	(cp_get_debug_type): Associate the OFFSET_TYPEs with the types.

From-SVN: r251923
2017-09-09 09:43:33 +00:00
GCC Administrator 6e1b459777 Daily bump.
From-SVN: r251916
2017-09-09 00:16:13 +00:00
Eric Botcazou 35a04528f8 re PR target/81988 (invalid std instruction with odd register)
PR target/81988
	* config/sparc/sparc.md (mulsi3): Rename into *mulsi3_sp32.
	(*mulsi3_sp64): New instruction.
	(mulsi3): New expander.

From-SVN: r251905
2017-09-08 17:12:15 +00:00
GCC Administrator b573cd732d Daily bump.
From-SVN: r251860
2017-09-08 00:16:14 +00:00
Jakub Jelinek f0da73ec40 backport: re PR middle-end/81768 (error: control flow in the middle of basic block)
Backported from mainline
	2017-09-05  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/81768
	* omp-low.c (lower_omp_for): Recompute tree invariant if
	gimple_omp_for_initial/final is ADDR_EXPR.

	* gcc.dg/gomp/pr81768-2.c: New test.

From-SVN: r251857
2017-09-07 22:41:42 +02:00
Jakub Jelinek 22bfd3f3a9 backport: re PR middle-end/81768 (error: control flow in the middle of basic block)
Backported from mainline
	2017-09-05  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/81768
	* omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
	into gimple val before gimplification fo the COND_EXPR.

	* gcc.dg/gomp/pr81768-1.c: New test.

From-SVN: r251856
2017-09-07 22:40:06 +02:00
Jakub Jelinek 7804f36f1e backport: lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.
Backported from mainline
	2017-09-04  Jakub Jelinek  <jakub@redhat.com>

	* lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.

From-SVN: r251855
2017-09-07 22:30:58 +02:00
Jakub Jelinek f7b87491a9 backport: re PR sanitizer/81923 ([ASAN] gcc emites wrong odr asan instrumentation for glibc)
Backported from mainline
	2017-09-01  Jakub Jelinek  <jakub@redhat.com>

	PR sanitizer/81923
	* asan.c (create_odr_indicator): Strip name encoding from assembler
	name before appending it after __odr_asan_.

	* gcc.dg/asan/pr81923.c: New test.

From-SVN: r251854
2017-09-07 22:29:04 +02:00
Jakub Jelinek 9e2e13bd6d backport: re PR c/81687 (Compiler drops label in OpenMP region)
2017-09-07  Jakub Jelinek  <jakub@redhat.com>

	Backported from mainline
	2017-08-09  Jakub Jelinek  <jakub@redhat.com>

	PR c/81687
	* omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
	LABEL_DECLs.
	* tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
	or DECL_NONLOCAL labels.
	(move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
	or DECL_NONLOCAL labels here.

	* testsuite/libgomp.c/pr81687-1.c: New test.
	* testsuite/libgomp.c/pr81687-2.c: New test.

From-SVN: r251853
2017-09-07 22:26:34 +02:00
Jakub Jelinek 4330b878c7 backport: ptrace.h: New file.
Backported from mainline
	2017-08-07  Jakub Jelinek  <jakub@redhat.com>

	* include/system/sys/ptrace.h: New file.

From-SVN: r251852
2017-09-07 22:24:36 +02:00
Jakub Jelinek 6b6bdf1822 backport: re PR target/81621 (ICE in delete_insn, at cfgrtl.c:167 with s390x cross compiler)
Backported from mainline
	2017-08-03  Jakub Jelinek  <jakub@redhat.com>

	PR target/81621
	* bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
	after setting changeable df flags.

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

From-SVN: r251851
2017-09-07 22:23:14 +02:00
Jakub Jelinek 2926cf5b22 backport: re PR driver/81650 (gcc -m32 mishandles -Walloc-size-larger-than=9223372036854775807)
Backported from mainline
	2017-08-03  Jakub Jelinek  <jakub@redhat.com>

	PR driver/81650
	* calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
	instead of 10??LU, perform unit multiplication in wide_int,
	don't change alloc_object_size_limit if the limit is larger
	than SSIZE_MAX.

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

From-SVN: r251850
2017-09-07 22:20:43 +02:00
Jakub Jelinek d85d1bf482 backport: re PR middle-end/81052 (ICE in verify_dominators, at dominance.c:1184)
Backported from mainline
	2017-08-03  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/81052
	* omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
	(pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.

	* c-c++-common/pr81052.c: New test.

From-SVN: r251849
2017-09-07 22:19:47 +02:00
Jakub Jelinek 54e97c588a backport: re PR c/45784 (gcc OpenMP - error: invalid controlling predicate)
Backported from mainline
	2017-07-27  Jakub Jelinek  <jakub@redhat.com>

	PR c/45784
	* c-omp.c (c_finish_omp_for): If the condition is wrapped in
	rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
	new COMPOUND_EXPRs around the rhs of the comparison.

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

From-SVN: r251848
2017-09-07 22:18:45 +02:00
GCC Administrator e7954201e5 Daily bump.
From-SVN: r251824
2017-09-07 00:16:16 +00:00
Bill Schmidt 2d3af62ba5 backport: re PR tree-optimization/81987 (ICE in verify_ssa with -O3 -march=skylake-avx512)
[gcc]

2017-09-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

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

	PR tree-optimization/81987
	* gimple-ssa-strength-reduction.c (insert_initializers): Don't
	insert an initializer in a location not dominated by the stride
	definition.

[gcc/testsuite]

2017-09-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

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

	PR tree-optimization/81987
	* g++.dg/torture/pr81987.C: New file.

From-SVN: r251815
2017-09-06 18:42:56 +00:00
Jakub Jelinek 7bcf615d74 re PR testsuite/82120 (FAIL: gcc.dg/tree-ssa/pr81588.c)
PR testsuite/82120
	* gcc.dg/tree-ssa/pr81588.c: Don't run on logical_op_short_circuit
	targets except for those where -mbranch-cost=2 is supported.

From-SVN: r251806
2017-09-06 17:10:28 +02:00
GCC Administrator 6243cd0615 Daily bump.
From-SVN: r251749
2017-09-06 00:16:14 +00:00
Bill Schmidt 540b5cb6c7 backport: re PR tree-optimization/81503 (Wrong code at -O2)
[gcc]

2017-09-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	Backport from mainline
	2017-08-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
		    Jakub Jelinek  <jakub@redhat.com>
		    Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81503
	* gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
	folded constant fits in the target type; reorder tests for clarity.

[gcc/testsuite]

2017-09-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	Backport from mainline
	2017-08-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
		    Jakub Jelinek  <jakub@redhat.com>
		    Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81503
	* gcc.c-torture/execute/pr81503.c: New file.

From-SVN: r251743
2017-09-05 21:49:01 +00:00
Pierre-Marie de Rodat db72abb6b8 [PR79542][Ada] Fix ICE in dwarf2out.c with nested func. inlining
This is a backport from trunk.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79542 reports an ICE in
dwarf2out.c for an Ada testcase built with optimization.

This crash happens during the late generation pass because
add_gnat_descriptive_type cannot find the type DIE corresponding to some
descriptive type after having tried to generate it. This is because the
DIE was generated during the early generation pass, but then pruned by
the type pruning machinery. So why was it pruned?

We are in a situation where we have cloned types (because of inlining,
IIUC) whose TYPE_NAME have non-null DECL_ABSTRACT_ORIGIN attributes. As
a consequence:

  * In modified_type_die, the "handle C typedef types" part calls
    gen_type_die on the cloned type.

  * gen_type_die matches a typedef variant, and then calls gen_decl_die
    on its TYPE_NAME, which will end up calling gen_typedef_die.

  * gen_typedef_die checks decl_ultimate_origin for this TYPE_DECL, and
    finds one, so it only adds a DW_AT_abstract_origin attribute to the
    DW_TAG_typedef DIE, but the cloned type itself does not get its own
    DIE.

  * Back in modified_type_die, the call to lookup_type_die on the type
    passed to gen_type_die returns NULL.

In the end, whole type trees, i.e. the ones referenced by
DECL_ABSTRACT_ORIGIN attributes, are never referenced from type pruning
"roots" and are thus pruned. The descriptive type at stake here is one
of them, hence the assertion failure.

This patch attemps to fix that with what seems to be the most sensible
thing to do in my opinion: updating the "handle C typedef types" part in
modified_type_die to check decl_ultimate_origin before calling
gen_type_die: if that function returns something not null, then we know
that gen_type_die/gen_typedef_die will not generate a DIE for the input
type, so we try to process the ultimate origin instead. It also updates
in a similar way gen_type_die_with_usage, assert that when
gen_typedef_die is called on nodes that have an ultimate origin, this
origin is themselves.

gcc/
	PR ada/79542
	* dwarf2out.c (modified_type_die): For C typedef types that have
	an ultimate origin, process the ultimate origin instead of the
	input type.
	(gen_typedef_die): Assert that input DECLs have no ultimate
	origin.
	(gen_type_die_with_usage): For typedef variants that have an
	ultimate origin, just call gen_decl_die on the original DECL.
	(process_scope_var): Avoid creating DIEs for local typedefs and
	concrete static variables.

gcc/testsuite/

	PR ada/79542
	* gnat.dg/debug13.ads, gnat.dg/debug13.adb: New testcase.

From-SVN: r251709
2017-09-05 11:04:41 +00:00
Eric Botcazou 497ffa572f re PR ada/62235 (segmentation fault on Ada 2012 code)
PR ada/62235
	* gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
	for Itypes that are E_Record_Subtype with a cloned subtype.
	<E_Record_Subtype>: Use the DECL of the cloned type directly, if any.

From-SVN: r251707
2017-09-05 09:49:34 +00:00
Eric Botcazou 613ef8fec7 utils.c (unchecked_convert): When the result type is a non-biased integral type with size 0...
* gcc-interface/utils.c (unchecked_convert): When the result type is a
	non-biased integral type with size 0, set the result to 0 directly.

From-SVN: r251702
2017-09-05 09:15:50 +00:00
Eric Botcazou 437fe63c6d trans.c (Call_to_gnu): If this is a function call and there is no target...
* gcc-interface/trans.c (Call_to_gnu): If this is a function call and
	there is no target, do not create a temporary for the return value for
	an allocator either.

From-SVN: r251696
2017-09-05 08:29:05 +00:00
Eric Botcazou d349b8ea75 trans.c (pos_to_constructor): Skip conversions to an unconstrained array type.
* gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
	unconstrained array type.

From-SVN: r251693
2017-09-05 08:17:56 +00:00
GCC Administrator f2ab7f7250 Daily bump.
From-SVN: r251688
2017-09-05 00:16:12 +00:00
Uros Bizjak 99f4d23fd0 mpx-os-support.h: New file.
* gcc.target/i386/mpx/mpx-os-support.h: New file.
	* gcc.target/i386/mpx/mpx-check.h: Include mpx-os-support.h.
	(check_osxsave): New function.
	(main): Use __get_cpuid_count and return NORUNRES on failure.
	Use check_osxsave.
	* gcc.target/i386/mpx/va-arg-pack-1-lbv.c (foo1): Use
	__builtin_va_arg_pack instead of __va_arg_pack.
	* gcc.target/i386/mpx/va-arg-pack-1-nov.c (foo1): Ditto.
	* gcc.target/i386/mpx/va-arg-pack-1-ubv.c (foo1): Ditto.
	* gcc.target/i386/mpx/va-arg-pack-2-lbv.c (foo1): Ditto.
	* gcc.target/i386/mpx/va-arg-pack-2-nov.c (foo1): Ditto.
	* gcc.target/i386/mpx/va-arg-pack-2-ubv.c (foo1): Ditto.

From-SVN: r251684
2017-09-04 20:43:44 +02:00
Jonathan Wakely c3c6d737b6 PR c++/82039 suppress -Wzero-as-null-pointer-constant warning
Backport from mainline
2017-08-31  Jonathan Wakely  <jwakely@redhat.com>

	PR c++/82039
	* include/ext/new_allocator.h (__gnu_cxx::new_allocator::allocate):
	Adjust null pointer constant to avoid warning.

From-SVN: r251658
2017-09-04 13:24:57 +01:00
Jonathan Wakely b121ffed0a PR libstdc++/81912 make std::__iterator_category constexpr
Backport from mainline
2017-08-21  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/81912
	* include/bits/stl_iterator_base_types.h (__iterator_category): Add
	constexpr for C++11 and later.
	* testsuite/24_iterators/container_access.cc: Add target selector.
	* testsuite/24_iterators/range_access.cc: Fix clause number in
	comment.
	* testsuite/24_iterators/range_access_cpp14.cc: Likewise.
	* testsuite/24_iterators/range_access_cpp17.cc: New.

From-SVN: r251657
2017-09-04 13:24:53 +01:00
Jonathan Wakely 6e85190f97 Fix test for __has_unique_object_representations support in Clang
Backport from mainline
2017-08-09  Jonathan Wakely  <jwakely@redhat.com>

	* include/std/type_traits (_GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP):
	Replace with _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP and use
	__is_identifier to set it.

From-SVN: r251656
2017-09-04 13:24:49 +01:00
Jonathan Wakely ec5016c395 Fix test for __is_aggregate support in Clang
Backport from mainline
2017-08-09  Katsuhiko Nishimra  <ktns.87@gmail.com>

	* include/std/type_traits (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Use
	__is_identifier instead of __has_builtin.

From-SVN: r251655
2017-09-04 13:24:45 +01:00
Jonathan Wakely c825961aa1 PR libstdc++/81891 fix double-free in hashtable constructor
Backport from mainline
2017-08-18  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/81891
	* include/bits/hashtable.h (_Hashtable(_InputIterator, _InputIterator,
	size_type, const _H1&, const _H2&, const _Hash&, const _Equal&,
	const _ExtractKey&, const allocator_type&)): Let destructor do clean
	up if an exception is thrown.
	* testsuite/23_containers/unordered_map/cons/81891.cc: New.

From-SVN: r251654
2017-09-04 13:24:42 +01:00
Jonathan Wakely 9584ad529f PR libstdc++/81599 fix typo in Doxygen comments
Backport from mainline
2017-07-31  Marek Polacek  <polacek@redhat.com>

	PR libstdc++/81599
	* include/bits/stl_stack.h: Fix typo.

From-SVN: r251653
2017-09-04 13:24:37 +01:00
Jonathan Wakely 16c067fa4a PR libstdc++/81338 correctly manage string capacity
Backport from mainline
2017-07-10  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/81338
	* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string):
	Declare basic_stringbuf to be a friend.
	* include/bits/sstream.tcc (basic_stringbuf::overflow)
	[_GLIBCXX_USE_CXX11_ABI]: Use unused capacity before reallocating.
	* include/std/sstream (basic_stringbuf::__xfer_bufptrs): Update string
	length to buffer length.
	* testsuite/27_io/basic_stringstream/assign/81338.cc: New.

From-SVN: r251652
2017-09-04 13:24:33 +01:00
GCC Administrator 075e2a50ff Daily bump.
From-SVN: r251632
2017-09-04 00:16:20 +00:00
GCC Administrator 5e4f96c5f5 Daily bump.
From-SVN: r251623
2017-09-03 00:16:18 +00:00