aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-09-15c++: conversion locationJason Merrill2-1/+5
It seems more useful for a conversion to have the location of the source expression rather than the enclosing expression, such as a call that might convert multiple arguments in different ways. As a result, in srcloc17.C the recorded location of 'e' when copy-initialized became that of the initializer rather than the variable, since the semantic was to convert the initializer (at its location) and then initialize the variable from the resulting prvalue. If we instead direct-initialize the variable, the location of the constructor call is that of the variable. gcc/cp/ChangeLog: * call.cc (convert_like_internal) [ck_user]: Use iloc_sentinel. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/srcloc17.C: Adjust initialization.
2024-09-15libstdc++: Adjust std::span::iterator to be ADL-proofJonathan Wakely2-2/+7
Because std::span<Incomplete> can be useful, it makes sense to define std::span<Incomplete>::iterator such that Incomplete is not an associated class, and so the compiler won't attempt to complete it when doing ADL for span iterators (including during the definition of std::span<Incomplete>::const_iterator which checks that iterator satisfies std::input_or_output_iterator). We can't make this change for std::vector<Incomplete> because it would change the mangled name of std::vector<Incomplete>::iterator which would affect the mangled names of templates and functions written by users. We can do the same thing for std::basic_stacktrace<Alloc> just so that Alloc is not an associated class. This is probably less beneficial, as Alloc can't be incomplete, and using SomeAllocator<Incomplete> as the allocator parameter doesn't seem useful. But simply making the stacktrace iterator not use Alloc for ADL lookup seems worthwhile. This is doable because std::stacktrace is part of C++23 so its ABI isn't considered stable yet. libstdc++-v3/ChangeLog: * include/std/span (span::__iter_tag): Declare nested type. (span::iterator): Use __iter_tag as second template argument. * include/std/stacktrace (basic_stacktrace::iterator): Use _Impl as second template argument.
2024-09-15libstdc++: Enable most of <chrono> for freestandingJonathan Wakely7-13/+109
This makes durations, time points and calendrical types available for freestanding. The clocks and time zone utilities are disabled for freestanding, as they require functions in the hosted lib. Add support for a new macro _GLIBCXX_NO_FREESTANDING_CHRONO which can be used to explicitly disable <chrono> for freestanding. libstdc++-v3/ChangeLog: * doc/xml/manual/using.xml (_GLIBCXX_NO_FREESTANDING_CHRONO): Document macro. * doc/html/*: Regenerate. * include/bits/chrono.h [_GLIBCXX_NO_FREESTANDING_CHRONO]: Only include <bits/require_hosted.h> when this macro is defined. [_GLIBCXX_HOSTED]: Only define clocks for hosted. * include/bits/version.def (chrono_udls): Remove hosted=yes. * include/bits/version.h: Regenerate. * include/std/chrono [_GLIBCXX_HOSTED]: Only define clocks and time zone utilities for hosted. * testsuite/std/time/freestanding.cc: New test.
2024-09-15libstdc++: Add assertion for valid facet type argumentsJonathan Wakely2-0/+10
LWG 436 confirmed that const-qualified types are valid arguments for Facet template parameters, but volatile-qualified types are not. Add an assertion to locale::combine to check for valid types. libstdc++-v3/ChangeLog: * include/bits/locale_classes.h (__is_facet): New helper. * include/bits/locale_classes.tcc (locale::combine): Check that _Facet type is valid.
2024-09-15libstdc++: Make PSTL algorithms accept C++20 iterators [PR110512]Jonathan Wakely2-5/+47
This is a step towards implementing the C++23 change P2408R5, "Ranges iterators as inputs to non-Ranges algorithms". C++20 random access iterators which do not meet the Cpp17RandomAccessIterator requirements will now be recognized by the PSTL algorithms. As noted by Patrick, P2408R5 only relaxes the requirements for non-mutating algorithms, but this relaxes them for all parallel algorithms. I believe that's OK. A call with a type which previously didn't compile at all was undefined, so we're allowed to start accepting those calls if the type satisfies std::random_access_iterator. However, this also causes a change in behaviour for calls with arguments which satisfy std::random_access_iterator and meet the Cpp17ForwardIterator requirements but not the Cpp17RandomAccessIterator requirements. The algorithms will dispatch to a different implementation now. I believe that's also OK. The algorithms should give the same results whether acting on forward iterators or random access iterators, just more efficiently for the latter. Additionally, we can optimize the C++17 implementation by using std::__and_, and use std::__remove_cvref_t and std::__iter_category_t for readability. This diverges from the upstream PSTL, but since libc++ is no longer using that upstream (so we're the only consumer of this code) I think it's reasonable to use libstdc++ extensions in localized places like this. Rebasing this small header on upstream should not be difficult. libstdc++-v3/ChangeLog: PR libstdc++/110512 * include/pstl/execution_impl.h (__are_random_access_iterators): Recognize C++20 random access iterators, and use more efficient implementations. * testsuite/25_algorithms/pstl/110512.cc: New test.
2024-09-15c++, coroutines: Fix handling of bool await_suspend() [PR115905].Iain Sandoe2-105/+174
As noted in the PR the action of the existing implementation was to treat a false value from await_suspend () as equivalent to "do not suspend". Actually it needs to be the equivalent of "resume" - and we need to restart the dispatcher - since the await_suspend() body could have already resumed the coroutine. See also https://github.com/cplusplus/CWG/issues/601 (NAD) for more discussion. Since we need to amend the await expansion and the actor build, take the opportunity to clean up and modernise the code there. Note that we need to make the jump back to the dispatcher without any scope exit cleanups (so we have to use the .CO_SUSPN IFN to do this). PR c++/115905 gcc/cp/ChangeLog: * coroutines.cc (struct coro_aw_data): Add a member for the restart dispatch label. (expand_one_await_expression): Rework to modernise and to handle the boolean await_suspend() case. (build_actor_fn): Rework the dispatcher and allow for a jump back to the dispatcher. gcc/testsuite/ChangeLog: * g++.dg/coroutines/torture/pr115905.C: New test. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2024-09-14phi-opt: Improve heuristics for factoring out with constant (again) [PR116699]Andrew Pinski2-0/+32
The heuristics for factoring out with a constant checks that the assignment statement is the last statement of the basic block but sometimes there is a predicate or a nop statement after the assignment. Rejecting this case does not make sense since both predicates and nop statements are removed and don't contribute any instructions. So we should skip over them when checking if the assignment statement was the last statement in the basic block. phi-opt-factor-1.c's f0 is such an example where it should catch it at phiopt1 (before predicates are removed) and should happen in a similar way as f1 (which uses a temporary variable rather than return). Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/116699 gcc/ChangeLog: * tree-ssa-phiopt.cc (factor_out_conditional_operation): Skip over nop/predicates for seeing the assignment is the last statement. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/phi-opt-factor-1.c: New test. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
2024-09-14vect: release defs of removed statementAndrew Pinski1-0/+1
While trying to add use of simple_dce_from_worklist to the vectorizer so we don't need to run a full blown DCE pass after the vectorizer, there was a crash noticed due to a ssa name which has a stmt without a bb. This was due to not calling release_defs after the call to gsi_remove. Note the code to remove zero use statements should be able to remove once the use of simple_dce_from_worklist has been added. But in the meantime, fixing this bug will also improve memory usage and a few other things which look through all ssa names. gcc/ChangeLog: * tree-vect-loop.cc (optimize_mask_stores): Call release_defs after the call to gsi_remove with last argument of true. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
2024-09-14Mark the copy/move constructor/operator= of auto_bitmap as deleteAndrew Pinski1-4/+4
Since we are written in C++11, these should be marked as delete rather than just private. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * bitmap.h (class auto_bitmap): Mark copy/move constructor/operator= as deleted. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
2024-09-15Daily bump.GCC Administrator5-1/+60
2024-09-14testsuite; Fix execute/pr52286.c for 16bitAndrew Pinski1-1/+1
The code path which was added for 16bit had a broken inline-asm which would only assign maybe half of the registers for the `long` type to 0. Adding L to the input operand of the inline-asm fixes the issue by now assigning the full 32bit value of the input register that would match up with the output register. Fixes r0-115223-gb0408f13d4b317 which added the 16bit code path to fix the testcase for 16bit. Pushed as obvious. PR testsuite/116716 gcc/testsuite/ChangeLog: * gcc.c-torture/execute/pr52286.c: Fix inline-asm for 16bit case.
2024-09-14c++: avoid init_priority warning in system headerJason Merrill1-1/+2
We don't want a warning about a reserved init_priority in a system header even with -Wsystem-headers. gcc/cp/ChangeLog: * tree.cc (handle_init_priority_attribute): Check in_system_header_at.
2024-09-14c++: Don't mix timevar_start and auto_cond_timevar for TV_NAME_LOOKUP [PR116681]Simon Martin2-2/+21
We currently ICE upon the following testcase when using -ftime-report === cut here === template < int> using __conditional_t = int; template < typename _Iter > concept random_access_iterator = requires { new _Iter; }; template < typename _Iterator > struct reverse_iterator { using iterator_concept = __conditional_t< random_access_iterator< _Iterator>>; }; void RemoveBottom() { int iter; for (reverse_iterator< int > iter;;) ; } === cut here === The problem is that qualified_namespace_lookup does a plain start() of the TV_NAME_LOOKUP timer (that asserts that the timer is not already started). However this timer has already been cond_start()'d in the call stack - by pushdecl - so the assert fails. This patch simply ensures that we always conditionally start this timer (which is done in all other places that use it). PR c++/116681 gcc/cp/ChangeLog: * name-lookup.cc (qualified_namespace_lookup): Use an auto_cond_timer instead of using timevar_start and timevar_stop. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-pr116681.C: New test.
2024-09-14AVR: Use rtx code copysign.Georg-Johann Lay1-6/+11
gcc/ * config/avr/avr.md (UNSPEC_COPYSIGN): Remove define_enum. (copysignsf3): Use copysign instead of UNSPEC_COPYSIGN. Allow const_double for operand 2.
2024-09-14libstdc++: Tweak localized formatting for floating-point typesJonathan Wakely1-7/+10
libstdc++-v3/ChangeLog: * include/std/format (__formatter_fp::_M_localize): Add comments and micro-optimize string copy.
2024-09-14libstdc++: Refactor loops in std::__platform_semaphoreJonathan Wakely3-38/+40
Refactor the loops to all use the same form, and to not need explicit 'break' or 'continue' jumps. This also avoids a -Wunused-variable warning with -Wsystem-headers. Also fix a bug for absolute timeouts specified with a time that isn't implicitly convertible to __clock_t::time_point, e.g. one with a higher resolution such as picoseconds. Use chrono::ceil to round up to the next time point representable by the clock. libstdc++-v3/ChangeLog: * include/bits/semaphore_base.h (__platform_semaphore): Refactor loops to all use similar forms. (__platform_semaphore::_M_try_acquire_until): Use chrono::ceil to explicitly convert to __clock_t::time_point. * testsuite/30_threads/semaphore/try_acquire_for.cc: Check that using a very high resolution timeout compiles. * testsuite/30_threads/semaphore/platform_try_acquire_for.cc: New test.
2024-09-14testsuite: adjust pragma-diag-17.c diagnosticsJason Merrill1-1/+1
The Linaro CI runs of this testcase pointed out that I need to check for DFP support, as well. gcc/testsuite/ChangeLog: * c-c++-common/pragma-diag-17.c: Handle !dfp targets.
2024-09-14c++: Fix g++.dg/ext/sve-sizeless-1.C regressionJonathan Wakely1-1/+1
This aarch64-*-* test needs an update for the diagnostic I changed in r15-3614-g9fe57e4879de93. gcc/testsuite/ChangeLog: * g++.dg/ext/sve-sizeless-1.C: Adjust dg-error string.
2024-09-13testsuite: a few more hostedlib adjustmentsAlexandre Oliva3-0/+4
This adjusts some recently-added tests that won't compile without a hostedlib libstdc++, missed in the patch that just went in, and also an old test that I'd missed because it also failed in my baseline. for gcc/testsuite/ChangeLog * g++.dg/coroutines/pr108620.C: Skip if !hostedlib because of unavailable headers. * g++.dg/other/profile1.C: Likewise. * g++.dg/ext/pragma-unroll-lambda-lto.C: Skip if !hostedlib because of unavailable declarations.
2024-09-14Daily bump.GCC Administrator8-1/+161
2024-09-13AVR: Detect more skip opportunities.Georg-Johann Lay1-2/+5
The transparent call insns like "*parityhi2.libgcc" output a single [R]CALL instruction that can be skipped by the skip instructions. Such insns have attribute "type" of "xcall" and can therefore be easily recognized. Same applies when "adjust_len" is "call". gcc/ * config/avr/avr.cc (avr_2word_insn_p): Return true for transparent calls: When insn attribute "type" is "xcall" or when "adjust_len" is "call".
2024-09-13Fix factor_out_conditional_operation heuristics for constantsAndrew Pinski1-6/+8
While working on a different patch, I noticed the heuristics were not doing the right thing if there was statements before the NOP/PREDICTs. (LABELS don't have other statements before them). This fixes that oversight which was added in r15-3334-gceda727dafba6e. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * tree-ssa-phiopt.cc (factor_out_conditional_operation): Instead of just ignorning a NOP/PREDICT, skip over them before checking the heuristics. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
2024-09-13AVR: Use avr_byte instead of simplify_gen_subreg (QImode, ...Georg-Johann Lay1-62/+47
There are many places where asm output functions have to look at the constituent bytes and words of the operands. The function of choice was simplify_gen_subreg (mode, ...) which can be replaced by the more handy avr_byte (rtx, byte_num). gcc/ * config/avr/avr.cc: Use functions like avr_byte, avr_word, avr_[u]int8/16 if convenient. (avr_uint16): New function.
2024-09-13c++: -fimplicit-constexpr diagnostic improvement [PR116696]Jason Merrill3-1/+16
PR116696 expressed surprise that explicit 'constexpr' was needed on one function; this was because the function isn't 'inline', and -fimplicit-constexpr doesn't try to promote non-inline functions. Let's be more helpful in that situation, and also help trace through functions that were promoted. PR c++/116696 gcc/cp/ChangeLog: * constexpr.cc (explain_invalid_constexpr_fn): When -fimplicit-constexpr, also explain inline functions, and point out non-inline functions. gcc/testsuite/ChangeLog: * g++.dg/DRs/dr2478.C: Prune extra diagnostic. * g++.dg/ext/fimplicit-constexpr1.C: New test.
2024-09-13Fortran: Fixes to OpenMP 'interop' directive parsing supportTobias Burnus10-162/+314
Handle lists as argument to 'fr' and 'attr'; fix parsing corner cases. Additionally, 'fr' values are now internally stored as integer, permitting the diagnoses (warning) for values not defined in the OpenMP additional definitions document. PR fortran/116661 gcc/fortran/ChangeLog: * gfortran.h (gfc_omp_namelist): Rename 'init' members for clarity. * match.cc (gfc_free_omp_namelist): Handle renaming. * dump-parse-tree.cc (show_omp_namelist): Update for new format and features. * openmp.cc (gfc_match_omp_prefer_type): Parse list to 'fr' and 'attr'; store 'fr' values as integer. (gfc_match_omp_init): Rename variable names. gcc/ChangeLog: * omp-api.h (omp_get_fr_id_from_name, omp_get_name_from_fr_id): New prototypes. * omp-general.cc (omp_get_fr_id_from_name, omp_get_name_from_fr_id): New. include/ChangeLog: * gomp-constants.h (GOMP_INTEROP_IFR_LAST, GOMP_INTEROP_IFR_SEPARATOR, GOMP_INTEROP_IFR_NONE): New. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/interop-1.f90: Extend, update dg-*. * gfortran.dg/gomp/interop-2.f90: Update dg-error. * gfortran.dg/gomp/interop-3.f90: Add dg-warning.
2024-09-13gcn/mkoffload.cc: Use #embed for including the generated ELF fileTobias Burnus1-67/+12
gcc/ChangeLog: * config/gcn/mkoffload.cc (read_file): Remove. (process_asm): Do not add '#include' to generated C file. (process_obj): Generate C file that uses #embed and use __SIZE_TYPE__ and __UINTPTR_TYPE__ instead the #include-defined size_t and uintptr. (main): Update call to it; remove no longer needed file I/O.
2024-09-13c++: Don't emit deprecated/unavailable attribute diagnostics when creating ↵Jakub Jelinek2-0/+22
cdtor thunks [PR116678] Another spot where we mark_used a function (in this case ctor or dtor) even when it is just artificially used inside of thunks (emitted on mingw with -Os for the testcase). 2024-09-13 Jakub Jelinek <jakub@redhat.com> PR c++/116678 * optimize.cc: Include decl.h. (maybe_thunk_body): Temporarily change deprecated_state to UNAVAILABLE_DEPRECATED_SUPPRESS. * g++.dg/warn/deprecated-20.C: New test.
2024-09-13libcpp: Fix up UB in finish_embedJakub Jelinek1-1/+1
Jonathan reported on IRC that certain unnamed proprietary static analyzer is unhappy about the new finish_embed function and it is actually right. On a testcase like: #embed __FILE__ limit (0) if_empty (0) params->if_empty.count is 1, limit is 0, so count is 0 (we need just a single token and one fits into pfile->directive_result). Because count is 0, we don't allocate toks, so it stays NULL, and then in 1301 if (prefix->count) 1302 { 1303 *tok = *prefix->base_run.base; 1304 tok = toks; 1305 tokenrun *cur_run = &prefix->base_run; 1306 while (cur_run) 1307 { 1308 size_t cnt = (cur_run->next ? cur_run->limit 1309 : prefix->cur_token) - cur_run->base; 1310 cpp_token *t = cur_run->base; 1311 if (cur_run == &prefix->base_run) 1312 { 1313 t++; 1314 cnt--; 1315 } 1316 memcpy (tok, t, cnt * sizeof (cpp_token)); 1317 tok += cnt; 1318 cur_run = cur_run->next; 1319 } 1320 } the *tok = *prefix->base_run.base; assignment will copy the only token. cur_run is still non-NULL, cnt will be initially 1 and then decremented to 0, but we invoke UB because we do memcpy (NULL, cur_run->base + 1, 0 * sizeof (cpp_token)); and then the loop stops because cur_run->next must be NULL. As we don't really copy anything, toks can be anything non-NULL, so the following patch fixes that by initializing toks also to &pfile->directive_result (just something known to be non-NULL). This should be harmless even for the #embed __FILE__ limit (1) case (no non-empty prefix/suffix) where toks isn't allocated either, but in that case prefix->count will be 0 and in the 1321 for (size_t i = 0; i < limit; ++i) 1322 { 1323 tok->src_loc = params->loc; 1324 tok->type = CPP_NUMBER; 1325 tok->flags = NO_EXPAND; 1326 if (i == 0) 1327 tok->flags |= PREV_WHITE; 1328 tok->val.str.text = s; 1329 tok->val.str.len = sprintf ((char *) s, "%d", buffer[i]); 1330 s += tok->val.str.len + 1; 1331 if (tok == &pfile->directive_result) 1332 tok = toks; 1333 else 1334 tok++; 1335 if (i < limit - 1) 1336 { 1337 tok->src_loc = params->loc; 1338 tok->type = CPP_COMMA; 1339 tok->flags = NO_EXPAND; 1340 tok++; 1341 } 1342 } loop limit will be 1, so tok is initially &pfile->directive_result, that is stilled in, then tok = toks; (previously setting tok to NULL, now to &pfile->directive_result again) and because 0 < 1 - 1 is false, nothing further will happen and the loop will finish (and as params->suffix.count will be 0, nothing further will use tok). 2024-09-13 Jakub Jelinek <jakub@redhat.com> * files.cc (finish_embed): Initialize toks to tok rather than NULL.
2024-09-13s390: Fix TF to FPRX2 conversion [PR115860]Stefan Schulze Frielinghaus6-40/+72
Currently subregs originating from *tf_to_fprx2_0 and *tf_to_fprx2_1 survive register allocation. This in turn leads to wrong register renaming. Keeping the current approach would mean we need two insns for *tf_to_fprx2_0 and *tf_to_fprx2_1, respectively. Something along the lines (define_insn "*tf_to_fprx2_0" [(set (subreg:DF (match_operand:FPRX2 0 "nonimmediate_operand" "=f") 0) (unspec:DF [(match_operand:TF 1 "general_operand" "v")] UNSPEC_TF_TO_FPRX2_0))] "TARGET_VXE" "#") (define_insn "*tf_to_fprx2_0" [(set (match_operand:DF 0 "nonimmediate_operand" "=f") (unspec:DF [(match_operand:TF 1 "general_operand" "v")] UNSPEC_TF_TO_FPRX2_0))] "TARGET_VXE" "vpdi\t%v0,%v1,%v0,1 [(set_attr "op_type" "VRR")]) and similar for *tf_to_fprx2_1. Note, pre register allocation operand 0 has mode FPRX2 and afterwards DF once subregs have been eliminated. Since we always copy a whole vector register into a floating-point register pair, another way to fix this is to merge *tf_to_fprx2_0 and *tf_to_fprx2_1 into a single insn which means we don't have to use subregs at all. The downside of this is that the assembler template contains two instructions, now. The upside is that we don't have to come up with some artificial insn before RA which might be more readable/maintainable. That is implemented by this patch. In commit r11-4872-ge627cda5686592, the output operand specifier %V was introduced which is used in tf_to_fprx2 only, now. Instead of coming up with its counterpart %F for floating-point registers, which would also only be used in tf_to_fprx2, I print the operands directly. This renders %V unused which is why it is removed by this patch. gcc/ChangeLog: PR target/115860 * config/s390/s390.cc (print_operand): Remove operand specifier %V. * config/s390/s390.md (UNSPEC_TF_TO_FPRX2): New. * config/s390/vector.md (*tf_to_fprx2_0): Remove. (*tf_to_fprx2_1): Remove. (tf_to_fprx2): New. gcc/testsuite/ChangeLog: * gcc.target/s390/vector/long-double-asm-abi.c: Adapt scan-assembler directive. * gcc.target/s390/vector/long-double-to-i64.c: Adapt scan-assembler directive. * gcc.target/s390/pr115860-1.c: New test.
2024-09-13s390: Fix AQ and AR constraintsStefan Schulze Frielinghaus1-0/+12
Ensure for AQ and AR constraints that the resulting displacement after adding any positive offset less than the size of the object being referenced is still valid. gcc/ChangeLog: * config/s390/s390.cc (s390_mem_constraint): Check displacement for AQ and AR constraints.
2024-09-13libstdc++: Do not use use memmove for 1-element ranges [PR108846,PR116471]Giuseppe D'Angelo6-29/+209
This commit ports the fixes already applied by r13-6372-g822a11a1e642e0 to the range-based versions of copy/move algorithms. When doing so, a further bug (PR116471) was discovered in the implementation of the range-based algorithms: although the algorithms are already constrained by the indirectly_copyable/movable concepts, there was a failing static_assert in the memmove path. This static_assert checked that iterator's value type was assignable by using the is_copy_assignable (move) type traits. However, this is a problem, because the traits are too strict when checking for constness; a type like struct S { S& operator=(S &) = default; }; is trivially copyable (and thus could benefit of the memmove path), but it does not satisfy is_copy_assignable because the operator takes by non-const reference. Now, the reason for the check to be there is because a type with a deleted assignment operator like struct E { E& operator=(const E&) = delete; }; is still trivially copyable, but not assignable. We don't want algorithms like std::ranges::copy to compile because they end up selecting the memmove path, "ignoring" the fact that E isn't even copy assignable. But the static_assert isn't needed here any longer: as noted before, the ranges algorithms already have the appropriate constraints; and even if they didn't, there's now a non-discarded codepath to deal with ranges of length 1 where there is an explicit assignment operation. Therefore, this commit removes it. (In fact, r13-6372-g822a11a1e642e0 removed the same static_assert from the non-ranges algorithms.) libstdc++-v3/ChangeLog: PR libstdc++/108846 PR libstdc++/116471 * include/bits/ranges_algobase.h (__assign_one): New helper function. (__copy_or_move): Remove a spurious static_assert; use __assign_one for memcpyable ranges of length 1. (__copy_or_move_backward): Likewise. * testsuite/25_algorithms/copy/108846.cc: Extend to range-based algorithms, and cover both memcpyable and non-memcpyable cases. * testsuite/25_algorithms/copy_backward/108846.cc: Likewise. * testsuite/25_algorithms/copy_n/108846.cc: Likewise. * testsuite/25_algorithms/move/108846.cc: Likewise. * testsuite/25_algorithms/move_backward/108846.cc: Likewise. Signed-off-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-09-13AVR: Rework avr_out_compare.Georg-Johann Lay1-57/+118
16-bit comparisons like R25:24 == -1 are currently performed like cpi R24, -1 cpc R25, R24 Similar is possible for wider modes. ADIW can be used like SBIW when the compare code is EQ or NE because such comparisons are just about (propagating) the Z flag. The patch adds helper functions like avr_byte() that may be useful in other functions than avr_out_compare(). Use new convenient helper functions that may be useful in other output functions, too. For example, with the patch R24:SI == -1 (unused after) adiw r26,1 sbci r25,hi8(-1) sbci r24,lo8(-1) R18:SI == -1 cpi r18,-1 cpc r19,r18 cpc r20,r18 cpc r21,r18 Without the patch, we had: R24:SI == -1 (unused after) cpi r24,-1 sbci r25,-1 sbci r26,-1 sbci r27,-1 R18:SI == -1 cpi r18,-1 ldi r24,-1 cpc r19,r24 cpc r20,r24 cpc r21,r24 gcc/ * config/avr/avr.cc (avr_chunk, avr_byte, avr_word) (avr_int8, avr_uint8, avr_int16): New helper functions. (avr_out_compare): Overhaul.
2024-09-13AVR: Tweak 32-bit EQ and NE comparisons.Georg-Johann Lay1-0/+25
The order in which multi-byte EQ and NE comparisons are performing the byte comparisons does not matter, and there are situations where using SBIW on the high word can save an instruction. gcc/ * config/avr/avr.cc (avr_out_compare): Tweak 32-bit EQ and NE comparisons that can use SBIW for the hi16 part.
2024-09-13AVR: avr.cc - Reorder functions to require less forward decls.Georg-Johann Lay1-407/+394
gcc/ * config/avr/avr.cc (avr_init_machine_status): Move code to... (avr_option_override) <init_machine_status>: ...lambda. (avr_insn_has_reg_unused_note_p): Move up. (_reg_unused_after, reg_unused_after): Move up. (output_reload_in_const): Move up. (avr_c_mode_for_floating_type): Move down.
2024-09-13Match: Remove unnecessary types_match for case 1 of signed SAT_ADDPan Li1-2/+1
Given all commutative binary operators requires types matching for both operands. Remove the types_match check for case 1 of the signed SAT_ADD, because we have (bit_xor @0 @1), which ensure the operands have the correct TREE type. The below test suites are passed for this patch. * The rv64gcv fully regression test. * The x86 bootstrap test. * The x86 fully regression test. gcc/ChangeLog: * match.pd: Remove the types_match check for signed SAT_ADD case 1. Signed-off-by: Pan Li <pan2.li@intel.com>
2024-09-13Fix endianness issue on unsigned_21.f90.Thomas Koenig2-0/+15
gcc/testsuite/ChangeLog: PR fortran/116653 * gfortran.dg/unsigned_21.f90: * gfortran.dg/unsigned_21_be.f90: New test.
2024-09-13Daily bump.GCC Administrator9-1/+1428
2024-09-12testsuite: introduce hostedlib effective targetAlexandre Oliva863-9/+1003
Several C++ tests fail with --disable-hosted-libstdcxx, whether because stdc++exp gets linked in despite not being built, because standard headers are included but that are unavailable in this mode, or because headers are (mistakenly?) expected to introduce declarations such as for abort, malloc, etc, but in this mode they don't. This patch introduces an effective target for GCC test, equivalent to one that's available in the libstdc++-v3 testsuite, and arranges for all such tests to be skipped when libstdc++-v3 is not hosted. Co-Authored-By: Olivier Hainque <hainque@adacore.com> for gcc/ChangeLog * doc/sourcebuild.texi (hostedlib): New effective target. for gcc/testsuite/ChangeLog * lib/target-supports.exp (check_effective_target_hostedlib): New. * g++.dg/contracts/contracts-access1.C: Skip if !hostedlib because of libstdc++exp. * g++.dg/contracts/contracts-assume3.C: Likewise. * g++.dg/contracts/contracts-assume4.C: Likewise. * g++.dg/contracts/contracts-config1.C: Likewise. * g++.dg/contracts/contracts-constexpr1.C: Likewise. * g++.dg/contracts/contracts-deduced2.C: Likewise. * g++.dg/contracts/contracts-externC.C: Likewise. * g++.dg/contracts/contracts-friend1.C: Likewise. * g++.dg/contracts/contracts-multiline1.C: Likewise. * g++.dg/contracts/contracts-nested-class2.C: Likewise. * g++.dg/contracts/contracts-post2.C: Likewise. * g++.dg/contracts/contracts-post3.C: Likewise. * g++.dg/contracts/contracts-pre2a2.C: Likewise. * g++.dg/contracts/contracts10.C: Likewise. * g++.dg/contracts/contracts18.C: Likewise. * g++.dg/contracts/contracts19.C: Likewise. * g++.dg/contracts/contracts2.C: Likewise. * g++.dg/contracts/contracts24.C: Likewise. * g++.dg/contracts/contracts25.C: Likewise. * g++.dg/contracts/contracts3.C: Likewise. * g++.dg/contracts/contracts4.C: Likewise. * g++.dg/contracts/contracts5.C: Likewise. * g++.dg/contracts/contracts6.C: Likewise. * g++.dg/contracts/contracts7.C: Likewise. * g++.dg/contracts/contracts9.C: Likewise. * g++.dg/contracts/pr110159.C: Likewise. * g++.dg/contracts/pr115434.C: Likewise. Adjust line numbers. * c-c++-common/pr36513-2.c: Skip if !hostedlib because of unavailable headers. * c-c++-common/analyzer/pr93290.c: Likewise. * g++.dg/analyzer/pr93212.C: Likewise. * g++.dg/analyzer/vfunc-2.C: Likewise. * g++.dg/cdce3.C: Likewise. Adjust line numbers. * g++.dg/concepts/expression.C: Likewise. * g++.dg/concepts/fn3.C: Likewise. * g++.dg/concepts/fn9.C: Likewise. * g++.dg/concepts/generic-fn.C: Likewise. * g++.dg/contracts/contracts-assume2.C: Likewise. * g++.dg/contracts/contracts-ignore2.C: Likewise. * g++.dg/contracts/contracts-post7.C: Likewise. * g++.dg/contracts/contracts-pre10.C: Likewise. * g++.dg/contracts/contracts-pre2.C: Likewise. * g++.dg/contracts/contracts-pre3.C: Likewise. * g++.dg/contracts/contracts-pre4.C: Likewise. * g++.dg/contracts/contracts-pre5.C: Likewise. * g++.dg/contracts/contracts-pre7.C: Likewise. * g++.dg/contracts/contracts-pre9.C: Likewise. * g++.dg/contracts/contracts-redecl3.C: Likewise. * g++.dg/contracts/contracts-redecl4.C: Likewise. * g++.dg/contracts/contracts-redecl6.C: Likewise. * g++.dg/contracts/contracts-redecl7.C: Likewise. * g++.dg/contracts/contracts-tmpl-spec1.C: Likewise. * g++.dg/contracts/contracts-tmpl-spec2.C: Likewise. * g++.dg/contracts/contracts-tmpl-spec3.C: Likewise. * g++.dg/contracts/contracts14.C: Likewise. * g++.dg/contracts/contracts15.C: Likewise. * g++.dg/contracts/contracts16.C: Likewise. * g++.dg/contracts/contracts17.C: Likewise. * g++.dg/contracts/contracts22.C: Likewise. * g++.dg/contracts/contracts35.C: Likewise. * g++.dg/coroutines/pr100611.C: Likewise. * g++.dg/coroutines/pr100772-b.C: Likewise. * g++.dg/coroutines/pr101133.C: Likewise. * g++.dg/coroutines/pr101367.C: Likewise. * g++.dg/coroutines/pr101976.C: Likewise. * g++.dg/coroutines/pr102454.C: Likewise. * g++.dg/coroutines/pr104051.C: Likewise. * g++.dg/coroutines/pr110635.C: Likewise. * g++.dg/coroutines/pr110871.C: Likewise. Adjust line numbers. * g++.dg/coroutines/pr110872.C: Likewise. Likewise. * g++.dg/coroutines/pr94288.C: Likewise. * g++.dg/coroutines/pr95520.C: Likewise. * g++.dg/coroutines/pr95736.C: Likewise. * g++.dg/coroutines/pr97587.C: Likewise. * g++.dg/coroutines/pr99576_1.C: Likewise. * g++.dg/coroutines/pr99576_2.C: Likewise. * g++.dg/coroutines/ramp-return-a.C: Likewise. * g++.dg/coroutines/ramp-return-b.C: Likewise. * g++.dg/coroutines/ramp-return-c.C: Likewise. * g++.dg/coroutines/symmetric-transfer-00-basic.C: Likewise. * g++.dg/coroutines/torture/co-await-16-template-traits.C: Likewise. * g++.dg/coroutines/torture/co-ret-15-default-return_void.C: Likewise. * g++.dg/coroutines/torture/co-yield-04-complex-local-state.C: Likewise. * g++.dg/coroutines/torture/extern-c-coroutine.C: Likewise. * g++.dg/coroutines/torture/func-params-08.C: Likewise. * g++.dg/coroutines/torture/func-params-09-awaitable-parms.C: Likewise. * g++.dg/coroutines/torture/local-var-05-awaitable.C: Likewise. * g++.dg/coroutines/torture/pr95615-01.C: Likewise. * g++.dg/coroutines/torture/pr95615-02.C: Likewise. * g++.dg/coroutines/torture/pr95615-03.C: Likewise. * g++.dg/coroutines/torture/pr95615-04.C: Likewise. * g++.dg/coroutines/torture/pr95615-05.C: Likewise. * g++.dg/coroutines/torture/pr98704.C: Likewise. * g++.dg/cpp/pr80005.C: Likewise. * g++.dg/cpp0x/Wliteral-suffix.C: Likewise. * g++.dg/cpp0x/Wpessimizing-move2.C: Likewise. * g++.dg/cpp0x/constexpr-70001-3.C: Likewise. * g++.dg/cpp0x/constexpr-ice16.C: Likewise. * g++.dg/cpp0x/dc5.C: Likewise. * g++.dg/cpp0x/enum35.C: Likewise. * g++.dg/cpp0x/enum36.C: Likewise. * g++.dg/cpp0x/initlist-opt1.C: Likewise. * g++.dg/cpp0x/initlist-vect2.C: Likewise. * g++.dg/cpp0x/initlist13.C: Likewise. * g++.dg/cpp0x/initlist15.C: Likewise. * g++.dg/cpp0x/initlist25.C: Likewise. * g++.dg/cpp0x/initlist54.C: Likewise. * g++.dg/cpp0x/initlist92.C: Likewise. * g++.dg/cpp0x/lambda/lambda-capture-const-ref-neg.C: Likewise. * g++.dg/cpp0x/lambda/lambda-capture-const-ref.C: Likewise. * g++.dg/cpp0x/lambda/lambda-const-neg.C: Likewise. * g++.dg/cpp0x/lambda/lambda-const.C: Likewise. * g++.dg/cpp0x/lambda/lambda-deduce.C: Likewise. * g++.dg/cpp0x/lambda/lambda-in-class-neg.C: Likewise. * g++.dg/cpp0x/lambda/lambda-in-class.C: Likewise. * g++.dg/cpp0x/lambda/lambda-mixed.C: Likewise. * g++.dg/cpp0x/lambda/lambda-mutable.C: Likewise. * g++.dg/cpp0x/lambda/lambda-nested.C: Likewise. * g++.dg/cpp0x/lambda/lambda-non-const.C: Likewise. * g++.dg/cpp0x/lambda/lambda-nop.C: Likewise. * g++.dg/cpp0x/lambda/lambda-nullptr.C: Likewise. * g++.dg/cpp0x/lambda/lambda-pass.C: Likewise. * g++.dg/cpp0x/lambda/lambda-recursive.C: Likewise. * g++.dg/cpp0x/lambda/lambda-ref-default.C: Likewise. * g++.dg/cpp0x/lambda/lambda-ref.C: Likewise. * g++.dg/cpp0x/nullptr20.C: Likewise. * g++.dg/cpp0x/pr61038.C: Likewise. * g++.dg/cpp0x/rv-trivial-bug.C: Likewise. * g++.dg/cpp0x/udlit-concat-neg.C: Likewise. * g++.dg/cpp0x/udlit-concat.C: Likewise. * g++.dg/cpp0x/udlit-embed-quote.C: Likewise. * g++.dg/cpp0x/udlit-extended-id-1.C: Likewise. * g++.dg/cpp0x/udlit-general.C: Likewise. * g++.dg/cpp0x/udlit-namespace.C: Likewise. * g++.dg/cpp0x/udlit-raw-op.C: Likewise. * g++.dg/cpp0x/udlit-raw-str.C: Likewise. * g++.dg/cpp0x/udlit-resolve-char8_t.C: Likewise. * g++.dg/cpp0x/udlit-resolve.C: Likewise. * g++.dg/cpp0x/udlit-sfinae.C: Likewise. * g++.dg/cpp0x/udlit-string-literal.C: Likewise. * g++.dg/cpp0x/udlit-suffix-neg.C: Likewise. * g++.dg/cpp1y/udlit-userdef-string.C: Likewise. * g++.dg/cpp0x/udlit-template.C: Likewise. * g++.dg/cpp0x/variadic-bind.C: Likewise. * g++.dg/cpp0x/variadic-function.C: Likewise. * g++.dg/cpp0x/variadic-mem_fn.C: Likewise. * g++.dg/cpp0x/variadic-tuple.C: Likewise. * g++.dg/cpp1y/auto-fn45.C: Likewise. * g++.dg/cpp1y/complex_literals1.C: Likewise. * g++.dg/cpp1y/complex_literals1a.C: Likewise. * g++.dg/cpp1y/constexpr-66093.C: Likewise. * g++.dg/cpp1y/constexpr-assert1.C: Likewise. * g++.dg/cpp1y/constexpr-assert2.C: Likewise. * g++.dg/cpp1y/feat-cxx14.C: Likewise. * g++.dg/cpp1y/lambda-generic-69078-2.C: Likewise. * g++.dg/cpp1y/lambda-generic-x.C: Likewise. * g++.dg/cpp1y/lambda-init8.C: Likewise. * g++.dg/cpp1y/new2.C: Likewise. * g++.dg/cpp1y/nsdmi-aggr12.C: Likewise. * g++.dg/cpp1y/pr57640.C: Likewise. * g++.dg/cpp1y/pr77786.C: Likewise. * g++.dg/cpp1y/pr95226.C: Likewise. * g++.dg/cpp1y/udlit-char-template-sfinae.C: Likewise. * g++.dg/cpp1y/udlit-char-template-vs-std-literal-operator.C: Likewise. * g++.dg/cpp1z/class-deduction14.C: Likewise. * g++.dg/cpp1z/constexpr-asm-1.C: Likewise. * g++.dg/cpp1z/constexpr-asm-3.C: Likewise. * g++.dg/cpp1z/decomp37.C: Likewise. * g++.dg/cpp1z/eval-order2.C: Likewise. * g++.dg/cpp1z/feat-cxx1z.C: Likewise. * g++.dg/cpp1z/fold1.C: Likewise. * g++.dg/cpp1z/init-statement6.C: Likewise. * g++.dg/cpp1z/launder3.C: Likewise. * g++.dg/cpp1z/launder4.C: Likewise. * g++.dg/cpp1z/launder5.C: Likewise. * g++.dg/cpp1z/launder6.C: Likewise. * g++.dg/cpp1z/utf8.C: Likewise. * g++.dg/cpp23/ext-floating12.C: Likewise. * g++.dg/cpp23/feat-cxx2b.C: Likewise. * g++.dg/cpp26/constexpr-voidptr1.C: Likewise. * g++.dg/cpp26/feat-cxx26.C: Likewise. * g++.dg/cpp2a/concepts-cmath.C: Likewise. * g++.dg/cpp2a/concepts-explicit-spec1.C: Likewise. * g++.dg/cpp2a/concepts-explicit-spec4.C: Likewise. * g++.dg/cpp2a/concepts-explicit-spec5.C: Likewise. * g++.dg/cpp2a/concepts-memfun.C: Likewise. * g++.dg/cpp2a/concepts-pr67774.C: Likewise. * g++.dg/cpp2a/cond-triv2.C: Likewise. * g++.dg/cpp2a/feat-cxx2a.C: Likewise. * g++.dg/cpp2a/nontype-float1.C: Likewise. * g++.dg/diagnostic/disable.C: Likewise. * g++.dg/diagnostic/missing-header-pr110164.C: Likewise. * g++.dg/diagnostic/pr65923.C: Likewise. * g++.dg/eh/arm-vfp-unwind.C: Likewise. * g++.dg/eh/crossjump1.C: Likewise. * g++.dg/eh/omit-frame-pointer.C: Likewise. * g++.dg/eh/simd-3.C: Likewise. * g++.dg/ext/bases.C: Likewise. * g++.dg/ext/builtin-line1.C: Likewise. * g++.dg/ext/builtin10.C: Likewise. * g++.dg/ext/complex4.C: Likewise. * g++.dg/ext/has_nothrow_assign.C: Likewise. * g++.dg/ext/has_nothrow_assign_odr.C: Likewise. * g++.dg/ext/has_nothrow_constructor.C: Likewise. * g++.dg/ext/has_nothrow_constructor_odr.C: Likewise. * g++.dg/ext/has_nothrow_copy-1.C: Likewise. * g++.dg/ext/has_nothrow_copy-2.C: Likewise. * g++.dg/ext/has_nothrow_copy-3.C: Likewise. * g++.dg/ext/has_nothrow_copy-4.C: Likewise. * g++.dg/ext/has_nothrow_copy-5.C: Likewise. * g++.dg/ext/has_nothrow_copy-6.C: Likewise. * g++.dg/ext/has_nothrow_copy-7.C: Likewise. * g++.dg/ext/has_nothrow_copy_odr.C: Likewise. * g++.dg/ext/has_trivial_assign.C: Likewise. * g++.dg/ext/has_trivial_constructor.C: Likewise. * g++.dg/ext/has_trivial_copy.C: Likewise. * g++.dg/ext/has_trivial_destructor-1.C: Likewise. * g++.dg/ext/has_virtual_destructor.C: Likewise. * g++.dg/ext/is_abstract.C: Likewise. * g++.dg/ext/is_aggregate.C: Likewise. * g++.dg/ext/is_base_of.C: Likewise. * g++.dg/ext/is_class.C: Likewise. * g++.dg/ext/is_convertible2.C: Likewise. * g++.dg/ext/is_empty.C: Likewise. * g++.dg/ext/is_enum.C: Likewise. * g++.dg/ext/is_pod.C: Likewise. * g++.dg/ext/is_polymorphic.C: Likewise. * g++.dg/ext/is_union.C: Likewise. * g++.dg/ext/underlying_type10.C: Likewise. * g++.dg/ext/underlying_type4.C: Likewise. * g++.dg/gcov/gcov-14.C: Likewise. * g++.dg/gcov/gcov-18.C: Likewise. * g++.dg/gcov/pr88045.C: Likewise. * g++.dg/gcov/pr88263-2.C: Likewise. * g++.dg/gcov/pr88263.C: Likewise. * g++.dg/gomp/has_device_addr-non-lvalue-1.C: Likewise. * g++.dg/gomp/ind-base-3.C: Likewise. * g++.dg/gomp/map-assignment-1.C: Likewise. * g++.dg/gomp/map-lvalue-ref-1.C: Likewise. * g++.dg/gomp/map-ptrmem-1.C: Likewise. * g++.dg/gomp/map-ptrmem-2.C: Likewise. * g++.dg/gomp/map-static-cast-lvalue-1.C: Likewise. * g++.dg/gomp/map-ternary-1.C: Likewise. * g++.dg/gomp/member-array-2.C: Likewise. * g++.dg/gomp/pr71910.C: Likewise. * g++.dg/gomp/pr91118-1.C: Likewise. * g++.dg/gomp/sink-2.C: Likewise. * g++.dg/gomp/target-this-3.C: Likewise. * g++.dg/gomp/target-this-4.C: Likewise. * g++.dg/gomp/tile-1.C: Likewise. * g++.dg/gomp/tile-2.C: Likewise. * g++.dg/gomp/unroll-1.C: Likewise. * g++.dg/gomp/unroll-2.C: Likewise. * g++.dg/gomp/unroll-3.C: Likewise. * g++.dg/graphite/id-1.C: Likewise. * g++.dg/graphite/pr42130.C: Likewise. * g++.dg/inherit/virtual8.C: Likewise. * g++.dg/init/array4.C: Likewise. * g++.dg/init/new18.C: Likewise. * g++.dg/init/new39.C: Likewise. * g++.dg/init/new40.C: Likewise. * g++.dg/ipa/devirt-29.C: Likewise. * g++.dg/ipa/pr85549.C: Likewise. * g++.dg/lookup/missing-std-include-3.C: Likewise. * g++.dg/lookup/pr21802.C: Likewise. * g++.dg/lto/20091022-2_0.C: Likewise. * g++.dg/lto/20091219_0.C: Likewise. * g++.dg/lto/pr80287_0.C: Likewise. * g++.dg/lto/pr89358_0.C: Likewise. * g++.dg/lto/pr89358_1.C: Likewise. * g++.dg/modules/binding-1_a.H: Likewise. * g++.dg/modules/binding-1_b.H: Likewise. * g++.dg/modules/contracts-1_a.C: Likewise. * g++.dg/modules/contracts-1_b.C: Likewise. * g++.dg/modules/contracts-2_a.C: Likewise. * g++.dg/modules/contracts-2_b.C: Likewise. * g++.dg/modules/contracts-3_a.C: Likewise. * g++.dg/modules/contracts-3_b.C: Likewise. * g++.dg/modules/contracts-4_a.C: Likewise. * g++.dg/modules/contracts-4_d.C: Likewise. * g++.dg/modules/global-3_a.C: Likewise. * g++.dg/modules/hello-1_a.C: Likewise. * g++.dg/modules/hello-2_a.C: Likewise. * g++.dg/modules/hello-2_b.C: Likewise. * g++.dg/modules/iostream-1_a.H: Likewise. * g++.dg/modules/p1689-2.C: Likewise. * g++.dg/modules/part-5_c.C: Likewise. * g++.dg/modules/pr99023_a.X: Likewise. * g++.dg/modules/pr99166_a.X: Likewise. * g++.dg/modules/pr99166_b.C: Likewise. * g++.dg/modules/pr99425-2_a.X: Likewise. * g++.dg/modules/pr99425-2_b.X: Likewise. * g++.dg/modules/string-1_a.H: Likewise. * g++.dg/modules/string-1_b.C: Likewise. * g++.dg/modules/string-view1.C: Likewise. * g++.dg/modules/xtreme-header-1_a.H: Likewise. * g++.dg/modules/xtreme-header-1_b.C: Likewise. * g++.dg/modules/xtreme-header-2_a.H: Likewise. * g++.dg/modules/xtreme-header-2_b.C: Likewise. * g++.dg/modules/xtreme-header-3_a.H: Likewise. * g++.dg/modules/xtreme-header-3_b.C: Likewise. * g++.dg/modules/xtreme-header-4_a.H: Likewise. * g++.dg/modules/xtreme-header-4_b.C: Likewise. * g++.dg/modules/xtreme-header-5_a.H: Likewise. * g++.dg/modules/xtreme-header-5_b.C: Likewise. * g++.dg/modules/xtreme-header-6_a.H: Likewise. * g++.dg/modules/xtreme-header-6_b.C: Likewise. * g++.dg/modules/xtreme-header-7_a.H: Likewise. * g++.dg/modules/xtreme-header-7_b.C: Likewise. * g++.dg/modules/xtreme-header_a.H: Likewise. * g++.dg/modules/xtreme-header_b.C: Likewise. * g++.dg/modules/xtreme-tr1_a.H: Likewise. * g++.dg/modules/xtreme-tr1_b.C: Likewise. * g++.dg/opt/builtins2.C: Likewise. * g++.dg/opt/dtor4-aux.cc: Likewise. * g++.dg/opt/dtor4.C: Likewise. * g++.dg/opt/nrv17.C: Likewise. * g++.dg/opt/pr102970.C: Likewise. * g++.dg/opt/pr109434.C: Likewise. * g++.dg/opt/pr110879.C: Likewise. * g++.dg/opt/pr15551.C: Likewise. * g++.dg/opt/pr30965.C: Likewise. * g++.dg/opt/pr65074.C: Likewise. * g++.dg/opt/pr66119.C: Likewise. * g++.dg/opt/pr77844.C: Likewise. * g++.dg/opt/pr85393.C: Likewise. * g++.dg/opt/pr94223.C: Likewise. * g++.dg/other/final7.C: Likewise. * g++.dg/other/pr40561.C: Likewise. * g++.dg/parse/lookup1.C: Likewise. * g++.dg/parse/parse5.C: Likewise. * g++.dg/pch/system-1.C: Likewise. * g++.dg/pch/system-1.Hs: Likewise. * g++.dg/pch/system-2.C: Likewise. * g++.dg/pch/system-2.Hs: Likewise. * g++.dg/pr100253.C: Likewise. * g++.dg/pr104547.C: Likewise. * g++.dg/pr107087.C: Likewise. * g++.dg/pr71488.C: Likewise. * g++.dg/pr71655.C: Likewise. * g++.dg/pr79095-3.C: Likewise. * g++.dg/pr83239.C: Likewise. * g++.dg/pr99966.C: Likewise. * g++.dg/rtti/typeid4.C: Likewise. * g++.dg/spellcheck-inttypes.C: Likewise. * g++.dg/template/friend10.C: Likewise. * g++.dg/template/pr69961a.C: Likewise. * g++.dg/template/show-template-tree-3.C: Likewise. * g++.dg/tm/inherit2.C: Likewise. * g++.dg/tm/pr46270.C: Likewise. * g++.dg/torture/alias-1.C: Likewise. * g++.dg/torture/builtin-location.C: Likewise. * g++.dg/torture/pr103669.C: Likewise. * g++.dg/torture/pr104601.C: Likewise. * g++.dg/torture/pr106922.C: Likewise. * g++.dg/torture/pr111019.C: Likewise. * g++.dg/torture/pr33572.C: Likewise. * g++.dg/torture/pr33735.C: Likewise. * g++.dg/torture/pr34099.C: Likewise. * g++.dg/torture/pr39417.C: Likewise. * g++.dg/torture/pr44972.C: Likewise. * g++.dg/torture/pr46364.C: Likewise. * g++.dg/torture/pr49628.C: Likewise. * g++.dg/torture/pr49938.C: Likewise. * g++.dg/torture/pr51903.C: Likewise. * g++.dg/torture/pr54498.C: Likewise. * g++.dg/torture/pr60750.C: Likewise. * g++.dg/torture/pr67600.C: Likewise. * g++.dg/torture/pr82084.C: Likewise. * g++.dg/torture/pr86763.C: Likewise. * g++.dg/torture/pr95493-1.C: Likewise. * g++.dg/tree-ssa/allocator-opt1.C: Likewise. * g++.dg/tree-ssa/copyprop.C: Likewise. * g++.dg/tree-ssa/empty-loop.C: Likewise. * g++.dg/tree-ssa/initlist-opt1.C: Likewise. * g++.dg/tree-ssa/initlist-opt2.C: Likewise. * g++.dg/tree-ssa/initlist-opt3.C: Likewise. * g++.dg/tree-ssa/initlist-opt5.C: Likewise. * g++.dg/tree-ssa/loop-cond-split-1.C: Likewise. * g++.dg/tree-ssa/loop-split-1.C: Likewise. * g++.dg/tree-ssa/pr101839.C: Likewise. * g++.dg/tree-ssa/pr104529.C: Likewise. * g++.dg/tree-ssa/pr109849.C: Likewise. * g++.dg/tree-ssa/pr14703.C: Likewise. * g++.dg/tree-ssa/pr19786.C: Likewise. * g++.dg/tree-ssa/pr46228.C: Likewise. * g++.dg/tree-ssa/pr63841.C: Likewise. * g++.dg/tree-ssa/pr69336.C: Likewise. * g++.dg/tree-ssa/pr78847.C: Likewise. * g++.dg/tree-ssa/pr95638.C: Likewise. * g++.dg/uninit-pr105937.C: Likewise. * g++.dg/vect/pr102421.cc: Likewise. * g++.dg/vect/pr105053.cc: Likewise. * g++.dg/vect/pr33426-ivdep-4.cc: Likewise. * g++.dg/vect/pr64410.cc: Likewise. * g++.dg/vect/slp-pr87105.cc: Likewise. * g++.dg/vect/vect-novector-pragma.cc: Likewise. * g++.dg/warn/Warray-bounds-27.C: Likewise. * g++.dg/warn/Wdangling-pointer-pr110055.C: Likewise. * g++.dg/warn/Wdangling-reference10.C: Likewise. * g++.dg/warn/Wdangling-reference14.C: Likewise. * g++.dg/warn/Wdangling-reference17.C: Likewise. * g++.dg/warn/Wdangling-reference4.C: Likewise. * g++.dg/warn/Wdangling-reference5.C: Likewise. * g++.dg/warn/Wfree-nonheap-object-3.C: Likewise. * g++.dg/warn/Winline-3.C: Likewise. * g++.dg/warn/Wmemset-elt-size1.C: Likewise. * g++.dg/warn/Wparentheses-34.C: Likewise. * g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C: Likewise. * g++.dg/warn/Wstrict-aliasing-bogus-escape.C: Likewise. * g++.dg/warn/Wstringop-overflow-6.C: Likewise. * g++.dg/warn/Wstringop-overflow-8.C: Likewise. * g++.dg/warn/Wstringop-overread-1.C: Likewise. * g++.dg/warn/Wuninitialized-33.C: Likewise. * g++.dg/warn/Wuninitialized-pr111123-1.C: Likewise. * g++.dg/warn/format1.C: Likewise. * g++.dg/warn/huge-val1.C: Likewise. * g++.dg/warn/string1.C: Likewise. * g++.dg/warn/uninit-pr105562.C: Likewise. * g++.old-deja/g++.benjamin/15071.C: Likewise. * g++.old-deja/g++.brendan/copy9.C: Likewise. * g++.old-deja/g++.brendan/crash15.C: Likewise. * g++.old-deja/g++.brendan/crash20.C: Likewise. * g++.old-deja/g++.brendan/crash30.C: Likewise. * g++.old-deja/g++.brendan/crash38.C: Likewise. * g++.old-deja/g++.brendan/crash39.C: Likewise. * g++.old-deja/g++.brendan/crash49.C: Likewise. * g++.old-deja/g++.brendan/crash52.C: Likewise. * g++.old-deja/g++.brendan/crash62.C: Likewise. * g++.old-deja/g++.brendan/cvt1.C: Likewise. * g++.old-deja/g++.brendan/err-msg3.C: Likewise. * g++.old-deja/g++.brendan/nest21.C: Likewise. * g++.old-deja/g++.brendan/ptolemy2.C: Likewise. * g++.old-deja/g++.jason/2371.C: Likewise. * g++.old-deja/g++.jason/template24.C: Likewise. * g++.old-deja/g++.jason/template31.C: Likewise. * g++.old-deja/g++.jason/typeid1.C: Likewise. * g++.old-deja/g++.law/arg1.C: Likewise. * g++.old-deja/g++.law/arg8.C: Likewise. * g++.old-deja/g++.law/arm12.C: Likewise. * g++.old-deja/g++.law/arm9.C: Likewise. * g++.old-deja/g++.law/bad-error7.C: Likewise. * g++.old-deja/g++.law/code-gen5.C: Likewise. * g++.old-deja/g++.law/ctors10.C: Likewise. * g++.old-deja/g++.law/ctors12.C: Likewise. * g++.old-deja/g++.law/ctors13.C: Likewise. * g++.old-deja/g++.law/ctors17.C: Likewise. * g++.old-deja/g++.law/ctors6.C: Likewise. * g++.old-deja/g++.law/cvt16.C: Likewise. * g++.old-deja/g++.law/cvt2.C: Likewise. * g++.old-deja/g++.law/cvt7.C: Likewise. * g++.old-deja/g++.law/except5.C: Likewise. * g++.old-deja/g++.law/missed-error2.C: Likewise. * g++.old-deja/g++.law/nest3.C: Likewise. * g++.old-deja/g++.law/operators32.C: Likewise. * g++.old-deja/g++.law/operators4.C: Likewise. * g++.old-deja/g++.law/vbase1.C: Likewise. * g++.old-deja/g++.law/virtual3.C: Likewise. * g++.old-deja/g++.law/visibility1.C: Likewise. * g++.old-deja/g++.law/visibility10.C: Likewise. * g++.old-deja/g++.law/visibility13.C: Likewise. * g++.old-deja/g++.law/visibility17.C: Likewise. * g++.old-deja/g++.law/visibility2.C: Likewise. * g++.old-deja/g++.law/visibility22.C: Likewise. * g++.old-deja/g++.law/visibility25.C: Likewise. * g++.old-deja/g++.law/visibility7.C: Likewise. * g++.old-deja/g++.law/weak.C: Likewise. * g++.old-deja/g++.martin/new1.C: Likewise. * g++.old-deja/g++.mike/dyncast7.C: Likewise. * g++.old-deja/g++.mike/eh13.C: Likewise. * g++.old-deja/g++.mike/eh2.C: Likewise. * g++.old-deja/g++.mike/net34.C: Likewise. * g++.old-deja/g++.mike/net46.C: Likewise. * g++.old-deja/g++.mike/p658.C: Likewise. * g++.old-deja/g++.mike/rtti1.C: Likewise. * g++.old-deja/g++.ns/using4.C: Likewise. * g++.old-deja/g++.ns/using6.C: Likewise. * g++.old-deja/g++.other/defarg6.C: Likewise. * g++.old-deja/g++.other/headers1.C: Likewise. * g++.old-deja/g++.other/init9.C: Likewise. * g++.old-deja/g++.other/inline14.C: Likewise. * g++.old-deja/g++.other/inline2.C: Likewise. * g++.old-deja/g++.other/inline7.C: Likewise. * g++.old-deja/g++.other/inline8.C: Likewise. * g++.old-deja/g++.other/optimize2.C: Likewise. * g++.old-deja/g++.other/sibcall1.C: Likewise. * g++.old-deja/g++.other/unchanging1.C: Likewise. * g++.old-deja/g++.pt/crash68.C: Likewise. * g++.old-deja/g++.pt/memtemp100.C: Likewise. * g++.old-deja/g++.robertl/eb109.C: Likewise. * g++.old-deja/g++.robertl/eb113.C: Likewise. * g++.old-deja/g++.robertl/eb115.C: Likewise. * g++.old-deja/g++.robertl/eb124.C: Likewise. * g++.old-deja/g++.robertl/eb127.C: Likewise. * g++.old-deja/g++.robertl/eb129.C: Likewise. * g++.old-deja/g++.robertl/eb129a.C: Likewise. * g++.old-deja/g++.robertl/eb130.C: Likewise. * g++.old-deja/g++.robertl/eb132.C: Likewise. * g++.old-deja/g++.robertl/eb15.C: Likewise. * g++.old-deja/g++.robertl/eb21.C: Likewise. * g++.old-deja/g++.robertl/eb24.C: Likewise. * g++.old-deja/g++.robertl/eb27.C: Likewise. * g++.old-deja/g++.robertl/eb28.C: Likewise. * g++.old-deja/g++.robertl/eb29.C: Likewise. * g++.old-deja/g++.robertl/eb3.C: Likewise. * g++.old-deja/g++.robertl/eb30.C: Likewise. * g++.old-deja/g++.robertl/eb31.C: Likewise. * g++.old-deja/g++.robertl/eb33.C: Likewise. * g++.old-deja/g++.robertl/eb36.C: Likewise. * g++.old-deja/g++.robertl/eb39.C: Likewise. * g++.old-deja/g++.robertl/eb4.C: Likewise. * g++.old-deja/g++.robertl/eb41.C: Likewise. * g++.old-deja/g++.robertl/eb43.C: Likewise. * g++.old-deja/g++.robertl/eb44.C: Likewise. * g++.old-deja/g++.robertl/eb46.C: Likewise. * g++.old-deja/g++.robertl/eb54.C: Likewise. * g++.old-deja/g++.robertl/eb55.C: Likewise. * g++.old-deja/g++.robertl/eb59.C: Likewise. * g++.old-deja/g++.robertl/eb60.C: Likewise. * g++.old-deja/g++.robertl/eb62.C: Likewise. * g++.old-deja/g++.robertl/eb66.C: Likewise. * g++.old-deja/g++.robertl/eb7.C: Likewise. * g++.old-deja/g++.robertl/eb73.C: Likewise. * g++.old-deja/g++.robertl/eb77.C: Likewise. * g++.old-deja/g++.robertl/eb79.C: Likewise. * g++.old-deja/g++.warn/iomanip.C: Likewise. * g++.target/i386/pr105638.C: Likewise. * g++.target/i386/pr110170.C: Likewise. * g++.target/i386/pr80566-1.C: Likewise. * g++.target/i386/pr80566-2.C: Likewise. * c-c++-common/analyzer/allocation-size-1.c: Skip if !hostedlib because of unavailable declarations. * c-c++-common/analyzer/allocation-size-2.c: Likewise. * c-c++-common/analyzer/allocation-size-3.c: Likewise. * c-c++-common/analyzer/allocation-size-4.c: Likewise. * c-c++-common/analyzer/analyzer-verbosity-0.c: Likewise. * c-c++-common/analyzer/analyzer-verbosity-1.c: Likewise. * c-c++-common/analyzer/analyzer-verbosity-2.c: Likewise. * c-c++-common/analyzer/analyzer-verbosity-3.c: Likewise. * c-c++-common/analyzer/call-summaries-1.c: Likewise. * c-c++-common/analyzer/call-summaries-malloc.c: Likewise. * c-c++-common/analyzer/callbacks-1.c: Likewise. * c-c++-common/analyzer/callbacks-2.c: Likewise. * c-c++-common/analyzer/capacity-1.c: Likewise. * c-c++-common/analyzer/capacity-2.c: Likewise. * c-c++-common/analyzer/capacity-3.c: Likewise. * c-c++-common/analyzer/compound-assignment-1.c: Likewise. * c-c++-common/analyzer/data-model-14.c: Likewise. * c-c++-common/analyzer/data-model-20.c: Likewise. * c-c++-common/analyzer/data-model-5d.c: Likewise. * c-c++-common/analyzer/disabling.c: Likewise. * c-c++-common/analyzer/dump-state.c: Likewise. * c-c++-common/analyzer/edges-2.c: Likewise. * c-c++-common/analyzer/first-field-2.c: Likewise. * c-c++-common/analyzer/flex-with-call-summaries.c: Likewise. * c-c++-common/analyzer/flex-without-call-summaries.c: Likewise. * c-c++-common/analyzer/flexible-array-member-1.c: Likewise. * c-c++-common/analyzer/function-ptr-2.c: Likewise. * c-c++-common/analyzer/function-ptr-3.c: Likewise. * c-c++-common/analyzer/function-ptr-4.c: Likewise. * c-c++-common/analyzer/gzio.c: Likewise. * c-c++-common/analyzer/imprecise-floating-point-1.c: Likewise. * c-c++-common/analyzer/leak-2.c: Likewise. * c-c++-common/analyzer/leak-3.c: Likewise. * c-c++-common/analyzer/leak-4.c: Likewise. * c-c++-common/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c: Likewise. * c-c++-common/analyzer/loop-3.c: Likewise. * c-c++-common/analyzer/malloc-3.c: Likewise. * c-c++-common/analyzer/malloc-5.c: Likewise. * c-c++-common/analyzer/malloc-CWE-401-example.c: Likewise. * c-c++-common/analyzer/malloc-CWE-415-examples.c: Likewise. * c-c++-common/analyzer/malloc-CWE-416-examples.c: Likewise. * c-c++-common/analyzer/malloc-CWE-590-examples.c: Likewise. * c-c++-common/analyzer/malloc-callbacks.c: Likewise. * c-c++-common/analyzer/malloc-dce.c: Likewise. * c-c++-common/analyzer/malloc-dedupe-1.c: Likewise. * c-c++-common/analyzer/malloc-in-loop.c: Likewise. * c-c++-common/analyzer/malloc-ipa-1.c: Likewise. * c-c++-common/analyzer/malloc-ipa-10.c: Likewise. * c-c++-common/analyzer/malloc-ipa-11.c: Likewise. * c-c++-common/analyzer/malloc-ipa-12.c: Likewise. * c-c++-common/analyzer/malloc-ipa-13a.c: Likewise. * c-c++-common/analyzer/malloc-ipa-2.c: Likewise. * c-c++-common/analyzer/malloc-ipa-3.c: Likewise. * c-c++-common/analyzer/malloc-ipa-4.c: Likewise. * c-c++-common/analyzer/malloc-ipa-5.c: Likewise. * c-c++-common/analyzer/malloc-ipa-6.c: Likewise. * c-c++-common/analyzer/malloc-ipa-7.c: Likewise. * c-c++-common/analyzer/malloc-ipa-9.c: Likewise. * c-c++-common/analyzer/malloc-macro-inline-events.c: Likewise. * c-c++-common/analyzer/malloc-macro-separate-events.c: Likewise. * c-c++-common/analyzer/malloc-many-paths-3.c: Likewise. * c-c++-common/analyzer/malloc-meaning-1.c: Likewise. * c-c++-common/analyzer/malloc-paths-1.c: Likewise. * c-c++-common/analyzer/malloc-paths-2.c: Likewise. * c-c++-common/analyzer/malloc-paths-3.c: Likewise. * c-c++-common/analyzer/malloc-paths-4.c: Likewise. * c-c++-common/analyzer/malloc-paths-5.c: Likewise. * c-c++-common/analyzer/malloc-paths-6.c: Likewise. * c-c++-common/analyzer/malloc-paths-7.c: Likewise. * c-c++-common/analyzer/malloc-paths-8.c: Likewise. * c-c++-common/analyzer/malloc-paths-9-noexcept.c: Likewise. * c-c++-common/analyzer/malloc-sarif-1.c: Likewise. * c-c++-common/analyzer/malloc-vs-local-1a.c: Likewise. * c-c++-common/analyzer/malloc-vs-local-1b.c: Likewise. * c-c++-common/analyzer/malloc-vs-local-2.c: Likewise. * c-c++-common/analyzer/malloc-vs-local-3.c: Likewise. * c-c++-common/analyzer/out-of-bounds-1.c: Likewise. * c-c++-common/analyzer/out-of-bounds-2.c: Likewise. * c-c++-common/analyzer/out-of-bounds-diagram-3.c: Likewise. * c-c++-common/analyzer/out-of-bounds-diagram-8.c: Likewise. * c-c++-common/analyzer/paths-3.c: Likewise. * c-c++-common/analyzer/paths-6.c: Likewise. * c-c++-common/analyzer/paths-7.c: Likewise. * c-c++-common/analyzer/pr103526.c: Likewise. * c-c++-common/analyzer/pr106539.c: Likewise. * c-c++-common/analyzer/pr94399.c: Likewise. * c-c++-common/analyzer/pr94851-1.c: Likewise. * c-c++-common/analyzer/pr94851-2.c: Likewise. * c-c++-common/analyzer/pr94851-4.c: Likewise. * c-c++-common/analyzer/pr97608.c: Likewise. * c-c++-common/analyzer/pr98918.c: Likewise. * c-c++-common/analyzer/pr99716-2.c: Likewise. * c-c++-common/analyzer/pr99716-3.c: Likewise. * c-c++-common/analyzer/pragma-1.c: Likewise. * c-c++-common/analyzer/pragma-2.c: Likewise. * c-c++-common/analyzer/sarif-path-role.c: Likewise. * c-c++-common/analyzer/scope-1.c: Likewise. * c-c++-common/analyzer/strndup-1.c: Likewise. * c-c++-common/analyzer/taint-alloc-3.c: Likewise. * c-c++-common/analyzer/taint-realloc.c: Likewise. * c-c++-common/analyzer/use-after-free-3.c: Likewise. * c-c++-common/analyzer/zlib-4.c: Likewise. * c-c++-common/goacc/kernels-counter-vars-function-scope.c: Likewise. * c-c++-common/goacc/kernels-loop-2.c: Likewise. * c-c++-common/goacc/kernels-loop-3.c: Likewise. * c-c++-common/goacc/kernels-loop-data-2.c: Likewise. * c-c++-common/goacc/kernels-loop-data-enter-exit-2.c: Likewise. * c-c++-common/goacc/kernels-loop-data-enter-exit.c: Likewise. * c-c++-common/goacc/kernels-loop-data-update.c: Likewise. * c-c++-common/goacc/kernels-loop-data.c: Likewise. * c-c++-common/goacc/kernels-loop-g.c: Likewise. * c-c++-common/goacc/kernels-loop-mod-not-zero.c: Likewise. * c-c++-common/goacc/kernels-loop-n.c: Likewise. * c-c++-common/goacc/kernels-loop.c: Likewise. * c-c++-common/goacc/kernels-one-counter-var.c: Likewise. * c-c++-common/goacc/kernels-parallel-loop-data-enter-exit.c: Likewise. * c-c++-common/gomp/pr103642.c: Likewise. * c-c++-common/gomp/target-implicit-map-2.c: Likewise. * c-c++-common/simulate-thread/bitfields-4.c: Likewise. * c-c++-common/tm/malloc.c: Likewise. * g++.dg/abi/mangle36.C: Likewise. * g++.dg/abi/mangle40.C: Likewise. * g++.dg/abi/mangle41.C: Likewise. * g++.dg/analyzer/cstdlib.C: Likewise. * g++.dg/analyzer/fanalyzer-show-events-in-system-headers-default.C: Likewise. * g++.dg/analyzer/fanalyzer-show-events-in-system-headers-no.C: Likewise. * g++.dg/analyzer/fanalyzer-show-events-in-system-headers.C: Likewise. * g++.dg/analyzer/malloc.C: Likewise. * g++.dg/analyzer/new-vs-malloc.C: Likewise. * g++.dg/analyzer/placement-new-size.C: Likewise. * g++.dg/analyzer/vfunc-3.C: Likewise. * g++.dg/analyzer/vfunc-5.C: Likewise. * g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C: Likewise. * g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C: Likewise. * g++.dg/coroutines/pr101765.C: Likewise. * g++.dg/coroutines/pr95477.C: Likewise. * g++.dg/coroutines/pr95599.C: Likewise. * g++.dg/coroutines/pr95711.C: Likewise. * g++.dg/coroutines/torture/alloc-00-gro-on-alloc-fail.C: Likewise. * g++.dg/coroutines/torture/alloc-01-overload-newdel.C: Likewise. * g++.dg/coroutines/torture/alloc-02-fail-new-grooaf-check.C: Likewise. * g++.dg/coroutines/torture/alloc-03-overload-new-1.C: Likewise. * g++.dg/coroutines/torture/alloc-04-overload-del-use-two-args.C: Likewise. * g++.dg/coroutines/torture/call-00-co-aw-arg.C: Likewise. * g++.dg/coroutines/torture/call-01-multiple-co-aw.C: Likewise. * g++.dg/coroutines/torture/call-02-temp-co-aw.C: Likewise. * g++.dg/coroutines/torture/call-03-temp-ref-co-aw.C: Likewise. * g++.dg/coroutines/torture/class-00-co-ret.C: Likewise. * g++.dg/coroutines/torture/class-01-co-ret-parm.C: Likewise. * g++.dg/coroutines/torture/class-02-templ-parm.C: Likewise. * g++.dg/coroutines/torture/class-03-operator-templ-parm.C: Likewise. * g++.dg/coroutines/torture/class-04-lambda-1.C: Likewise. * g++.dg/coroutines/torture/class-05-lambda-capture-copy-local.C: Likewise. * g++.dg/coroutines/torture/class-06-lambda-capture-ref.C: Likewise. * g++.dg/coroutines/torture/class-07-data-member.C: Likewise. * g++.dg/coroutines/torture/co-await-00-trivial.C: Likewise. * g++.dg/coroutines/torture/co-await-01-with-value.C: Likewise. * g++.dg/coroutines/torture/co-await-02-xform.C: Likewise. * g++.dg/coroutines/torture/co-await-03-rhs-op.C: Likewise. * g++.dg/coroutines/torture/co-await-04-control-flow.C: Likewise. * g++.dg/coroutines/torture/co-await-05-loop.C: Likewise. * g++.dg/coroutines/torture/co-await-06-ovl.C: Likewise. * g++.dg/coroutines/torture/co-await-07-tmpl.C: Likewise. * g++.dg/coroutines/torture/co-await-08-cascade.C: Likewise. * g++.dg/coroutines/torture/co-await-09-pair.C: Likewise. * g++.dg/coroutines/torture/co-await-10-template-fn-arg.C: Likewise. * g++.dg/coroutines/torture/co-await-11-forwarding.C: Likewise. * g++.dg/coroutines/torture/co-await-12-operator-2.C: Likewise. * g++.dg/coroutines/torture/co-await-13-return-ref.C: Likewise. * g++.dg/coroutines/torture/co-await-14-return-ref-to-auto.C: Likewise. * g++.dg/coroutines/torture/co-await-15-return-non-triv.C: Likewise. * g++.dg/coroutines/torture/co-await-17-capture-comp-ref.C: Likewise. * g++.dg/coroutines/torture/co-await-18-if-cond.C: Likewise. * g++.dg/coroutines/torture/co-await-19-while-cond.C: Likewise. * g++.dg/coroutines/torture/co-await-20-do-while-cond.C: Likewise. * g++.dg/coroutines/torture/co-await-21-switch-value.C: Likewise. * g++.dg/coroutines/torture/co-await-22-truth-and-of-if.C: Likewise. * g++.dg/coroutines/torture/co-await-24-for-init.C: Likewise. * g++.dg/coroutines/torture/co-await-25-for-condition.C: Likewise. * g++.dg/coroutines/torture/co-await-26-for-iteration-expr.C: Likewise. * g++.dg/coroutines/torture/co-ret-00-void-return-is-ready.C: Likewise. * g++.dg/coroutines/torture/co-ret-01-void-return-is-suspend.C: Likewise. * g++.dg/coroutines/torture/co-ret-03-different-GRO-type.C: Likewise. * g++.dg/coroutines/torture/co-ret-04-GRO-nontriv.C: Likewise. * g++.dg/coroutines/torture/co-ret-05-return-value.C: Likewise. * g++.dg/coroutines/torture/co-ret-06-template-promise-val-1.C: Likewise. * g++.dg/coroutines/torture/co-ret-07-void-cast-expr.C: Likewise. * g++.dg/coroutines/torture/co-ret-08-template-cast-ret.C: Likewise. * g++.dg/coroutines/torture/co-ret-09-bool-await-susp.C: Likewise. * g++.dg/coroutines/torture/co-ret-10-expression-evaluates-once.C: Likewise. * g++.dg/coroutines/torture/co-ret-11-co-ret-co-await.C: Likewise. * g++.dg/coroutines/torture/co-ret-12-co-ret-fun-co-await.C: Likewise. * g++.dg/coroutines/torture/co-ret-13-template-2.C: Likewise. * g++.dg/coroutines/torture/co-ret-14-template-3.C: Likewise. * g++.dg/coroutines/torture/co-ret-16-simple-control-flow.C: Likewise. * g++.dg/coroutines/torture/co-ret-17-void-ret-coro.C: Likewise. * g++.dg/coroutines/torture/co-yield-00-triv.C: Likewise. * g++.dg/coroutines/torture/co-yield-01-multi.C: Likewise. * g++.dg/coroutines/torture/co-yield-02-loop.C: Likewise. * g++.dg/coroutines/torture/co-yield-03-tmpl.C: Likewise. * g++.dg/coroutines/torture/co-yield-03-tmpl-nondependent.C: Likewise. * g++.dg/coroutines/torture/co-yield-05-co-aw.C: Likewise. * g++.dg/coroutines/torture/co-yield-06-fun-parm.C: Likewise. * g++.dg/coroutines/torture/co-yield-07-template-fn-param.C: Likewise. * g++.dg/coroutines/torture/co-yield-08-more-refs.C: Likewise. * g++.dg/coroutines/torture/co-yield-09-more-templ-refs.C: Likewise. * g++.dg/coroutines/torture/exceptions-test-0.C: Likewise. * g++.dg/coroutines/torture/exceptions-test-01-n4849-a.C: Likewise. * g++.dg/coroutines/torture/func-params-00.C: Likewise. * g++.dg/coroutines/torture/func-params-01.C: Likewise. * g++.dg/coroutines/torture/func-params-02.C: Likewise. * g++.dg/coroutines/torture/func-params-03.C: Likewise. * g++.dg/coroutines/torture/func-params-04.C: Likewise. * g++.dg/coroutines/torture/func-params-05.C: Likewise. * g++.dg/coroutines/torture/func-params-06.C: Likewise. * g++.dg/coroutines/torture/func-params-07.C: Likewise. * g++.dg/coroutines/torture/lambda-00-co-ret.C: Likewise. * g++.dg/coroutines/torture/lambda-01-co-ret-parm.C: Likewise. * g++.dg/coroutines/torture/lambda-02-co-yield-values.C: Likewise. * g++.dg/coroutines/torture/lambda-03-auto-parm-1.C: Likewise. * g++.dg/coroutines/torture/lambda-04-templ-parm.C: Likewise. * g++.dg/coroutines/torture/lambda-05-capture-copy-local.C: Likewise. * g++.dg/coroutines/torture/lambda-06-multi-capture.C: Likewise. * g++.dg/coroutines/torture/lambda-07-multi-yield.C: Likewise. * g++.dg/coroutines/torture/lambda-08-co-ret-parm-ref.C: Likewise. * g++.dg/coroutines/torture/lambda-09-init-captures.C: Likewise. * g++.dg/coroutines/torture/lambda-10-mutable.C: Likewise. * g++.dg/coroutines/torture/local-var-00-const.C: Likewise. * g++.dg/coroutines/torture/local-var-01-single.C: Likewise. * g++.dg/coroutines/torture/local-var-02-conditional.C: Likewise. * g++.dg/coroutines/torture/local-var-03-with-awaits.C: Likewise. * g++.dg/coroutines/torture/local-var-04-hiding-nested-scopes.C: Likewise. * g++.dg/coroutines/torture/local-var-06-structured-binding.C: Likewise. * g++.dg/coroutines/torture/mid-suspend-destruction-0.C: Likewise. * g++.dg/coroutines/torture/pr95003.C: Likewise. * g++.dg/coroutines/torture/pr95519-00-return_void.C: Likewise. * g++.dg/coroutines/torture/pr95519-01-initial-suspend.C: Likewise. * g++.dg/coroutines/torture/pr95519-02-final_suspend.C: Likewise. * g++.dg/coroutines/torture/pr95519-03-return-value.C: Likewise. * g++.dg/coroutines/torture/pr95519-04-yield-value.C: Likewise. * g++.dg/coroutines/torture/pr95519-05-gro.C: Likewise. * g++.dg/coroutines/torture/pr95519-06-grooaf.C: Likewise. * g++.dg/coroutines/torture/pr95519-07-unhandled-exception.C: Likewise. * g++.dg/cpp0x/lambda/lambda-std-function.C: Likewise. * g++.dg/cpp0x/lambda/lambda-this8.C: Likewise. * g++.dg/cpp0x/pr70887.C: Likewise. * g++.dg/cpp1y/lambda-generic-variadic2.C: Likewise. * g++.dg/cpp23/subscript5.C: Likewise. * g++.dg/cpp23/subscript6.C: Likewise. * g++.dg/cpp26/constexpr-new2.C: Likewise. * g++.dg/cpp2a/destroying-delete5.C: Likewise. * g++.dg/eh/filter2.C: Likewise. * g++.dg/eh/uncaught1.C: Likewise. * g++.dg/eh/uncaught2.C: Likewise. * g++.dg/expr/anew1.C: Likewise. * g++.dg/expr/anew2.C: Likewise. * g++.dg/expr/anew3.C: Likewise. * g++.dg/expr/anew4.C: Likewise. * g++.dg/ext/cleanup-10.C: Likewise. * g++.dg/ext/cleanup-11.C: Likewise. * g++.dg/ext/cleanup-5.C: Likewise. * g++.dg/ext/cleanup-8.C: Likewise. * g++.dg/ext/cleanup-9.C: Likewise. * g++.dg/ext/is_invocable2.C: Likewise. * g++.dg/goacc/pr107028-2.C: Likewise. * g++.dg/gomp/target-lambda-2.C: Likewise. * g++.dg/init/new11.C: Likewise. * g++.dg/init/value3.C: Likewise. * g++.dg/lto/pr66180_0.C: Likewise. * g++.dg/opt/eh4.C: Likewise. * g++.dg/opt/pr103989.C: Likewise. * g++.dg/opt/pr80385.C: Likewise. * g++.dg/opt/reload3.C: Likewise. * g++.dg/other/i386-1.C: Likewise. * g++.dg/other/i386-11.C: Likewise. * g++.dg/other/i386-2.C: Likewise. * g++.dg/other/i386-3.C: Likewise. * g++.dg/other/i386-4.C: Likewise. * g++.dg/other/i386-7.C: Likewise. * g++.dg/other/i386-8.C: Likewise. * g++.dg/other/mmintrin.C: Likewise. * g++.dg/other/pr34435.C: Likewise. * g++.dg/other/pr40446.C: Likewise. * g++.dg/other/pr49133.C: Likewise. * g++.dg/other/ucnid-1-utf8.C: Likewise. * g++.dg/other/ucnid-1.C: Likewise. * g++.dg/pr80481.C: Likewise. * g++.dg/torture/pr10148.C: Likewise. * g++.dg/torture/pr91334.C: Likewise. * g++.dg/torture/pr91606.C: Likewise. * g++.dg/tree-ssa/pr102216-2.C: Likewise. * g++.dg/vect/slp-pr98855.cc: Likewise. * g++.dg/warn/Wsystem-headers1a.C: Likewise. * g++.dg/warn/noreturn-1.C: Likewise. * g++.old-deja/g++.abi/arraynew.C: Likewise. * g++.old-deja/g++.abi/cxa_vec.C: Likewise. * g++.old-deja/g++.brendan/new3.C: Likewise. * g++.old-deja/g++.eh/new1.C: Likewise. * g++.old-deja/g++.eh/new2.C: Likewise. * g++.old-deja/g++.jason/template44.C: Likewise. * g++.old-deja/g++.law/arm13.C: Likewise. * g++.old-deja/g++.law/scope2.C: Likewise. * g++.old-deja/g++.mike/eh47.C: Likewise. * g++.old-deja/g++.mike/ns15.C: Likewise. * g++.old-deja/g++.mike/p710.C: Likewise. * g++.old-deja/g++.mike/p9706.C: Likewise. * g++.old-deja/g++.oliva/new1.C: Likewise. * g++.old-deja/g++.other/delete8.C: Likewise. * g++.target/i386/avx-pr54700-1.C: Likewise. * g++.target/i386/avx-pr54700-2.C: Likewise. * g++.target/i386/avx2-pr54700-1.C: Likewise. * g++.target/i386/avx2-pr54700-2.C: Likewise. * g++.target/i386/avx512bw-pr96246-2.C: Likewise. * g++.target/i386/avx512vl-pr54700-1a.C: Likewise. * g++.target/i386/avx512vl-pr54700-1b.C: Likewise. * g++.target/i386/avx512vl-pr54700-2a.C: Likewise. * g++.target/i386/avx512vl-pr54700-2b.C: Likewise. * g++.target/i386/avx512vl-pr96246-2.C: Likewise. * g++.target/i386/mvc4.C: Likewise. * g++.target/i386/pr100885.C: Likewise. * g++.target/i386/pr102166.C: Likewise. * g++.target/i386/pr103750-fwprop-1.C: Likewise. * g++.target/i386/pr105593.C: Likewise. * g++.target/i386/pr112443.C: Likewise. * g++.target/i386/pr113560.C: Likewise. * g++.target/i386/pr88152.C: Likewise. * g++.target/i386/pr88998.C: Likewise. * g++.target/i386/pr94046-1.C: Likewise. * g++.target/i386/pr94046-2.C: Likewise. * g++.target/i386/sse4_1-pr54700-1.C: Likewise. * g++.target/i386/sse4_1-pr54700-2.C: Likewise. * g++.dg/tree-ssa/pr20458.C: Skip if !hostedlib because of unavailable library definitions.
2024-09-12libstdc++: Remove unused alias template in std::optionalJonathan Wakely1-2/+0
I added this __is_bool alias template in r15-2309-g6d86486292acbe but it isn't actually used so can be removed. libstdc++-v3/ChangeLog: * include/std/optional (__is_bool): Remove.
2024-09-12libstdc++: Simplify std::launder definitionJonathan Wakely2-27/+24
A single static assert is a much simpler way to implement the compile-time preconditions on std::launder than an overload set of deleted functions and function templates. The only difficulty is that <new> doesn't include <type_traits> so we can't use std::is_function and std::is_void for the checks. That can be worked around though, by using the __is_same and __is_function built-ins. If the __is_function built-in isn't supported then the __builtin_launder built-in will give an error anyway, since the commit preceding this one. We can also remove the redundant __cplusplus >= 201703L check around the definitions of std::launder and the interference constants, which are already guarded by the appropriate feature test macros. libstdc++-v3/ChangeLog: * libsupc++/new (launder): Add static_assert and remove deleted overloads. * testsuite/18_support/launder/requirements_neg.cc: Adjust expected diagnostics.
2024-09-12c++: Make __builtin_launder reject invalid types [PR116673]Jonathan Wakely3-6/+21
The standard says that std::launder is ill-formed for function pointers and cv void pointers, so there's no reason for __builtin_launder to accept them. This change allows implementations of std::launder to defer to the built-in for error checking, although libstdc++ will continue to diagnose it directly for more user-friendly diagnostics. PR c++/116673 gcc/cp/ChangeLog: * semantics.cc (finish_builtin_launder): Diagnose function pointers and cv void pointers. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/launder2.C: Adjust dg-error strings. * g++.dg/cpp1z/launder10.C: New test.
2024-09-12Implement modules for UNSIGNED.Steven G. Kargl2-0/+101
gcc/fortran/ChangeLog: * module.cc (bt_types): Add BT_UNSIGNED. gcc/testsuite/ChangeLog: * gfortran.dg/unsigned_kiss.f90: New test.
2024-09-12i386: Implement SAT_ADD for signed vector integersUros Bizjak3-1/+51
Enable V4QI, V2QI and V2HI mode signed saturated arithmetic insn patterns and add a couple of testcases to test for PADDSB and PADDSW instructions. PR target/112600 gcc/ChangeLog: * config/i386/mmx.md (<sat_plusminus:insn><mode>3): Rename from *<sat_plusminus:insn><mode>3. gcc/testsuite/ChangeLog: * gcc.target/i386/pr112600-3a.c: New test. * gcc.target/i386/pr112600-3b.c: New test.
2024-09-12c++: decltype(auto) deduction of statement-expression [PR116418]Patrick Palka3-5/+14
r8-7538 for PR84968 made strip_typedefs_expr diagnose STATEMENT_LIST so that we reject statement-expressions in noexcept-specifiers to match our behavior in template arguments (which the parser diagnoses directly). Later r11-7452 made decltype(auto) deduction canonicalize the expression (as an implementation detail) which in turn calls strip_typedefs_expr, and so ever since we inadvertently reject decltype(auto) deduction of a statement-expression. This patch just removes the diagnostic in strip_typedefs_expr and instead treats statement-expressions similar to lambda-expressions. The function doesn't seem like the right place for such a diagnostic and so it seems easier to just accept rather than try to reject them in a suitable place. PR c++/116418 gcc/cp/ChangeLog: * tree.cc (strip_typedefs_expr) <case STATEMENT_LIST>: Replace this error path with ... <case STMT_EXPR>: ... this, returning the original tree. gcc/testsuite/ChangeLog: * g++.dg/eh/pr84968.C: No longer expect an ahead of time diagnostic for the statement-expresssion. Instantiate the template and expect an incomplete type error instead. * g++.dg/ext/stmtexpr26.C: New test. Reviewed-by: Jason Merrill <jason@redhat.com>
2024-09-12c++: Disable deprecated/unavailable diagnostics when creating thunks for ↵Jakub Jelinek2-0/+28
methods with such attributes [PR116636] On the following testcase, we emit false positive warnings/errors about using the deprecated or unavailable methods when creating thunks for them, even when nothing (in the testcase so far) actually used those. The following patch temporarily disables that diagnostics when creating the thunks. 2024-09-12 Jakub Jelinek <jakub@redhat.com> PR c++/116636 * method.cc: Include decl.h. (use_thunk): Temporarily change deprecated_state to UNAVAILABLE_DEPRECATED_SUPPRESS. * g++.dg/warn/deprecated-19.C: New test.
2024-09-12libcpp, v2: Add support for gnu::base64 #embed parameterJakub Jelinek11-183/+709
This patch which adds another #embed extension, gnu::base64. As mentioned in the documentation, this extension is primarily intended for use by the preprocessor, so that for the larger (say 32+ or 64+ bytes long embeds it doesn't have to emit tens of thousands or millions of comma separated string literals which would be very expensive to parse again, but can emit #embed "." __gnu__::__base64__( \ "Tm9uIGVyYW0gbsOpc2NpdXMsIEJydXRlLCBjdW0sIHF1w6Ygc3VtbWlzIGluZ8OpbmlpcyBleHF1" \ "aXNpdMOhcXVlIGRvY3Ryw61uYSBwaGlsw7Nzb3BoaSBHcsOmY28gc2VybcOzbmUgdHJhY3RhdsOt" \ "c3NlbnQsIGVhIExhdMOtbmlzIGzDrXR0ZXJpcyBtYW5kYXLDqW11cywgZm9yZSB1dCBoaWMgbm9z" \ "dGVyIGxhYm9yIGluIHbDoXJpYXMgcmVwcmVoZW5zacOzbmVzIGluY8O6cnJlcmV0LiBuYW0gcXVp" \ "YsO6c2RhbSwgZXQgaWlzIHF1aWRlbSBub24gw6FkbW9kdW0gaW5kw7NjdGlzLCB0b3R1bSBob2Mg" \ "ZMOtc3BsaWNldCBwaGlsb3NvcGjDoXJpLiBxdWlkYW0gYXV0ZW0gbm9uIHRhbSBpZCByZXByZWjD" \ "qW5kdW50LCBzaSByZW3DrXNzaXVzIGFnw6F0dXIsIHNlZCB0YW50dW0gc3TDumRpdW0gdGFtcXVl" \ "IG11bHRhbSDDs3BlcmFtIHBvbsOpbmRhbSBpbiBlbyBub24gYXJiaXRyw6FudHVyLiBlcnVudCDD" \ "qXRpYW0sIGV0IGlpIHF1aWRlbSBlcnVkw610aSBHcsOmY2lzIGzDrXR0ZXJpcywgY29udGVtbsOp" \ "bnRlcyBMYXTDrW5hcywgcXVpIHNlIGRpY2FudCBpbiBHcsOmY2lzIGxlZ8OpbmRpcyDDs3BlcmFt" \ "IG1hbGxlIGNvbnPDum1lcmUuIHBvc3Ryw6ltbyDDoWxpcXVvcyBmdXTDunJvcyBzw7pzcGljb3Is" \ "IHF1aSBtZSBhZCDDoWxpYXMgbMOtdHRlcmFzIHZvY2VudCwgZ2VudXMgaG9jIHNjcmliw6luZGks" \ "IGV0c2kgc2l0IGVsw6lnYW5zLCBwZXJzw7Nuw6YgdGFtZW4gZXQgZGlnbml0w6F0aXMgZXNzZSBu" \ "ZWdlbnQu") with the meaning don't actually load some file, instead base64 decode (RFC4648 with A-Za-z0-9+/ chars and = padding, no newlines in between) the string and use that as data. This is chosen because it should be -pedantic-errors clean, fairly cheap to decode and then in optimizing compiler could be handled as similar binary blob to normal #embed, while the data isn't left somewhere on the disk, so distcc/ccache etc. can move the preprocessed source without issues. It makes no sense to support limit and gnu::offset parameters together with it IMHO, why would somebody waste providing full data and then threw some away? prefix/suffix/if_empty are normally supported though, but not intended to be used by the preprocessor. This patch adds just the extension side, not the actual emitting of this during -E or -E -fdirectives-only for now, that will be included in the upcoming patch. Compared to the earlier posted version of this extension, this patch allows the string concatenation in the parameter argument (but still doesn't allow escapes in the string, why would anyone use them when only A-Za-z0-9+/= are valid). The patch also adds support for parsing this even in -fpreprocessed compilation. 2024-09-12 Jakub Jelinek <jakub@redhat.com> libcpp/ * internal.h (struct cpp_embed_params): Add base64 member. (_cpp_free_embed_params_tokens): Declare. * directives.cc (DIRECTIVE_TABLE): Add IN_I flag to T_EMBED. (save_token_for_embed, _cpp_free_embed_params_tokens): New functions. (EMBED_PARAMS): Add gnu::base64 entry. (_cpp_parse_embed_params): Parse gnu::base64 parameter. If -fpreprocessed without -fdirectives-only, require #embed to have gnu::base64 parameter. Diagnose conflict between gnu::base64 and limit or gnu::offset parameters. (do_embed): Use _cpp_free_embed_params_tokens. * files.cc (finish_embed, base64_dec_fn): New functions. (base64_dec): New array. (B64D0, B64D1, B64D2, B64D3): Define. (finish_base64_embed): New function. (_cpp_stack_embed): Use finish_embed. Handle params->base64 using finish_base64_embed. * macro.cc (builtin_has_embed): Call _cpp_free_embed_params_tokens. gcc/ * doc/cpp.texi (Binary Resource Inclusion): Document gnu::base64 parameter. gcc/testsuite/ * c-c++-common/cpp/embed-17.c: New test. * c-c++-common/cpp/embed-18.c: New test. * c-c++-common/cpp/embed-19.c: New test. * c-c++-common/cpp/embed-27.c: New test. * gcc.dg/cpp/embed-6.c: New test. * gcc.dg/cpp/embed-7.c: New test.
2024-09-12libcpp: adjust pedwarn handlingJason Merrill11-121/+213
Using cpp_pedwarning (CPP_W_PEDANTIC instead of if (CPP_PEDANTIC cpp_error lets users suppress these diagnostics with #pragma GCC diagnostic ignored "-Wpedantic". This patch changes all instances of the cpp_error (CPP_DL_PEDWARN to cpp_pedwarning. In cases where the extension appears in a later C++ revision, we now condition the warning on the relevant -Wc++??-extensions flag instead of -Wpedantic; in such cases often the if (CPP_PEDANTIC) check is retained to preserve the default non-warning behavior. I didn't attempt to adjust the warning flags for the C compiler, since it seems to follow a different system than C++. The CPP_PEDANTIC check is also kept in _cpp_lex_direct to avoid an ICE in the self-tests from cb.diagnostics not being initialized. While working on testcases for these changes I noticed that the c-c++-common tests are not run with -pedantic-errors by default like the gcc.dg and g++.dg directories are. And if I specify -pedantic-errors with dg-options, the default -std= changes from c++?? to gnu++??, which interferes with some other pedwarns. So two of the tests are C++-only. libcpp/ChangeLog: * include/cpplib.h (enum cpp_warning_reason): Add CPP_W_CXX{14,17,20,23}_EXTENSIONS. * charset.cc (_cpp_valid_ucn, convert_hex, convert_oct) (convert_escape, narrow_str_to_charconst): Use cpp_pedwarning instead of cpp_error for pedwarns. * directives.cc (directive_diagnostics, _cpp_handle_directive) (do_line, do_elif): Likewise. * expr.cc (cpp_classify_number, eval_token): Likewise. * lex.cc (skip_whitespace, maybe_va_opt_error) (_cpp_lex_direct): Likewise. * macro.cc (_cpp_arguments_ok): Likewise. (replace_args): Use -Wvariadic-macros for pedwarn about empty macro arguments. gcc/c-family/ChangeLog: * c.opt: Add CppReason for Wc++{14,17,20,23}-extensions. * c-pragma.cc (handle_pragma_diagnostic_impl): Don't check OPT_Wc__23_extensions. gcc/testsuite/ChangeLog: * c-c++-common/pragma-diag-17.c: New test. * g++.dg/cpp0x/va-opt1.C: New test. * g++.dg/cpp23/named-universal-char-escape3.C: New test.
2024-09-12arm: testsuite: make use of -mcpu=unset/-march=unsetRichard Earnshaw3-7/+60
This patch makes use of the new ability to unset the CPU or architecture flags on the command line to enable several more tests on Arm. It doesn't cover every case and it does enable some tests that now fail for different reasons when the tests are no-longer skipped; these were failing anyway for other testsuite configurations, so it's still an overall improvement. There's some restructuring required to fully implement this change: we could previously treat Xscale as an architecture, even though the option set -mcpu=, we now need to handle this correctly so that we unset the architecture rather than the CPU. To do this I've added a new table for these variants and renamed the template functions to use 'cpu' rather than 'arch'. This entailed updating the two XScale related tests accordingly. gcc/testsuite/ChangeLog: * lib/target-supports.exp: Move xscale to new generator table. (check_effective_target_arm_arch_FUNC_ok): Add -mcpu=unset to the list of flags. (add_options_for_arm_arch_FUNC): Likewise. (check_effective_target_arm_cpu_FUNC_ok): New function. (add_options_for_arm_cpu_FUNC): Likewise. (check_effective_target_arm_cpu_FUNC_link): Likewise. (check_effective_target_arm_cpu_FUNC_multilib): Likewise. * gcc.target/arm/g2.c: Update dg directives. * gcc.target/arm/scd42-2.c: Likewise.
2024-09-12arm: Allow -mcpu and -march options to be unsetRichard Earnshaw2-3/+23
The compiler will warn if the architectural specification derived from a -mcpu option is not the same as that specified by -march. This is because it was never intended that the two should be used at the same time: -mcpu=<name> is supposed to be shorthand for -mtune=<name> -march=arch-of(<name>). Unfortunately, there are times when the two options passed to the compiler may come from distinct sources: one example is makefiles which accumulate options; another is the testsuite itself, when some tests require a particular architecture setting to be useful - only running the tests when the compiler/testsuite configuration exactly matched the requirements would make regression testing especially hard (we have too many permutations). So this patch allows a user to cancel any earlier setting of a particular flag and to make the compiler behave as though it was never passed. The intended usecase is (sources of options are shown in parenthesis, but that's just for grouping: (-march=armv7-a+simd) (-march=unset -mcpu=cortex-m33) The option processing logic will now simplify this to: -mcpu=cortex-m33 A useful corollary of this is that -march=armv7-a -march=unset will now cause the compiler to behave as though neither the architecture nor the CPU was ever set and to default back to the configure-time settings. gcc/ChangeLog: * config/arm/arm.h (OPTION_DEFAULT_SPECS): Allow -mcpu and -march to be unset. (ARCH_CPU_CLEANUP_SPECS): Likewise (DRIVER_SELF_SPECS): Add ARCH_CPU_CLEANUP_SPECS * doc/invoke.texi (arm: -mcpu= and -march=): Document use of 'unset'.
2024-09-12Git ignores .vscodeYunQiang Su1-0/+1
ChangeLog * .gitignore: Add .vscode.