Commit Graph

178103 Commits

Author SHA1 Message Date
Eric Botcazou
b541b87113 Make memory copy functions scalar storage order barriers
This addresses the issue raised about the usage of memory copy functions
to toggle the scalar storage order.  Recall that you cannot (the compiler
errors out) take the address of a scalar which is stored in reverse order,
but you can do it for the enclosing aggregate type., which means that you
can also pass it to the memory copy functions.  In this case, the optimizer
may rewrite the copy into a scalar copy, which is a no-no.

gcc/c-family/ChangeLog:
	* c.opt (Wscalar-storage-order): Add explicit variable.

gcc/c/ChangeLog:
	* c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
	set, warn for conversion between pointers that point to incompatible
	scalar storage orders.

gcc/ChangeLog:
	* gimple-fold.c (gimple_fold_builtin_memory_op): Do not fold if
	either type has reverse scalar storage order.
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Do not propagate through
	a memory copy if either type has reverse scalar storage order.

gcc/testsuite/ChangeLog:
	* gcc.dg/sso-11.c: New test.
	* gcc.dg/sso/sso.exp: Pass -Wno-scalar-storage-order.
	* gcc.dg/sso/memcpy-1.c: New test.
2020-07-09 00:59:59 +02:00
Kwok Cheung Yeung
a8b522311b amdgcn, nvptx: Handle -fpic/-fPIC in mkoffload
2020-07-08  Tobias Burnus  <tobias@codesourcery.com>

gcc/ChangeLog:

	* config/gcn/mkoffload.c (compile_native, main): Pass -fPIC/-fpic
	on to the native compiler, if used.
	* config/nvptx/mkoffload.c (compile_native, main): Likewise.
2020-07-08 12:11:10 -07:00
Harald Anlauf
1fa08dcac6 PR fortran/96085 - ICE in gfc_finish_var_decl, at fortran/trans-decl.c:694
Legacy ASSIGN requires a scalar integer variable.  Reject parameter
arguments.

gcc/fortran/
	PR fortran/96085
	* resolve.c (gfc_resolve_code): Check whether assign target is a
	parameter.
2020-07-08 20:53:12 +02:00
Joseph Myers
1f0d614557 Update gcc sv.po.
* sv.po: Update.
2020-07-08 18:30:38 +00:00
Patrick Palka
9eb7d0d76e c++: ICE in is_really_empty_class [PR95497]
We are ICEing in the testcase below because we pass the
yet-uninstantiated class type A<int> of the PARM_DECL b to
is_really_empty_class from is_rvalue_constant_expression when parsing
the requirement t += b.

This patch fixes the ICE by guarding the problematic call to
is_really_empty_class with a COMPLETE_TYPE_P check, which should also
subsume the existing dependent_type_p check.

gcc/cp/ChangeLog:

	PR c++/95497
	* constexpr.c (potential_constant_expression_1) <case PARM_DECL>:
	When processing_template_decl, check COMPLETE_TYPE_P before
	calling is_really_empty_class.  Don't check dependent_type_p.

gcc/testsuite/ChangeLog:

	PR c++/95497
	* g++.dg/cpp2a/concepts-pr95497.C: New test.
2020-07-08 14:17:47 -04:00
Will Schmidt
c1a57681a6 [PATCH, rs6000]Add support to enable vmsumudm behind vec_msum builtin.
gcc/ChangeLog:

2020-07-08  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* config/rs6000/altivec.h (vec_vmsumudm): New define.
	* config/rs6000/altivec.md (UNSPEC_VMSUMUDM): New unspec.
	  (altivec_vmsumudm): New define_insn.
	* config/rs6000/rs6000-builtin.def (altivec_vmsumudm): New BU_ALTIVEC_3
	  entry. (vmsumudm): New BU_ALTIVEC_OVERLOAD_3 entry.
	* config/rs6000/rs6000-call.c (altivec_overloaded_builtins): Add entries for
	  ALTIVEC_BUILTIN_VMSUMUDM variants of vec_msum.
	* doc/extend.texi: Add document for vmsumudm behind vmsum.

gcc/testsuite/ChangeLog:

