aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
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 Administrator6-1/+1293
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-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 Jelinek7-1/+264
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 Merrill5-6/+66
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-12i386: Use offsetable address constraint for double-word memory operands, part 2Uros Bizjak1-1/+1
Double-word memory operands are accessed as their high and low part, so the memory location has to be offsettable. Use "o" constraint instead of "m" for double-word memory operands. gcc/ChangeLog: * config/i386/i386.md (*insvti_lowpart_1): Use "o" constraint instead of "m" for double-word mode memory operands.
2024-09-12c++: ICE with TTP [PR96097]Marek Polacek2-0/+15
We crash when dependent_type_p gets a TEMPLATE_TYPE_PARM outside a template. That happens here because in template <template <typename T, typename T::type TT> typename X> void func() {} template <typename U, int I> struct Y {}; void g() { func<Y>(); } when performing overload resolution for func<Y>() we have to check if U matches T and I matches TT. So we wind up in coerce_template_template_parm/PARM_DECL. TREE_TYPE (arg) is int so we try to substitute TT's type, which is T::type. But we have nothing to substitute T with. And we call make_typename_type where ctx is still T, which checks dependent_scope_p and we trip the assert. It should work to always perform the substitution in a template context. If the result still contains template parameters, we cannot say if they match. PR c++/96097 gcc/cp/ChangeLog: * pt.cc (coerce_template_template_parm): Increment processing_template_decl before calling tsubst. gcc/testsuite/ChangeLog: * g++.dg/template/ttp44.C: New test.
2024-09-12s390: Fix strict_low_part generationStefan Schulze Frielinghaus3-41/+20
In s390_expand_insv(), if generating code for ICM et al. src is a MEM and gen_lowpart might force src into a register such that we end up with patterns which do not match anymore. Use adjust_address() instead in order to preserve a MEM. Furthermore, it is not straight forward to enforce a subreg. For example, in case of a paradoxical subreg, gen_lowpart() may return a register. In order to compensate this, s390_gen_lowpart_subreg() emits a reference to a pseudo which does not coincide with its definition which is wrong. Additionally, if dest is a paradoxical subreg, then do not try to emit a strict_low_part since it could mean that dest was not initialized even though this might be fixed up later by init-regs. Splitter for insn *get_tp_64, *zero_extendhisi2_31, *zero_extendqisi2_31, *zero_extendqihi2_31 are applied after reload. Thus, operands[0] is a hard register and gen_lowpart (m, operands[0]) just returns the hard register for mode m which is fine to use as an argument for strict_low_part, i.e., we do not need to enforce subregs here since after reload subregs are supposed to be eliminated anyway. This fixes gcc.dg/torture/pr111821.c. gcc/ChangeLog: * config/s390/s390-protos.h (s390_gen_lowpart_subreg): Remove. * config/s390/s390.cc (s390_gen_lowpart_subreg): Remove. (s390_expand_insv): Use adjust_address() and emit a strict_low_part only in case of a natural subreg. * config/s390/s390.md: Use gen_lowpart() instead of s390_gen_lowpart_subreg().
2024-09-12Abort loop SLP analysis quickerRichard Biener2-7/+13
As we can't cope with removed SLP instances during analysis there's no point in doing that or even continuing analysis of SLP instances after a failure. The following makes us abort early. * tree-vect-slp.cc (vect_slp_analyze_operations): When doing loop analysis fail after the first failed SLP instance. Only remove instances when doing BB vectorization. * tree-vect-loop.cc (vect_analyze_loop_2): Check whether vect_slp_analyze_operations failed instead of checking the number of SLP instances remaining.
2024-09-12libcpp: Add support for gnu::offset #embed/__has_embed parameterJakub Jelinek4-2/+129
The following patch adds on top of the just posted #embed patch a first extension, gnu::offset which allows to seek in the data file (for seekable files, otherwise read and throw away). I think this is useful e.g. when some binary data start with some well known header which shouldn't be included in the data etc. 2024-09-12 Jakub Jelinek <jakub@redhat.com> libcpp/ * internal.h (struct cpp_embed_params): Add offset member. * directives.cc (EMBED_PARAMS): Add gnu::offset entry. (enum embed_param_kind): Add NUM_EMBED_STD_PARAMS. (_cpp_parse_embed_params): Use NUM_EMBED_STD_PARAMS rather than NUM_EMBED_PARAMS when parsing standard parameters. Parse gnu::offset parameter. * files.cc (struct _cpp_file): Add offset member. (_cpp_stack_embed): Handle params->offset. gcc/ * doc/cpp.texi (Binary Resource Inclusion): Document gnu::offset #embed parameter. gcc/testsuite/ * c-c++-common/cpp/embed-15.c: New test. * c-c++-common/cpp/embed-16.c: New test. * gcc.dg/cpp/embed-5.c: New test.
2024-09-12libcpp, c-family: Add (dumb) C23 N3017 #embed support [PR105863]Jakub Jelinek36-3/+1003
The following patch implements the C23 N3017 "#embed - a scannable, tooling-friendly binary resource inclusion mechanism" paper. The implementation is intentionally dumb, in that it doesn't significantly speed up compilation of larger initializers and doesn't make it possible to use huge #embeds (like several gigabytes large, that is compile time and memory still infeasible). There are 2 reasons for this. One is that I think like it is implemented now in the patch is how we should use it for the smaller #embed sizes, dunno with which boundary, whether 32 bytes or 64 or something like that, certainly handling the single byte cases which is something that can appear anywhere in the source where constant integer literal can appear is desirable and I think for a few bytes it isn't worth it to come up with something smarter and users would like to e.g. see it in -E readably as well (perhaps the slow vs. fast boundary should be determined by command line option). And the other one is to be able to more easily find regressions in behavior caused by the optimizations, so we have something to get back in git to compare against. I'm definitely willing to work on the optimizations (likely introduce a new CPP_* token type to refer to a range of libcpp owned memory (start + size) and similarly some tree which can do the same, and can be at any time e.g. split into 2 subparts + say INTEGER_CST in between if needed say for const unsigned char d[] = { #embed "2GB.dat" prefix (0, 0, ) suffix (, [0x40000000] = 42) }; still without having to copy around huge amounts of data; STRING_CST owns the memory it points to and can be only 2GB in size), but would like to do that incrementally. And would like to first include some extensions also not included in this patch, like gnu::offset (off) parameter to allow to skip certain constant amount of bytes at the start of the files, plus gnu::base64 ("base64_encoded_data") parameter to add something which can store more efficiently large amounts of the #embed data in preprocessed source. I've been cross-checking all the tests also against the LLVM implementation https://github.com/llvm/llvm-project/pull/68620 which has been for a few hours even committed to LLVM trunk but reverted afterwards. LLVM now has the support committed and I admit I haven't rechecked whether the behavior on the below mentioned spots have been fixed in it already or not yet. The patch uses --embed-dir= option that clang plans to add above and doesn't use other variants on the search directories yet, plus there are no default directories at least for the time being where to search for embed files. So, #embed "..." works if it is found in the same directory (or relative to the current file's directory) and #embed "/..." or #embed </...> work always, but relative #embed <...> doesn't unless at least one --embed-dir= is specified. There is no reason to differentiate between system and non-system directories, so we don't need -isystem like counterpart, perhaps -iquote like counterpart could be useful in the future, dunno what else. It has --embed-directory=dir and --embed-directory dir as aliases. There are some differences beyond clang ICEs, so I'd like to point them out to make sure there is agreement on the choices in the patch. They are also mentioned in the comments of the llvm pull request. The most important is that the GCC patch (as well as the original thephd.dev LLVM branch on godbolt) expands #embed (or acts as if it is expanded) into a mere sequence of numbers like 123,2,35,26 rather then what clang effectively treats as (unsigned char)123,(unsigned char)2,(unsigned char)35,(unsigned char)26 but only does that when using integrated preprocessor, not when using -save-temps where it acts as GCC. JeanHeyd as the original author agrees that is how it is currently worded in C23. Another difference (not tested in the testsuite, not sure how to check for effective target /dev/urandom nor am sure it is desirable to check that during testsuite) is how to treat character devices, named pipes etc. (block devices are errored on). The original paper uses /dev/urandom in various examples and seems to assume that unlike regular files the devices aren't really cached, so #embed </dev/urandom> limit(1) prefix(int a = ) suffix(;) #embed </dev/urandom> limit(1) prefix(int b = ) suffix(;) usually results in a != b. That is what the godbolt thephd.dev branch implements too and what this patch does as well, but clang actually seems to just go from st.st_size == 0, ergo it must be zero-sized resource and so just copies over if_empty if present. It is really questionable what to do about the character devices/named pipes with __has_embed, for regular files the patch doesn't read anything from them, relies on st.st_size + limit for whether it is empty or non-empty. But I don't know of a way to check if read on say a character device would read anything or not (the </dev/null> limit (1) vs. </dev/zero> limit (1) cases), and if we read something, that would be better cached for later because #embed later if it reads again could read no further data even when it first read something. So, the patch currently for __has_embed just always returns 2 on the non-regular files, like the thephd.dev branch does as well and like the clang pull request as well. A question is also what to do for gnu::offset on the non-regular files even for #embed, those aren't seekable and do we want to just read and throw away the offset bytes each time we see it used? clang also chokes on the #if __has_embed (__FILE__ __limit__ (1) __prefix__ () suffix (1 / 0) \ __if_empty__ ((({{[0[0{0{0(0(0)1)1}1}]]}})))) != __STDC_EMBED_FOUND__ #error "__has_embed fail" #endif in embed-1.c, but thephd.dev branch accepts it and I don't see why it shouldn't, (({{[0[0{0{0(0(0)1)1}1}]]}}))) is a balanced token sequence and the file isn't empty, so it should just be parsed and discarded. clang also IMHO mishandles const unsigned char w[] = { #embed __FILE__ prefix([0] = 42, [15] =) limit(32) }; but again only without -save-temps, seems like it treats it as [0] = 42, [15] = (99,111,110,115,116,32,117,110,115,105,103,110,101,100, 32,99,104,97,114,32,119,91,93,32,61,32,123,10,35,101,109,98) rather than [0] = 42, [15] = 99,111,110,115,116,32,117,110,115,105,103,110,101,100, 32,99,104,97,114,32,119,91,93,32,61,32,123,10,35,101,109,98 and warns on it for -Wunused-value and just compiles it as [0] = 42, [15] = 98 And also void foo (int, int, int, int); void bar (void) { foo ( #embed __FILE__ limit (4) prefix (172 + ) suffix (+ 2) ); } is treated as 172 + (118, 111, 105, 100) + 2 rather than 172 + 118, 111, 105, 100 + 2 which clang -save-temps or GCC treats it like, so results in just one argument passed rather than 4. if (!strstr ((const char *) magna_carta, "imprisonétur")) abort (); in the testcase fails as well, but in that case calling it in gdb succeeds: p ((char *(*)(char *, char *))__strstr_sse2) (magna_carta, "imprisonétur") $2 = 0x555555558d3c <magna_carta+11564> "imprisonétur aut disseisiátur"... so I guess they are just trying to constant evaluate strstr and do it incorrectly. They started with making the optimizations together in the initial patch set, so they don't have the luxury to compare if it is just because of the optimization they are trying to do or because that is how the feature works for them. At least unless they use -save-temps for now. There is also different behavior between clang and gcc on -M or other dependency generating options. Seems clang includes the __has_embed searched files in dependencies, while my patch doesn't. But so does clang for __has_include and GCC doesn't. Emitting a hard dependency on some header just because there was __has_include/__has_embed for it seems wrong to me, because (at least when properly written) the source likely doesn't mind if the file is missing, it will do something else, so a hard error from make because of it doesn't seem right. Does make have some weaker dependencies, such that if some file can be remade it is but if it doesn't exist, it isn't fatal? I wonder whether #embed <non-existent-file> really needs to be fatal or whether we could simply after diagnosing it pretend the file exists and is empty. For #include I think fatal errors make tons of sense, but perhaps for #embed which is more localized we'd get better error reporting if we didn't bail out immediately. Note, both GCC and clang currently treat those as fatal errors. clang also added -dE option which with -E instead of preprocessing the #embed directives keeps them as is, but the preprocessed source then isn't self-contained. That option looks more harmful than useful to me. Also, it isn't clear to me from C23 whether it is possible to have __has_include/__has_c_attribute/__has_embed expressions inside of the limit #embed/__has_embed argument. 6.10.3.2/2 says that defined should not appear there (and the patch diagnoses it and testsuite tests), but for __has_include/__has_embed etc. 6.10.1/11 says: "The identifiers __has_include, __has_embed, and __has_c_attribute shall not appear in any context not mentioned in this subclause." If that subclause in that case means 6.10.1, then it presumably shouldn't appear in #embed in 6.10.3, but __has_embed is in 6.10.1... But 6.10.3.2/3 says that it should be parsed according to the 6.10.1 rules. Haven't included tests like #if __has_embed (__FILE__ limit (__has_embed (__FILE__ limit (1)))) or #embed __FILE__ limit (__has_include (__FILE__)) into the testsuite because of the doubts but I think the patch should handle those right now. The reason I've used Magna Carta text in some of the testcases is that I hope it shouldn't be copyrighted after the centuries and I'd strongly prefer not to have binary blobs in git after the xz backdoor lesson and wanted something larger which doesn't change all the time. Oh, BTW, I see in C23 draft 6.10.3.2 in Example 4 if (f_source == NULL); return 1; (note the spurious semicolon after closing paren), has that been fixed already? Like the thephd.dev and clang implementations, the patch always macro expands the whole #embed and __has_embed directives except for the embed keyword. That is most likely not what C23 says, my limited understanding right now is that in #embed one needs to parse the whole directive line with macro expansion disabled and check if it satisfies the grammar, if not, the whole directive is macro expanded, if yes, only the limit parameter argument is macro expanded and the prefix/suffix/if_empty arguments are maybe macro expanded when actually used (and not at all if unused). And I think __has_embed macro expansion has conflicting rules. 2024-09-12 Jakub Jelinek <jakub@redhat.com> PR c/105863 libcpp/ * include/cpplib.h: Implement C23 N3017 #embed - a scannable, tooling-friendly binary resource inclusion mechanism paper. (struct cpp_options): Add embed member. (enum cpp_builtin_type): Add BT_HAS_EMBED. (cpp_set_include_chains): Add another cpp_dir * argument to the declaration. * internal.h (enum include_type): Add IT_EMBED. (struct cpp_reader): Add embed_include member. (struct cpp_embed_params_tokens): New type. (struct cpp_embed_params): New type. (_cpp_get_token_no_padding): Declare. (enum _cpp_find_file_kind): Add _cpp_FFK_EMBED and _cpp_FFK_HAS_EMBED. (_cpp_stack_embed): Declare. (_cpp_parse_expr): Change return type to cpp_num_part instead of bool, change second argument from bool to const char * and add third argument. (_cpp_parse_embed_params): Declare. * directives.cc (DIRECTIVE_TABLE): Add embed entry. (end_directive): Don't call skip_rest_of_line for T_EMBED directive. (_cpp_handle_directive): Return 2 rather than 1 for T_EMBED in directives-only mode. (parse_include): Don't Call check_eol for T_EMBED directive. (skip_balanced_token_seq): New function. (EMBED_PARAMS): Define. (enum embed_param_kind): New type. (embed_params): New variable. (_cpp_parse_embed_params): New function. (do_embed): New function. (do_if): Adjust _cpp_parse_expr caller. (do_elif): Likewise. * expr.cc (parse_defined): Diagnose defined in #embed or __has_embed parameters. (_cpp_parse_expr): Change return type to cpp_num_part instead of bool, change second argument from bool to const char * and add third argument. Adjust function comment. For #embed/__has_embed parameters add an artificial CPP_OPEN_PAREN. Use the second argument DIR directly instead of string literals conditional on IS_IF. For #embed/__has_embed parameter, stop on reaching CPP_CLOSE_PAREN matching the artificial one. Diagnose negative or too large embed parameter operands. (num_binary_op): Use #embed instead of #if for diagnostics if inside #embed/__has_embed parameter. (num_div_op): Likewise. * files.cc (struct _cpp_file): Add limit member and embed bitfield. (search_cache): Add IS_EMBED argument, formatting fix. Skip over files with different file->embed from the argument. (find_file_in_dir): Don't call pch_open_file if file->embed. (_cpp_find_file): Handle _cpp_FFK_EMBED and _cpp_FFK_HAS_EMBED. (read_file_guts): Formatting fix. (has_unique_contents): Ignore file->embed files. (search_path_head): Handle IT_EMBED type. (_cpp_stack_embed): New function. (_cpp_get_file_stat): Formatting fix. (cpp_set_include_chains): Add embed argument, save it to pfile->embed_include and compute lens for the chain. * init.cc (struct lang_flags): Add embed member. (lang_defaults): Add embed initializers. (cpp_set_lang): Initialize CPP_OPTION (pfile, embed). (builtin_array): Add __has_embed entry. (cpp_init_builtins): Predefine __STDC_EMBED_NOT_FOUND__, __STDC_EMBED_FOUND__ and __STDC_EMBED_EMPTY__. * lex.cc (cpp_directive_only_process): Handle #embed. * macro.cc (cpp_get_token_no_padding): Rename to ... (_cpp_get_token_no_padding): ... this. No longer static. (builtin_has_include_1): New function. (builtin_has_include): Use it. Use _cpp_get_token_no_padding instead of cpp_get_token_no_padding. (builtin_has_embed): New function. (_cpp_builtin_macro_text): Handle BT_HAS_EMBED. gcc/ * doc/cppdiropts.texi (--embed-dir=): Document. * doc/cpp.texi (Binary Resource Inclusion): New chapter. (__has_embed): Document. * doc/invoke.texi (Directory Options): Mention --embed-dir=. * gcc.cc (cpp_unique_options): Add %{-embed*}. * genmatch.cc (main): Adjust cpp_set_include_chains caller. * incpath.h (enum incpath_kind): Add INC_EMBED. * incpath.cc (merge_include_chains): Handle INC_EMBED. (register_include_chains): Adjust cpp_set_include_chains caller. gcc/c-family/ * c.opt (-embed-dir=): New option. (-embed-directory): New alias. (-embed-directory=): New alias. * c-opts.cc (c_common_handle_option): Handle OPT__embed_dir_. gcc/testsuite/ * c-c++-common/cpp/embed-1.c: New test. * c-c++-common/cpp/embed-2.c: New test. * c-c++-common/cpp/embed-3.c: New test. * c-c++-common/cpp/embed-4.c: New test. * c-c++-common/cpp/embed-5.c: New test. * c-c++-common/cpp/embed-6.c: New test. * c-c++-common/cpp/embed-7.c: New test. * c-c++-common/cpp/embed-8.c: New test. * c-c++-common/cpp/embed-9.c: New test. * c-c++-common/cpp/embed-10.c: New test. * c-c++-common/cpp/embed-11.c: New test. * c-c++-common/cpp/embed-12.c: New test. * c-c++-common/cpp/embed-13.c: New test. * c-c++-common/cpp/embed-14.c: New test. * c-c++-common/cpp/embed-25.c: New test. * c-c++-common/cpp/embed-26.c: New test. * c-c++-common/cpp/embed-dir/embed-1.inc: New test. * c-c++-common/cpp/embed-dir/embed-3.c: New test. * c-c++-common/cpp/embed-dir/embed-4.c: New test. * c-c++-common/cpp/embed-dir/magna-carta.txt: New test. * gcc.dg/cpp/embed-1.c: New test. * gcc.dg/cpp/embed-2.c: New test. * gcc.dg/cpp/embed-3.c: New test. * gcc.dg/cpp/embed-4.c: New test. * g++.dg/cpp/embed-1.C: New test. * g++.dg/cpp/embed-2.C: New test. * g++.dg/cpp/embed-3.C: New test.
2024-09-12c++: Don't ICE to build private access error message [PR116323]Simon Martin2-2/+17
We currently ICE upon the following code while building the "[...] is private within this context" error message === cut here === class A { enum Enum{}; }; template<typename E, template<typename> class Alloc> class B : private Alloc<E>, private A {}; template<typename E, template<typename> class Alloc> int B<E, Alloc>::foo (Enum m) { return 42; } === cut here === The problem is that since r11-6880, after detecting that Enum cannot be accessed in B, enforce_access will access the TYPE_BINFO of all the bases of B, which ICEs for any that is a BOUND_TEMPLATE_TEMPLATE_PARM. This patch simply skips such bases. PR c++/116323 gcc/cp/ChangeLog: * search.cc (get_parent_with_private_access): Only call access_in_type for RECORD_OR_UNION_TYPE_P base BINFOs. gcc/testsuite/ChangeLog: * g++.dg/template/access43.C: New test.
2024-09-12Better recover from SLP reassociation fails during discoveryRichard Biener1-15/+14
When we decide to not process a association chain of size two and that would also mismatch with a different chain size on another lane we shouldn't fail discovery hard at this point. Instead let the regular discovery figure out matching lanes so the parent can decide to perform operand swapping or we can split groups at better points rather than forcefully splitting away the first single lane. For example on gcc.dg/vect/vect-strided-u8-i8.c we now see two groups of size 4 feeding the store instead of groups of size 1, three, two, one and one. * tree-vect-slp.cc (vect_build_slp_tree_2): On reassociation chain length mismatch do not fail discovery of the node but try without re-associating to compute a better matches[]. Provide a reassociation failure hint in the dump. (vect_slp_analyze_node_operations): Avoid stray failure dumping. (vectorizable_slp_permutation_1): Dump the address of the SLP node representing the permutation.
2024-09-12i386: Enable V2BF/V4BF vec_cmp with AVX10.2 vcmppbf16Levy Hsu3-1/+45
gcc/ChangeLog: * config/i386/i386.cc (ix86_get_mask_mode): Enable BFmode for targetm.vectorize.get_mask_mode with AVX10.2. * config/i386/mmx.md (vec_cmp<mode>qi): Implement vec_cmpv2bfqi and vec_cmpv4bfqi. gcc/testsuite/ChangeLog: * gcc.target/i386/part-vect-vec_cmpbf.c: New test.
2024-09-12RISC-V: Eliminate latter vsetvl when fusedBohan Lei2-0/+22
Hi all, A simple assembly check has been added in this version. Previous version: https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662783.html Thanks, Bohan ------ The current vsetvl pass eliminates a vsetvl instruction when the previous info is "available," but does not when "compatible." This can lead to not only redundancy, but also incorrect behaviors when the previous info happens to be compatible with a later vector instruction, which ends of using the vsetvl info that should have been eliminated, as is shown in the testcase. This patch eliminates the vsetvl when the previous info is "compatible." gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pre_vsetvl::fuse_local_vsetvl_info): Delete vsetvl insn when `prev_info` is compatible gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/vsetvl/vsetvl_bug-4.c: New test.
2024-09-12i386: Fix incorrect avx512f-mask-type.h includeHaochen Jiang60-395/+428
In avx512f-mask-type.h, we need SIZE being defined to get MASK_TYPE defined correctly. Fix those testcases where SIZE are not defined before the include for avv512f-mask-type.h. gcc/testsuite/ChangeLog: * gcc.target/i386/avx10-helper.h: Do not include avx512f-mask-type.h. * gcc.target/i386/avx10_2-512-vaddnepbf16-2.c: Define SIZE and include avx512f-mask-type.h. * gcc.target/i386/avx10_2-512-vcmppbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtnebf162ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtnebf162iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttnebf162ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttnebf162iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vdivnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vdpphps-2.c: Ditto. * gcc.target/i386/avx10_2-512-vfmaddXXXnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vfmsubXXXnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vfnmaddXXXnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vfnmsubXXXnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vfpclasspbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vgetexppbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vgetmantpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vmaxpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vminmaxnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vminmaxpd-2.c: Ditto. * gcc.target/i386/avx10_2-512-vminmaxph-2.c: Ditto. * gcc.target/i386/avx10_2-512-vminmaxps-2.c: Ditto. * gcc.target/i386/avx10_2-512-vminpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vmpsadbw-2.c: Ditto. * gcc.target/i386/avx10_2-512-vmulnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpbssd-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpbssds-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpbsud-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpbsuds-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpbuud-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpbuuds-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpwsud-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpwsuds-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpwusd-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpwusds-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpwuud-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpwuuds-2.c: Ditto. * gcc.target/i386/avx10_2-512-vrcppbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vreducenepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vrndscalenepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vrsqrtpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vscalefpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vsqrtnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vsubnepbf16-2.c: Ditto. * gcc.target/i386/avx512fp16-vfpclassph-1b.c: Ditto.
2024-09-12RISC-V: Fix vl_used_by_non_rvv_insn logic of vsetvl passgarthlei2-5/+28
This patch fixes a bug in the current vsetvl pass. The current pass uses `m_vl` to determine whether the dest operand has been used by non-RVV instructions. However, `m_vl` may have been modified as a result of an `update_avl` call, and thus would be no longer the dest operand of the original instruction. This can lead to incorrect vsetvl eliminations, as is shown in the testcase. In this patch, we create a `dest_vl` variable for this scenerio. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc: Use `dest_vl` for dest VL operand gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/vsetvl/vsetvl_bug-3.c: New test.
2024-09-12c++/modules: Really always track partial specialisations [PR116496]Nathaniel Shead4-13/+31
My last fix for this issue (PR c++/114947, r15-810) didn't go far enough; I had assumed that the issue where we lost track of partial specialisations we would need to walk again later was limited to partitions (where we always re-walk all specialisations), but the linked PR is the same cause but for header units, and it is possible to construct test cases exposing the same bug just for normal modules. As such this patch just unconditionally ensures that whenever we modify DECL_TEMPLATE_SPECIALIZATIONS we also track any partial specialisations that might have added. Also clean up a couple of comments and assertions to make expected state more obvious when processing these specs. PR c++/116496 gcc/cp/ChangeLog: * module.cc (trees_in::decl_value): Don't call set_defining_module_for_partial_spec here. (depset::hash::add_partial_entities): Clarity assertions. * pt.cc (add_mergeable_specialization): Always call set_defining_module_for_partial_spec when adding a partial spec. gcc/testsuite/ChangeLog: * g++.dg/modules/partial-5_a.C: New test. * g++.dg/modules/partial-5_b.C: New test. Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
2024-09-12Daily bump.GCC Administrator5-1/+198
2024-09-11ipa-cp: One more use of ipa_vr_supported_type_pMartin Jambor1-2/+1
Since we have the predicate, this patch converts one more check for essentially the same thing into its use. 2024-09-11 Martin Jambor <mjambor@suse.cz> * ipa-cp.cc (propagate_vr_across_jump_function): Use ipa_vr_supported_type_p instead of explicit check for integral and pointer types.
2024-09-11ipa: Rename ipa_supports_p to ipa_vr_supported_type_pMartin Jambor3-6/+7
ipa_supports_p is not a name that captures well what the predicate determines. Therefore, this patch renames it to ipa_vr_supported_type_p. gcc/ChangeLog: 2024-09-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.h (ipa_supports_p): Rename to ipa_vr_supported_type_p. * ipa-cp.cc (ipa_vr_operation_and_type_effects): Adjust called function name. (propagate_vr_across_jump_function): Likewise. * ipa-prop.cc (ipa_compute_jump_functions_for_edge): Likewise. (ipcp_get_parm_bits): Likewise.
2024-09-11arm: avoid indirect sibcalls when IP is live [PR116597]Richard Earnshaw3-11/+55
On Arm only r0-r3 (the argument registers) and IP are available for use as an address for an indirect sibcall. But if all the argument registers are used and IP is clobbered during the epilogue, or is used to pass closure information, then there is no spare register to hold the address and we must reject the sibcall. arm_function_ok_for_sibcall did try to handle this, but it did this by examining the function declaration. That doesn't work if the function has no prototype, or if the prototype has variadic arguments: we must, instead, look at the list of actuals for the call rather than the list of formals. The old code also worked by laying out all the arguments and then trying to add one more integer argument at the end of the list, but this missed a corner case where a hole had been left in the argument register list due to argument alignment. We fix all of this by now scanning the list of actual values to be passed and then checking if a core register has been assigned to that argument. If it has, then we record which registers were assigned. Once done we then look to see if all the argument registers have been assigned and only block the sibcall if that is the case. This permits us to sibcall: int (*d)(int, ...); int g(void); int i () { return d(g(), 2LL);} because r1 remains free (the 2LL argument is passed in {r2,r3}). gcc/ PR target/116597 * config/arm/arm.cc (arm_function_ok_for_sibcall): Use the list of actuals for the call, not the list of formals. gcc/testsuite/ PR target/116597 * gcc.target/arm/pac-sibcall-2.c: New test. * gcc.target/arm/pac-sibcall-3.c: New test.
2024-09-11tree-optimization/116674 - vectorizable_simd_clone_call and re-analysisRichard Biener2-3/+90
When SLP analysis scraps an instance because it fails to analyze we can end up calling vectorizable_* in analysis mode on a node that was analyzed during the analysis of that instance again. vectorizable_simd_clone_call wasn't expecting that and instead guarded analysis/transform code on populated data structures. The following changes it so it survives re-analysis. PR tree-optimization/116674 * tree-vect-stmts.cc (vectorizable_simd_clone_call): Support re-analysis. * g++.dg/vect/pr116674.cc: New testcase.
2024-09-11lto: Stream has_unroll flag during LTO [PR116140]Alex Coplan3-0/+34
When #pragma GCC unroll is processed in tree-cfg.cc:replace_loop_annotate_in_block, we set both the loop->unroll field (which is currently streamed out and back in during LTO) but also the cfun->has_unroll flag. cfun->has_unroll, however, is not currently streamed during LTO. This patch fixes that. Prior to this patch, loops marked with #pragma GCC unroll that would be unrolled by RTL loop2_unroll in a non-LTO compilation didn't get unrolled under LTO. gcc/ChangeLog: PR libstdc++/116140 * lto-streamer-in.cc (input_struct_function_base): Stream in fn->has_unroll. * lto-streamer-out.cc (output_struct_function_base): Stream out fn->has_unroll. gcc/testsuite/ChangeLog: PR libstdc++/116140 * g++.dg/ext/pragma-unroll-lambda-lto.C: New test.
2024-09-11testsuite: Ensure ltrans dump files get cleaned up properly [PR116140]Alex Coplan1-2/+2
I noticed while working on a test that uses LTO and requests a dump file, that we are failing to cleanup ltrans dump files in the testsuite. E.g. the test I was working on compiles with -flto -fdump-rtl-loop2_unroll, and we end up with the following file: ./gcc/testsuite/g++/pr116140.ltrans0.ltrans.287r.loop2_unroll being left behind by the testsuite. This is problematic not just from a "missing cleanup" POV, but also because it can cause the test to pass spuriously when the test is re-run wtih an unpatched compiler (without the bug fix). In the broken case, loop2_unroll isn't run at all, so we end up scanning the old dumpfile (from the previous test run) and making the dumpfile scan pass. Running with `-v -v` in RUNTESTFLAGS we can see the following cleanup attempt is made: remove-build-file `pr116140.{C,exe}.{ltrans[0-9]*.,}[0-9][0-9][0-9]{l,i,r,t}.*' looking again at the ltrans dump file above we can see this will fail for two reasons: - The actual dump file has no {C,exe} extension between the basename and ltrans0. - The actual dump file has an additional `.ltrans` component after `.ltrans0`. This patch therefore relaxes the pattern constructed for cleaning up such dumpfiles to also match dumpfiles with the above form. Running the testsuite before/after this patch shows the number of files in gcc/testsuite (in the build dir) with "ltrans" in the name goes from 1416 to 62 on aarch64. gcc/testsuite/ChangeLog: PR libstdc++/116140 * lib/gcc-dg.exp (schedule-cleanups): Relax ltrans dumpfile cleanup pattern to handle missing cases.
2024-09-11c++: Ensure ANNOTATE_EXPRs remain outermost expressions in conditions [PR116140]Alex Coplan2-1/+104
For the testcase added with this patch, we would end up losing the: #pragma GCC unroll 4 and emitting "warning: ignoring loop annotation". That warning comes from tree-cfg.cc:replace_loop_annotate, and means that we failed to process the ANNOTATE_EXPR in tree-cfg.cc:replace_loop_annotate_in_block. That function walks backwards over the GIMPLE in an exiting BB for a loop, skipping over the final gcond, and looks for any ANNOTATE_EXPRS immediately preceding the gcond. The function documents the following pre-condition: /* [...] We assume that the annotations come immediately before the condition in BB, if any. */ now looking at the exiting BB of the loop, we have: <bb 8> : D.4524 = .ANNOTATE (iftmp.1, 1, 4); retval.0 = D.4524; if (retval.0 != 0) goto <bb 3>; [INV] else goto <bb 9>; [INV] and crucially there is an intervening assignment between the gcond and the preceding .ANNOTATE ifn call. To see where this comes from, we can look to the IR given by -fdump-tree-original: if (<<cleanup_point ANNOTATE_EXPR <first != last && !use_find(short int*)::<lambda(short int)>::operator() (&pred, *first), unroll 4>>>) goto <D.4518>; else goto <D.4516>; here the problem is that we've wrapped a CLEANUP_POINT_EXPR around the ANNOTATE_EXPR, meaning the ANNOTATE_EXPR is no longer the outermost expression in the condition. The CLEANUP_POINT_EXPR gets added by the following call chain: finish_while_stmt_cond -> maybe_convert_cond -> condition_conversion -> fold_build_cleanup_point_expr this patch chooses to fix the issue by first introducing a new helper class (annotate_saver) to save and restore outer chains of ANNOTATE_EXPRs and then using it in maybe_convert_cond. With this patch, we don't get any such warning and the loop gets unrolled as expected at -O2. gcc/cp/ChangeLog: PR libstdc++/116140 * semantics.cc (anotate_saver): New. Use it ... (maybe_convert_cond): ... here, to ensure any ANNOTATE_EXPRs remain the outermost expression(s) of the condition. gcc/testsuite/ChangeLog: PR libstdc++/116140 * g++.dg/ext/pragma-unroll-lambda.C: New test.
2024-09-11OpenMP: Add interop routines to omp_runtime_api_procnameTobias Burnus1-0/+7
gcc/ * omp-general.cc (omp_runtime_api_procname): Add omp_get_interop_{int,name,ptr,rc_desc,str,type_desc} and omp_get_num_interop_properties.
2024-09-11fortran/openmp.cc: Fix var init and locus use to avoid uninit values [PR ↵Tobias Burnus1-1/+2
fortran/116661] gcc/fortran/ChangeLog: PR fortran/116661 * openmp.cc (gfc_match_omp_prefer_type): NULL init a gfc_expr variable and use right locus in gfc_error.
2024-09-11Vect: Support form 1 of vector signed integer .SAT_ADDPan Li2-1/+20
This patch would like to support the vector signed ssadd pattern for the RISC-V backend. Aka Form 1: #define DEF_VEC_SAT_S_ADD_FMT_1(T, UT, MIN, MAX) \ void __attribute__((noinline)) \ vec_sat_s_add_##T##_fmt_1 (T *out, T *x, T *y, unsigned n) \ { \ for (unsigned i = 0; i < n; i++) \ { \ T sum = (UT)x[i] + (UT)y[i]; \ out[i] = (x[i] ^ y[i]) < 0 \ ? sum \ : (sum ^ x[i]) >= 0 \ ? sum \ : x[i] < 0 ? MIN : MAX; \ } \ } DEF_VEC_SAT_S_ADD_FMT_1(int64_t, uint64_t, INT64_MIN, INT64_MAX) If the backend implemented the vector mode of ssadd, we will see IR diff similar as below: Before this patch: 108 │ _114 = .SELECT_VL (ivtmp_112, POLY_INT_CST [2, 2]); 109 │ ivtmp_77 = _114 * 8; 110 │ vect__4.9_80 = .MASK_LEN_LOAD (vectp_x.7_78, 64B, { -1, ... }, _114, 0); 111 │ vect__5.10_81 = VIEW_CONVERT_EXPR<vector([2,2]) long unsigned int>(vect__4.9_80); 112 │ vect__7.13_85 = .MASK_LEN_LOAD (vectp_y.11_83, 64B, { -1, ... }, _114, 0); 113 │ vect__8.14_86 = VIEW_CONVERT_EXPR<vector([2,2]) long unsigned int>(vect__7.13_85); 114 │ vect__9.15_87 = vect__5.10_81 + vect__8.14_86; 115 │ vect_sum_20.16_88 = VIEW_CONVERT_EXPR<vector([2,2]) long int>(vect__9.15_87); 116 │ vect__10.17_89 = vect__4.9_80 ^ vect__7.13_85; 117 │ vect__11.18_90 = vect__4.9_80 ^ vect_sum_20.16_88; 118 │ mask__46.19_92 = vect__10.17_89 >= { 0, ... }; 119 │ _36 = vect__4.9_80 >> 63; 120 │ mask__44.26_104 = vect__11.18_90 < { 0, ... }; 121 │ mask__43.27_105 = mask__46.19_92 & mask__44.26_104; 122 │ _115 = .COND_XOR (mask__43.27_105, _36, { 9223372036854775807, ... }, vect_sum_20.16_88); 123 │ .MASK_LEN_STORE (vectp_out.29_108, 64B, { -1, ... }, _114, 0, _115); 124 │ vectp_x.7_79 = vectp_x.7_78 + ivtmp_77; 125 │ vectp_y.11_84 = vectp_y.11_83 + ivtmp_77; 126 │ vectp_out.29_109 = vectp_out.29_108 + ivtmp_77; 127 │ ivtmp_113 = ivtmp_112 - _114; After this patch: 94 │ # vectp_x.7_82 = PHI <vectp_x.7_83(6), x_18(D)(5)> 95 │ # vectp_y.10_86 = PHI <vectp_y.10_87(6), y_19(D)(5)> 96 │ # vectp_out.14_91 = PHI <vectp_out.14_92(6), out_21(D)(5)> 97 │ # ivtmp_95 = PHI <ivtmp_96(6), _94(5)> 98 │ _97 = .SELECT_VL (ivtmp_95, POLY_INT_CST [2, 2]); 99 │ ivtmp_81 = _97 * 8; 100 │ vect__4.9_84 = .MASK_LEN_LOAD (vectp_x.7_82, 64B, { -1, ... }, _97, 0); 101 │ vect__7.12_88 = .MASK_LEN_LOAD (vectp_y.10_86, 64B, { -1, ... }, _97, 0); 102 │ vect_patt_40.13_89 = .SAT_ADD (vect__4.9_84, vect__7.12_88); 103 │ .MASK_LEN_STORE (vectp_out.14_91, 64B, { -1, ... }, _97, 0, vect_patt_40.13_89); 104 │ vectp_x.7_83 = vectp_x.7_82 + ivtmp_81; 105 │ vectp_y.10_87 = vectp_y.10_86 + ivtmp_81; 106 │ vectp_out.14_92 = vectp_out.14_91 + ivtmp_81; 107 │ ivtmp_96 = ivtmp_95 - _97; The below test suites are passed for this patch: 1. The rv64gcv fully regression tests. 2. The x86 bootstrap tests. 3. The x86 fully regression tests. gcc/ChangeLog: * match.pd: Add case 2 for the signed .SAT_ADD consumed by vect pattern. * tree-vect-patterns.cc (gimple_signed_integer_sat_add): Add new matching func decl for signed .SAT_ADD. (vect_recog_sat_add_pattern): Add signed .SAT_ADD pattern match. Signed-off-by: Pan Li <pan2.li@intel.com>
2024-09-11Enable tune fuse_move_and_alu for GNR.liuhongt1-1/+2
According to Intel Software Optimization Manual[1], the Redwood cove microarchitecture supports LD+OP and MOV+OP macro fusions. The patch enables MOV+OP tune for GNR. [1] https://www.intel.com/content/www/us/en/content-details/814198/intel-64-and-ia-32-architectures-optimization-reference-manual-volume-1.html gcc/ChangeLog: * config/i386/x86-tune.def (X86_TUNE_FUSE_MOV_AND_ALU): Enable for GNR and GNR-D.
2024-09-11RISC-V: Fix asm check for Vector SAT_* due to middle-end changePan Li99-294/+179
The middle-end change makes the effect on the layout of the assembly for vector SAT_*. This patch would like to fix it and make it robust. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-1.c: Adjust asm check and make it robust. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-10.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-11.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-12.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-13.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-14.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-15.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-16.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-17.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-18.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-19.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-2.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-20.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-21.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-22.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-23.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-24.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-25.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-26.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-27.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-28.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-29.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-3.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-30.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-31.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-32.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-4.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-5.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-6.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-7.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-8.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-9.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-1.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-10.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-11.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-12.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-13.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-14.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-15.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-16.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-17.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-18.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-19.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-2.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-20.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-21.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-22.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-23.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-24.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-25.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-26.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-27.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-28.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-29.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-3.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-30.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-31.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-32.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-33.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-34.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-35.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-36.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-37.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-38.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-39.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-4.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-40.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-5.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-6.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-7.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-8.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-9.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub_trunc-1.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub_trunc-2.c: Ditto. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub_trunc-3.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-1.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-10.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-11.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-12.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-13.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-14.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-15.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-16.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-17.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-18.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-19.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-2.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-20.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-21.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-22.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-23.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-24.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-3.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-4.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-5.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-6.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-7.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-8.c: Ditto. * gcc.target/riscv/rvv/autovec/unop/vec_sat_u_trunc-9.c: Ditto. Signed-off-by: Pan Li <pan2.li@intel.com>
2024-09-11Daily bump.GCC Administrator5-1/+129
2024-09-10c++: Fix get_member_function_from_ptrfunc with -fsanitize=bounds [PR116449]Jakub Jelinek2-3/+30
The following testcase is miscompiled, because get_member_function_from_ptrfunc emits something like (((FUNCTION.__pfn & 1) != 0) ? ptr + FUNCTION.__delta + FUNCTION.__pfn - 1 : FUNCTION.__pfn) (ptr + FUNCTION.__delta, ...) or so, so FUNCTION tree is used there 5 times. There is if (TREE_SIDE_EFFECTS (function)) function = save_expr (function); but in this case function doesn't have side-effects, just nested ARRAY_REFs. Now, if all the FUNCTION trees would be shared, it would work fine, FUNCTION is evaluated in the first operand of COND_EXPR; but unfortunately that isn't the case, both the BIT_AND_EXPR shortening and conversion to bool done for build_conditional_expr actually unshare_expr that first expression, but none of the other 4 are unshared. With -fsanitize=bounds, .UBSAN_BOUNDS calls are added to the ARRAY_REFs and use save_expr to avoid evaluating the argument multiple times, but because that FUNCTION tree is first used in the second argument of COND_EXPR (i.e. conditionally), the SAVE_EXPR initialization is done just there and then the third argument of COND_EXPR just uses the uninitialized temporary and so does the first argument computation as well. The following patch fixes that by doing save_expr even if !TREE_SIDE_EFFECTS, but to avoid doing that too often only if !nonvirtual and if the expression isn't a simple decl. 2024-09-10 Jakub Jelinek <jakub@redhat.com> PR c++/116449 * typeck.cc (get_member_function_from_ptrfunc): Use save_expr on instance_ptr and function even if it doesn't have side-effects, as long as it isn't a decl. * g++.dg/ubsan/pr116449.C: New test.
2024-09-10c++: mutable temps in rodata [PR116369]Marek Polacek2-1/+16
Here we wrongly mark the reference temporary for g TREE_READONLY, so it's put in .rodata and so we can't modify its subobject even when the subobject is marked mutable. This is so since r9-869. r14-1785 fixed a similar problem, but not in set_up_extended_ref_temp. PR c++/116369 gcc/cp/ChangeLog: * call.cc (set_up_extended_ref_temp): Don't mark a temporary TREE_READONLY if its type is TYPE_HAS_MUTABLE_P. gcc/testsuite/ChangeLog: * g++.dg/tree-ssa/initlist-opt7.C: New test.
2024-09-10Pass host specific ABI opts from mkoffload.Prathamesh Kulkarni8-30/+46
The patch adds an option -foffload-abi-host-opts, which is set by host in TARGET_OFFLOAD_OPTIONS, and mkoffload then passes its value to host_compiler. gcc/ChangeLog: PR target/96265 * common.opt (foffload-abi-host-opts): New option. * config/aarch64/aarch64.cc (aarch64_offload_options): Pass -foffload-abi-host-opts. * config/i386/i386-options.cc (ix86_offload_options): Likewise. * config/rs6000/rs6000.cc (rs6000_offload_options): Likewise. * config/nvptx/mkoffload.cc (offload_abi_host_opts): Define. (compile_native): Append offload_abi_host_opts to argv_obstack. (main): Handle option -foffload-abi-host-opts. * config/gcn/mkoffload.cc (offload_abi_host_opts): Define. (compile_native): Append offload_abi_host_opts to argv_obstack. (main): Handle option -foffload-abi-host-opts. * lto-wrapper.cc (merge_and_complain): Handle -foffload-abi-host-opts. (append_compiler_options): Likewise. * opts.cc (common_handle_option): Likewise. Signed-off-by: Prathamesh Kulkarni <prathameshk@nvidia.com>
2024-09-10tree-optimization/116658 - latent issue in vect_is_slp_load_nodeRichard Biener2-3/+62
Permute nodes do not have a representative so we have to guard vect_is_slp_load_node against those. PR tree-optimization/116658 * tree-vect-slp.cc (vect_is_slp_load_node): Make sure node isn't a permute. * g++.dg/vect/pr116658.cc: New testcase.
2024-09-10Match: Support form 2 for scalar signed integer .SAT_ADDPan Li1-0/+14
This patch would like to support the form 2 of the scalar signed integer .SAT_ADD. Aka below example: Form 2: #define DEF_SAT_S_ADD_FMT_2(T, UT, MIN, MAX) \ T __attribute__((noinline)) \ sat_s_add_##T##_fmt_2 (T x, T y) \ { \ T sum = (UT)x + (UT)y; \ \ if ((x ^ y) < 0 || (sum ^ x) >= 0) \ return sum; \ \ return x < 0 ? MIN : MAX; \ } DEF_SAT_S_ADD_FMT_2(int8_t, uint8_t, INT8_MIN, INT8_MAX) We can tell the difference before and after this patch if backend implemented the ssadd<m>3 pattern similar as below. Before this patch: 4 │ __attribute__((noinline)) 5 │ int8_t sat_s_add_int8_t_fmt_2 (int8_t x, int8_t y) 6 │ { 7 │ int8_t sum; 8 │ unsigned char x.0_1; 9 │ unsigned char y.1_2; 10 │ unsigned char _3; 11 │ signed char _4; 12 │ signed char _5; 13 │ int8_t _6; 14 │ _Bool _11; 15 │ signed char _12; 16 │ signed char _13; 17 │ signed char _14; 18 │ signed char _22; 19 │ signed char _23; 20 │ 21 │ ;; basic block 2, loop depth 0 22 │ ;; pred: ENTRY 23 │ x.0_1 = (unsigned char) x_7(D); 24 │ y.1_2 = (unsigned char) y_8(D); 25 │ _3 = x.0_1 + y.1_2; 26 │ sum_9 = (int8_t) _3; 27 │ _4 = x_7(D) ^ y_8(D); 28 │ _5 = x_7(D) ^ sum_9; 29 │ _23 = ~_4; 30 │ _22 = _5 & _23; 31 │ if (_22 >= 0) 32 │ goto <bb 4>; [42.57%] 33 │ else 34 │ goto <bb 3>; [57.43%] 35 │ ;; succ: 4 36 │ ;; 3 37 │ 38 │ ;; basic block 3, loop depth 0 39 │ ;; pred: 2 40 │ _11 = x_7(D) < 0; 41 │ _12 = (signed char) _11; 42 │ _13 = -_12; 43 │ _14 = _13 ^ 127; 44 │ ;; succ: 4 45 │ 46 │ ;; basic block 4, loop depth 0 47 │ ;; pred: 2 48 │ ;; 3 49 │ # _6 = PHI <sum_9(2), _14(3)> 50 │ return _6; 51 │ ;; succ: EXIT 52 │ 53 │ } After this patch: 4 │ __attribute__((noinline)) 5 │ int8_t sat_s_add_int8_t_fmt_2 (int8_t x, int8_t y) 6 │ { 7 │ int8_t _6; 8 │ 9 │ ;; basic block 2, loop depth 0 10 │ ;; pred: ENTRY 11 │ _6 = .SAT_ADD (x_7(D), y_8(D)); [tail call] 12 │ return _6; 13 │ ;; succ: EXIT 14 │ 15 │ } 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: Add the form 2 of signed .SAT_ADD matching. Signed-off-by: Pan Li <pan2.li@intel.com>
2024-09-10ada: Include missing associated header fileEric Botcazou1-0/+1
memmodel.h must be included alongside tm_p.h for the sake of the SPARC port. gcc/ada/ * gcc-interface/misc.cc: Include memmodel.h before tm_p.h.
2024-09-10ada: Use the same warning character in continuationsViljar Indus2-11/+11
gcc/ada/ * gcc-interface/decl.cc: Use same warning characters in continuation messages. * gcc-interface/trans.cc: Likewise.
2024-09-10ada: First controlling parameter: report error without Extensions allowedJavier Miranda2-20/+61
Enable reporting an error when this new aspect/pragma is set to True, and the sources are compiled without language extensions allowed. gcc/ada/ * sem_ch13.adb (Analyze_One_Aspect): Call Error_Msg_GNAT_Extension() to report an error when the aspect First_Controlling_Parameter is set to True and the sources are compiled without Core_Extensions_ Allowed. * sem_prag.adb (Pragma_First_Controlling_Parameter): Call subprogram Error_Msg_GNAT_Extension() to report an error when the aspect First_Controlling_Parameter is set to True and the sources are compiled without Core_Extensions_Allowed. Report an error when the aspect pragma does not confirm an inherited True value.
2024-09-10ada: Normalize span generation on different platformsViljar Indus1-3/+27
The total number of characters on a source code line is different on Windows and Linux based systems (CRLF vs LF endings). Use the last non line change character to adjust printing the spans that go over the end of line. gcc/ada/ * diagnostics-pretty_emitter.adb (Get_Last_Line_Char): New. Get the last non line change character. Write_Span_Labels use the adjusted line end pointer to calculate the length of the span.
2024-09-10ada: Evaluate calls to GNAT.Source_Info routines in semantic checkingPiotr Trojanek3-9/+39
When semantic checking mode is active, i.e. when switch -gnatc is present or when the frontend is operating in the GNATprove mode, we now rewrite calls to GNAT.Source_Info routines in evaluation and not expansion (which is disabled in these modes). This is needed to recognize constants initialized with calls to GNAT.Source_Info as static constants, regardless of expansion being enabled. gcc/ada/ * exp_intr.ads, exp_intr.adb (Expand_Source_Info): Move declaration to package spec. * sem_eval.adb (Eval_Intrinsic_Call): Evaluate calls to GNAT.Source_Info where possible.