Commit graph

206731 commits

Author SHA1 Message Date
Alex Coplan
b73a685ebf aarch64: Fix up printing of ldp/stp with -msve-vector-bits=128
Later patches allow using SVE modes in ldp/stp with -msve-vector-bits=128,
so we need to make sure that we don't use SVE addressing modes when
printing the address for the ldp/stp.

This patch does that.

gcc/ChangeLog:

	* config/aarch64/aarch64.cc (aarch64_print_address_internal): Handle SVE
	modes when printing ldp/stp addresses.
2023-12-15 19:59:59 +00:00
Alex Coplan
94415eb7a4 aarch64: Fix up aarch64_print_operand xzr/wzr case
This adjusts aarch64_print_operand to recognize zero rtxes in modes other than
VOIDmode.  This allows us to use xzr/wzr for zero vectors, for example.

We extract the test into a helper function, aarch64_const_zero_rtx_p, since this
predicate is needed by later patches.

gcc/ChangeLog:

	* config/aarch64/aarch64-protos.h (aarch64_const_zero_rtx_p): New.
	* config/aarch64/aarch64.cc (aarch64_const_zero_rtx_p): New.
	Use it ...
	(aarch64_print_operand): ... here.  Recognize CONST0_RTXes in
	modes other than VOIDmode.
2023-12-15 19:59:59 +00:00
Alex Coplan
0bd6f7a749 aarch64, testsuite: Fix up pr103147-10.[cC]
This disables scheduling in the pr103147-10 tests.  The tests use
check-function-bodies, and upcoming changes lead to a different
schedule.

gcc/testsuite/ChangeLog:

	* g++.target/aarch64/pr103147-10.C: Add -fno-schedule-insns{,2}
	to dg-options.
	* gcc.target/aarch64/pr103147-10.c: Likewise.
2023-12-15 19:59:59 +00:00
Alex Coplan
924ed11802 aarch64, testsuite: Allow ldp/stp on SVE regs with -msve-vector-bits=128
Later patches in the series allow ldp and stp to use SVE modes if
-msve-vector-bits=128 is provided.  This patch therefore adjusts tests
that pass -msve-vector-bits=128 to allow ldp/stp to save/restore SVE
registers.

gcc/testsuite/ChangeLog:

	* gcc.target/aarch64/sve/pcs/stack_clash_1_128.c: Allow ldp/stp saves
	of SVE registers.
	* gcc.target/aarch64/sve/pcs/struct_3_128.c: Likewise.
2023-12-15 19:59:58 +00:00
Alex Coplan
635093595f aarch64, testsuite: Fix up auto-init-padding tests
The tests currently depend on memcpy lowering forming stps at -O0,
but we no longer want to form stps during memcpy lowering, but instead
in the upcoming load/store pair fusion pass.

This patch therefore tweaks affected tests to enable optimizations
(-O1), and adjusts the tests to avoid parts of the structures being
optimized away where necessary.

gcc/testsuite/ChangeLog:

	* gcc.target/aarch64/auto-init-padding-1.c: Add -O to options,
	adjust test to work with optimizations enabled.
	* gcc.target/aarch64/auto-init-padding-2.c: Add -O to options.
	* gcc.target/aarch64/auto-init-padding-3.c: Add -O to options,
	adjust test to work with optimizations enabled.
	* gcc.target/aarch64/auto-init-padding-4.c: Likewise.
	* gcc.target/aarch64/auto-init-padding-9.c: Likewise.
2023-12-15 19:59:58 +00:00
Xiao Zeng
1ddf65c5fc [PATCH] RISC-V: Add Zvfbfmin extension to the -march= option
This patch would like to add new sub extension (aka Zvfbfmin) to the
-march= option. It introduces a new data type BF16.

Depending on different usage scenarios, the Zvfbfmin extension may
depend on 'V' or 'Zve32f'. This patch only implements dependencies
in scenario of Embedded Processor. In scenario of Application
Processor, it is necessary to explicitly indicate the dependent
'V' extension.

You can locate more information about Zvfbfmin from below spec doc.

https://github.com/riscv/riscv-bfloat16/releases/download/20231027/riscv-bfloat16.pdf

gcc/ChangeLog:

	* common/config/riscv/riscv-common.cc:
	(riscv_implied_info): Add zvfbfmin item.
	(riscv_ext_version_table): Ditto.
	(riscv_ext_flag_table): Ditto.
	* config/riscv/riscv.opt:
	(MASK_ZVFBFMIN): New macro.
	(MASK_VECTOR_ELEN_BF_16): Ditto.
	(TARGET_ZVFBFMIN): Ditto.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/arch-31.c: New test.
	* gcc.target/riscv/arch-32.c: New test.
	* gcc.target/riscv/predef-32.c: New test.
	* gcc.target/riscv/predef-33.c: New test.
2023-12-15 12:25:30 -07:00
Gaius Mulley
7d7a480eed PR modula2/112946 ICE assignment of string to enumeration or set
This patch introduces type checking during FoldBecomes and also
adds set/string/enum checking to the type checker.  FoldBecomes
has been re-written, tidied up and re-factored.

gcc/m2/ChangeLog:

	PR modula2/112946
	* gm2-compiler/M2Check.mod (checkConstMeta): New procedure
	function.
	(checkConstEquivalence): New procedure function.
	(doCheckPair): Add call to checkConstEquivalence.
	* gm2-compiler/M2GenGCC.mod (ResolveConstantExpressions): Call
	FoldBecomes with reduced parameters.
	(FoldBecomes): Re-write.
	(TryDeclareConst): New procedure.
	(RemoveQuads): New procedure.
	(DeclaredOperandsBecomes): New procedure function.
	(TypeCheckBecomes): New procedure function.
	(PerformFoldBecomes): New procedure.
	* gm2-compiler/M2Range.mod (FoldAssignment): Call
	AssignmentTypeCompatible to check des expr compatibility.
	* gm2-compiler/M2SymInit.mod (CheckReadBeforeInitQuad): Remove
	parameter lst.
	(FilterCheckReadBeforeInitQuad): Remove parameter lst.
	(CheckReadBeforeInitFirstBasicBlock): Remove parameter lst.
	Call FilterCheckReadBeforeInitQuad without lst.

gcc/testsuite/ChangeLog:

	PR modula2/112946
	* gm2/iso/fail/badassignment.mod: New test.
	* gm2/iso/fail/badexpression.mod: New test.
	* gm2/iso/fail/badexpression2.mod: New test.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-12-15 15:26:48 +00:00
Patrick Palka
ea7bebff7c c++: section attribute on templates [PR70435, PR88061]
The section attribute currently has no effect on templates because the
call to set_decl_section_name only happens at parse time (on the
dependent decl) and not also at instantiation time.  This patch fixes
this by propagating the section name from the template to the
instantiation.

	PR c++/70435
	PR c++/88061

gcc/cp/ChangeLog:

	* pt.cc (tsubst_function_decl): Propagate DECL_SECTION_NAME
	via set_decl_section_name.
	(tsubst_decl) <case VAR_DECL>: Likewise.

gcc/testsuite/ChangeLog:

	* g++.dg/ext/attr-section1.C: New test.
	* g++.dg/ext/attr-section1a.C: New test.
	* g++.dg/ext/attr-section2.C: New test.
	* g++.dg/ext/attr-section2a.C: New test.
	* g++.dg/ext/attr-section2b.C: New test.
2023-12-15 10:03:31 -05:00
Patrick Palka
46984fa259 c++: abi_tag attribute on templates [PR109715]
We need to look through TEMPLATE_DECL when looking up the abi_tag
attribute (as with other function/variable declaration attributes).

	PR c++/109715

gcc/cp/ChangeLog:

	* mangle.cc (get_abi_tags): Strip TEMPLATE_DECL before looking
	up the abi_tag attribute.

gcc/testsuite/ChangeLog:

	* g++.dg/abi/abi-tag25.C: New test.
	* g++.dg/abi/abi-tag25a.C: New test.
2023-12-15 10:03:26 -05:00
Andre Vieira
863df360fb Fix tests for gomp
This is to fix testisms initially introduced by:
commit f5fc001a84
Author: Andre Vieira <andre.simoesdiasvieira@arm.com>
Date:   Mon Dec 11 14:24:41 2023 +0000

    aarch64: enable mixed-types for aarch64 simdclones

gcc/testsuite/ChangeLog:

	* gcc.dg/gomp/pr87887-1.c: Fixed test.
	* gcc.dg/gomp/pr89246-1.c: Likewise.
	* gcc.dg/gomp/simd-clones-2.c: Likewise.

libgomp/ChangeLog:

	* testsuite/libgomp.c/declare-variant-1.c: Fixed test.
	* testsuite/libgomp.fortran/declare-simd-1.f90: Likewise.
2023-12-15 13:48:08 +00:00
Jonathan Wakely
1d8ac2a74f libstdc++: Fix std::print test case for Windows
libstdc++-v3/ChangeLog:

	* src/c++23/print.cc (__write_to_terminal) [_WIN32]: If handle
	does not refer to the console then just write to it using normal
	file I/O.
	* testsuite/27_io/print/2.cc (as_printed_to_terminal): Print
	error message on failure.
	(test_utf16_transcoding): Adjust for as_printed_to_terminal
	modifying its argument.
2023-12-15 13:20:49 +00:00
Jonathan Wakely
7d2e100058 libstdc++: Simplify std::vprint_unicode for non-Windows targets
Since we don't need to do anything special to print Unicode on
non-Windows targets, we might as well just use std::vprint_nonunicode to
implement std::vprint_unicode. Removing the duplicated code should
reduce code size in cases where those calls aren't inlined.

Also use an RAII type for the unused case where a non-Windows target
calls __open_terminal(streambuf*) and needs to fclose the result. This
makes the code futureproof in case we ever start using the
__write_terminal function for non-Windows targets.

libstdc++-v3/ChangeLog:

	* include/std/ostream (vprint_unicode) [_WIN32]: Use RAII guard.
	(vprint_unicode) [!_WIN32]: Just call vprint_nonunicode.
	* include/std/print (vprint_unicode) [!_WIN32]: Likewise.
2023-12-15 13:20:49 +00:00
Jonathan Wakely
8a5cac92e7 libstdc++: Do not add padding for std::print to std::ostream
Tim Song pointed out that although std::print behaves as a formatted
output function, it does "determine padding" using the stream's flags.

libstdc++-v3/ChangeLog:

	* include/std/ostream (vprint_nonunicode, vprint_unicode): Do
	not insert padding.
	* testsuite/27_io/basic_ostream/print/1.cc: Adjust expected
	behaviour.
2023-12-15 13:20:49 +00:00
Wilco Dijkstra
3fa689f6ed libatomic: Enable lock-free 128-bit atomics on AArch64
Enable lock-free 128-bit atomics on AArch64.  This is backwards compatible with
existing binaries (as for these GCC always calls into libatomic, so all 128-bit
atomic uses in a process are switched), gives better performance than locking
atomics and is what most users expect.

128-bit atomic loads use a load/store exclusive loop if LSE2 is not supported.
This results in an implicit store which is invisible to software as long as the
given address is writeable (which will be true when using atomics in real code).

