Commit Graph

192862 Commits

Author SHA1 Message Date
Richard Biener
374cee99d0 tree-optimization/105618 - restore load sinking
The PR97330 fix caused some missed sinking of loads out of loops
the following patch re-instantiates.

2022-05-17  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/105618
	* tree-ssa-sink.cc (statement_sink_location): For virtual
	PHI uses ignore those defining the used virtual operand.

	* gcc.dg/tree-ssa/ssa-sink-19.c: New testcase.

(cherry picked from commit ebce0e9bd8)
2022-05-19 14:01:26 +02:00
Richard Biener
25d7a73810 rtl-optimization/105577 - testcase for the PR
2022-05-16  Richard Biener  <rguenther@suse.de>

	PR rtl-optimization/105577
	* g++.dg/torture/pr105577.C: New testcase.

(cherry picked from commit ef7b8976b9)
2022-05-19 14:00:59 +02:00
Richard Biener
b251f8be6b rtl-optimization/105577 - RTL DSE and non-call EH
When one of the first two stages of DSE removes a throwing stmt
we have to purge dead EH edges before the DF re-analyze fires off
a fast DCE since that cannot cope with the situation.

2022-05-12  Richard Biener  <rguenther@suse.de>

	PR rtl-optimization/105577
	* dse.cc (rest_of_handle_dse): Make sure to purge dead EH
	edges before running fast DCE via df_analyze.

(cherry picked from commit dfda40f814)
2022-05-19 14:00:49 +02:00
Richard Biener
844a5c8ca7 tree-optimization/105562 - avoid uninit diagnostic with better FRE
We can avoid some uninit diagnostics by making FRE disambiguate
against CLOBBERs since any aliasing there would invoke undefined
behavior for a read we are looking up.

2022-05-12  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/105562
	* tree-ssa-sccvn.cc (vn_reference_lookup_3): Disambiguate
	against all CLOBBER defs if there's not an obvious must-alias
	and we are not doing redundant store elimination.
	(vn_walk_cb_data::redundant_store_removal_p): New field.
	(vn_reference_lookup_pieces): Initialize it.
	(vn_reference_lookup): Add argument to specify if we are
	doing redundant store removal.
	(eliminate_dom_walker::eliminate_stmt): Specify we do.
	* tree-ssa-sccvn.h (vn_reference_lookup): Adjust.

	* g++.dg/warn/uninit-pr105562.C: New testcase.

(cherry picked from commit 94b8a37fa1)
2022-05-19 13:59:30 +02:00
Richard Biener
2a040e9829 rtl-optimization/105559 - avoid quadratic behavior in delete_insn_and_edges
When the insn to delete is a debug insn there's no point in figuring
out whether it might be the last real insn and thus we have to purge
dead edges.

2022-05-11  Richard Biener  <rguenther@suse.de>

	PR rtl-optimization/105559
	* cfgrtl.cc (delete_insn_and_edges): Only perform search to BB_END
	for non-debug insns.

(cherry picked from commit 37a8220fa9)
2022-05-19 13:58:50 +02:00
Richard Biener
a53eff4ad0 middle-end/105537 - debug processing
The following makes sure to have a consistent state of
flag_var_tracking_assignments with the distributed handling
in process_options and finish_options by moving everything to
finish_options which also restores diagnostics for
-g0 -fvar-tracking which was lost with previous changes.

2022-05-10  Richard Biener  <rguenther@suse.de>

	PR middle-end/105537
	* toplev.cc (process_options): Move flag_var_tracking
	handling ...
	* opts.cc (finish_options): ... here.

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

(cherry picked from commit 76db543db8)
2022-05-19 13:58:31 +02:00
Richard Biener
ad4fa189a7 Properly use opts in finish_options
When code was moved from process_options to finish_options it
was not properly adjusted to look at and alter the opts set
passed to the function but continued to modify the global options
set.  The following rectifies this and makes sure the same
mistake isn't repeated by poisoning global_options{,_set}.

2022-05-10  Richard Biener  <rguenther@suse.de>

	* flags.h (dwarf_debuginfo_p): Add opts argument, guard
	API with !GENERATOR_FILE.
	* opts.cc (global_options): Poison.
	(global_options_set): Likewise.
	(finish_options): Refer to options via opts.