2020-07-08  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/builtins-msum-runnable.c: New test.
	* gcc.target/powerpc/vsx-builtin-msum.c: New test.
2020-07-08 10:33:09 -05:00
Richard Biener
30fdaead5b compute and check alignment info during analysis
This moves querying the alignment support scheme from load/store
transform time to get_load_store_type where we should know best
what alignment constraints we actually need.  This should make
verify_data_ref_alignment obsolete which prematurely disqualifies
all vectorization IMHO.

2020-07-08  Richard Biener  <rguenther@suse.de>

	* tree-vect-stmts.c (get_group_load_store_type): Pass
	in the SLP node and the alignment support scheme output.
	Set that.
	(get_load_store_type): Likewise.
	(vectorizable_store): Adjust.
	(vectorizable_load): Likewise.
2020-07-08 17:15:36 +02:00
Eric Botcazou
0cb1b7276d [Ada] Disable warning about unsafe use of __builtin_frame_address
gcc/ada/

	* tracebak.c [generic implementation]: Add pragma GCC diagnostic
	to disable warning about __builtin_frame_address.
2020-07-08 10:55:56 -04:00
Dmitriy Anisimkov
6c8b9020a8 [Ada] Fix C miss parentheses warning on Windows
gcc/ada/

	* socket.c [_WIN32] (__gnat_minus_500ms): Parentheses around &&
	operations.  Remove notes about TN in comment.
2020-07-08 10:55:56 -04:00
Eric Botcazou
19ddfb317f [Ada] Fix warnings in C runtime files on Windows
gcc/ada/

	* adaint.h (__gnat_expect_portable_execvp): Fix prototype.
	(__gnat_expect_poll): Likewise.
	* expect.c [_WIN32]: Include adaint.h file.
	(__gnat_waitpid): Remove useless variable.
	(__gnat_expect_portable_execvp): Add ATTRIBUTE_UNUSED on parameter.
	* raise-gcc.c [SEH] (__gnat_personality_v0): Add ATTRIBUTE_UNUSED.
	* socket.c [_WIN32] (__gnat_getservbyport): Add ATTRIBUTE_UNUSED on
	a couple of parameters.
	(__gnat_gethostbyname): Likewise.
	(__gnat_gethostbyaddr): Likewise.
	(__gnat_getservbyname): Likewise.
	(__gnat_last_socket_in_set): Use variables local to loops.
	(__gnat_socket_ioctl): Cast 3rd parameter to proper type if _WIN32.
	(__gnat_inet_pton): Cast 2nd parameter to proper type if _WIN32.
	* sysdep.c (__gnat_localtime_tzoff): Remove superfluous test.
	* terminals.c [_WIN32]: Include io.h file.
	(is_gui_app): Remove useless variables and fix unsigned comparison.
	(nt_spawnve): Add ATTRIBUTE_UNUSED on first parameter.  Initialize a
	local variable and remove others that are useless.  Add missing cast
	(__gnat_setup_child_communication): Remove useless variable and call
	Use proper formatting string in call to sprintf.
	(__gnat_setup_parent_communication): Cast to proper type.
	(find_child_console): Fix prototype and remove useless variable.
	(find_process_handle): Likewise.
	(_gnat_interrupt_process): Move to after __gnat_interrupt_pid.
	(__gnat_reset_tty): Add ATTRIBUTE_UNUSED on parameter, remove return
	(__gnat_setup_winsize): Add ATTRIBUTE_UNUSED on all parameters.
2020-07-08 10:55:55 -04:00
Eric Botcazou
9e8102b350 [Ada] Do not apply constraint checks on allocator with No_Initialization
gcc/ada/

	* exp_ch4.adb (Expand_N_Allocator): In the subtype mark case, do
	not apply constraint checks if the No_Initialization flag is set.
2020-07-08 10:55:55 -04:00
Javier Miranda
d387808d8b [Ada] Fix recent regression on _Master declaration
gcc/ada/

	* exp_ch9.adb
	(Build_Class_Wide_Master): Insert the declaration of _Master
	before its use; required to avoid assertion failure in the
	backend.