This doesn't yet change __atomic_is_lock_free eventhough all atomics are finally
lock-free on AArch64.

libatomic:
	* config/linux/aarch64/atomic_16.S: Implement lock-free ARMv8.0 atomics.
	(libat_exchange_16): Merge RELEASE and ACQ_REL/SEQ_CST cases.
	* config/linux/aarch64/host-config.h: Use atomic_16.S for baseline v8.0.
2023-12-15 13:19:41 +00:00
Wilco Dijkstra
bbdb72ba29 AArch64: Add inline memmove expansion
Add support for inline memmove expansions.  The generated code is identical
as for memcpy, except that all loads are emitted before stores rather than
being interleaved.  The maximum size is 256 bytes which requires at most 16
registers.

gcc/ChangeLog:
	* config/aarch64/aarch64.opt (aarch64_mops_memmove_size_threshold):
	Change default.
	* config/aarch64/aarch64.md (cpymemdi): Add a parameter.
	(movmemdi): Call aarch64_expand_cpymem.
	* config/aarch64/aarch64.cc (aarch64_copy_one_block): Rename function,
	simplify, support storing generated loads/stores.
	(aarch64_expand_cpymem): Support expansion of memmove.
	* config/aarch64/aarch64-protos.h (aarch64_expand_cpymem): Add bool arg.

gcc/testsuite/ChangeLog:
	* gcc.target/aarch64/memmove.c: Add new test.
	* gcc.target/aarch64/memmove2.c: Likewise.
2023-12-15 13:19:40 +00:00
Juzhe-Zhong
5ddf651ad9 RISC-V: Fix vmerge optimization bug in vec_perm vectorization
This patch fixes the following FAILs in "full coverage" testing:

Running target riscv-sim/-march=rv64gcv_zvl256b/-mabi=lp64d/-mcmodel=medlow/--param=riscv-autovec-lmul=m8/--param=riscv-autovec-preference=fixed-vlmax
FAIL: gcc.dg/vect/vect-strided-mult-char-ls.c -flto -ffat-lto-objects execution test
FAIL: gcc.dg/vect/vect-strided-mult-char-ls.c execution test
FAIL: gcc.dg/vect/vect-strided-u8-i2.c -flto -ffat-lto-objects execution test
FAIL: gcc.dg/vect/vect-strided-u8-i2.c execution test

The root cause is vmerge optimization on this following IR:

_45 = VEC_PERM_EXPR <vect__3.13_47, vect__4.14_46, { 0, 257, 2, 259, 4, 261, 6, 263, 8, 265, 10, 267, 12, 269, 14, 271, 16, 273, 18, 275, 20, 277, 22, 279, 24, 281, 26, 283, 28, 285, 30, 287, 32, 289, 34, 291, 36, 293, 38, 295, 40, 297, 42, 299, 44, 301, 46, 303, 48, 305, 50, 307, 52, 309, 54, 311, 56, 313, 58, 315, 60, 317, 62, 319, 64, 321, 66, 323, 68, 325, 70, 327, 72, 329, 74, 331, 76, 333, 78, 335, 80, 337, 82, 339, 84, 341, 86, 343, 88, 345, 90, 347, 92, 349, 94, 351, 96, 353, 98, 355, 100, 357, 102, 359, 104, 361, 106, 363, 108, 365, 110, 367, 112, 369, 114, 371, 116, 373, 118, 375, 120, 377, 122, 379, 124, 381, 126, 383, 128, 385, 130, 387, 132, 389, 134, 391, 136, 393, 138, 395, 140, 397, 142, 399, 144, 401, 146, 403, 148, 405, 150, 407, 152, 409, 154, 411, 156, 413, 158, 415, 160, 417, 162, 419, 164, 421, 166, 423, 168, 425, 170, 427, 172, 429, 174, 431, 176, 433, 178, 435, 180, 437, 182, 439, 184, 441, 186, 443, 188, 445, 190, 447, 192, 449, 194, 451, 196, 453, 198, 455, 200, 457, 202, 459, 204, 461, 206, 463, 208, 465, 210, 467, 212, 469, 214, 471, 216, 473, 218, 475, 220, 477, 222, 479, 224, 481, 226, 483, 228, 485, 230, 487, 232, 489, 234, 491, 236, 493, 238, 495, 240, 497, 242, 499, 244, 501, 246, 503, 248, 505, 250, 507, 252, 509, 254, 511 }>;

It's obvious we have many index > 255 in shuffle indice. Here we use vmerge optimizaiton which is available but incorrect codgen cause run fail.

The bug codegen:
        vsetvli	zero,a4,e8,m8,ta,ma
	vmsltu.vi	v0,v0,0     -> it should be 256 instead of 0, but since it is EEW8 vector, 256 is not a available value that 8bit register can hold it.
	vmerge.vvm	v8,v8,v16,v0

After this patch:
	vmv.v.x	v0,a6
	vmerge.vvm	v8,v8,v16,v0

gcc/ChangeLog:

	* config/riscv/riscv-v.cc (shuffle_merge_patterns): Fix bug.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/autovec/bug-1.c: New test.
2023-12-15 21:06:02 +08:00
Thomas Schwinge
bc7546e32c In 'libgomp.fortran/map-subarray-5.f90', restrict 'dg-output's to 'target offload_device_nonshared_as'
..., as in 'libgomp.c-c++-common/map-arrayofstruct-{2,3}.c'.

Minor fix-up for commit f5745dc142
"OpenMP/OpenACC: Unordered/non-constant component offset runtime diagnostic".

	libgomp/
	* testsuite/libgomp.fortran/map-subarray-5.f90: Restrict
	'dg-output's to 'target offload_device_nonshared_as'.
2023-12-15 13:58:53 +01:00
Jakub Jelinek
a98a393286 bitint: Introduce abi_limb_mode
Given what I saw in the aarch64/arm psABIs for BITINT_TYPE, as I said
earlier I'm afraid we need to differentiate between the limb mode/precision
specified in the psABIs (what is used to decide how it is actually passed,
aligned or what size it has) vs. what limb mode/precision should be used
during bitint lowering and in the libgcc bitint APIs.
While in the x86_64 psABI a limb is 64-bit, which is perfect for both,
that is a wordsize which we can perform operations natively in,
e.g. aarch64 wants 128-bit limbs for alignment/sizing purposes, but
on the bitint lowering side I believe it would result in terribly bad code
and on the libgcc side wouldn't work at all (because it relies there on
longlong.h support).

So, the following patch makes it possible for aarch64 to use TImode
as abi_limb_mode for _BitInt(129) and larger, while using DImode as
limb_mode.

2023-12-15  Jakub Jelinek  <jakub@redhat.com>

	* target.h (struct bitint_info): Add abi_limb_mode member, adjust
	comment.
	* target.def (bitint_type_info): Mention abi_limb_mode instead of
	limb_mode.
	* varasm.cc (output_constant): Use abi_limb_mode rather than
	limb_mode.
	* stor-layout.cc (finish_bitfield_representative): Likewise.  Assert
	that if precision is smaller or equal to abi_limb_mode precision or
	if info.big_endian is different from WORDS_BIG_ENDIAN, info.limb_mode
	must be the same as info.abi_limb_mode.
	(layout_type): Use abi_limb_mode rather than limb_mode.
	* gimple-fold.cc (clear_padding_bitint_needs_padding_p): Likewise.
	(clear_padding_type): Likewise.
	* config/i386/i386.cc (ix86_bitint_type_info): Also set
	info->abi_limb_mode.
	* doc/tm.texi: Regenerated.
2023-12-15 12:40:51 +01:00
Julian Brown
f5745dc142 OpenMP/OpenACC: Unordered/non-constant component offset runtime diagnostic
This patch adds support for non-constant component offsets in "map"
clauses for OpenMP (and the equivalants for OpenACC), which are not able
to be sorted into order at compile time.  Normally struct accesses in
such clauses are gathered together and sorted into increasing address
order after a "GOMP_MAP_STRUCT" node: if we have variable indices,
that is no longer possible.

This version of the patch scales back the previously-posted version to
merely add a diagnostic for incorrect usage of component accesses with
variably-indexed arrays of structs: the only permitted variant is where
we have multiple indices that are the same, but we could not prove so
at compile time.  Rather than silently producing the wrong result for
cases where the indices are in fact different, we error out (e.g.,
"map(dtarr(i)%arrptr, dtarr(j)%arrptr(4:8))", for different i/j).

For now, multiple *constant* array indices are still supported (see
map-arrayofstruct-1.c).  That could perhaps be addressed with a follow-up
patch, if necessary.

This version of the patch renumbers the GOMP_MAP_STRUCT_UNORD kind to
avoid clashing with the OpenACC "non-contiguous" dynamic array support
(though that is not yet applied to mainline).

2023-08-18  Julian Brown  <julian@codesourcery.com>

gcc/
	* gimplify.cc (extract_base_bit_offset): Add VARIABLE_OFFSET parameter.
	(omp_get_attachment, omp_group_last, omp_group_base,
	omp_directive_maps_explicitly): Add GOMP_MAP_STRUCT_UNORD support.
	(omp_accumulate_sibling_list): Update calls to extract_base_bit_offset.
	Support GOMP_MAP_STRUCT_UNORD.
	(omp_build_struct_sibling_lists, gimplify_scan_omp_clauses,
	gimplify_adjust_omp_clauses, gimplify_omp_target_update): Add
	GOMP_MAP_STRUCT_UNORD support.
	* omp-low.cc (lower_omp_target): Add GOMP_MAP_STRUCT_UNORD support.
	* tree-pretty-print.cc (dump_omp_clause): Likewise.

include/
	* gomp-constants.h (gomp_map_kind): Add GOMP_MAP_STRUCT_UNORD.

libgomp/
	* oacc-mem.c (find_group_last, goacc_enter_data_internal,
	goacc_exit_data_internal, GOACC_enter_exit_data): Add
	GOMP_MAP_STRUCT_UNORD support.
	* target.c (gomp_map_vars_internal): Add GOMP_MAP_STRUCT_UNORD support.
	Detect incorrect use of variable indexing of arrays of structs.
	(GOMP_target_enter_exit_data, gomp_target_task_fn): Add
	GOMP_MAP_STRUCT_UNORD support.
	* testsuite/libgomp.c-c++-common/map-arrayofstruct-1.c: New test.
	* testsuite/libgomp.c-c++-common/map-arrayofstruct-2.c: New test.
	* testsuite/libgomp.c-c++-common/map-arrayofstruct-3.c: New test.
	* testsuite/libgomp.fortran/map-subarray-5.f90: New test.
2023-12-15 10:33:52 +00:00
Alex Coplan
ef9754dfdf aarch64: Handle autoinc addresses in ld1rq splitter [PR112906]
This patch uses the new force_reload_address routine added by the
previous patch to fix PR112906.

gcc/ChangeLog:

	PR target/112906
	* config/aarch64/aarch64-sve.md (@aarch64_vec_duplicate_vq<mode>_le):
	Use force_reload_address to reload addresses that aren't suitable for
	ld1rq in the pre-RA splitter.