(cherry picked from commit d469484610)
2022-05-19 13:58:21 +02:00
Richard Biener
1e43783b3f tree-optimization/105431 - another overflow in powi handling
This avoids undefined signed overflow when calling powi_as_mults_1.

2022-04-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/105431
	* tree-ssa-math-opts.cc (powi_as_mults_1): Make n unsigned.
	(powi_as_mults): Use absu_hwi.
	(gimple_expand_builtin_powi): Remove now pointless n != -n
	check.

(cherry picked from commit 44b09adb9b)
2022-05-19 13:56:48 +02:00
GCC Administrator
72c2898ccd Daily bump. 2022-05-19 00:18:47 +00:00
Eric Botcazou
696fce7368 Reduce usage of limited_with clauses with -fdump-ada-spec
The problem is that subtypes are not part of the limited view of a package
so we need to use types in conjunction with limited_with clauses, which is
not always desirable as this yields less portable Ada bindings.  The patch
also contains a small enhancement for complex floating-point types.

gcc/c-family/
	* c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
	floating-point complex types.
	<POINTER_TYPE>: Do not use limited_with clause if the designated
	type is a scalar type.
2022-05-18 16:31:42 +02:00
Andrew MacLeod
9c8125b98c Check for equivalence after merging relations.
When registering a relation, we need to merge with any existing relation
before checking if it was an equivalence... otherwise it was not being
handled properly.

	gcc/
	PR tree-optimization/105458
	* value-relation.cc (path_oracle::register_relation): Merge, then check
	for equivalence.

	gcc/testsuite/
	* gcc.dg/pr105458.c: New.
2022-05-18 10:07:29 -04:00
GCC Administrator
a048e606e6 Daily bump. 2022-05-18 00:19:18 +00:00
Jakub Jelinek
978036a016 libgomp: Clarify that omp_display_env is fully implemented
OpenMP 5.2 added
"When called from within a target region the effect is unspecified."
restriction to omp_display_env, so it is ok not to support it in
target regions (worst case we could add an empty implementation
or one with __builtin_trap in there).

2022-05-17  Jakub Jelinek  <jakub@redhat.com>

	* libgomp.texi (OpenMP 5.1): Remove "Not inside target regions"
	comment for omp_display_env feature.

(cherry picked from commit 741478ed3e)
2022-05-17 17:03:52 +02:00
GCC Administrator
325d82b086 Daily bump. 2022-05-17 00:18:54 +00:00
Sebastian Pop
5251647c84 [AArch64] add barriers to ool __sync builtins
2022-05-13  Sebastian Pop  <spop@amazon.com>

gcc/
	PR target/105162
	* config/aarch64/aarch64-protos.h (atomic_ool_names): Increase dimension
	of str array.
	* config/aarch64/aarch64.cc (aarch64_atomic_ool_func): Call
	memmodel_from_int and handle MEMMODEL_SYNC_*.
	(DEF0): Add __aarch64_*_sync functions.

gcc/testsuite/
	PR target/105162
	* gcc.target/aarch64/sync-comp-swap-ool.c: New.
	* gcc.target/aarch64/sync-op-acquire-ool.c: New.
	* gcc.target/aarch64/sync-op-full-ool.c: New.
	* gcc.target/aarch64/target_attr_20.c: Update check.
	* gcc.target/aarch64/target_attr_21.c: Same.

libgcc/
	PR target/105162
	* config/aarch64/lse.S: Define BARRIER and handle memory MODEL 5.
	* config/aarch64/t-lse: Add a 5th memory model for _sync functions.
2022-05-16 14:43:20 +00:00
Jonathan Wakely
9742709708 libstdc++: Fix hyperlink in docs
libstdc++-v3/ChangeLog:

	* doc/xml/manual/prerequisites.xml: Fix attributes for external
	hyperlink.
	* doc/html/manual/setup.html: Regenerate.