2020-07-08 10:55:55 -04:00
Arnaud Charlet
eafbde5131 [Ada] Clean up in Interfaces.C.Extensions
gcc/ada/

	* libgnat/i-cexten.ads (long_long, unsigned_long_long): Now
	subtypes of Interfaces.C types.
	* libgnat/a-calcon.ads, libgnat/a-calcon.adb
	(To_Unix_Nano_Time): Use Interfaces.C.long_long instead of
	Interfaces.C.Extensions.long_long.
2020-07-08 10:55:55 -04:00
Vasiliy Fofanov
b19c922bf4 [Ada] Optional warning on build-in-place function calls
gcc/ada/

	* debug.adb: Document new switch.
	* exp_ch6.adb (Warn_BIP): New function that warns if the switch
	is on.  Call it from Make_Build_In_Place_* functions.  Warn_BIP
	is not needed in Make_Build_In_Place_Iface_*, because those call
	Make_Build_In_Place_Call_In_Object_Declaration or similar.
2020-07-08 10:55:55 -04:00
Piotr Trojanek
72145c1ee8 [Ada] Fix typo and layout in comments about matching
gcc/ada/

	* erroutc.adb (Matches): Fix comments.
2020-07-08 10:55:54 -04:00
Eric Botcazou
a1014c8136 [Ada] Fix internal error on string type comparision with predicate
gcc/ada/

	* freeze.adb (Has_Decl_In_List): New predicate to check that an
	entity is declared in a list of nodes.
	(Freeze_Expression): Use it to deal with Expression_With_Actions,
	short-circuit expression, if- and case-expression and ensure that
	the freeze node is put onto their Actions list if the entity is
	declared locally.
2020-07-08 10:55:54 -04:00
Eric Botcazou
1567ebf93a [Ada] Fix incorrect placement of freeze node with predicate
gcc/ada/

	* freeze.adb (In_Expanded_Body): Return true for the body of a
	generated predicate function.
2020-07-08 10:55:54 -04:00
Gary Dismukes
98ceb79632 [Ada] Minor reformatting and typo fix
gcc/ada/

	* sem_attr.adb: Remove hyphens in comments, plus minor code
	reformatting.
	* sem_ch13.adb: Fix typo (that => than).
	* sem_util.adb: Add hyphen in comment ("class-wide").
2020-07-08 10:55:54 -04:00
Eric Botcazou
5c63fd2c90 [Ada] Add comment on implementation choice for byte-packed array types
gcc/ada/

	* freeze.adb (Freeze_Array_Type): Add comment on implementation
	choice for byte-packed array types.
2020-07-08 10:55:53 -04:00
Piotr Trojanek
720425fa2d [Ada] Accept aspect Relaxed_Initialization on generic subprograms
gcc/ada/

	* sem_attr.adb (Analyze_Attribute): Correct prefix of 'Result
	this prefix is a generic function but the enclosing aspect or
	pragma is attached to its instance.
	* sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Analyze
	generic subprogram formal parameters (including the implicit
	result of a generic function) and only then analyse its aspects,
	because with Relaxed_Initialization the aspect expression might
	refer to those formal parameters.
	* sem_ch13.adb (Analyze_Aspect_Relaxed_Initialization): Accept
	aspect on generic subprograms; install formal parameters of a
	generic subprogram but not formal parameters of the generic unit
	itself (the previous code was inspired by aspects Post and
	Depends, where both kinds of formals are allowed).
	* sem_util.ads (Enter_Name): Fix name of a subprogram referenced
	in comment.
2020-07-08 10:55:53 -04:00
Piotr Trojanek
6b52c24dd1 [Ada] Analyze aspects once generic subprograms are recognized
gcc/ada/

	* sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
	Analyze_Aspect_Specifications after setting Ekind of the
	analyzed entity.
	* sem_ch13.adb (Analyze_Aspect_Yield): Remove minimal decoration
	of generic subprograms.
2020-07-08 10:55:53 -04:00
Arnaud Charlet
cf6bd6a3ef [Ada] ACATS 4.1R - BD10001 - Error missed
gcc/ada/

	* sem_prag.adb (Process_Inline): Check for duplicate
	pragma+aspect Inline. Minor code cleanup.
	(Check_Duplicate_Pragma): Add warning for duplicate
	pragma [No_]Inline under -gnatwr.
	* sinfo.ads, sinfo.adb (Next_Rep_Item): Allow N_Null_Statement
	which can appear when a pragma is rewritten.
	* sem_util.ads, sem_util.adb, bindo-writers.adb: Fix bad
	copy/paste now flagged.
	* libgnat/s-mmap.ads: Remove redundant pragma Inline.