gcc/testsuite/ChangeLog:

	PR target/112906
	* gcc.target/aarch64/sve/acle/general/pr112906.c: New test.
2023-12-15 09:35:45 +00:00
Alex Coplan
bac33a522b emit-rtl, lra: Move lra's emit_inc to emit-rtl.cc
In PR112906 we ICE because we try to use force_reg to reload an
auto-increment address, but force_reg can't do this.

With the aim of fixing the PR by supporting reloading arbitrary
addresses in pre-RA splitters, this patch generalizes
lra-constraints.cc:emit_inc and makes it available to the rest of the
compiler by moving the generalized version to emit-rtl.cc.

We observe that the separate IN parameter to LRA's emit_inc is
redundant, since the function is static and is only (statically) called
once in lra-constraints.cc, with in == value.  As such, we drop the IN
parameter and simplify the code accordingly.

We wrap the emit_inc code in a virtual class to allow LRA to override
how reload pseudos are created, thereby preserving the existing LRA
behaviour as much as possible.

We then add a second (higher-level) routine to emit-rtl.cc,
force_reload_address, which can reload arbitrary addresses.  This uses
the generalized emit_inc code to handle the RTX_AUTOINC case.  The
second patch in this series uses force_reload_address to fix PR112906.

Since we intend to call address_reload_context::emit_autoinc from within
splitters, and the code lifted from LRA calls recog, we have to avoid
clobbering recog_data.  We do this by introducing a new RAII class for
saving/restoring recog_data on the stack.

gcc/ChangeLog:

	PR target/112906
	* emit-rtl.cc (address_reload_context::emit_autoinc): New.
	(force_reload_address): New.
	* emit-rtl.h (struct address_reload_context): Declare.
	(force_reload_address): Declare.
	* lra-constraints.cc (class lra_autoinc_reload_context): New.
	(emit_inc): Drop IN parameter, invoke
	code moved to emit-rtl.cc:address_reload_context::emit_autoinc.
	(curr_insn_transform): Drop redundant IN parameter in call to
	emit_inc.
	* recog.h (class recog_data_saver): New.
2023-12-15 09:35:45 +00:00
Thomas Schwinge
91e9e8faea Fix 'gcc.dg/pr110279-2.c' syntax error due to '__attribute_noinline__'
For example, for GCN or nvptx target configurations, using newlib:

    FAIL: gcc.dg/pr110279-2.c (test for excess errors)
    UNRESOLVED: gcc.dg/pr110279-2.c scan-tree-dump-not reassoc2 "was chosen for reassociation"
    UNRESOLVED: gcc.dg/pr110279-2.c scan-tree-dump-times optimized "\\.FMA " 3

    [...]/source-gcc/gcc/testsuite/gcc.dg/pr110279-2.c:11:1: error: unknown type name '__attribute_noinline__'
    [...]/source-gcc/gcc/testsuite/gcc.dg/pr110279-2.c:12:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'foo'

We cannot assume 'stdio.h' to define '__attribute_noinline__' -- but then, that
also isn't necessary for this test case (there is nothing to inline into).

	gcc/testsuite/
	* gcc.dg/pr110279-2.c: Don't '#include <stdio.h>'.  Remove
	'__attribute_noinline__'.
2023-12-15 10:29:44 +01:00
Jakub Jelinek
330f1e078d match.pd: Optimize sign-extension followed by truncation [PR113024]
While looking at a bitint ICE, I've noticed we don't optimize
in f1 and f5 functions below the 2 casts into just one at GIMPLE,
even when optimize it in convert_to_integer if it appears in the same
stmt.  The large match.pd simplification of two conversions in a row
has many complex rules and as the testcase shows, everything else from
the narrowest -> widest -> prec_in_between all integer conversions
is already handled, either because the inside_unsignedp == inter_unsignedp
rule kicks in, or the
         && ((inter_unsignedp && inter_prec > inside_prec)
             == (final_unsignedp && final_prec > inter_prec))
one, but there is no reason why sign extension to from narrowest to
widest type followed by truncation to something in between can't be
done just as sign extension from narrowest to the final type.  After all,
if the widest type is signed rather than unsigned, regardless of the final
type signedness we already handle it that way.
And since PR93044 we also handle it if the final precision is not wider
than the inside precision.

2023-12-15  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/113024
	* match.pd (two conversions in a row): Simplify scalar integer
	sign-extension followed by truncation.

	* gcc.dg/tree-ssa/pr113024.c: New test.
2023-12-15 10:13:44 +01:00
Jakub Jelinek
d50d3d0a68 lower-bitint: Fix .{ADD,SUB,MUL}_OVERFLOW with _BitInt large/huge INTEGER_CST arguments [PR113003]
As shown in the testcase, .{ADD,SUB,MUL}_OVERFLOW calls are another
exception to the middle/large/huge _BitInt discovery through SSA_NAMEs
next to stores of INTEGER_CSTs to memory and their conversions to
floating point.
The calls can have normal COMPLEX_TYPE with INTEGER_TYPE elts return type
(or BITINT_TYPE with small precision) and one of the arguments can be
SSA_NAME with an INTEGER_TYPE or small BITINT_TYPE as well; still, when
there is an INTEGER_CST argument with large/huge BITINT_TYPE, we need to
lower it that way.

2023-12-15  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/113003
	* gimple-lower-bitint.cc (arith_overflow_arg_kind): New function.
	(gimple_lower_bitint): Use it to catch .{ADD,SUB,MUL}_OVERFLOW
	calls with large/huge INTEGER_CST arguments.

	* gcc.dg/bitint-54.c: New test.
2023-12-15 10:10:58 +01:00
Gerald Pfeifer
5641787abe doc: Update nvptx-tools Github link
gcc:

	* doc/install.texi (Specific) <nvptx-*-none>: Update nvptx-tools
	Github link.
2023-12-15 16:20:26 +08:00
Juzhe-Zhong
7304e85fff RISC-V: Remove xfail for some of the SLP tests
Due to recent middle-end cost model changes, now we can do more VLA SLP.

Fix these following regressions:

XPASS: gcc.target/riscv/rvv/autovec/partial/slp-1.c scan-assembler \\tvand
XPASS: gcc.target/riscv/rvv/autovec/partial/slp-1.c scan-assembler \\tvand
XPASS: gcc.target/riscv/rvv/autovec/partial/slp-1.c scan-assembler \\tvid\\.v
XPASS: gcc.target/riscv/rvv/autovec/partial/slp-1.c scan-assembler \\tvid\\.v
XPASS: gcc.target/riscv/rvv/autovec/partial/slp-1.c scan-tree-dump-times optimized ".VEC_PERM" 1
XPASS: gcc.target/riscv/rvv/autovec/partial/slp-1.c scan-tree-dump-times optimized ".VEC_PERM" 1
XPASS: gcc.target/riscv/rvv/autovec/partial/slp-16.c scan-assembler \\tvid\\.v
XPASS: gcc.target/riscv/rvv/autovec/partial/slp-16.c scan-assembler \\tvid\\.v
XPASS: gcc.target/riscv/rvv/autovec/partial/slp-16.c scan-tree-dump-times optimized ".VEC_PERM" 1
XPASS: gcc.target/riscv/rvv/autovec/partial/slp-16.c scan-tree-dump-times optimized ".VEC_PERM" 1
XPASS: gcc.target/riscv/rvv/autovec/partial/slp-3.c scan-tree-dump-times optimized ".VEC_PERM" 1
XPASS: gcc.target/riscv/rvv/autovec/partial/slp-3.c scan-tree-dump-times optimized ".VEC_PERM" 1
XPASS: gcc.target/riscv/rvv/autovec/partial/slp-5.c scan-tree-dump-times optimized ".VEC_PERM" 1
XPASS: gcc.target/riscv/rvv/autovec/partial/slp-5.c scan-tree-dump-times optimized ".VEC_PERM" 1

Committed.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/autovec/partial/slp-1.c: Remove xfail of M2.
	* gcc.target/riscv/rvv/autovec/partial/slp-16.c: Ditto.
	* gcc.target/riscv/rvv/autovec/partial/slp-3.c: Ditto.
	* gcc.target/riscv/rvv/autovec/partial/slp-5.c: Ditto.
2023-12-15 16:09:01 +08:00
Hongyu Wang
e7b3cf2a0e testsuite: Require dfp for pr112943.c
This test fails on darwin as it does not support _Decimal64,
so require dfp for it.

gcc/testsuite/ChangeLog:

	* gcc.target/i386/pr112943.c: Require dfp.
2023-12-15 10:46:03 +08:00
Hongyu Wang
a52940cfee i386: Sync move_max/store_max with prefer-vector-width [PR112824]
Currently move_max follows the tuning feature first, but ideally it
should sync with prefer-vector-width when it is explicitly set to keep
vector move and operation with same vector size.

gcc/ChangeLog:

	PR target/112824
	* config/i386/i386-options.cc (ix86_option_override_internal):
	Sync ix86_move_max/ix86_store_max with prefer_vector_width when
	it is explicitly set.

gcc/testsuite/ChangeLog:

	PR target/112824
	* gcc.target/i386/pieces-memset-45.c: Remove
	-mprefer-vector-width=256.
	* g++.target/i386/pr112824-1.C: New test.
2023-12-15 10:32:51 +08:00
Haochen Jiang
9b4f535e45 i386: Remove RAO-INT from Grand Ridge
gcc/ChangeLog:

	* config/i386/driver-i386.cc (host_detect_local_cpu): Do not
	set Grand Ridge depending on RAO-INT.
	* config/i386/i386.h: Remove PTA_RAOINT from PTA_GRANDRIDGE.
	* doc/invoke.texi: Adjust documentation.
2023-12-15 10:08:09 +08:00
Juzhe-Zhong
afead7fb9b RISC-V: Adjust test
Since middle-end patch:
https://gcc.gnu.org/pipermail/gcc-patches/2023-December/640595.html

will change vectorization code.

Adapt tests for ths patch.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/vsetvl/pr112988-1.c: Adapt test.
2023-12-15 08:32:38 +08:00
Juzhe-Zhong
4bfafea692 RISC-V: Tweak generic vector COST model
Notice current generic vector cost model make PR112387 failed to vectorize.

Adapt it same as ARM SVE generic vector cost model which can fix it.

Committed as it is obvious fix.

	PR target/112387

gcc/ChangeLog:

	* config/riscv/riscv.cc: Adapt generic cost model same ARM SVE.

gcc/testsuite/ChangeLog:

	* gcc.dg/vect/costmodel/riscv/rvv/pr112387.c: Moved to...
	* gcc.dg/vect/costmodel/riscv/rvv/pr112387-1.c: ...here.
	* gcc.dg/vect/costmodel/riscv/rvv/pr112387-2.c: New test.
2023-12-15 08:30:31 +08:00
Juzhe-Zhong
c7ef218985 Middle-end: Do not model address cost for SELECT_VL style vectorization
Follow Richard's suggestions, we should not model address cost in the loop
vectorizer for select_vl or decrement IV since other style vectorization doesn't
do that.

To make cost model comparison apple to apple.
This patch set COST from 2 to 1 which turns out have better codegen
in various codegen for RVV.