(cherry picked from commit 682e587f10)
2022-05-16 15:05:26 +01:00
Jonathan Wakely
cfaf297e05 libstdc++: Update C++23 status docs
These are the C++23 proposals supported in the gcc-12 branch.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2023.xml: Update with gcc-12 support.
	* doc/html/*: Regenerate.

(cherry picked from commit 8414dad54a)
2022-05-16 15:05:20 +01:00
Jonathan Wakely
228bd8151c libstdc++: Add C++23 status docs
These are the C++23 proposals already supported in the gcc-11 branch.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/intro.xml: Include new chapter.
	* doc/xml/manual/status_cxx2020.xml: Tweak release numbers.
	* doc/xml/manual/status_cxx2023.xml: New file.
	* doc/html/*: Regenerate.

(cherry picked from commit 4361867344)
2022-05-16 15:04:56 +01:00
Jonathan Wakely
02acb54c6e libstdc++: Fix status docs for <bit> support
libstdc++-v3/ChangeLog:

	* doc/html/manual/status.html: Regenerate.
	* doc/xml/manual/status_cxx2020.xml: Fix supported version for
	C++20 bit operations.

(cherry picked from commit 64648821f1)
2022-05-16 15:04:05 +01:00
Richard Biener
9b5109971b ipa/105598 - testcase for PR105598
2022-05-16  Richard Biener  <rguenther@suse.de>

gcc/testsuite/
	* gcc.dg/torture/pr105598.c: New testcase.

(cherry picked from commit 6230911cb9)
2022-05-16 12:04:15 +02:00
Eric Botcazou
ad05a1d7f8 Do not use DW_OP_not for TRUTH_NOT_EXPR in conditional expressions
DW_OP_not is a bitwise, not a logical NOT, so it computes the wrong result
in a DWARF conditional expression.

gcc/
	* dwarf2out.cc (loc_list_from_tree_1) <TRUTH_NOT_EXPR>: Do a logical
	instead of a bitwise negation.
	<COND_EXPR>: Swap the operands if the condition is TRUTH_NOT_EXPR.
2022-05-16 11:08:47 +02:00
GCC Administrator
c6ca39c7bf Daily bump. 2022-05-16 00:19:11 +00:00
Iain Buclaw
0556c356e5 d: Merge upstream dmd a53934d18, phobos 604534d7c.
D front-end changes:

    - Import dmd v2.100.0.

Phobos changes:

    - Import phobos v2.100.0.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd a53934d18.
	* dmd/VERSION: Update version to v2.100.0.
	* d-codegen.cc (d_decl_context): Use resolvedLinkage to get
	declaration linkage.
	(build_struct_literal): Track offset in bits.
	* d-gimplify.cc (d_gimplify_modify_expr): Check both operands for a
	bit-field reference.
	* d-lang.cc (d_post_options): Set flag_rtti and flag_exceptions if
	-fno-druntime was seen on command-line.
	(d_type_promotes_to): Use resolvedLinkage to get declaration linkage.
	* decl.cc (make_thunk): Likewise.
	* types.cc (layout_aggregate_members): Ignore anonymous fields in
	total count.

libphobos/ChangeLog:

	* src/MERGE: Merge upstream phobos 604534d7c.
2022-05-16 00:56:06 +02:00
Jason Merrill
40f749b364 c++: array {}-init [PR105589]
My patch for 105191 made us use build_value_init more frequently from
build_vec_init_expr, but build_value_init doesn't like to be called to
initialize a class in a template.  That's caused trouble in the past, and
seems like a strange restriction, so let's fix it.

	PR c++/105589
	PR c++/105191
	PR c++/92385

gcc/cp/ChangeLog:

	* init.cc (build_value_init): Handle class in template.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/initlist-array16.C: New test.
2022-05-15 12:29:04 -04:00
Jason Merrill
73b47159d7 c++: alias CTAD and member alias templates [PR104470]
In this testcase, we were trying to substitute into
variant<Foo<T>>::__accepted_type, but failed to look it up because
variant<Foo<T>> doesn't exist.  In other cases we already rewrite such
things into a dependent reference; we need to do that for alias templates as
well.

This caused some testsuite regressions on alias uses outside of deduction
guides, so I've made all of this rewriting conditional on a new tf_dguide
tsubst flag.

	PR c++/104470

gcc/cp/ChangeLog:

	* cp-tree.h (enum tsubst_flags): Add tf_dguide.
	* pt.cc (tsubst_aggr_type): Check it.
	(tsubst_baselink, tsubst_copy): Check it.
	(maybe_dependent_member_ref): Check it.
	(instantiate_alias_template): Handle it.
	(build_deduction_guide): Set it.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp2a/explicit11.C: Second example also ill-formed.
	* g++.dg/cpp2a/class-deduction-alias12.C: New test.
2022-05-15 05:47:40 -04:00
Jason Merrill
5237059e04 c++: typeid and instantiation [PR102651]
PR49387 was a problem with initially asking for a typeid for a class
template specialization before it was complete, and later actually filling
in the descriptor when the class was complete, and thus disagreeing on the
form of the descriptor.  I fixed that by forcing the class to be complete,
but this testcase shows why that approach is problematic.  So instead let's
adjust the type of the descriptor later if needed.

	PR c++/102651
	PR c++/49387

gcc/cp/ChangeLog:

	* rtti.cc (get_tinfo_decl_direct): Don't complete_type.
	(emit_tinfo_decl): Update tdesc type if needed.

gcc/testsuite/ChangeLog:

	* g++.dg/rtti/typeid-complete1.C: New test.
2022-05-15 05:47:40 -04:00
GCC Administrator
dbd77e660f Daily bump. 2022-05-15 00:18:55 +00:00
GCC Administrator
52991af6ff Daily bump. 2022-05-14 00:20:09 +00:00
Harald Anlauf
0b9bdcf685 Fortran: fix error recovery on invalid array section
gcc/fortran/ChangeLog:

	PR fortran/105230
	* expr.cc (find_array_section): Correct logic to avoid NULL
	pointer dereference on invalid array section.

gcc/testsuite/ChangeLog:

	PR fortran/105230
	* gfortran.dg/pr105230.f90: New test.

Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
(cherry picked from commit 0acdbe29f6)
2022-05-13 21:34:02 +02:00
Martin Liska
5176d2755c libgcov: use proper type for n_functions
gcov_info::n_functions type is initialized by generated
code in build_info_type:

/* n_functions */
field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE,
		    get_gcov_unsigned_t ());