2020-07-08 10:55:52 -04:00
Ed Schonberg
4b5838e086 [Ada] Update entities on class-wide condition function creation
gcc/ada/

	* sem_util.adb (Build_Class_Wide_Clone_Body): Update entities to
	refer to the right spec.
2020-07-08 10:55:52 -04:00
Bob Duff
6091c2e0fa [Ada] Disallow Predicate_Failure without predicate
gcc/ada/

	* sem_ch13.adb (Predicate_Failure): Check that the type has
	predicates.  Remove the setting of Has_Delayed_Aspects and
	Freeze_Node, because (if the code is legal) it should have
	already been done by the predicate aspect.
2020-07-08 10:55:52 -04:00
Gary Dismukes
64b15a17a1 [Ada] Typo corrections, plus minor reformatting in comments
gcc/ada/

	* par-ch4.adb (P_Iterated_Component_Association): Typo
	corrections.
2020-07-08 10:55:51 -04:00
Ed Schonberg
ff49b8053d [Ada] Ada_2020 AI12-0250 : Implement Iterator filters.
gcc/ada/

	* par.adb (P_Iterator_Specification): Make public for use in
	other parser subprograms.
	* par-ch4.adb (P_Iterated_Component_Association): In Ada_2020,
	recognize use of Iterator_Specification in an element iterator.
	To simplify disambiguation between the two iterator forms, mark
	the component association as carrying an Iterator_Specification
	only when the element iterator (using "OF") is used.
	* par-ch5.adb (P_Loop_Parameter_Specification): In Ada_2020,
	parse iterator filter when present.
	(P_Iterator_Specification): Ditto.  Remove declaration of
	P_Iterator_Specification, now in parent unit.
	* exp_ch5.adb (Expand_N_Loop_Statement): Apply Iterator filter
	when present.
	(Expand_Iterator_Loop_Over_Array): Ditto.
	(Expand_Iterator_Loop_Over_Container): Ditto.
	* sem_aggr.adb (Resolve_Array_Aggregate): Emit error nessage if
	an iterated component association includes a iterator
	specificcation with an element iterator, i.e. one that uses the
	OF keyword.
	* sem_ch5.adb (Analyze_Iterator_Specification): Analyze Iterator
	filter when present.
	(Analyze_Loop_Parameter_Specification): Ditto.
	* sinfo.adb: Suprogram bodies for new syntactic element
	Iterator_Filter.
	* sinfo.ads: Add Iterator_Filter to relevant nodes.  Structure
	of Component_Association and Iteroted_Component_Association
	nodes is modified to take into account the possible  presence of
	an iterator specification in the latter.
2020-07-08 10:55:51 -04:00
Yannick Moy
c1fece377a [Ada] Add utility function to recognize attribute 'Loop_Entry
gcc/ada/

	* sem_util.ads, sem_util.adb (Is_Attribute_Loop_Entry): New
	function for GNATProve.
2020-07-08 10:55:51 -04:00
Ghjuvan Lacambre
01f27c6477 [Ada] Add expected and actual size to "bit number out of range" error message
gcc/ada/

	* sem_ch13.adb (Analyze_Record_Representation_Clause,
	Check_Record_Representation_Clause): Add expected and actual
	size to error message.
2020-07-08 10:55:51 -04:00
Piotr Trojanek
5fae483372 [Ada] Remove excessive validity checks on in-parameters
gcc/ada/

	* sem_util.ads, sem_util.adb (Safe_To_Capture_Value): Return
	True for in-parameters.
2020-07-08 10:55:50 -04:00
Justin Squirek
c0ffadd6ea [Ada] Minor refactoring
gcc/ada/

	* exp_attr.adb (Expand_Attribute): Set
	Stores_Attribute_Old_Prefix to generated renamings of 'Old
	constants for later use in generating finalization routines.
	* exp_ch7.adb (Build_Finalizer): Minor reformatting. Use "or
	else" operators.