Ok for trunk ?

	PR target/111153

gcc/ChangeLog:

	* tree-vect-loop.cc (vect_estimate_min_profitable_iters):
	Remove address cost for select_vl/decrement IV.

gcc/testsuite/ChangeLog:

	* gcc.dg/vect/costmodel/riscv/rvv/pr111153.c: Moved to...
	* gcc.dg/vect/costmodel/riscv/rvv/pr11153-2.c: ...here.
	* gcc.dg/vect/costmodel/riscv/rvv/pr111153-1.c: New test.
2023-12-15 08:26:45 +08:00
GCC Administrator
f998335ac0 Daily bump. 2023-12-15 00:17:17 +00:00
Jonathan Wakely
fe54b57728 libstdc++: Implement C++23 <print> header [PR107760]
This adds the C++23 std::print functions, which use std::format to write
to a FILE stream or std::ostream (defaulting to stdout).

The new extern symbols are in the libstdc++exp.a archive, so we aren't
committing to stable symbols in the DSO yet. There's a UTF-8 validating
and transcoding function added by this change. That can certainly be
optimized, but it's internal to libstdc++exp.a so can be tweaked later
at leisure.

Currently the external symbols work for all targets, but are only
actually used for Windows, where it's necessary to transcode to UTF-16
to write to the console.  The standard seems to encourage us to also
diagnose invalid UTF-8 for non-Windows targets when writing to a
terminal (and only when writing to a terminal), but I'm reliably
informed that that wasn't the intent of the wording. Checking for
invalid UTF-8 sequences only needs to happen for Windows, which is good
as checking for a terminal requires a call to isatty, and on Linux that
uses an ioctl syscall, which would make std::print ten times slower!

Testing the std::print behaviour is difficult if it depends on whether
the output stream is connected to a Windows console or not, as we can't
(as far as I know) do that non-interactively in DejaGNU. One of the new
tests uses the internal __write_to_terminal function directly. That
allows us to verify its UTF-8 error handling on POSIX targets, even
though that's not actually used by std::print. For Windows, that
__write_to_terminal function transcodes to UTF-16 but then uses
WriteConsoleW which fails unless it really is writing to the console.
That means the 27_io/print/2.cc test FAILs on Windows. The UTF-16
transcoding has been manually tested using mingw-w64 and Wine, and
appears to work.

libstdc++-v3/ChangeLog:

	PR libstdc++/107760
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/bits/version.def (__cpp_lib_print): Define.
	* include/bits/version.h: Regenerate.
	* include/std/format (__literal_encoding_is_utf8): New function.
	(_Seq_sink::view()): New member function.
	* include/std/ostream (vprintf_nonunicode, vprintf_unicode)
	(print, println): New functions.
	* include/std/print: New file.
	* src/c++23/Makefile.am: Add new source file.
	* src/c++23/Makefile.in: Regenerate.
	* src/c++23/print.cc: New file.
	* testsuite/27_io/basic_ostream/print/1.cc: New test.
	* testsuite/27_io/print/1.cc: New test.
	* testsuite/27_io/print/2.cc: New test.
2023-12-14 23:59:24 +00:00
Jonathan Wakely
29ad35a1db libstdc++: Fix filebuf::native_handle() for Windows
libstdc++-v3/ChangeLog:

	* acinclude.m4 (GLIBCXX_CHECK_FILEBUF_NATIVE_HANDLES): Add
	missing header to configure test. Check correct variable.
	* config/io/basic_file_stdio.cc (__basic_file<char>::native_handle):
	Fix typo.
	* configure: Regenerate.
	* testsuite/27_io/basic_filebuf/native_handle/char/1.cc: Do not
	call CloseHandle on the native handle.
	* testsuite/27_io/basic_filebuf/native_handle/wchar_t/1.cc:
	Likewise.
2023-12-14 23:59:21 +00:00
Jonathan Wakely
3fa0f9404b libstdc++: Tweaks for std::format fast path
Fix an incorrect call to _Sink::_M_reserve() which should have passed
the __n parameter. This was not actually a problem because it was in an
discarded statement, because only the _Seq_sink<basic_string<C>>
specialization was used.

Also add some branch prediction hints, explanatory comments, and debug
mode assertions to _Seq_sink.

libstdc++-v3/ChangeLog:

	* include/std/format (_Seq_sink): Fix missing argument in
	discarded statement. Add comments, likely/unlikely attributes
	and debug assertions as sanity checks.
2023-12-14 22:04:43 +00:00
Jonathan Wakely
0c773209fc libstdc++: Add dg-output to two tests
These tests are expected to run interactively, with the output checked
by eye. Nobody ever does that, but we can at least use dg-output to
check that the output is as expected.

libstdc++-v3/ChangeLog:

	* testsuite/27_io/objects/char/2.cc: Use dg-output.
	* testsuite/27_io/objects/wchar_t/2.cc: Use dg-output.
2023-12-14 22:04:43 +00:00
Jonathan Wakely
2ef5200a6f libstdc++: Fix %S format of duration with floating-point rep
I got the order of arguments to std::format_to wrong. It was in a
discarded statement, for a case which wasn't being tested.

libstdc++-v3/ChangeLog:

	* include/bits/chrono_io.h (__formatter_chrono::_M_S): Fix order
	of arguments to std::format_to.
	* testsuite/20_util/duration/io.cc: Test subsecond duration with
	floating-point rep.
2023-12-14 22:04:42 +00:00
David Malcolm
ae034b9106 testsuite: move more analyzer test cases to c-c++-common (3) [PR96395]
Move a further 268 tests from gcc.dg/analyzer to c-c++-common/analyzer.