It uses gcov_unsigned_t, but the struct definition in libgcov.h uses
unsigned type. That brings troubled on 16-bit targets.

	PR gcov-profile/105535

libgcc/ChangeLog:

	* libgcov.h (struct gcov_info): Use gcov_unsigned_t for
	n_functions.

Co-Authored-By: Hans-Peter Helfert <peter-helfert@t-online.de>
(cherry picked from commit eaf359ed04e7169f740dade548965c757f4c1e0a)
2022-05-13 14:04:27 +02:00
Eric Botcazou
f8598704c0 Fix wrong SRA with VIEW_CONVERT_EXPR and reverse SSO
Most cases of VIEW_CONVERT_EXPRs involving reverse scalar storage order are
disqualified for SRA because they are storage_order_barrier_p, but you can
still have a VIEW_CONVERT_EXPR to a regular composite type being applied to
a component of a record type with reverse scalar storage order.

In this case the bypass for !useless_type_conversion_p in sra_modify_assign,
albeit already heavily guarded, triggers and may generate wrong code, so the
patch makes sure that it does only when the SSO is the same on both side.

gcc/
	* tree-sra.cc (sra_modify_assign): Check that scalar storage order
	is the same on the LHS and RHS before rewriting one with the model
	of the other.
gcc/testsuite/
	* gnat.dg/sso17.adb: New test.
2022-05-13 11:20:04 +02:00
Alexandre Oliva
e628690d63 [PR105455] Set edge probabilities when hardening conditionals
When turning unconditional edges into conditional, as in
gimple-harden-conditionals.cc:insert_check_and_trap, the newly-created
edge's probability comes out uninitialized, while the previously
unconditional edge's probability is presumably
profile_probability::always.

Mixing initialized and uninitialized probabilities before expand
breaks predict.cc:force_edge_cold: the initialized probability may end
up copied to a REG_BR_PROB note in a conditional branch insn, but if
force_edge_cold is called on that edge, it will find another edge with
uninitialized probability and assume the note is absent.  Later on,
rtl_verify_edges complains that the note does not match the
probability modified by force_edge_cold in the edge.

This patch sets probabilities for edges affected by hardening of
conditionals, both the newly-created edges to trap blocks and the
previously-unconditional edges, so that the former are considered
never taken, while the latter are confirmed as always taken.


for  gcc/ChangeLog

	PR rtl-optimization/105455
	* gimple-harden-conditionals.cc (insert_check_and_trap): Set
	probabilities for newly-conditional edges.

for  gcc/testsuite/ChangeLog

	PR rtl-optimization/105455
	* gcc.dg/pr105455.c: New.