2020-07-08 10:55:50 -04:00
Gary Dismukes
85f6d7e2d2 [Ada] Static expression function problems with -gnatc and -gnatd.F (SPARK mode)
gcc/ada/

	* exp_ch6.adb (Expand_Simple_Function_Return): Remove ugly code
	that was copying the return expression, resetting Analyzed
	flags, etc. for the return expression of static expression
	functions.
	* inline.adb (Inline_Static_Expression_Function_Call): Set the
	Parent of the copied expression to that of the call. This avoids
	a blowup in Insert_Actions when GNATprove_Mode is set and there
	are nested SEF calls. Add ??? comment.
	* sem_ch6.adb (Analyze_Expression_Function): In the case of a
	static expression function, create a new copy of the expression
	and replace the function's expression with the copy; the
	original expression is used in the expression function's body
	and will be analyzed and rewritten, and we need to save a clean
	copy for later use in processing static calls to the function.
	This allows removing the kludgy code that was in
	Expand_Simple_Function_Return.
	* sem_eval.adb (Eval_Qualified_Expression): Return immediately
	if any errors have been posted on the qualified expression, to
	avoid blowups when GNATprove_Mode is enabled (or with -gnatd.F),
	since illegal static expressions are handled differently in that
	case and attempting to fold such expressions would fail.
2020-07-08 10:55:50 -04:00
Eric Botcazou
0f2d27e5fe [Ada] Fix inaccurate -gnatR output for derived untagged types
gcc/ada/

	* repinfo.adb (Compute_Max_Length): Skip hidden discriminants.
	(List_Record_Layout): Likewise.
	(List_Structural_Record_Layout): Use First_Discriminant instead
	of First_Stored_Discriminant and Next_Discriminant instead of
	Next_Stored_Discriminant to walk the list of discriminants.
2020-07-08 10:55:50 -04:00
Piotr Trojanek
530b30d9b3 [Ada] Allow boolean expressions in aspect Relaxed_Initialization
gcc/ada/

	* sem_ch13.adb (Analyze_Aspect_Relaxed_Initialization): Analyze
	optional boolean expressions.
	* sem_util.ads, sem_util.adb (Has_Relaxed_Initialization): Adapt
	query; update comment.
2020-07-08 10:55:49 -04:00
Piotr Trojanek
8e3342889e [Ada] Style cleanups related to Current_Condition
gcc/ada/

	* einfo.ads (Current_Value): Fix typo in comment.
	* exp_ch2.adb (Expand_Current_Value): Remove unnecessary "Start
	of processing ..." comment.
	* exp_util.adb (Set_Entity_Current_Value): Fix unbalanced paren
	in comment.
	(Get_Current_Value_Condition): Fix layout in comment.
	* sem_ch5.adb (Analyze_Cond_Then): Replace commented condition
	with pragma Assert.
2020-07-08 10:55:49 -04:00
Piotr Trojanek
964a8141e1 [Ada] Extend optimization to True/False prefixed with Standard
gcc/ada/

	* exp_ch5.adb (Expand_N_If_Statement): Detect True/False
	prefixed with Standard.
2020-07-08 10:55:49 -04:00
Bob Duff
3452f4b72d [Ada] Check predicates for subtypes of private types
gcc/ada/

	* sem_ch13.adb (Analyze_Aspect_Specifications): Add freeze node
	for the Underlying_Full_View if it exists. The freeze node is
	what triggers the generation of the predicate function.
	* freeze.adb: Minor reformatting.
2020-07-08 10:55:49 -04:00
Eric Botcazou
19036072c6 [Ada] Small tweak to Narrow_Large_Operation procedure
gcc/ada/

	* exp_ch4.adb (Narrow_Large_Operation): Use the base type instead
	of the first subtype of standard integer types as narrower type.
2020-07-08 10:55:48 -04:00
Richard Sandiford
760df6d296 expr: Fix REDUCE_BIT_FIELD for constants [PR95694]
This is yet another PR caused by constant integer rtxes not storing
a mode.  We were calling REDUCE_BIT_FIELD on a constant integer that
didn't fit in poly_int64, and then tripped the as_a<scalar_int_mode>
assert on VOIDmode.