gcc/testsuite/ChangeLog:
	PR analyzer/96395
	* c-c++-common/analyzer/analyzer-decls.h: New header.
	* gcc.dg/analyzer/20020129-1.c: Move to...
	* c-c++-common/analyzer/20020129-1.c: ...here.
	* gcc.dg/analyzer/SARD-tc117-basic-00001-min.c: Move to...
	* c-c++-common/analyzer/SARD-tc117-basic-00001-min.c: ...here.
	* gcc.dg/analyzer/SARD-tc249-basic-00034-min.c: Move to...
	* c-c++-common/analyzer/SARD-tc249-basic-00034-min.c: ...here.
	* gcc.dg/analyzer/abort.c: Move to...
	* c-c++-common/analyzer/abort.c: ...here.
	* gcc.dg/analyzer/aliasing-1.c: Move to...
	* c-c++-common/analyzer/aliasing-1.c: ...here.
	* gcc.dg/analyzer/aliasing-2.c: Move to...
	* c-c++-common/analyzer/aliasing-2.c: ...here.
	* gcc.dg/analyzer/alloca-leak.c: Move to...
	* c-c++-common/analyzer/alloca-leak.c: ...here.
	* gcc.dg/analyzer/analyzer-debugging-fns-1.c: Move to...
	* c-c++-common/analyzer/analyzer-debugging-fns-1.c: ...here.
	* gcc.dg/analyzer/analyzer-verbosity-2a.c: Move to...
	* c-c++-common/analyzer/analyzer-verbosity-2a.c: ...here.
	* gcc.dg/analyzer/analyzer-verbosity-3a.c: Move to...
	* c-c++-common/analyzer/analyzer-verbosity-3a.c: ...here.
	* gcc.dg/analyzer/asm-x86-1.c: Move to...
	* c-c++-common/analyzer/asm-x86-1.c: ...here.
	* gcc.dg/analyzer/attr-alloc_size-3.c: Move to...
	* c-c++-common/analyzer/attr-alloc_size-3.c: ...here.
	* gcc.dg/analyzer/attr-const-1.c: Move to...
	* c-c++-common/analyzer/attr-const-1.c: ...here.
	* gcc.dg/analyzer/attr-const-2.c: Move to...
	* c-c++-common/analyzer/attr-const-2.c: ...here.
	* gcc.dg/analyzer/attr-const-3.c: Move to...
	* c-c++-common/analyzer/attr-const-3.c: ...here.
	* gcc.dg/analyzer/attr-malloc-2.c: Move to...
	* c-c++-common/analyzer/attr-malloc-2.c: ...here.
	* gcc.dg/analyzer/attr-malloc-4.c: Move to...
	* c-c++-common/analyzer/attr-malloc-4.c: ...here.
	* gcc.dg/analyzer/attr-malloc-5.c: Move to...
	* c-c++-common/analyzer/attr-malloc-5.c: ...here.
	* gcc.dg/analyzer/attr-malloc-misuses.c: Move to...
	* c-c++-common/analyzer/attr-malloc-misuses.c: ...here.
	* gcc.dg/analyzer/attr-tainted_args-misuses.c: Move to...
	* c-c++-common/analyzer/attr-tainted_args-misuses.c: ...here.
	* gcc.dg/analyzer/bzip2-arg-parse-1.c: Move to...
	* c-c++-common/analyzer/bzip2-arg-parse-1.c: ...here.
	* gcc.dg/analyzer/call-summaries-1.c: Move to...
	* c-c++-common/analyzer/call-summaries-1.c: ...here.
	* gcc.dg/analyzer/call-summaries-3.c: Move to...
	* c-c++-common/analyzer/call-summaries-3.c: ...here.
	* gcc.dg/analyzer/call-summaries-asm-x86.c: Move to...
	* c-c++-common/analyzer/call-summaries-asm-x86.c: ...here.
	* gcc.dg/analyzer/callbacks-1.c: Move to...
	* c-c++-common/analyzer/callbacks-1.c: ...here.
	* gcc.dg/analyzer/callbacks-2.c: Move to...
	* c-c++-common/analyzer/callbacks-2.c: ...here.
	* gcc.dg/analyzer/callbacks-3.c: Move to...
	* c-c++-common/analyzer/callbacks-3.c: ...here.
	* gcc.dg/analyzer/capacity-2.c: Move to...
	* c-c++-common/analyzer/capacity-2.c: ...here.
	* gcc.dg/analyzer/capacity-3.c: Move to...
	* c-c++-common/analyzer/capacity-3.c: ...here.
	* gcc.dg/analyzer/casts-1.c: Move to...
	* c-c++-common/analyzer/casts-1.c: ...here.
	* gcc.dg/analyzer/casts-2.c: Move to...
	* c-c++-common/analyzer/casts-2.c: ...here.
	* gcc.dg/analyzer/clobbers-1.c: Move to...
	* c-c++-common/analyzer/clobbers-1.c: ...here.
	* gcc.dg/analyzer/compound-assignment-4.c: Move to...
	* c-c++-common/analyzer/compound-assignment-4.c: ...here.
	* gcc.dg/analyzer/data-model-12.c: Move to...
	* c-c++-common/analyzer/data-model-12.c: ...here.
	* gcc.dg/analyzer/data-model-14.c: Move to...
	* c-c++-common/analyzer/data-model-14.c: ...here.
	* gcc.dg/analyzer/data-model-18.c: Move to...
	* c-c++-common/analyzer/data-model-18.c: ...here.
	* gcc.dg/analyzer/data-model-2.c: Move to...
	* c-c++-common/analyzer/data-model-2.c: ...here.
	* gcc.dg/analyzer/data-model-20.c: Move to...
	* c-c++-common/analyzer/data-model-20.c: ...here.
	* gcc.dg/analyzer/data-model-21.c: Move to...
	* c-c++-common/analyzer/data-model-21.c: ...here.
	* gcc.dg/analyzer/data-model-22.c: Move to...
	* c-c++-common/analyzer/data-model-22.c: ...here.
	* gcc.dg/analyzer/data-model-4.c: Move to...
	* c-c++-common/analyzer/data-model-4.c: ...here.
	* gcc.dg/analyzer/data-model-5d.c: Move to...
	* c-c++-common/analyzer/data-model-5d.c: ...here.
	* gcc.dg/analyzer/data-model-8.c: Move to...
	* c-c++-common/analyzer/data-model-8.c: ...here.
	* gcc.dg/analyzer/data-model-path-1.c: Move to...
	* c-c++-common/analyzer/data-model-path-1.c: ...here.
	* gcc.dg/analyzer/deref-before-check-2.c: Move to...
	* c-c++-common/analyzer/deref-before-check-2.c: ...here.
	* gcc.dg/analyzer/deref-before-check-macro-pr108745.c: Move to...
	* c-c++-common/analyzer/deref-before-check-macro-pr108745.c: ...here.
	* gcc.dg/analyzer/deref-before-check-qemu-qtest_rsp_args.c: Move to...
	* c-c++-common/analyzer/deref-before-check-qemu-qtest_rsp_args.c:
	...here.
	* gcc.dg/analyzer/disabling.c: Move to...
	* c-c++-common/analyzer/disabling.c: ...here.
	* gcc.dg/analyzer/dump-state.c: Move to...
	* c-c++-common/analyzer/dump-state.c: ...here.
	* gcc.dg/analyzer/edges-2.c: Move to...
	* c-c++-common/analyzer/edges-2.c: ...here.
	* gcc.dg/analyzer/equivalence.c: Move to...
	* c-c++-common/analyzer/equivalence.c: ...here.
	* gcc.dg/analyzer/errno-1.c: Move to...
	* c-c++-common/analyzer/errno-1.c: ...here.
	* gcc.dg/analyzer/errno-___errno.c: Move to...
	* c-c++-common/analyzer/errno-___errno.c: ...here.
	* gcc.dg/analyzer/errno-__error.c: Move to...
	* c-c++-common/analyzer/errno-__error.c: ...here.
	* gcc.dg/analyzer/errno-global-var.c: Move to...
	* c-c++-common/analyzer/errno-global-var.c: ...here.
	* gcc.dg/analyzer/errno-pr107777.c: Move to...
	* c-c++-common/analyzer/errno-pr107777.c: ...here.
	* gcc.dg/analyzer/error-3.c: Move to...
	* c-c++-common/analyzer/error-3.c: ...here.
	* gcc.dg/analyzer/error-uninit.c: Move to...
	* c-c++-common/analyzer/error-uninit.c: ...here.
	* gcc.dg/analyzer/factorial.c: Move to...
	* c-c++-common/analyzer/factorial.c: ...here.
	* gcc.dg/analyzer/fd-1.c: Move to...
	* c-c++-common/analyzer/fd-1.c: ...here.
	* gcc.dg/analyzer/fd-2.c: Move to...
	* c-c++-common/analyzer/fd-2.c: ...here.
	* gcc.dg/analyzer/fd-3.c: Move to...
	* c-c++-common/analyzer/fd-3.c: ...here.
	* gcc.dg/analyzer/fd-bind-pr107928.c: Move to...
	* c-c++-common/analyzer/fd-bind-pr107928.c: ...here.
	* gcc.dg/analyzer/fd-connect-pr107928.c: Move to...
	* c-c++-common/analyzer/fd-connect-pr107928.c: ...here.
	* gcc.dg/analyzer/fd-glibc-byte-stream-socket.c: Move to...
	* c-c++-common/analyzer/fd-glibc-byte-stream-socket.c: ...here.
	* gcc.dg/analyzer/fd-manpage-getaddrinfo-client.c: Move to...
	* c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c: ...here.
	* gcc.dg/analyzer/fd-mappage-getaddrinfo-server.c: Move to...
	* c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c: ...here.
	* gcc.dg/analyzer/fd-meaning.c: Move to...
	* c-c++-common/analyzer/fd-meaning.c: ...here.
	* gcc.dg/analyzer/fd-socket-meaning.c: Move to...
	* c-c++-common/analyzer/fd-socket-meaning.c: ...here.
	* gcc.dg/analyzer/fd-symbolic-socket.c: Move to...
	* c-c++-common/analyzer/fd-symbolic-socket.c: ...here.
	* gcc.dg/analyzer/fd-uninit-1.c: Move to...
	* c-c++-common/analyzer/fd-uninit-1.c: ...here.
	* gcc.dg/analyzer/feasibility-1.c: Move to...
	* c-c++-common/analyzer/feasibility-1.c: ...here.
	* gcc.dg/analyzer/feasibility-2.c: Move to...
	* c-c++-common/analyzer/feasibility-2.c: ...here.
	* gcc.dg/analyzer/feasibility-4.c: Move to...
	* c-c++-common/analyzer/feasibility-4.c: ...here.
	* gcc.dg/analyzer/feasibility-pr107948.c: Move to...
	* c-c++-common/analyzer/feasibility-pr107948.c: ...here.
	* gcc.dg/analyzer/ferror-1.c: Move to...
	* c-c++-common/analyzer/ferror-1.c: ...here.
	* gcc.dg/analyzer/fibonacci.c: Move to...
	* c-c++-common/analyzer/fibonacci.c: ...here.
	* gcc.dg/analyzer/file-1.c: Move to...
	* c-c++-common/analyzer/file-1.c: ...here.
	* gcc.dg/analyzer/file-3.c: Move to...
	* c-c++-common/analyzer/file-3.c: ...here.
	* gcc.dg/analyzer/file-meaning-1.c: Move to...
	* c-c++-common/analyzer/file-meaning-1.c: ...here.
	* gcc.dg/analyzer/malloc-ipa-10.c: Move to...
	* c-c++-common/analyzer/malloc-ipa-10.c: ...here.
	* gcc.dg/analyzer/malloc-ipa-12.c: Move to...
	* c-c++-common/analyzer/malloc-ipa-12.c: ...here.
	* gcc.dg/analyzer/malloc-ipa-13a.c: Move to...
	* c-c++-common/analyzer/malloc-ipa-13a.c: ...here.
	* gcc.dg/analyzer/malloc-ipa-9.c: Move to...
	* c-c++-common/analyzer/malloc-ipa-9.c: ...here.
	* gcc.dg/analyzer/malloc-many-paths-1.c: Move to...
	* c-c++-common/analyzer/malloc-many-paths-1.c: ...here.
	* gcc.dg/analyzer/malloc-many-paths-3.c: Move to...
	* c-c++-common/analyzer/malloc-many-paths-3.c: ...here.
	* gcc.dg/analyzer/malloc-meaning-1.c: Move to...
	* c-c++-common/analyzer/malloc-meaning-1.c: ...here.
	* gcc.dg/analyzer/malloc-paths-1.c: Move to...
	* c-c++-common/analyzer/malloc-paths-1.c: ...here.
	* gcc.dg/analyzer/malloc-paths-2.c: Move to...
	* c-c++-common/analyzer/malloc-paths-2.c: ...here.
	* gcc.dg/analyzer/malloc-paths-3.c: Move to...
	* c-c++-common/analyzer/malloc-paths-3.c: ...here.
	* gcc.dg/analyzer/malloc-paths-4.c: Move to...
	* c-c++-common/analyzer/malloc-paths-4.c: ...here.
	* gcc.dg/analyzer/malloc-paths-5.c: Move to...
	* c-c++-common/analyzer/malloc-paths-5.c: ...here.
	* gcc.dg/analyzer/malloc-paths-6.c: Move to...
	* c-c++-common/analyzer/malloc-paths-6.c: ...here.
	* gcc.dg/analyzer/malloc-paths-7.c: Move to...
	* c-c++-common/analyzer/malloc-paths-7.c: ...here.
	* gcc.dg/analyzer/malloc-paths-8.c: Move to...
	* c-c++-common/analyzer/malloc-paths-8.c: ...here.
	* gcc.dg/analyzer/malloc-sarif-1.c: Move to...
	* c-c++-common/analyzer/malloc-sarif-1.c: ...here.
	* gcc.dg/analyzer/malloc-vs-local-1a.c: Move to...
	* c-c++-common/analyzer/malloc-vs-local-1a.c: ...here.
	* gcc.dg/analyzer/malloc-vs-local-1b.c: Move to...
	* c-c++-common/analyzer/malloc-vs-local-1b.c: ...here.
	* gcc.dg/analyzer/malloc-vs-local-2.c: Move to...
	* c-c++-common/analyzer/malloc-vs-local-2.c: ...here.
	* gcc.dg/analyzer/malloc-vs-local-3.c: Move to...
	* c-c++-common/analyzer/malloc-vs-local-3.c: ...here.
	* gcc.dg/analyzer/many-disabled-diagnostics.c: Move to...
	* c-c++-common/analyzer/many-disabled-diagnostics.c: ...here.
	* gcc.dg/analyzer/many-unused-locals.c: Move to...
	* c-c++-common/analyzer/many-unused-locals.c: ...here.
	* gcc.dg/analyzer/memcpy-pr107882.c: Move to...
	* c-c++-common/analyzer/memcpy-pr107882.c: ...here.
	* gcc.dg/analyzer/memset-1.c: Move to...
	* c-c++-common/analyzer/memset-1.c: ...here.
	* gcc.dg/analyzer/memset-2.c: Move to...
	* c-c++-common/analyzer/memset-2.c: ...here.
	* gcc.dg/analyzer/named-constants-via-macros-2.c: Move to...
	* c-c++-common/analyzer/named-constants-via-macros-2.c: ...here.
	* gcc.dg/analyzer/named-constants-via-macros-3.c: Move to...
	* c-c++-common/analyzer/named-constants-via-macros-3.c: ...here.
	* gcc.dg/analyzer/named-constants-via-macros-4.c: Move to...
	* c-c++-common/analyzer/named-constants-via-macros-4.c: ...here.
	* gcc.dg/analyzer/named-constants-via-macros-empty.c: Move to...
	* c-c++-common/analyzer/named-constants-via-macros-empty.c: ...here.
	* gcc.dg/analyzer/named-constants-via-macros-traditional.c: Move to...
	* c-c++-common/analyzer/named-constants-via-macros-traditional.c:
	...here.
	* gcc.dg/analyzer/named-constants-via-macros-undef.c: Move to...
	* c-c++-common/analyzer/named-constants-via-macros-undef.c: ...here.
	* gcc.dg/analyzer/omp-parallel-for-1.c: Move to...
	* c-c++-common/analyzer/omp-parallel-for-1.c: ...here.
	* gcc.dg/analyzer/omp-parallel-for-get-min.c: Move to...
	* c-c++-common/analyzer/omp-parallel-for-get-min.c: ...here.
	* gcc.dg/analyzer/out-of-bounds-3.c: Move to...
	* c-c++-common/analyzer/out-of-bounds-3.c: ...here.
	* gcc.dg/analyzer/out-of-bounds-coreutils.c: Move to...
	* c-c++-common/analyzer/out-of-bounds-coreutils.c: ...here.
	* gcc.dg/analyzer/out-of-bounds-curl.c: Move to...
	* c-c++-common/analyzer/out-of-bounds-curl.c: ...here.
	* gcc.dg/analyzer/out-of-bounds-diagram-1-json.c: Move to...
	* c-c++-common/analyzer/out-of-bounds-diagram-1-json.c: ...here.
	* gcc.dg/analyzer/out-of-bounds-diagram-1-sarif.c: Move to...

	* c-c++-common/analyzer/out-of-bounds-diagram-1-sarif.c: ...here.
	* gcc.dg/analyzer/out-of-bounds-pr110387.c: Move to...
	* c-c++-common/analyzer/out-of-bounds-pr110387.c: ...here.
	* gcc.dg/analyzer/out-of-bounds-read-char-arr.c: Move to...
	* c-c++-common/analyzer/out-of-bounds-read-char-arr.c: ...here.
	* gcc.dg/analyzer/out-of-bounds-read-int-arr.c: Move to...
	* c-c++-common/analyzer/out-of-bounds-read-int-arr.c: ...here.
	* gcc.dg/analyzer/out-of-bounds-read-struct-arr.c: Move to...
	* c-c++-common/analyzer/out-of-bounds-read-struct-arr.c: ...here.
	* gcc.dg/analyzer/out-of-bounds-write-char-arr.c: Move to...
	* c-c++-common/analyzer/out-of-bounds-write-char-arr.c: ...here.
	* gcc.dg/analyzer/out-of-bounds-write-int-arr.c: Move to...
	* c-c++-common/analyzer/out-of-bounds-write-int-arr.c: ...here.
	* gcc.dg/analyzer/out-of-bounds-write-struct-arr.c: Move to...
	* c-c++-common/analyzer/out-of-bounds-write-struct-arr.c: ...here.
	* gcc.dg/analyzer/params-2.c: Move to...
	* c-c++-common/analyzer/params-2.c: ...here.
	* gcc.dg/analyzer/paths-1.c: Move to...
	* c-c++-common/analyzer/paths-1.c: ...here.
	* gcc.dg/analyzer/paths-1a.c: Move to...
	* c-c++-common/analyzer/paths-1a.c: ...here.
	* gcc.dg/analyzer/paths-2.c: Move to...
	* c-c++-common/analyzer/paths-2.c: ...here.
	* gcc.dg/analyzer/paths-3.c: Move to...
	* c-c++-common/analyzer/paths-3.c: ...here.
	* gcc.dg/analyzer/paths-4.c: Move to...
	* c-c++-common/analyzer/paths-4.c: ...here.
	* gcc.dg/analyzer/paths-5.c: Move to...
	* c-c++-common/analyzer/paths-5.c: ...here.
	* gcc.dg/analyzer/paths-6.c: Move to...
	* c-c++-common/analyzer/paths-6.c: ...here.
	* gcc.dg/analyzer/paths-7.c: Move to...
	* c-c++-common/analyzer/paths-7.c: ...here.
	* gcc.dg/analyzer/paths-8.c: Move to...
	* c-c++-common/analyzer/paths-8.c: ...here.
	* gcc.dg/analyzer/pattern-test-1.c: Move to...
	* c-c++-common/analyzer/pattern-test-1.c: ...here.
	* gcc.dg/analyzer/pipe-pr107486.c: Move to...
	* c-c++-common/analyzer/pipe-pr107486.c: ...here.
	* gcc.dg/analyzer/pointer-merging.c: Move to...
	* c-c++-common/analyzer/pointer-merging.c: ...here.
	* gcc.dg/analyzer/pr100546.c: Move to...
	* c-c++-common/analyzer/pr100546.c: ...here.
	* gcc.dg/analyzer/pr101503.c: Move to...
	* c-c++-common/analyzer/pr101503.c: ...here.
	* gcc.dg/analyzer/pr101570.c: Move to...
	* c-c++-common/analyzer/pr101570.c: ...here.
	* gcc.dg/analyzer/pr101721.c: Move to...
	* c-c++-common/analyzer/pr101721.c: ...here.
	* gcc.dg/analyzer/pr102692-2.c: Move to...
	* c-c++-common/analyzer/pr102692-2.c: ...here.
	* gcc.dg/analyzer/pr102695.c: Move to...
	* c-c++-common/analyzer/pr102695.c: ...here.
	* gcc.dg/analyzer/pr103217-3.c: Move to...
	* c-c++-common/analyzer/pr103217-3.c: ...here.
	* gcc.dg/analyzer/pr103217-4.c: Move to...
	* c-c++-common/analyzer/pr103217-4.c: ...here.
	* gcc.dg/analyzer/pr103217-5.c: Move to...
	* c-c++-common/analyzer/pr103217-5.c: ...here.
	* gcc.dg/analyzer/pr104089.c: Move to...
	* c-c++-common/analyzer/pr104089.c: ...here.
	* gcc.dg/analyzer/pr104308.c: Move to...
	* c-c++-common/analyzer/pr104308.c: ...here.
	* gcc.dg/analyzer/pr104452.c: Move to...
	* c-c++-common/analyzer/pr104452.c: ...here.
	* gcc.dg/analyzer/pr104524.c: Move to...
	* c-c++-common/analyzer/pr104524.c: ...here.
	* gcc.dg/analyzer/pr104560-2.c: Move to...
	* c-c++-common/analyzer/pr104560-2.c: ...here.
	* gcc.dg/analyzer/pr105087-1.c: Move to...
	* c-c++-common/analyzer/pr105087-1.c: ...here.
	* gcc.dg/analyzer/pr105087-2.c: Move to...
	* c-c++-common/analyzer/pr105087-2.c: ...here.
	* gcc.dg/analyzer/pr105252.c: Move to...
	* c-c++-common/analyzer/pr105252.c: ...here.
	* gcc.dg/analyzer/pr106394.c: Move to...
	* c-c++-common/analyzer/pr106394.c: ...here.
	* gcc.dg/analyzer/pr106539.c: Move to...
	* c-c++-common/analyzer/pr106539.c: ...here.
	* gcc.dg/analyzer/pr106845.c: Move to...
	* c-c++-common/analyzer/pr106845.c: ...here.
	* gcc.dg/analyzer/pr109439.c: Move to...
	* c-c++-common/analyzer/pr109439.c: ...here.
	* gcc.dg/analyzer/pr110455.c: Move to...
	* c-c++-common/analyzer/pr110455.c: ...here.
	* gcc.dg/analyzer/pr93032-mztools-simplified.c: Move to...
	* c-c++-common/analyzer/pr93032-mztools-simplified.c: ...here.
	* gcc.dg/analyzer/pr93290.c: Move to...
	* c-c++-common/analyzer/pr93290.c: ...here.
	* gcc.dg/analyzer/pr93352.c: Move to...
	* c-c++-common/analyzer/pr93352.c: ...here.
	* gcc.dg/analyzer/pr93355-localealias-feasibility-3.c: Move to...
	* c-c++-common/analyzer/pr93355-localealias-feasibility-3.c: ...here.
	* gcc.dg/analyzer/pr93355-localealias-simplified.c: Move to...
	* c-c++-common/analyzer/pr93355-localealias-simplified.c: ...here.
	* gcc.dg/analyzer/pr93546.c: Move to...
	* c-c++-common/analyzer/pr93546.c: ...here.
	* gcc.dg/analyzer/pr93547.c: Move to...
	* c-c++-common/analyzer/pr93547.c: ...here.
	* gcc.dg/analyzer/pr93669.c: Move to...
	* c-c++-common/analyzer/pr93669.c: ...here.
	* gcc.dg/analyzer/pr93938.c: Move to...
	* c-c++-common/analyzer/pr93938.c: ...here.
	* gcc.dg/analyzer/pr94047.c: Move to...
	* c-c++-common/analyzer/pr94047.c: ...here.
	* gcc.dg/analyzer/pr94099.c: Move to...
	* c-c++-common/analyzer/pr94099.c: ...here.
	* gcc.dg/analyzer/pr94105.c: Move to...
	* c-c++-common/analyzer/pr94105.c: ...here.
	* gcc.dg/analyzer/pr94362-2.c: Move to...
	* c-c++-common/analyzer/pr94362-2.c: ...here.
	* gcc.dg/analyzer/pr94399.c: Move to...
	* c-c++-common/analyzer/pr94399.c: ...here.
	* gcc.dg/analyzer/pr94447.c: Move to...
	* c-c++-common/analyzer/pr94447.c: ...here.
	* gcc.dg/analyzer/pr94639.c: Move to...
	* c-c++-common/analyzer/pr94639.c: ...here.
	* gcc.dg/analyzer/pr94640.c: Move to...
	* c-c++-common/analyzer/pr94640.c: ...here.
	* gcc.dg/analyzer/pr94732.c: Move to...
	* c-c++-common/analyzer/pr94732.c: ...here.
	* gcc.dg/analyzer/pr94851-1.c: Move to...
	* c-c++-common/analyzer/pr94851-1.c: ...here.
	* gcc.dg/analyzer/pr94851-2.c: Move to...
	* c-c++-common/analyzer/pr94851-2.c: ...here.
	* gcc.dg/analyzer/pr94851-3.c: Move to...
	* c-c++-common/analyzer/pr94851-3.c: ...here.
	* gcc.dg/analyzer/pr94851-4.c: Move to...
	* c-c++-common/analyzer/pr94851-4.c: ...here.
	* gcc.dg/analyzer/pr95026.c: Move to...
	* c-c++-common/analyzer/pr95026.c: ...here.
	* gcc.dg/analyzer/pr96598.c: Move to...
	* c-c++-common/analyzer/pr96598.c: ...here.
	* gcc.dg/analyzer/pr96611.c: Move to...
	* c-c++-common/analyzer/pr96611.c: ...here.
	* gcc.dg/analyzer/pr96644.c: Move to...
	* c-c++-common/analyzer/pr96644.c: ...here.
	* gcc.dg/analyzer/pr96646.c: Move to...
	* c-c++-common/analyzer/pr96646.c: ...here.
	* gcc.dg/analyzer/pr96648.c: Move to...
	* c-c++-common/analyzer/pr96648.c: ...here.
	* gcc.dg/analyzer/pr96650-1-notrans.c: Move to...
	* c-c++-common/analyzer/pr96650-1-notrans.c: ...here.
	* gcc.dg/analyzer/pr96650-1-trans.c: Move to...
	* c-c++-common/analyzer/pr96650-1-trans.c: ...here.
	* gcc.dg/analyzer/pr96650-2-notrans.c: Move to...
	* c-c++-common/analyzer/pr96650-2-notrans.c: ...here.
	* gcc.dg/analyzer/pr96650-2-trans.c: Move to...
	* c-c++-common/analyzer/pr96650-2-trans.c: ...here.
	* gcc.dg/analyzer/pr96651-1.c: Move to...
	* c-c++-common/analyzer/pr96651-1.c: ...here.
	* gcc.dg/analyzer/pr96699.c: Move to...
	* c-c++-common/analyzer/pr96699.c: ...here.
	* gcc.dg/analyzer/pr96705.c: Move to...
	* c-c++-common/analyzer/pr96705.c: ...here.
	* gcc.dg/analyzer/pr96713.c: Move to...
	* c-c++-common/analyzer/pr96713.c: ...here.
	* gcc.dg/analyzer/pr96764.c: Move to...
	* c-c++-common/analyzer/pr96764.c: ...here.
	* gcc.dg/analyzer/pr96777.c: Move to...
	* c-c++-common/analyzer/pr96777.c: ...here.
	* gcc.dg/analyzer/pr96860-2.c: Move to...
	* c-c++-common/analyzer/pr96860-2.c: ...here.
	* gcc.dg/analyzer/pr97029.c: Move to...
	* c-c++-common/analyzer/pr97029.c: ...here.
	* gcc.dg/analyzer/pr97072.c: Move to...
	* c-c++-common/analyzer/pr97072.c: ...here.
	* gcc.dg/analyzer/pr97130.c: Move to...
	* c-c++-common/analyzer/pr97130.c: ...here.
	* gcc.dg/analyzer/pr97233.c: Move to...
	* c-c++-common/analyzer/pr97233.c: ...here.
	* gcc.dg/analyzer/pr97514.c: Move to...
	* c-c++-common/analyzer/pr97514.c: ...here.
	* gcc.dg/analyzer/pr97608.c: Move to...
	* c-c++-common/analyzer/pr97608.c: ...here.
	* gcc.dg/analyzer/pr97668.c: Move to...
	* c-c++-common/analyzer/pr97668.c: ...here.
	* gcc.dg/analyzer/pr98073.c: Move to...
	* c-c++-common/analyzer/pr98073.c: ...here.
	* gcc.dg/analyzer/pr98575-1.c: Move to...
	* c-c++-common/analyzer/pr98575-1.c: ...here.
	* gcc.dg/analyzer/pr98580-a.c: Move to...
	* c-c++-common/analyzer/pr98580-a.c: ...here.
	* gcc.dg/analyzer/pr98580-b.c: Move to...
	* c-c++-common/analyzer/pr98580-b.c: ...here.
	* gcc.dg/analyzer/pr98918.c: Move to...
	* c-c++-common/analyzer/pr98918.c: ...here.
	* gcc.dg/analyzer/pr99044-2.c: Move to...
	* c-c++-common/analyzer/pr99044-2.c: ...here.
	* gcc.dg/analyzer/pr99716-2.c: Move to...
	* c-c++-common/analyzer/pr99716-2.c: ...here.
	* gcc.dg/analyzer/pr99716-3.c: Move to...
	* c-c++-common/analyzer/pr99716-3.c: ...here.
	* gcc.dg/analyzer/pr99906.c: Move to...
	* c-c++-common/analyzer/pr99906.c: ...here.
	* gcc.dg/analyzer/pragma-1.c: Move to...
	* c-c++-common/analyzer/pragma-1.c: ...here.
	* gcc.dg/analyzer/pragma-2.c: Move to...
	* c-c++-common/analyzer/pragma-2.c: ...here.
	* gcc.dg/analyzer/refcounting-1.c: Move to...
	* c-c++-common/analyzer/refcounting-1.c: ...here.
	* gcc.dg/analyzer/rhbz1878600.c: Move to...
	* c-c++-common/analyzer/rhbz1878600.c: ...here.
	* gcc.dg/analyzer/sarif-pr107366.c: Move to...
	* c-c++-common/analyzer/sarif-pr107366.c: ...here.
	* gcc.dg/analyzer/setjmp-pr109094.c: Move to...
	* c-c++-common/analyzer/setjmp-pr109094.c: ...here.
	* gcc.dg/analyzer/sock-2.c: Move to...
	* c-c++-common/analyzer/sock-2.c: ...here.
	* gcc.dg/analyzer/stale-frame-1.c: Move to...
	* c-c++-common/analyzer/stale-frame-1.c: ...here.
	* gcc.dg/analyzer/stdarg-sentinel-1.c: Move to...
	* c-c++-common/analyzer/stdarg-sentinel-1.c: ...here.
	* gcc.dg/analyzer/stdarg-types-2.c: Move to...
	* c-c++-common/analyzer/stdarg-types-2.c: ...here.
	* gcc.dg/analyzer/stdarg-types-3.c: Move to...
	* c-c++-common/analyzer/stdarg-types-3.c: ...here.
	* gcc.dg/analyzer/stdarg-types-4.c: Move to...
	* c-c++-common/analyzer/stdarg-types-4.c: ...here.
	* gcc.dg/analyzer/strcpy-2.c: Move to...
	* c-c++-common/analyzer/strcpy-2.c: ...here.
	* gcc.dg/analyzer/strndup-1.c: Move to...
	* c-c++-common/analyzer/strndup-1.c: ...here.
	* gcc.dg/analyzer/switch-wrong-enum.c: Move to...
	* c-c++-common/analyzer/switch-wrong-enum.c: ...here.
	* gcc.dg/analyzer/symbolic-1.c: Move to...
	* c-c++-common/analyzer/symbolic-1.c: ...here.
	* gcc.dg/analyzer/symbolic-2.c: Move to...
	* c-c++-common/analyzer/symbolic-2.c: ...here.
	* gcc.dg/analyzer/symbolic-3.c: Move to...
	* c-c++-common/analyzer/symbolic-3.c: ...here.
	* gcc.dg/analyzer/symbolic-4.c: Move to...
	* c-c++-common/analyzer/symbolic-4.c: ...here.
	* gcc.dg/analyzer/symbolic-5.c: Move to...
	* c-c++-common/analyzer/symbolic-5.c: ...here.
	* gcc.dg/analyzer/symbolic-6.c: Move to...
	* c-c++-common/analyzer/symbolic-6.c: ...here.
	* gcc.dg/analyzer/symbolic-7.c: Move to...
	* c-c++-common/analyzer/symbolic-7.c: ...here.
	* gcc.dg/analyzer/symbolic-8.c: Move to...
	* c-c++-common/analyzer/symbolic-8.c: ...here.
	* gcc.dg/analyzer/symbolic-gt-1.c: Move to...
	* c-c++-common/analyzer/symbolic-gt-1.c: ...here.
	* gcc.dg/analyzer/taint-alloc-3.c: Move to...
	* c-c++-common/analyzer/taint-alloc-3.c: ...here.
	* gcc.dg/analyzer/taint-assert-BUG_ON.c: Move to...
	* c-c++-common/analyzer/taint-assert-BUG_ON.c: ...here.
	* gcc.dg/analyzer/taint-divisor-2.c: Move to...
	* c-c++-common/analyzer/taint-divisor-2.c: ...here.
	* gcc.dg/analyzer/taint-merger.c: Move to...
	* c-c++-common/analyzer/taint-merger.c: ...here.
	* gcc.dg/analyzer/taint-realloc.c: Move to...
	* c-c++-common/analyzer/taint-realloc.c: ...here.
	* gcc.dg/analyzer/uninit-1.c: Move to...
	* c-c++-common/analyzer/uninit-1.c: ...here.
	* gcc.dg/analyzer/uninit-2.c: Move to...
	* c-c++-common/analyzer/uninit-2.c: ...here.
	* gcc.dg/analyzer/uninit-3.c: Move to...
	* c-c++-common/analyzer/uninit-3.c: ...here.
	* gcc.dg/analyzer/uninit-6.c: Move to...
	* c-c++-common/analyzer/uninit-6.c: ...here.
	* gcc.dg/analyzer/uninit-6b.c: Move to...
	* c-c++-common/analyzer/uninit-6b.c: ...here.
	* gcc.dg/analyzer/uninit-8.c: Move to...
	* c-c++-common/analyzer/uninit-8.c: ...here.
	* gcc.dg/analyzer/uninit-pr104576.c: Move to...
	* c-c++-common/analyzer/uninit-pr104576.c: ...here.
	* gcc.dg/analyzer/uninit-pr106204.c: Move to...
	* c-c++-common/analyzer/uninit-pr106204.c: ...here.
	* gcc.dg/analyzer/uninit-pr108704.c: Move to...
	* c-c++-common/analyzer/uninit-pr108704.c: ...here.
	* gcc.dg/analyzer/uninit-pr108806-qemu.c: Move to...
	* c-c++-common/analyzer/uninit-pr108806-qemu.c: ...here.
	* gcc.dg/analyzer/uninit-pr108968-register.c: Move to...
	* c-c++-common/analyzer/uninit-pr108968-register.c: ...here.
	* gcc.dg/analyzer/uninit-pr94713.c: Move to...
	* c-c++-common/analyzer/uninit-pr94713.c: ...here.
	* gcc.dg/analyzer/uninit-pr94714.c: Move to...
	* c-c++-common/analyzer/uninit-pr94714.c: ...here.
	* gcc.dg/analyzer/unknown-fns-2.c: Move to...
	* c-c++-common/analyzer/unknown-fns-2.c: ...here.
	* gcc.dg/analyzer/unknown-fns-3.c: Move to...
	* c-c++-common/analyzer/unknown-fns-3.c: ...here.
	* gcc.dg/analyzer/unknown-fns-4.c: Move to...
	* c-c++-common/analyzer/unknown-fns-4.c: ...here.
	* gcc.dg/analyzer/unused-local-1.c: Move to...
	* c-c++-common/analyzer/unused-local-1.c: ...here.
	* gcc.dg/analyzer/use-after-free-2.c: Move to...
	* c-c++-common/analyzer/use-after-free-2.c: ...here.
	* gcc.dg/analyzer/use-after-free-3.c: Move to...
	* c-c++-common/analyzer/use-after-free-3.c: ...here.
	* gcc.dg/analyzer/vsnprintf-1.c: Move to...
	* c-c++-common/analyzer/vsnprintf-1.c: ...here.
	* gcc.dg/analyzer/zlib-1.c: Move to...
	* c-c++-common/analyzer/zlib-1.c: ...here.
	* gcc.dg/analyzer/zlib-2.c: Move to...
	* c-c++-common/analyzer/zlib-2.c: ...here.
	* gcc.dg/analyzer/zlib-4.c: Move to...
	* c-c++-common/analyzer/zlib-4.c: ...here.
	* gcc.dg/analyzer/zlib-5.c: Move to...
	* c-c++-common/analyzer/zlib-5.c: ...here.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2023-12-14 16:53:50 -05:00
