As reported in bug 114869, the C front end wrongly creates nullptr_t
as a built-in typedef; it should only be defined in <stddef.h>. While
the type node needs a name for debug info generation, it doesn't need
to be a valid identifier; use typeof (nullptr) instead, similar to how
the C++ front end uses decltype(nullptr) for this purpose.
Bootstrapped with no regressions for x86_64-pc-linux-gnu.
PR c/114869
gcc/c/
* c-decl.cc (c_init_decl_processing): Register nullptr_type_node
as typeof (nullptr) not nullptr_t.
gcc/testsuite/
* gcc.dg/c23-nullptr-5.c: Use typeof (nullptr) not nullptr_t.
* gcc.dg/c11-nullptr-2.c, gcc.dg/c11-nullptr-3.c,
gcc.dg/c23-nullptr-7.c: New tests
This patch calculates more accurate shift costs, but makes
the costs for larger offsets no more expensive than the costs
for an unrolled shift.
gcc/
PR target/54378
* config/avr/avr.cc (avr_default_shift_costs): New static function.
(avr_rtx_costs_1) [ASHIFT, LSHIFTRT, ASHIFTRT]: Use it
to determine the default shift costs for shifts with a
constant shift offset.
Update the conditions used by the inline MINLOC/MAXLOC code generation
function to check directly the properties of MASK instead of the
variable holding its scalarization chain.
The inline implementation of MINLOC/MAXLOC in gfc_conv_intrinsic_minmaxloc
uses several conditions checking the presence of a scalarization chain for
MASK, which means that the argument is present and non-scalar. The next
patch will allow inlining MINLOC/MAXLOC with DIM and MASK, and in that
case the scalarization chain for MASK is initialized elsewhere, so the
variable usually holding it in the function is not used, and the conditions
won't work in that case.
This change updates the conditions to check directly the properties of
MASK so that they work even if the scalarization chain variable is not used.
gcc/fortran/ChangeLog:
* trans-intrinsic.cc (gfc_conv_intrinsic_minmaxloc): Use
conditionals based on the MASK expression rather than on its
scalarization chains.
Only __atomic_* builtins are meant to work on arbitrary _BitInt types
(if not supported in hw we emit a CAS loop which uses __atomic_load_*
in that case), the compatibility __sync_* builtins work only if there
is a corresponding normal integral type (for _BitInt on 32-bit ARM
we'll need to limit even that to no padding, because the padding bits
are well defined there and the hw or libatomic __sync_* APIs don't
guarantee that), IMHO people shouldn't mix very old APIs with very
new ones and I don't see a replacement for the __atomic_load_*.
For size > 16 that is how it already correctly behaves,
in the hunk shown in the patch it is immediately followed by
if (fetch && !orig_format && TREE_CODE (type) == BITINT_TYPE)
return -1;
which returns -1 for the __atomic_* builtins (i.e. !orig_format),
which causes caller to use atomic_bitint_fetch_using_cas_loop,
and otherwise does diagnostic and return 0 (which causes caller
to punt). But for size == 16 if TImode isn't suipported (i.e.
mostly 32-bit arches), we return (correctly) -1 if !orig_format,
so again force atomic_bitint_fetch_using_cas_loop on those arches
for e.g. _BitInt(115), but for orig_format the function returns
16 as if it could do 16 byte __sync_*_and_* (which it can't
because TImode isn't supported; for 16 byte it can only do
(perhaps using libatomic) normal compare and swap). So we need
to error and return 0, rather than return 16.
The following patch ensures that.
2024-11-19 Jakub Jelinek <jakub@redhat.com>
PR c/117641
* c-common.cc (sync_resolve_size): For size == 16 fetch of
BITINT_TYPE if TImode isn't supported scalar mode diagnose
and return 0 if orig_format instead of returning 16.
* gcc.dg/bitint-115.c: New test.
Apparently the middle-end/expansion can only handle {L,R}ROTATE_EXPR
on types with mode precision, or large/huge BITINT_TYPE.
So, the following patch uses the rotate exprs only in those cases
where it can be handled, and emits code with shifts/ior otherwise.
As types without mode precision including small/medium BITINT_TYPE
have unlikely power of two precision and TRUNC_MOD_EXPR is on many targets
quite expensive, I chose to expand e.g. __builtin_stdc_rotate_left (arg1,
arg2) as
((tem = arg1, count = arg2 % prec)
? ((tem << count) | (tem >> (prec - count))) : tem)
rather than
(((tem = arg1) << (count = arg2 % prec))
| (tem >> (-count % prec))
(where the assignments are really save_exprs, so no UB), because
I think another TRUNC_MOD_EXPR would be more costly in most cases
when the shift count is non-constant (and when it is constant,
it folds to 2 shifts by constant and ior in either case).
2024-11-19 Jakub Jelinek <jakub@redhat.com>
PR c/117456
gcc/c/
* c-parser.cc (c_parser_postfix_expression): Use LROTATE_EXPR
or RROTATE_EXPR only if type_has_mode_precision_p or if arg1
has BITINT_TYPE with precision larger than MAX_FIXED_MODE_SIZE.
Otherwise build BIT_IOR_EXPR of LSHIFT_EXPR and RSHIFT_EXPR
and wrap it into a COND_EXPR depending on if arg2 is 0 or not.
* c-fold.cc (c_fully_fold_internal): Check for suppression of
-Wshift-count-overflow warning.
gcc/testsuite/
* gcc.dg/builtin-stdc-rotate-4.c: New test.
Two different declarations of tagged types in the same translation unit
are incompatible in C before C23 and without tag also in C23. Still,
two such types can be compatible to the same tagged type in a different
translation unit, but this means that pointers can alias.
typedef struct { int i; } s1;
typedef struct { int i; } s2;
int f(s1 *p1, s2 *p2)
{
p1->i = 2;
p2->i = 3; // p2->i can alias p1->i
return p1->i;
}
We need to assign the same TYPE_CANONICAL to both types. This patch fixes
this for C23 and types without tag by also forming equivalence classes for
such types based on their structure as already done for types with tag.
Because this change exposes checking errors related to flexible array
members (cf. PR113688), one test is restricted to C17 for now.
PR c/117490
gcc/c/ChangeLog:
* c-typeck.cc (tagged_types_tu_compatible): Form equivalence
classed for tagless types in C23.
gcc/testsuite/ChangeLog:
* gcc.dg/gnu23-tag-alias-4.c: Adapt test.
* gcc.dg/gnu23-tag-alias-7.c: Adapt test.
* gcc.dg/guality/zero-length-array.c: Restrict to c17.
* gcc.dg/pr117490.c: New test.
The following testcase was failing with the warning: old-style function
definition ever since the c standard version has been updated. Update
the function definition.
gcc/testsuite/ChangeLog:
* gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul-ice-3.c: Update
function definition.
Signed-off-by: Edwin Lu <ewlu@rivosinc.com>
This patch adds 3-operand alternatives to the shift insns for
offsets that are one less than the bit-size of the mode.
For example, ashrhi3 can support "r,r,C15" without overhead.
Apart from that, the asm out functions for the shifts now use
avr_asm_len to print assembly and to track the isnsns' lengths.
gcc/
* config/avr/avr.md (ashlhi3, *ashlhi3_const_split, *ashlhi3_const)
(*ashlpsi3_split, *ashlpsi3)
(ashlsi3, *ashlsi3_const_split, *ashlsi3_const)
(ashrhi3, *ashrhi3, ashrpsi3, *ashrpsi3, ashrsi3, *ashrsi3)
(*ashrhi3_const_split, *ashrhi3_const, *ashrsi3_const_split, *ashrsi3_const):
Add constraint alternatives that allow a 3-operand operation when the
shift offset is one less than the mode's bitsize.
* config/avr/avr.cc (ashl<mode>3_out, ashr<mode>3_out)
(lshr<mode>3_out): Use avr_asm_len for asm_out and length tracking.
(ashrhi3_out, ashlhi3_out): Support the new "r,r,C15" alternatives.
(ashrsi3_out, ashlsi3_out): Support the new "r,r,C31" alternatives.
(avr_out_ashrpsi3, avr_out_ashlpsi3): Support the new "r,r,C23" alternatives.
gcc/testsuite/
* gcc.target/avr/torture/test-shift.h: New file.
* gcc.target/avr/torture/shift-l-u32.c: New test.
* gcc.target/avr/torture/shift-r-u32.c: New test.
* gcc.target/avr/torture/shift-r-i32.c: New test.
* gcc.target/avr/torture/shift-l-u24.c: New test.
* gcc.target/avr/torture/shift-r-u24.c: New test.
* gcc.target/avr/torture/shift-r-i24.c: New test.
* gcc.target/avr/torture/shift-l-u16.c: New test.
* gcc.target/avr/torture/shift-r-u16.c: New test.
* gcc.target/avr/torture/shift-r-i16.c: New test.
* gcc.target/avr/torture/shift-l-u8.c: New test.
* gcc.target/avr/torture/shift-r-u8.c: New test.
* gcc.target/avr/torture/shift-r-i8.c: New test.
Now that the C default is C23, we can use bool in avr.h
(which is still used in libgcc via tm.h).
bool is a keyword in C23, so no stdbool.h is required in libgcc.
gcc/
* config/avr/avr.h (avr_args.has_stack_args): Be a bool.
(struct machine_function) <is_naked, is_noblock, is_OS_task,
is_OS_task, sibcall_fails, attributes_checked_p, is_no_gccisr,
use_L__stack_usage, gasisr.yes, gasisr.maybe>: Same.
* config/avr/avr-protos.h (reg_unused_after)
(test_hard_reg_class, jump_over_one_insn_p): Use bool as
return type.
* config/avr/avr.cc (reg_unused_after)
(test_hard_reg_class, jump_over_one_insn_p): Same.
(cfun->machine->attributes_checked_p, cum->has_stack_args)
(cfun->machine->use_L__stack_usage, cfun->machine->gasisr.yes)
(cfun->machine->sibcall_fails): Use like a bool.
When configuring GCC for RV32EC with:
./configure \
--target=riscv32-none-elf \
--with-multilib-generator="rv32ec-ilp32e--" \
--with-abi=ilp32e \
--with-arch=rv32ec
Then the build fails because division is erroneously left enabled:
cc1: error: '-mdiv' requires '-march' to subsume the 'M' extension
-fself-test: 8412281 pass(es) in 0.647173 seconds
Fix by disabling MASK_DIV if multiplication is not available and -mdiv
option has not been explicitly passed.
Tested the above RV32EC-only toolchain using the GNU simulator:
=== gcc Summary ===
# of expected passes 211635
# of unexpected failures 3004
# of expected failures 1061
# of unresolved testcases 5651
# of unsupported tests 18958
gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_override_options_internal):
Set division option's default to disabled if multiplication
is not available.
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
This has been failing since r5-2883-g8cb65b3725f0c3 which caused the
memset to be optimized out. Add an unoptimizable reference to the local
variable to keep it.
* gcc.target/m68k/20100512-1.c (doTest1, doTest2): Add asm that
references foo.
Enable the generation of inline code for MINLOC/MAXLOC when argument
ARRAY is of integral type and has rank > 1, DIM is a constant, and MASK is
scalar (only absent MASK or rank 1 ARRAY were inlined before).
Scalar masks are implemented with a wrapping condition around the code
one would generate if MASK wasn't present, so they are easy to support
once inline code without MASK is working.
With this change, there are both expressions evaluated inside the nested
loop (ARRAY, and in the future MASK if non-scalar) and expressions evaluated
outside of it (MASK if scalar). For both one has to advance the
scalarization chain passed as argument SE to gfc_conv_intrinsic_minmaxloc as
they are evaluated, but for expressions evaluated from within the nested
loop one has to advance additionally the nested scalarization chain of the
reduction loop. This is normally handled transparently through the
inheritance that is defined when initializing gfc_se structs, but there has
to be some variable to inherit from, and there is a single one, SE. This
variable is kept as base for out of nested loop expressions only (i.e. for
scalar MASK), and this change introduces a new variable to hold the current
advance of the nested loop scalarization chain and serve as inheritance base
to evaluate nested loop expressions (just ARRAY for now, additionally
non-scalar MASK later).
PR fortran/90608
gcc/fortran/ChangeLog:
* trans-intrinsic.cc (gfc_inline_intrinsic_function_p): Return TRUE
if MASK is scalar.
(walk_inline_intrinsic_minmaxloc): Append to the scalarization chain
a scalar element for MASK if it's present.
(gfc_conv_intrinsic_minmaxloc): Use a local gfc_se struct to serve
as base for all the expressions evaluated in the nested loop. To
evaluate MASK when there is a nested loop, enable usage of the
scalarizer and set the original passed in SE argument as current
scalarization chain element to use. And use the nested loop from
the scalarizer instead of the local loop in that case.
gcc/testsuite/ChangeLog:
* gfortran.dg/maxloc_bounds_8.f90: Accept the error message
generated by the scalarizer in case the MAXLOC intrinsic call is
implemented through inline code.
* gfortran.dg/minmaxloc_20.f90: New test.
Standard JSON doesn't have comments, and it seems this file needs to be
conforming, not the common JSON-with-comments dialect.
libstdc++-v3/ChangeLog:
* src/c++23/libstdc++.modules.json.in: Remove C++ comment.
If a template uses a deprecated function, we should warn there and not also
whenever the template is instantiated. I implement this by suppressing
the warning at the location; then to make this also work with modules, I
need to make sure to set TREE_NO_WARNING so that the warning spec for this
location gets recorded.
And then I noticed that has_warning_spec was broken such that if it
returned true than get_nowarn_spec would always return null.
gcc/cp/ChangeLog:
* decl2.cc (cp_handle_deprecated_or_unavailable): Avoid redundant
warning.
* call.cc (build_over_call): Set TREE_NO_WARNING for calls
to deprecated functions.
* semantics.cc (finish_call_expr): Propagate TREE_NO_WARNING.
gcc/ChangeLog:
* warning-control.cc (has_warning_spec): Fix handling of
get_no_warning_bit.
gcc/testsuite/ChangeLog:
* g++.dg/warn/deprecated-21.C: New test.
* g++.dg/modules/warn-spec-2_a.C: New test.
* g++.dg/modules/warn-spec-2_b.C: New test.
This fixes a build failure on hosts where HARD_REG_SET is not a scalar.
The issue was introduced with the patch for PR84211 in r15-5415.
PR target/84211
gcc/
* config/avr/avr-passes.cc (memento_t::apply_insn1): Don't
use operator &= on memento_t.known but on memento_t itself.
The last patch did the right thing to the wrong parameter, which caused a build
failure in Newlib. This patch fixes it.
gcc/ChangeLog:
PR target/117657
* config/gcn/gcn-valu.md (mask_gather_load<mode><vnsi>): Fix bug in
maskload else patch.
This patch allows using an offset of up to 16MB in "symbol + offset",
instead of 1MB limit that was used previously.
gcc/ChangeLog:
* config/aarch64/aarch64.cc (aarch64_load_symref_appropriately):
Update.
LOCAL_LABEL_PREFIX has been changed to help the assembly
compiler recognize local labels. Emitting locals has been
replaced with the .lcomm directive to declare uninitialized
data without defining an exact section. Functions and objects
were missing declarations. Binutils was not able to distinguish
static from external, or an object from a function.
mingw_pe_declare_object_type has been added to have type
information for relocation on AArch64, which is not the case
for ix86.
This fix relies on changes in binutils.
aarch64: Relocation fixes and LTO
https://sourceware.org/pipermail/binutils/2024-August/136481.html
gcc/ChangeLog:
* config/aarch64/aarch64-coff.h (LOCAL_LABEL_PREFIX):
Use "." as the local label prefix.
(ASM_OUTPUT_ALIGNED_LOCAL): Remove.
(ASM_OUTPUT_LOCAL): New.
* config/aarch64/cygming.h (ASM_OUTPUT_EXTERNAL_LIBCALL):
Update.
(ASM_DECLARE_OBJECT_NAME): New.
(ASM_DECLARE_FUNCTION_NAME): New.
* config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME):
Update.
(ASM_OUTPUT_EXTERNAL_LIBCALL): Update.
* config/mingw/winnt.cc (mingw_pe_declare_function_type):
Rename into ...
(mingw_pe_declare_type): ... this.
(i386_pe_start_function): Update.
* config/mingw/winnt.h (mingw_pe_declare_function_type):
Rename into ...
(mingw_pe_declare_type): ... this.
Symbols using GOT are not supported by the aarch64-w64-mingw32
target and should be excluded from the code models.
gcc/ChangeLog:
* config/aarch64/aarch64.cc (aarch64_classify_symbol):
Disable GOT for PECOFF target.
The patch resolves compilation issues for the C++ language. Previous
patch series contributed to C++ as well, however, C++ could not be
tested until we got a C++ compiler and could build at least a "Hello
World" C++ program, and in reality, more than that.
Another issue has been fixed in the libstdc++ patch.
https://gcc.gnu.org/pipermail/libstdc++/2024-September/059472.html
gcc/ChangeLog:
* config.gcc: Add missing dependencies.
This patch enables DWARF and allows compilation with debugging
information by using "gcc -g". The unwind info is disabled for
the moment and will be revisited after SEH implementation for
the target.
gcc/ChangeLog:
* config/aarch64/aarch64.cc (TARGET_ASM_UNALIGNED_HI_OP):
Enable DWARF.
(TARGET_ASM_UNALIGNED_SI_OP): Likewise.
(TARGET_ASM_UNALIGNED_DI_OP): Likewise.
* config/aarch64/cygming.h (DWARF2_DEBUGGING_INFO): Likewise.
(PREFERRED_DEBUGGING_TYPE): Likewise.
(DWARF2_UNWIND_INFO): Likewise.
(ASM_OUTPUT_DWARF_OFFSET): Likewise.
The patch adds support for weak references. The original MinGW
implementation targets ix86, which handles weak symbols differently
compared to AArch64. In AArch64, the weak symbols are replaced by
other symbols which reference the original weak symbols, and the
compiler does not track the original symbol names.
This patch resolves this and declares the original symbols.
Here is an explanation of why this change is needed and what the
difference is between x86_64-w64-mingw32 and aarch64-w64-mingw32.
The way x86_64 calls a weak function:
call weak_fn2
GCC emits the call and creates the required definitions at the end
of the assembly:
.weak weak_fn2
.def weak_fn2; .scl 2; .type 32; .endef
This is different from aarch64:
weak_fn2 will be legitimized and replaced by .refptr.weak_fn2,
and there will be no other references to weak_fn2 in the code.
adrp x0, .refptr.weak_fn2
add x0, x0, :lo12:.refptr.weak_fn2
ldr x0, [x0]
blr x0
GCC does not emit the required definitions at the end of the assembly,
and weak_fn2 is tracked only by the mingw stub sybmol.
Without the change, the stub definition will emit:
.section .rdata$.refptr.weak_fn2, "dr"
.globl .refptr.weak_fn2
.linkonce discard
.refptr.weak_fn2:
.quad weak_fn2
which is not enough. This fix will emit the required definitions:
.weak weak_fn2
.def weak_fn2; .scl 2; .type 32; .endef
.section .rdata$.refptr.weak_fn2, "dr"
.globl .refptr.weak_fn2
.linkonce discard
.refptr.weak_fn2:
.quad weak_fn2
This is the first commit in the third patch series with SMALL code
model fixes, optimization fixes, LTO, and minimal C++ enablement.
Prepared, refactored and validated by
Radek Barton <radek.barton@microsoft.com> and
Evgeny Karpov <evgeny.karpov@microsoft.com>
Contributor: Zac Walker <zacwalker@microsoft.com>
gcc/ChangeLog:
* config/aarch64/cygming.h (SUB_TARGET_RECORD_STUB): Request
declaration for weak symbols.
(PE_COFF_LEGITIMIZE_EXTERN_DECL): Legitimize external
declaration for weak symbols.
* config/i386/cygming.h (SUB_TARGET_RECORD_STUB): Update
declarations in ix86 with the same functionality.
(PE_COFF_LEGITIMIZE_EXTERN_DECL): Likewise.
* config/mingw/winnt-dll.cc (legitimize_pe_coff_symbol):
Support declaration for weak symbols if requested.
* config/mingw/winnt.cc (struct stub_list): Likewise.
(mingw_pe_record_stub): Likewise.
(mingw_pe_file_end): Likewise.
* config/mingw/winnt.h (mingw_pe_record_stub): Likewise.
The case and if expressions are exactly the conditional expressions.
gcc/ada/ChangeLog:
* exp_util.ads (Within_Case_Or_If_Expression): Rename into...
(Within_Conditional_Expression): ...this.
* exp_util.adb (Within_Case_Or_If_Expression): Rename into...
(Within_Conditional_Expression): ...this.
* checks.adb (Install_Null_Excluding_Check): Adjust for renaming.
The (minimal) expansion is now done by Build_Array_Aggr_Code in all cases,
which means that it must prevent the aggregate from being re-analyzed as
the RHS of the assignment, which may trigger a bogus warning and lead to
another useless rewriting.
The change also inlines Build_Assignment_With_Temporary that is now called
only once by Build_Array_Aggr_Code for this processing.
gcc/ada/ChangeLog:
* exp_aggr.adb (Build_Assignment_With_Temporary): Inline into...
(Build_Array_Aggr_Code): ...this. Set the Analyzed flag on the
relocated aggregate if it is to be handled by the back-end.
The strategy to expand aggregates present as initialization expressions in
object declarations, originally with a subsequent address clause given for
the object and later with aspects whose resolution needs to be delayed up
to the freeze point, has been to block their resolution, so as to block
their expansion, during the processing of the declarations, lest they be
nonstatic and expanded in place and therefore generate assignments to the
object before its freeze point, which is forbidden. Instead a temporary
is created at the declaration point and the aggregates are assigned to it,
and finally the temporary is copied into the object at the freeze point.
Of course this general strategy cannot be applied to limited types because
the copy operation is forbidden for them, so instead aggregates of limited
types are resolved but have their expansion delayed, before being eventually
expanded through Convert_Aggr_In_Object_Decl, which uses the mechanism based
on Initialization_Statements to insert them at the freeze point.
After the series of cleanups, all the aggregates that are initialization
expressions in object declarations and get expanded in place, go through the
Convert_Aggr_In_Object_Decl mechanism, exactly like those of limited type
with address clause/aspects have done historically. This means that we no
longer need to block the resolution of those of nonlimited type with address
clause/aspects.
gcc/ada/ChangeLog:
* exp_ch3.adb: Remove clauses for Expander.
(Expand_N_Object_Declaration): Remove special processing for delayed
aggregates of limited types as initialization expressions.
* freeze.adb (Warn_Overlay): Bail out if No_Initialization is set on
the declaration node of the entity.
* sem_ch3.adb (Delayed_Aspect_Present): Delete.
(Expand_N_Object_Declaration): Do not block the resolution of the
initialization expression that is an aggregate when the object has
an address clause or delayed aspects.
Enable generation of inline code for the MINLOC and MAXLOC intrinsics,
if the ARRAY argument is of integral type and of rank > 1 (only the rank 1
case was previously inlined), the DIM argument is a constant value and there
is no MASK argument.
The restriction to integral ARRAY and absent MASK limits the scope of
the change to the cases where we generate single loop inline code.
This change uses the existing scalarizer suport for reductions, that is
arrays used in scalarization loops, where each element uses a nested
scalarization loop to calculate its value. The nested loop (and
respectively the nested scalarization chain) is created while walking the
MINLOC/MAXLOC expression, it's set up automatically at the time the outer
loop is set up, and gfc_conv_intrinsic_minmaxloc is changed to use it as a
replacement for the local loop variable (respectively ARRAY scalarization
chain) used in the non-reduction case (i.e. when DIM is absent).
PR fortran/90608
gcc/fortran/ChangeLog:
* trans-intrinsic.cc (gfc_inline_intrinsic_function_p): Return true
if DIM is constant, ARRAY is integral and MASK is absent.
(walk_inline_intrinsic_minmaxloc): If DIM is present, walk ARRAY and
move the dimension corresponding to DIM to a nested chain, keeping
the rest of the dimensions as the returned scalarization chain.
(gfc_conv_intrinsic_minmaxloc): When inside the scalarization loops,
proceed with inline code generation If DIM is present. If DIM is
present, skip result array creation and final initialization from
individual result local variables. If DIM is present and ARRAY has
rank greater than 1, use the nested loop initialized by the
scalarizer instead of the local one, use 1 as scalarization
dimension, and evaluate ARRAY using the inherited scalarization
chain instead of creating a local one by walking the expression.
gcc/testsuite/ChangeLog:
* gfortran.dg/maxloc_bounds_1.f90: Also accept the error message
generated by the scalarizer in case the function call is implemented
through inline code.
* gfortran.dg/maxloc_bounds_2.f90: Likewise.
* gfortran.dg/maxloc_bounds_3.f90: Likewise.
* gfortran.dg/minmaxloc_19.f90: New test.
Add the tests covering the cases for which the following patches will
implement inline expansion of MINLOC and MAXLOC. Those are cases where the
DIM argument is a constant value, and the ARRAY argument has rank greater
than 1.
PR fortran/90608
gcc/testsuite/ChangeLog:
* gfortran.dg/ieee/maxloc_nan_2.f90: New test.
* gfortran.dg/ieee/minloc_nan_2.f90: New test.
* gfortran.dg/maxloc_with_dim_1.f90: New test.
* gfortran.dg/maxloc_with_dim_and_mask_1.f90: New test.
* gfortran.dg/minloc_with_dim_1.f90: New test.
* gfortran.dg/minloc_with_dim_and_mask_1.f90: New test.
Instead of loading the permutation indices and using vmslt in order to
determine which elements belong to which source vector we can compute
the proper mask at compile time. That way we can emit vlm instead of
vle + vmslt.
gcc/ChangeLog:
* config/riscv/riscv-v.cc (shuffle_merge_patterns): Load VLS
indices directly.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/vls/merge-1.c: Check for vlm and
no vmsleu etc.
* gcc.target/riscv/rvv/autovec/vls/merge-2.c: Ditto.
* gcc.target/riscv/rvv/autovec/vls/merge-3.c: Ditto.
* gcc.target/riscv/rvv/autovec/vls/merge-4.c: Ditto.
* gcc.target/riscv/rvv/autovec/vls/merge-5.c: Ditto.
* gcc.target/riscv/rvv/autovec/vls/merge-6.c: Ditto.
In an attempt to reduce compile time, rtl-ssa computes the cost
of existing instructions lazily rather than eagerly. However,
this means that it might need to calculate the cost of an existing
instruction while a change group is already in progress for the
instruction. rtl_ssa::insn_info::calculate_cost therefore temporarily
undoes any in-progress changes in order to get back the original pattern
and insn code.
rtl-ssa's main use of insn costs is in rtl_ssa::changes_are_worthwhile,
which calculates the cost of a change involving an arbitrary number
of instructions. Summing up the original cost of N instructions
while those N instructions have in-progress changes could lead to
O(N*N) rtl changes, since each lazy calculation might have to
temporarily undo the changes to all N instructions.
We can avoid that by converting the current temporarily_undo_changes/
redo_changes pair into an RAII class and extending it to allow
nested uses. rtl_ssa::changes_are_worthwhile can then undo the
in-progress changes once, before computing the original cost of all
the instructions.
gcc/
PR rtl-optimization/117297
* recog.h (temporarily_undo_changes, redo_changes): Delete in
favor of...
(undo_recog_changes): ...this new RAII class.
* fwprop.cc (should_replace_address): Update accordingly.
(fwprop_propagation::check_mem): Likewise.
(try_fwprop_subst_note): Likewise.
(try_fwprop_subst_pattern): Likewise.
* rtl-ssa/insns.cc (insn_info::calculate_cost): Likewise.
* rtl-ssa/changes.cc (rtl_ssa::changes_are_worthwhile): Temporarily
undo all in-progress changes while computing the cost of the original
sequence.
* recog.cc (temporarily_undone_changes): Replace with...
(undo_recog_changes::s_num_changes): ...this static member variable.
(validate_change_1): Update check accordingly.
(confirm_change_group): Likewise.
(num_validated_changes): Likewise.
(temporarily_undo_changes): Replace with...
(undo_recog_changes::undo_recog_changes): ...this constructor.
(redo_changes): Replace with...
(undo_recog_changes::~undo_recog_changes): ...this destructor.
extract_bit_field can't handle extraction of non-mode precision
from complex mode operands which don't live in memory, e.g. gen_lowpart
crashes on those.
The following patch in that case defers the extract_bit_field call
until op0 is forced into memory.
2024-11-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/117458
* expr.cc (expand_expr_real_1) <case VIEW_CONVERT_EXPR>: Don't
call extract_bit_field if op0 has complex mode and isn't a MEM,
instead first force op0 into memory and then call extract_bit_field.
* gcc.dg/bitint-116.c: New test.
The following patch handles PAREN_EXPR in bitint lowering, and handles it
as an optimization barrier, so that temporary arithmetics from PAREN_EXPR
isn't mixed with temporary arithmetics from outside of the PAREN_EXPR.
2024-11-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/117459
* gimple-lower-bitint.cc (bitint_large_huge::handle_stmt,
bitint_large_huge::lower_stmt): Handle PAREN_EXPR.
* gcc.dg/torture/bitint-74.c: New test.
r15-4601 added match.pd simplification of some TRUNC_DIV_EXPR expressions
into EXACT_DIV_EXPR, so bitintlower can now encounter even those.
From bitint lowering POV the fact that the division will be exact
doesn't matter, we still need to call at runtime the __divmodbitint4
API and it wouldn't simplify there anything to know it is exact if
we duplicated that, so the following patch lowers EXACT_DIV_EXPR exactly
as TRUNC_DIV_EXPR.
I think we don't need to backport this unless something introduces
EXACT_DIV_EXPR on BITINT_TYPEd expressions on the 14 branch as well.
2024-11-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/117571
* gimple-lower-bitint.cc (bitint_large_huge::lower_muldiv_stmt,
bitint_large_huge::lower_stmt, stmt_needs_operand_addr,
build_bitint_stmt_ssa_conflicts, gimple_lower_bitint): Handle
EXACT_DIV_EXPR like TRUNC_DIV_EXPR.
* gcc.dg/bitint-114.c: New test.
pow-to-ldexp.c checks for calls to __builtin_ldexpf and __builtin_ldexpl, which
will only be performed when the compiler knows the target has a C99 libm
available.
Modified the test to add a C99 runtime requirement.
This fixes the failure on arm-eabi targets for this test case.
Signed-off-by: Soumya AR <soumyaa@nvidia.com>
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pow-to-ldexp.c: Require c99_runtime.
After we create a isolated folder to hold all SAT scalar test,
we have fully control of what optimization options passing to
the testcase. Thus, it is better to remove the unnecessary
work around for flto option, as well as the -O3 option for
each cases. The riscv.exp will pass sorts of different optimization
options for each case.
The below test suites are passed for this patch.
* The rv64gcv fully regression test.
It is test only patch and obvious up to a point, will commit it
directly if no comments in next 48H.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/sat/sat_u_trunc-1-u16.c: Remove flto
dg-skip workaround and -O3 option.
* gcc.target/riscv/sat/sat_u_trunc-1-u32.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-1-u64.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-1-u8.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-2-u16.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-2-u32.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-2-u64.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-2-u8.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-3-u16.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-3-u32.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-3-u64.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-3-u8.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-4-u16.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-4-u32.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-4-u64.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-4-u8.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-5-u16.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-5-u32.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-5-u64.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-5-u8.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-6-u16.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-6-u32.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-6-u64.c: Ditto.
* gcc.target/riscv/sat/sat_u_trunc-6-u8.c: Ditto.
* gcc.target/riscv/sat/scalar_sat_unary.h: New test.
Signed-off-by: Pan Li <pan2.li@intel.com>
If a CodeView struct, class, or union has as a member an anonymous
struct, class, or union, this gets flattened. The sub-struct's members
will appear as if they were part of their parent.
For this, we move part of get_type_num_struct into a new function
add_to_fieldlist, which also handles creating an LF_INDEX overflow item
if an LF_FIELDLIST grows too large. This is because add_struct_member
now calls itself recursively, and so needs to handle overflows itself.
gcc/
* dwarf2codeview.cc (add_to_fieldlist): New function.
(add_struct_member): Call recursively to flatten structs, and call
add_to_fieldlist.
(add_struct_static_member): Call add_to_fieldlist.
(add_struct_function): Call add_to_fieldlist.
(add_struct_inheritance): Call add_to_fieldlist.
(add_struct_nested_type): Call add_to_fieldlist.
(get_type_num_struct): Move code to add_to_fieldlist, and move
responsibility for this to subfunctions.
If the DIE for a struct, class, or union contains a nested type, add a
LF_NESTTYPE entry to its field list recording this.
Plus if we use a nested type, make sure that its parent also gets
defined. This may entail adding a forward definition and creating a
deferred type, so we need to call flush_deferred_types in
codeview_debug_finish as well.
gcc/
* dwarf2codeview.cc (enum cv_leaf_type): Add LF_NESTTYPE.
(struct codeview_subtype): Add lf_nesttype to union.
(flush_deferred_types): Add declaration.
(write_lf_fieldlist): Handle LF_NESTTYPE.
(codeview_debug_finish): Call flush_deferred_types.
(add_struct_nested_type): New function.
(get_type_num_struct): Call add_struct_nested_type, and if nested make
that parent is added.
As reported in bug 112556, GCC wrongly rejects conversion of null
pointer constants with bool or enum type to pointers in
convert_for_assignment (assignment, initialization, argument passing,
return). Fix the code there to allow BOOLEAN_TYPE and ENUMERAL_TYPE;
it already allowed INTEGER_TYPE and BITINT_TYPE.
This bug (together with -std=gnu23 meaning false has type bool rather
than int) has in turn resulted in people thinking they need to fix
code using false as a null pointer constant for C23 compatibility.
While such a usage is certainly questionable, it has nothing to do
with C23 compatibility and the right place for warnings about such
usage is -Wzero-as-null-pointer-constant. I think it would be
appropriate to extend -Wzero-as-null-pointer-constant to cover
BOOLEAN_TYPE, ENUMERAL_TYPE and BITINT_TYPE (in all the various
contexts in which that option generates warnings), though this patch
doesn't do anything about that option.
Bootstrapped with no regressions for x86-64-pc-linux-gnu.
PR c/112556
gcc/c/
* c-typeck.cc (convert_for_assignment): Allow conversion of
ENUMERAL_TYPE and BOOLEAN_TYPE null pointer constants to pointers.
gcc/testsuite/
* gcc.dg/c11-null-pointer-constant-1.c,
gcc.dg/c23-null-pointer-constant-1.c: New tests.
This patch adds a new "sarif-replay" command-line tool for
viewing .sarif files. It uses libdiagnostics to "replay"
any diagnostics found in the .sarif files in text form as if
they were GCC diagnostics.
contrib/ChangeLog:
PR other/96032
* regenerate-sarif-spec-index.py: New file.
gcc/ChangeLog:
PR other/96032
* Makefile.in (lang_checks): If libdiagnostics is enabled, add
check-sarif-replay.
(SARIF_REPLAY_OBJS): New.
(ALL_HOST_OBJS): If libdiagnostics is enabled, add
$(SARIF_REPLAY_OBJS).
(sarif-replay): New.
(install-libdiagnostics): Add sarif-replay to deps, and install
it.
* configure: Regenerate.
* configure.ac (check_languages): If libdiagnostics is enabled,
add check-sarif-replay.
(LIBDIAGNOSTICS): If libdiagnostics is enabled, add sarif-replay.
* doc/install.texi (--enable-libdiagnostics): Note that it also
enables sarif-replay.
* libsarifreplay.cc: New file.
* libsarifreplay.h: New file.
* sarif-replay.cc: New file.
* sarif-spec-urls.def: New file.
gcc/testsuite/ChangeLog:
PR other/96032
* lib/gcc-dg.exp (gcc-dg-test-1): Add "replay-sarif".
* lib/sarif-replay-dg.exp: New file.
* lib/sarif-replay.exp: New file.
* sarif-replay.dg/2.1.0-invalid/3.1-not-an-object.sarif: New test.
* sarif-replay.dg/2.1.0-invalid/3.11.11-malformed-placeholder.sarif:
New test.
* sarif-replay.dg/2.1.0-invalid/3.11.11-missing-arguments-for-placeholders.sarif:
New test.
* sarif-replay.dg/2.1.0-invalid/3.11.11-not-enough-arguments-for-placeholders.sarif:
New test.
* sarif-replay.dg/2.1.0-invalid/3.13.2-no-version.sarif: New test.
* sarif-replay.dg/2.1.0-invalid/3.13.2-version-not-a-string.sarif:
New test.
* sarif-replay.dg/2.1.0-invalid/3.13.4-bad-runs.sarif: New test.
* sarif-replay.dg/2.1.0-invalid/3.13.4-no-runs.sarif: New test.
* sarif-replay.dg/2.1.0-invalid/3.13.4-non-object-in-runs.sarif:
New test.
* sarif-replay.dg/2.1.0-invalid/3.27.10-bad-level.sarif: New test.
* sarif-replay.dg/2.1.0-unhandled/3.27.10-none-level.sarif: New test.
* sarif-replay.dg/2.1.0-valid/error-with-note.sarif: New test.
* sarif-replay.dg/2.1.0-valid/escaped-braces.sarif: New test.
* sarif-replay.dg/2.1.0-valid/null-runs.sarif: New test.
* sarif-replay.dg/2.1.0-valid/signal-1.c.sarif: New test.
* sarif-replay.dg/2.1.0-valid/spec-example-1.sarif: New test.
* sarif-replay.dg/2.1.0-valid/spec-example-2.sarif: New test.
* sarif-replay.dg/2.1.0-valid/spec-example-3.sarif: New test.
* sarif-replay.dg/2.1.0-valid/spec-example-4.sarif: New test.
* sarif-replay.dg/2.1.0-valid/tutorial-example.sarif: New test.
* sarif-replay.dg/dg.exp: New script.
* sarif-replay.dg/malformed-json/array-missing-comma.sarif: New test.
* sarif-replay.dg/malformed-json/array-with-trailing-comma.sarif:
New test.
* sarif-replay.dg/malformed-json/bad-token.sarif: New test.
* sarif-replay.dg/malformed-json/object-missing-comma.sarif: New test.
* sarif-replay.dg/malformed-json/object-with-trailing-comma.sarif:
New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
This patch implements JSON parsing support.
It's based on the parsing parts of the patch I posted here:
https://gcc.gnu.org/legacy-ml/gcc-patches/2017-08/msg00417.html
with the parsing moved to a separate source file and header, heavily
rewritten to capture source location information for JSON values, and
to capture errors via a result template.
I also added optional support for C and C++ style comments, which is
extremely useful in DejaGnu tests.
gcc/ChangeLog:
* Makefile.in (OBJS-libcommon): Add json-parsing.o.
* json-parsing.cc: New file.
* json-parsing.h: New file.
* json.cc (selftest::assert_print_eq): Remove "static".
* json.h (json::array::begin): New.
(json::array::end): New.
(json::array::length): New.
(json::array::get): New.
(is_a_helper <json::value *>::test): New.
(is_a_helper <const json::value *>::test): New.
(is_a_helper <json::object *>::test): New.
(is_a_helper <const json::object *>::test): New.
(is_a_helper <json::array *>::test): New.
(is_a_helper <const json::array *>::test): New.
(is_a_helper <json::float_number *>::test): New.
(is_a_helper <const json::float_number *>::test): New.
(is_a_helper <json::integer_number *>::test): New.
(is_a_helper <const json::integer_number *>::test): New.
(is_a_helper <json::string *>::test): New.
(is_a_helper <const json::string *>::test): New.
(selftest::assert_print_eq): New decl.
* selftest-run-tests.cc (selftest::run_tests): Call
selftest::json_parser_cc_tests.
* selftest.h (selftest::json_parser_cc_tests): New decl.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
This patch adds a new libdiagnostics shared library available as
part of the GCC build via --enable-libdiagnostics when
configuring GCC.
It combines the following patches from:
https://gcc.gnu.org/pipermail/gcc-patches/2024-November/668632.html
[PATCH 1/8] libdiagnostics v4: header
[PATCH 2/8] libdiagnostics v4: implementation
[PATCH 3/8] libdiagnostics: add API docs
[PATCH 4/8] libdiagnostics v4: add C++ wrapper API
[PATCH 6/8] libdiagnostics v4: test suite
ChangeLog:
* configure.ac (--enable-libdiagnostics): New.
* configure: Regenerate.
gcc/ChangeLog:
* configure.ac (check_languages): Add check-libdiagnostics.
(--enable-libdiagnostics): New.
* configure: Regenerate.
* Makefile.in (enable_libdiagnostics): New.
(lang_checks): If libdiagnostics is enabled, add
check-libdiagnostics.
(ALL_HOST_OBJS): If libdiagnostics is enabled, add
$(libdiagnostics_OBJS).
(start.encap): Add LIBDIAGNOSTICS.
(libdiagnostics_OBJS): New.
(LIBDIAGNOSTICS_VERSION_NUM): New, adapted from code in
jit/Make-lang.in.
(LIBDIAGNOSTICS_MINOR_NUM): Likewise.
(LIBDIAGNOSTICS_RELEASE_NUM): Likewise.
(LIBDIAGNOSTICS_FILENAME): Likewise.
(LIBDIAGNOSTICS_IMPORT_LIB): Likewise.
(libdiagnostics): Likewise.
(LIBDIAGNOSTICS_AGE): Likewise.
(LIBDIAGNOSTICS_BASENAME): Likewise.
(LIBDIAGNOSTICS_SONAME): Likewise.
(LIBDIAGNOSTICS_LINKER_NAME): Likewise.
(LIBDIAGNOSTICS_COMMA): Likewise.
(LIBDIAGNOSTICS_VERSION_SCRIPT_OPTION): Likewise.
(LIBDIAGNOSTICS_SONAME_OPTION): Likewise.
(LIBDIAGNOSTICS_SONAME_SYMLINK): Likewise.
(LIBDIAGNOSTICS_LINKER_NAME_SYMLINK): Likewise.
(LIBDIAGNOSTICS_FILENAME): Likewise.
(libdiagnostics.serial): Likewise.
(LIBDIAGNOSTICS_EXTRA_OPTS): Likewise.
(install): If libdiagnostics is enabled, add
install-libdiagnostics.
(libdiagnostics.install-headers): New.
(libdiagnostics.install-common): New, adapted from code in
jit/Make-lang.in.
(install-libdiagnostics): New.
* diagnostic-format-text.h
(diagnostic_text_output_format::get_location_text): Make public.
* doc/install.texi (--enable-libdiagnostics): New.
* doc/libdiagnostics/Makefile: New file.
* doc/libdiagnostics/conf.py: New file.
* doc/libdiagnostics/index.rst: New file.
* doc/libdiagnostics/make.bat: New file.
* doc/libdiagnostics/topics/diagnostic-manager.rst: New file.
* doc/libdiagnostics/topics/diagnostics.rst: New file.
* doc/libdiagnostics/topics/execution-paths.rst: New file.
* doc/libdiagnostics/topics/fix-it-hints.rst: New file.
* doc/libdiagnostics/topics/index.rst: New file.
* doc/libdiagnostics/topics/logical-locations.rst: New file.
* doc/libdiagnostics/topics/message-formatting.rst: New file.
* doc/libdiagnostics/topics/metadata.rst: New file.
* doc/libdiagnostics/topics/physical-locations.rst: New file.
* doc/libdiagnostics/topics/retrofitting.rst: New file.
* doc/libdiagnostics/topics/sarif.rst: New file.
* doc/libdiagnostics/topics/text-output.rst: New file.
* doc/libdiagnostics/topics/ux.rst: New file.
* doc/libdiagnostics/tutorial/01-hello-world.rst: New file.
* doc/libdiagnostics/tutorial/02-physical-locations.rst: New file.
* doc/libdiagnostics/tutorial/03-logical-locations.rst: New file.
* doc/libdiagnostics/tutorial/04-notes.rst: New file.
* doc/libdiagnostics/tutorial/05-warnings.rst: New file.
* doc/libdiagnostics/tutorial/06-fix-it-hints.rst: New file.
* doc/libdiagnostics/tutorial/07-execution-paths.rst: New file.
* doc/libdiagnostics/tutorial/index.rst: New file.
* libdiagnostics++.h: New file.
* libdiagnostics.cc: New file.
* libdiagnostics.h: New file.
* libdiagnostics.map: New file.
gcc/testsuite/ChangeLog:
* libdiagnostics.dg/libdiagnostics.exp: New, adapted from jit.exp.
* libdiagnostics.dg/sarif.py: New.
* libdiagnostics.dg/test-dump.c: New test.
* libdiagnostics.dg/test-error-c.py: New test.
* libdiagnostics.dg/test-error-with-note-c.py: New test.
* libdiagnostics.dg/test-error-with-note.c: New test.
* libdiagnostics.dg/test-error-with-note.cc: New test.
* libdiagnostics.dg/test-error.c: New test.
* libdiagnostics.dg/test-error.cc: New test.
* libdiagnostics.dg/test-example-1.c: New test.
* libdiagnostics.dg/test-fix-it-hint-c.py: New test.
* libdiagnostics.dg/test-fix-it-hint.c: New test.
* libdiagnostics.dg/test-fix-it-hint.cc: New test.
* libdiagnostics.dg/test-helpers++.h: New test.
* libdiagnostics.dg/test-helpers.h: New test.
* libdiagnostics.dg/test-labelled-ranges.c: New test.
* libdiagnostics.dg/test-labelled-ranges.cc: New test.
* libdiagnostics.dg/test-labelled-ranges.py: New test.
* libdiagnostics.dg/test-logical-location-c.py: New test.
* libdiagnostics.dg/test-logical-location.c: New test.
* libdiagnostics.dg/test-metadata-c.py: New test.
* libdiagnostics.dg/test-metadata.c: New test.
* libdiagnostics.dg/test-multiple-lines-c.py: New test.
* libdiagnostics.dg/test-multiple-lines.c: New test.
* libdiagnostics.dg/test-no-column-c.py: New test.
* libdiagnostics.dg/test-no-column.c: New test.
* libdiagnostics.dg/test-no-diagnostics-c.py: New test.
* libdiagnostics.dg/test-no-diagnostics.c: New test.
* libdiagnostics.dg/test-note-with-fix-it-hint-c.py: New test.
* libdiagnostics.dg/test-note-with-fix-it-hint.c: New test.
* libdiagnostics.dg/test-text-sink-options.c: New test.
* libdiagnostics.dg/test-warning-c.py: New test.
* libdiagnostics.dg/test-warning-with-path-c.py: New test.
* libdiagnostics.dg/test-warning-with-path.c: New test.
* libdiagnostics.dg/test-warning.c: New test.
* libdiagnostics.dg/test-write-sarif-to-file-c.py: New test.
* libdiagnostics.dg/test-write-sarif-to-file.c: New test.
* libdiagnostics.dg/test-write-text-to-file.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
I need to use this cleanup logic for the testsuite for libdiagnostics
where it's too awkward to directly use gcc-dg.exp itself.
No functional change intended.
gcc/testsuite/ChangeLog:
* lib/dg-test-cleanup.exp: New file, from material moved from
lib/gcc-dg.exp.
* lib/gcc-dg.exp: Add load_lib of dg-test-cleanup.exp.
(cleanup-after-saved-dg-test): Move to lib/dg-test-cleanup.exp.
(dg-test): Likewise for override.
(initialize_prune_notes): Likewise.
libatomic/ChangeLog:
* testsuite/lib/libatomic.exp: Add
"load_gcc_lib dg-test-cleanup.exp".
libgomp/ChangeLog:
* testsuite/lib/libgomp.exp: Add
"load_gcc_lib dg-test-cleanup.exp".
libitm/ChangeLog:
* testsuite/lib/libitm.exp: Add
"load_gcc_lib dg-test-cleanup.exp".
libphobos/ChangeLog:
* testsuite/lib/libphobos-dg.exp: Add
"load_gcc_lib dg-test-cleanup.exp".
libstdc++-v3/ChangeLog:
* testsuite/lib/libstdc++.exp: Add
"load_gcc_lib dg-test-cleanup.exp".
libvtv/ChangeLog:
* testsuite/lib/libvtv.exp: Add
"load_gcc_lib dg-test-cleanup.exp".
Signed-off-by: David Malcolm <dmalcolm@redhat.com>