AFAICT REDUCE_BIT_FIELD is always passed rtxes that have TYPE_MODE
(rather than some other mode) and it just fills in the redundant
sign bits of that TYPE_MODE value.  So it should be safe to get
the mode from the type instead of the rtx.  The patch does that
and asserts that the modes agree, where information is available.

That on its own is enough to fix the bug, but we might as well
extend the folding case to all constant integers, not just those
that fit poly_int64.

gcc/
	PR middle-end/95694
	* expr.c (expand_expr_real_2): Get the mode from the type rather
	than the rtx, and assert that it is consistent with the mode of
	the rtx (where known).  Optimize all constant integers, not just
	those that can be represented in poly_int64.

gcc/testsuite/
	PR middle-end/95694
	* gcc.dg/pr95694.c: New test.
2020-07-08 15:01:14 +01:00
Marek Polacek
a51de1af06 c++: Better diagnostic for decltype(auto) in C++11 [PR96103]
If you try to use decltype(auto) in C++11, we emit obscure

  error: expected primary-expression before 'auto'

giving the user no hint as to what's wrong.  This patch improves that
diagnostic.  Since we've been giving an error, I'm also using error().

gcc/cp/ChangeLog:

	PR c++/96103
	* parser.c (cp_parser_decltype): Print error about using decltype(auto)
	in C++11.  Check that the token following "auto" is ")".

gcc/testsuite/ChangeLog:

	PR c++/96103
	* g++.dg/cpp0x/decltype77.C: New test.
2020-07-08 09:13:39 -04:00
Kewen Lin
4070208f23 rs6000: Add len_load/len_store optab support
Define rs6000 specific len_load/len_store for the LEN_LOAD/LEN_STORE
internal function's expansion.  As the doc description of the
len_load/len_store optab shows, we should use V16QI to wrap those
available vector modes.

gcc/ChangeLog:

	* config/rs6000/vsx.md (len_load_v16qi): New define_expand.
	(len_store_v16qi): Likewise.
2020-07-08 02:48:01 -05:00
Kewen Lin
d496134a6b IFN/optabs: Support vector load/store with length
This patch is to add the internal function and optabs support for
vector load/store with length.

For the vector load/store with length optab, the length item would
be measured in lanes by default.  For the targets which support
length measured in bytes like Power, they should only define VnQI
modes to wrap the other same size vector modes.  If the length is
larger than total lane/byte count of the given mode, the behavior
is undefined.  For the remaining lanes/bytes which isn't specified
by length, they would be taken as undefined value.

gcc/ChangeLog:

	* doc/md.texi (len_load_@var{m}): Document.
	(len_store_@var{m}): Likewise.
	* internal-fn.c (len_load_direct): New macro.
	(len_store_direct): Likewise.
	(expand_len_load_optab_fn): Likewise.
	(expand_len_store_optab_fn): Likewise.
	(direct_len_load_optab_supported_p): Likewise.
	(direct_len_store_optab_supported_p): Likewise.
	(expand_mask_load_optab_fn): New macro.  Original renamed to ...
	(expand_partial_load_optab_fn): ... here.  Add handlings for
	len_load_optab.
	(expand_mask_store_optab_fn): New macro.  Original renamed to ...
	(expand_partial_store_optab_fn): ... here. Add handlings for
	len_store_optab.
	(internal_load_fn_p): Handle IFN_LEN_LOAD.
	(internal_store_fn_p): Handle IFN_LEN_STORE.
	(internal_fn_stored_value_index): Handle IFN_LEN_STORE.
	* internal-fn.def (LEN_LOAD): New internal function.
	(LEN_STORE): Likewise.
	* optabs.def (len_load_optab, len_store_optab): New optab.
2020-07-08 02:33:03 -05:00
François Dumont
c832cf1c1d libstdc++: Fix [multi]map/[multi]set move constructors noexcept qualification
Container move constructors shall not consider their allocator move
constructor qualification.