Marek Polacek
1ae7126989 c++: fix parsing with auto(x) at block scope [PR112482]
This is sort of like r14-5514, but at block scope.  Consider

  struct A { A(int, int); };
  void
  g (int a)
  {
    A bar(auto(a), 42); // not a fn decl
  }

where we emit error: 'auto' parameter not permitted in this context
which is bogus -- bar doesn't declare a function, so the auto is OK,
but we don't know it till we've seen the second argument.  The error
comes from grokdeclarator invoked just after we've parsed the auto(a).

A possible approach seems to be to delay the auto parameter checking
and only check once we know we are indeed dealing with a function
declaration.  For tparms, we should still emit the error right away.

	PR c++/112482

gcc/cp/ChangeLog:

	* decl.cc (grokdeclarator): Do not issue the auto parameter error while
	tentatively parsing a function parameter.
	* parser.cc (cp_parser_parameter_declaration_clause): Check it here.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp23/auto-fncast15.C: New test.
2023-12-14 16:39:51 -05:00
Andrew Pinski
5fa27d9f8c middle-end: Fix up constant handling in emit_conditional_move [PR111260]
After r14-2667-gceae1400cf24f329393e96dd9720, we force a constant to a register
if it is shared with one of the other operands. The problem is used the comparison
mode for the register but that could be different from the operand mode. This
causes some issues on some targets.
To fix it, we need to make sure the mode of the comparison matches the mode
of the other operands, before we can compare the constants (CONST_INT has no
modes so compare_rtx returns true if they have the same value even if the usage
is in a different mode).