(cherry picked from commit 90a8eab4a1)
2022-05-13 03:05:46 -03:00
Alexandre Oliva
a4183ab7cf libstdc++: ppc: conditionalize vsx-only simd intrinsics
libstdc++'s bits/simd.h section for PowerPC, guarded by __ALTIVEC__,
defines various intrinsic vector types that are only available with
__VSX__: 64-bit long double, double, (un)signed long long, and 64-bit
(un)signed long.

experimental/simd/standard_abi_usable{,_2}.cc tests error out
reporting the unmet requirements when the target cpu doesn't enable
VSX.  Make the reported instrinsic types conditional on __VSX__ so
that <experimental/simd> can be used on PowerPC variants that do not
support VSX.


for  libstdc++-v3/ChangeLog

	* include/experimental/bits/simd.h [__ALTIVEC__]: Require VSX
	for double, long long, and 64-bit long intrinsic types.
	[__ALTIVEC__] (__intrinsic_type): Mention 128-bit in
	preexisting long double diagnostic, adjust no-VSX double
	diagnostic to cover 64-bit long double as well.

(cherry picked from commit 469c76f0d9)
2022-05-13 03:05:45 -03:00
GCC Administrator
05a3929f9c Daily bump. 2022-05-13 00:19:08 +00:00
GCC Administrator
f363017e8b Daily bump. 2022-05-12 00:19:06 +00:00
Martin Jambor
988fbc6366
ipa: Release body of clone_of when removing its last clone (PR 100413)
In the PR, the verifier complains that we did not manage to remove the
body of a node and it is right.  The node is kept for materialization
of two clones but after one is materialized, the other one is removed
as unneeded (as a part of delete_unreachable_blocks_update_callgraph).
The problem is that the node removal does not check for this situation
and can leave the clone_of node there with a body attached to it even
though there is no use for it any more.  This patch does checks for it
and handles the situation in a simlar way that
cgraph_node::materialize_clone does it, except that it also has to be
careful that the removed node itself does not have any clones, which
would still need the clone_of's body.  Failing to do that results in a
bootstrap failure.

gcc/ChangeLog:

2022-04-27  Martin Jambor  <mjambor@suse.cz>

	PR ipa/100413
	* cgraph.cc (cgraph_node::remove): Release body of the node this
	is clone_of if appropriate.

gcc/testsuite/ChangeLog:

2022-04-27  Martin Jambor  <mjambor@suse.cz>

	PR ipa/100413
	* g++.dg/ipa/pr100413.C: New test.

(cherry picked from commit 27ee75dbe8)
2022-05-11 23:28:21 +02:00
GCC Administrator
d74cade6c1 Daily bump. 2022-05-11 00:20:00 +00:00
Joseph Myers
c318b1af73 Update gcc hr.po
* hr.po: Update.
2022-05-10 20:23:33 +00:00
Jonathan Wakely
cc93971399 libstdc++: Add <spanstream> declarations to <iosfwd> [PR105284]
libstdc++-v3/ChangeLog:

	PR libstdc++/105284
	* include/std/iosfwd: Add declarations for <spanstream> class
	templates and typedefs.
	* include/std/spanstream (basic_spanbuf, basic_ispanstream)
	(basic_ospanstream, basic_spanstream): Remove default template
	arguments.
	* testsuite/27_io/headers/iosfwd/synopsis.cc: Add <spanstream>
	declarations.
	* testsuite/27_io/headers/iosfwd/types.cc: Check <spanstream>
	default arguments.

(cherry picked from commit ca97c87758)
2022-05-10 18:24:19 +01:00
Jonathan Wakely
3e6067bdca libstdc++: Add <syncstream> declarations to <iosfwd> [PR105284]
libstdc++-v3/ChangeLog:

	PR libstdc++/105284
	* include/std/iosfwd: Add declarations for <synstream> class
	templates and typedefs.
	* include/std/syncstream (basic_syncbuf, basic_osyncstream):
	Remove default template arguments.
	* testsuite/27_io/headers/iosfwd/synopsis.cc: New test.
	* testsuite/27_io/headers/iosfwd/types.cc: New test.