libstdc++-v3/ChangeLog:

	* include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&)): Add noexcept
	qualification based only on _Compare one.
	* testsuite/23_containers/map/cons/noexcept_move_construct.cc: Add
	static asserts.
	* testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
	Likewise.
	* testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
	Likewise.
	* testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
2020-07-08 08:02:16 +02:00
Ian Lance Taylor
fccb41b909 libbacktrace: test linker support for DWARF 5
On AIX, the compiler supports DWARF 5 but the linker does not.

2020-07-07 Clement Chigot <clement.chigot@atos.net>

	* configure.ac: Test linker support for DWARF5
	* configure: Regenerate
2020-07-07 20:45:10 -07:00
GCC Administrator
f60ee68de3 Daily bump. 2020-07-08 00:16:40 +00:00
Marek Polacek
36e8db7c2a c++: Add new test [PR92427]
Fixed in r10-5578.

	PR c++/92427
	* g++.dg/ext/flexary37.C: New test.
2020-07-07 19:28:53 -04:00
Jonathan Wakely
161aa50ee2 libstdc++: Whitespace changes to remove spaces before tabs
libstdc++-v3/ChangeLog:

	* include/std/limits: Whitespace changes.
2020-07-07 23:39:44 +01:00
Jonathan Wakely
eb04805be4 libstdc++: Replace __int_limits with __numeric_traits_integer
I recently added std::__detail::__int_limits as a lightweight
alternative to std::numeric_limits, forgetting that the values it
provides (digits, min and max) are already provided by
__gnu_cxx::__numeric_traits.

This change adds __int_traits as an alias for __numeric_traits_integer.
This avoids instantiating __numeric_traits to decide whether to use
__numeric_traits_integer or __numeric_traits_floating. Then all uses of
__int_limits can be replaced with __int_traits, and __int_limits can be
removed.

libstdc++-v3/ChangeLog:

	* include/Makefile.am: Remove bits/int_limits.h.
	* include/Makefile.in: Regenerate.
	* include/bits/int_limits.h: Removed.
	* include/bits/parse_numbers.h (_Select_int_base): Replace
	__int_limits with __int_traits.
	* include/bits/range_access.h (_SSize::operator()): Likewise.
	* include/ext/numeric_traits.h (__numeric_traits_integer): Add
	static assertion.
	(__int_traits): New alias template.
	* include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
	(__countr_zero, __countr_one, __popcount, __bit_ceil)
	(__bit_floor, __bit_width) Replace __int_limits with
	__int_traits.
	* include/std/charconv (__to_chars_8, __from_chars_binary)
	(__from_chars_alpha_to_num, from_chars): Likewise.
	* include/std/memory_resource (polymorphic_allocator::allocate)
	(polymorphic_allocator::allocate_object): Likewise.
	* include/std/string_view (basic_string_view::_S_compare):
	Likewise.
	* include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
2020-07-07 23:36:29 +01:00
Jonathan Wakely
9ca8fefeb7 libstdc++: Whitespace changes to keep lines below 80 columns
Also remove leading spaces that are followed by tabs.

libstdc++-v3/ChangeLog:

	* include/std/limits: Whitespace changes.
2020-07-07 23:35:10 +01:00
Patrick Palka
9845b7b456 c++: wrong pretty printing of nested type [PR95303]
In the testcase below, we pretty print the nested type A<int>::B as
A<int>::B<int> because we don't check whether B is itself a class
template before printing the innermost set of template arguments from
B's TEMPLATE_INFO (which in this case belong to A).  This patch fixes
this by checking PRIMARY_TEMPLATE_P beforehand.

gcc/cp/ChangeLog:

	PR c++/95303
	* cxx-pretty-print.c (pp_cxx_unqualified_id): Check
	PRIMARY_TEMPLATE_P before printing the innermost template
	arguments.

gcc/testsuite/ChangeLog:

	PR c++/95303
	* g++.dg/concepts/diagnostic14.C: New test.
2020-07-07 16:33:12 -04:00
Aaron Sawdey
7126583af5 rs6000: fix power10_hw test
The code snippet for this test was returning 1 if power10
instructions executed correctly. It should return 0 if the
test passes.

	* lib/target-supports.exp (check_power10_hw_available):
	Return 0 for passing test.
2020-07-07 14:16:01 -05:00