Bootstrapped and tested on both aarch64-linux-gnu and x86_64-linux.

	PR middle-end/111260

gcc/ChangeLog:

	* optabs.cc (emit_conditional_move): Change the modes to be
	equal before forcing the constant to a register.

gcc/testsuite/ChangeLog:

	* gcc.c-torture/compile/condmove-1.c: New test.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
2023-12-14 13:38:57 -08:00
Marek Polacek
8cccdc2176 c++: fix ICE with sizeof in a template [PR112869]
This test shows that we cannot clear *walk_subtrees in
cp_fold_immediate_r when we're in_immediate_context, because that
checks even e.g. sk_template_parms, and, as the comment says, affects
cp_fold_r as well.  Here we had an expression with

  min ((long int) VIEW_CONVERT_EXPR<long unsigned int>(bytecount), (long int) <<< Unknown tree: sizeof_expr
    (int) <<< error >>> >>>)

as its sub-expression, and we never evaluated that into

  min ((long int) bytecount, 4)

so the SIZEOF_EXPR leaked into the middle end.  We need to make sure
we are calling cp_fold on the SIZEOF_EXPR.

	PR c++/112869

gcc/cp/ChangeLog:

	* cp-gimplify.cc (cp_fold_immediate_r): Check cp_unevaluated_operand
	and DECL_IMMEDIATE_FUNCTION_P rather than in_immediate_context.