(cherry picked from commit 1807e07825)
2022-05-10 18:24:19 +01:00
H.J. Lu
ab8a8d0537 x86: Add .note.GNU-stack section only for Linux
Add .note.GNU-stack section only for Linux since it may not be supported
on non-Linux OSes.  __ELF__ isn't checked since these tests can only run
on Linux/x86 ELF systems.

	PR target/105472
	* gcc.target/i386/iamcu/asm-support.S: Add .note.GNU-stack section
	only for Linux.
	* gcc.target/x86_64/abi/asm-support.S: Likewise.
	* gcc.target/x86_64/abi/avx/asm-support.S: Likewise.
	* gcc.target/x86_64/abi/avx512f/asm-support.S: Likewise.
	* gcc.target/x86_64/abi/avx512fp16/asm-support.S: Likewise.
	* gcc.target/x86_64/abi/avx512fp16/m256h/asm-support.S: Likewise.
	* gcc.target/x86_64/abi/avx512fp16/m512h/asm-support.S: Likewise.
	* gcc.target/x86_64/abi/ms-sysv/do-test.S: Likewise.

(cherry picked from commit 71eae0fd3d)
2022-05-10 09:42:45 -07:00
Jakub Jelinek
9468cc35da isel: Fix up gimple_expand_vec_set_expr [PR105528]
The following testcase ICEs (and only without -g), because we don't replace
one VEC_COND_EXPR with .VCOND* call.
We don't do that because gimple_expand_vec_set_expr adds some stmts before
*gsi and then uses gsi_remove to remove it.  gsi_remove moves the iterator
to the next stmt and in the caller we then do gsi_next before looking at
another stmt, which means we can skip processing of one stmt, which in this
case happened to be a VEC_COND_EXPR but with -g is some debug stmt in
between.  As we always emit some stmts before it, it is easy to update the
iterator to the last stmt emitted there, so that caller continues really
with the next stmt.

2022-05-10  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/105528
	* gimple-isel.cc (gimple_expand_vec_set_expr): After gsi_remove
	set *gsi to gsi_for_stmt (ass_stmt).  Fix up function comment.

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

(cherry picked from commit ddd46293e2)
2022-05-10 18:39:51 +02:00
Eric Botcazou
b931d0cfd3 Fix internal error with vectorization on SPARC
This is a regression present since the 10.x series, but the underlying issue
has been there since the TARGET_VEC_PERM_CONST hook was implemented, in the
form of an ICE when expanding a constant VEC_PERM_EXPR in V4QI, while the
back-end only supports V8QI constant VEC_PERM_EXPRs.

gcc/
	PR target/105292
	* config/sparc/sparc.cc (sparc_vectorize_vec_perm_const): Return
	true only for 8-byte vector modes.

gcc/testsuite/
	* gcc.target/sparc/20220510-1.c: New test.
2022-05-10 09:40:35 +02:00
GCC Administrator
6d7d4f59c3 Daily bump. 2022-05-10 00:19:32 +00:00
Joseph Myers
076aee6b18 Update gcc .po files
* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
	ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
	zh_TW.po: Update.
2022-05-09 21:11:02 +00:00
Jonathan Wakely
df8e384d5f libstdc++: Fix test that fails on Solaris [PR104731]
On Solaris the dirent::d_name member is a single char, causing this test
to fail with warnings about buffer overflow. Change the test to use a
union with additional space for writing a string to the d_name member.

libstdc++-v3/ChangeLog:

	PR libstdc++/104731
	* testsuite/27_io/filesystem/iterators/error_reporting.cc:
	Use a trailing char array as storage for dirent::d_name.

(cherry picked from commit aa8bdfee1d)
2022-05-09 12:28:27 +01:00
GCC Administrator
197b7ace53 Daily bump. 2022-05-09 00:18:39 +00:00
GCC Administrator
0870ab6133 Daily bump. 2022-05-08 00:19:11 +00:00
GCC Administrator
d413626f99 Daily bump. 2022-05-07 00:18:53 +00:00
Jonathan Wakely
03257e7ee3 libstdc++: Fix deserialization for std::normal_distribution [PR105502]
This fixes a regression in std::normal_distribution deserialization that
caused the object to be left unchanged if the __state_avail value read
from the stream was false.

libstdc++-v3/ChangeLog:

	PR libstdc++/105502
	* include/bits/random.tcc
	(operator>>(basic_istream<C,T>&, normal_distribution<R>&)):
	Update state when __state_avail is false.
	* testsuite/26_numerics/random/normal_distribution/operators/serialize.cc:
	Check that deserialized object equals serialized one.

(cherry picked from commit 909ef4e272)
2022-05-06 23:57:44 +01:00