gcc/testsuite/ChangeLog:

	* g++.dg/template/sizeof18.C: New test.
2023-12-14 16:05:37 -05:00
Thomas Schwinge
7b15959f8e Update 'gcc.dg/vect/vect-simd-clone-*.c' GCN 'dg-warning's
Recent commit f5fc001a84
"aarch64: enable mixed-types for aarch64 simdclones" added lines to those
test cases and GCN-specific line numbers got out of sync, which had
originally gotten added in commit b73c49f6f8
"amdgcn: OpenMP SIMD routine support".

	gcc/testsuite/
	* gcc.dg/vect/vect-simd-clone-1.c: Update GCN 'dg-warning's.
	* gcc.dg/vect/vect-simd-clone-2.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-3.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-4.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-5.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-8.c: Likewise.
2023-12-14 22:03:01 +01:00
Di Zhao
8afdbcdd7a Consider fully pipelined FMA in get_reassociation_width
Add a new parameter param_fully_pipelined_fma. If it is non-zero,
reassociation considers the benefit of parallelizing FMA's
multiplication part and addition part, assuming FMUL and FMA use the
same units that can also do FADD.

With the patch and new option, there's ~2% improvement in spec2017
508.namd on AmpereOne. (The other options are "-Ofast -mcpu=ampere1
 -flto".)

	PR tree-optimization/110279

gcc/ChangeLog:

	* doc/invoke.texi: New parameter fully-pipelined-fma.
	* params.opt: New parameter fully-pipelined-fma.
	* tree-ssa-reassoc.cc (get_mult_latency_consider_fma): Return
	the latency of MULT_EXPRs that can't be hidden by the FMAs.
	(get_reassociation_width): Search for a smaller width
	considering the benefit of fully pipelined FMA.
	(rank_ops_for_fma): Return the number of MULT_EXPRs.
	(reassociate_bb): Pass the number of MULT_EXPRs to
	get_reassociation_width; avoid calling
	get_reassociation_width twice.

gcc/testsuite/ChangeLog:

	* gcc.dg/pr110279-2.c: New test.
2023-12-15 03:39:37 +08:00
Jerry DeLisle
95b7054533 fortran: Add degree based trig functions for F2023
PR fortran/112873

gcc/fortran/ChangeLog:

	* gfortran.texi: Update to reflect the changes.
	* intrinsic.cc (add_functions): Update the standard that the
	various  degree trigonometric functions have been described in.
	(gfc_check_intrinsic_standard): Add an error string for F2023.
	* intrinsic.texi: Update accordingly.
2023-12-14 10:37:11 -08:00
Marek Polacek
767e267487 c++: adjust class-deduction67.C for C++23
The test says that CTAD from inherited constructors doesn't work
before C++23 so we should use c++20_down for the error.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp1z/class-deduction67.C: Correct dg-error target.
2023-12-14 12:29:42 -05:00
Robin Dapp
e5e1999aa6 expmed: Compare unit_precision for better mode.
In extract_bit_field_1 we try to get a better vector mode before
extracting from it.  Better refers to the case when the requested target
mode does not equal the inner mode of the vector to extract from and we
have an equivalent tieable vector mode with a fitting inner mode.

On riscv this triggered an ICE (PR112999) because we would take the
detour of extracting from a mask-mode vector via a vector integer mode.
One element of that mode could be subreg-punned with TImode which, in
turn, would need to be operated on in DImode chunks.

This patch adds

    && known_eq (bitsize, GET_MODE_UNIT_PRECISION (new_mode))
    && multiple_p (bitnum, GET_MODE_UNIT_PRECISION (new_mode))

to the list of criteria for a better mode.

gcc/ChangeLog:

	PR target/112999

	* expmed.cc (extract_bit_field_1):  Ensure better mode
	has fitting unit_precision.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/autovec/pr112999.c: New test.
2023-12-14 17:51:45 +01:00
Robin Dapp
0a5170b5f5 expmed: Use GET_MODE_PRECISION and expander's output mode.
This changes the vec_extract path of extract_bit_field to use
GET_MODE_PRECISION instead of GET_MODE_BITSIZE and uses
the mode obtained from insn_data[icode].operand[0] as target mode.

Also, it adds a vec_extract<mode>bi expander for riscv that maps
to vec_extract<mode>qi.  This fixes an ICE on riscv where we did
not find a vec_extract optab and continued with the generic code
which requires 1-byte alignment that riscv mask modes do not provide.

Apart from that it adds poly_int support to riscv's vec_extract
expander and makes the RVV..BImode -> QImode expander call
emit_vec_extract in order not to duplicate code.

gcc/ChangeLog:

	PR target/112773

	* config/riscv/autovec.md (vec_extract<mode>bi): New expander
	calling vec_extract<mode>qi.
	* config/riscv/riscv-protos.h (riscv_legitimize_poly_move):
	Export.
	(emit_vec_extract): Change argument from poly_int64 to rtx.
	* config/riscv/riscv-v.cc (shuffle_extract_and_slide1up_patterns):
	Ditto.
	* config/riscv/riscv.cc (riscv_legitimize_poly_move): Export.
	(riscv_legitimize_move): Use rtx instead of poly_int64.
	* expmed.cc (store_bit_field_1): Change BITSIZE to PRECISION.
	(extract_bit_field_1): Change BITSIZE to PRECISION and use
	return mode from insn_data as target mode.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/autovec/partial/pr112773.c: New test.
2023-12-14 17:51:45 +01:00
Alex Coplan
8cfc28040e doc: Document AArch64-specific asm operand modifiers
As it stands, GCC doesn't document any public AArch64-specific operand
modifiers for use in inline asm.  This patch fixes that by documenting
an initial set of public AArch64-specific operand modifiers.

gcc/ChangeLog:

	* doc/extend.texi: Document AArch64 Operand Modifiers.
2023-12-14 16:50:30 +00:00
Jonathan Wakely
7d00a59229 libstdc++: Make __gnu_debug::vector usable in constant expressions [PR109536]
This makes constexpr std::vector (mostly) work in Debug Mode. All safe
iterator instrumentation and checking is disabled during constant
evaluation, because it requires mutex locks and calls to non-inline
functions defined in libstdc++.so. It should be OK to disable the safety
checks, because most UB should be detected during constant evaluation
anyway.

We could try to enable the full checking in constexpr, but it would mean
wrapping all the non-inline functions like _M_attach with an inline
_M_constexpr_attach that does the iterator housekeeping inline without
mutex locks when called for constant evaluation, and calls the
non-inline function at runtime. That could be done in future if we find
that we've lost safety or useful checking by disabling the safe
iterators.

There are a few test failures in C++20 mode, which I'm unable to
explain. The _Safe_iterator::operator++() member gives errors for using
non-constexpr functions during constant evaluation, even though those
functions are guarded by std::is_constant_evaluated() checks. The same
code works fine for C++23 and up.

libstdc++-v3/ChangeLog:

	PR libstdc++/109536
	* include/bits/c++config (__glibcxx_constexpr_assert): Remove
	macro.
	* include/bits/stl_algobase.h (__niter_base, __copy_move_a)
	(__copy_move_backward_a, __fill_a, __fill_n_a, __equal_aux)
	(__lexicographical_compare_aux): Add constexpr to overloads for
	debug mode iterators.
	* include/debug/helper_functions.h (__unsafe): Add constexpr.
	* include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_COND_AT): Remove
	macro, folding it into ...
	(_GLIBCXX_DEBUG_VERIFY_AT_F): ... here. Do not use
	__glibcxx_constexpr_assert.
	* include/debug/safe_base.h (_Safe_iterator_base): Add constexpr
	to some member functions. Omit attaching, detaching and checking
	operations during constant evaluation.
	* include/debug/safe_container.h (_Safe_container): Likewise.
	* include/debug/safe_iterator.h (_Safe_iterator): Likewise.
	* include/debug/safe_iterator.tcc (__niter_base, __copy_move_a)
	(__copy_move_backward_a, __fill_a, __fill_n_a, __equal_aux)
	(__lexicographical_compare_aux): Add constexpr.
	* include/debug/vector (_Safe_vector, vector): Add constexpr.
	Omit safe iterator operations during constant evaluation.
	* testsuite/23_containers/vector/bool/capacity/constexpr.cc:
	Remove dg-xfail-if for debug mode.
	* testsuite/23_containers/vector/bool/cmp_c++20.cc: Likewise.
	* testsuite/23_containers/vector/bool/cons/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/element_access/1.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/element_access/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/modifiers/assign/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/modifiers/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/modifiers/swap/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/capacity/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/cmp_c++20.cc: Likewise.
	* testsuite/23_containers/vector/cons/constexpr.cc: Likewise.
	* testsuite/23_containers/vector/data_access/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/element_access/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/modifiers/assign/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/modifiers/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/modifiers/swap/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
	Adjust dg-error line number.
2023-12-14 16:07:48 +00:00