aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-10-21Add 'gcc.dg/tree-ssa/pr107195-3.c' [PR107195]Thomas Schwinge1-0/+112
... to display optimization performed as of recent commit r13-3217-gc4d15dddf6b9eacb36f535807ad2ee364af46e04 "[PR107195] Set range to zero when nonzero mask is 0". PR tree-optimization/107195 gcc/testsuite/ * gcc.dg/tree-ssa/pr107195-3.c: New.
2022-10-21tree-optimization/107323 - loop distribution partition ordering issueRichard Biener2-14/+64
The following reverts part of the PR94125 fix which causes us to use a bogus partition ordering after applying versioning for alias to the testcase in PR107323. Instead PR94125 is fixed by appropriately considering to be merged SCCs when skipping edges we want to ignore because of the alias versioning. PR tree-optimization/107323 * tree-loop-distribution.cc (pg_unmark_merged_alias_ddrs): New function. (loop_distribution::break_alias_scc_partitions): Revert postorder save/restore from the PR94125 fix. Instead make sure to not ignore edges from SCCs we are going to merge. * gcc.dg/tree-ssa/pr107323.c: New testcase.
2022-10-21RISC-V: Add type attribute for atomic instructions.Monk Chiang2-6/+11
gcc/ChangeLog: * config/riscv/riscv.md: Add atomic type attribute. * config/riscv/sync.md: Add atomic type for atomic instructions.
2022-10-21match.pd: Fix up gcc.dg/pr54346.c on i686-linux [PR54346]Jakub Jelinek2-2/+11
The pr54346.c testcase FAILs on i686-linux (without -msse*) for multiple reasons. One is the trivial missing -Wno-psabi which the following patch adds, but that isn't enough. The thing is that without native vector support, we have VEC_PERM_EXPRs in the IL and are actually considering the nested VEC_PERM_EXPRs into one VEC_PERM_EXPR optimization, but punt because can_vec_perm_const_p (result_mode, op_mode, sel2, false) is false. Such a test makes sense to prevent "optimizing" two VEC_PERM_EXPRs that can be handled by the backend natively into one VEC_PERM_EXPR that can't be handled. But if both of the original VEC_PERM_EXPRs can't be handled natively either, having just one VEC_PERM_EXPR that will be lowered by generic vec lowering is IMHO still better than 2. Or even if we trade just one VEC_PERM_EXPR that can't be handled plus one that can to one that can't be handled. Also, removing the testcase's executable permissions... 2022-10-21 <jakub@redhat.com> PR tree-optimization/54346 * match.pd ((vec_perm (vec_perm@0 @1 @2 VECTOR_CST) @0 VECTOR_CST)): Optimize nested VEC_PERM_EXPRs even if target can't handle the new one provided we don't increase number of VEC_PERM_EXPRs the target can't handle. * gcc.dg/pr54346.c: Add -Wno-psabi to dg-options.
2022-10-21c++: Fix up mangling ICE with void{} [PR106863]Jakub Jelinek2-1/+24
We ICE on the following testcase during mangling, finish_compound_literal returns for void{} void_node and the mangler doesn't handle it. Handling void_node in the mangler seems problematic to me, because we don't know for which case it has been created. The following patch arranges to mangle it as other compound literals with no operands, so it demangles as void{}, by returning a void type COMPOUND_LITERAL_P with no elements if processing_template_decl. Otherwise it keeps returning void_node. 2022-10-21 Jakub Jelinek <jakub@redhat.com> PR c++/106863 * semantics.cc (finish_compound_literal): For void{}, if processing_template_decl return a COMPOUND_LITERAL_P CONSTRUCTOR rather than void_node. * g++.dg/cpp0x/dr2351-2.C: New test.
2022-10-21Don't build readline/libreadline.a, when --with-system-readline is suppliedДилян Палаузов2-0/+12
https://sourceware.org/bugzilla/show_bug.cgi?id=18632 The bundled libreadline is always built, even if the system is ./configure'd --with-system-readline and the build libreadline.a is not used. Proposed patch: Fix ./configure.ac not to proceed readline/, when --with-system- readline is provided * configure.ac: Don't configure readline if --with-system-readline is used. * configure: Re-generate.
2022-10-21RISC-V: Add RVV vsetvl/vsetvlmax intrinsics and tests.Ju-Zhe Zhong13-2/+1300
gcc/ChangeLog: * config.gcc: Add riscv-vector-builtins-bases.o and riscv-vector-builtins-shapes.o * config/riscv/riscv-vector-builtins.cc (DEF_RVV_I_OPS): New macro. (DEF_RVV_FUNCTION): Ditto. (handle_pragma_vector): Add intrinsic framework. * config/riscv/riscv.cc (riscv_print_operand): Add operand print for vsetvl/vsetvlmax. * config/riscv/riscv.md: include vector.md. * config/riscv/t-riscv: Add riscv-vector-builtins-bases.o and riscv-vector-builtins-shapes.o * config/riscv/riscv-vector-builtins-bases.cc: New file. * config/riscv/riscv-vector-builtins-bases.h: New file. * config/riscv/riscv-vector-builtins-functions.def: New file. * config/riscv/riscv-vector-builtins-shapes.cc: New file. * config/riscv/riscv-vector-builtins-shapes.h: New file. * config/riscv/riscv-vector-builtins-types.def: New file. * config/riscv/vector.md: New file. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/vsetvl-1.c: New test.
2022-10-21RISC-V: Add RVV intrinsic basic framework.Ju-Zhe Zhong6-81/+1065
gcc/ChangeLog: * config.gcc: Add gt files since function_instance is GTY ((user)). * config/riscv/riscv-builtins.cc (riscv_init_builtins): Add RVV intrinsic framework. (riscv_builtin_decl): Ditto. (riscv_expand_builtin): Ditto. * config/riscv/riscv-protos.h (builtin_decl): New function. (expand_builtin): Ditto. (enum riscv_builtin_class): New enum to classify RVV intrinsic and RISC-V general built-in. * config/riscv/riscv-vector-builtins.cc (class GTY): New declaration. (struct registered_function_hasher): New struct. (DEF_RVV_OP_TYPE): New macro. (DEF_RVV_TYPE): Ditto. (DEF_RVV_PRED_TYPE): Ditto. (GTY): New declaration. (add_attribute): New function. (check_required_extensions): Ditto. (rvv_arg_type_info::get_tree_type): Ditto. (function_instance::function_instance): Ditto. (function_instance::operator==): Ditto. (function_instance::any_type_float_p): Ditto. (function_instance::get_return_type): Ditto. (function_instance::get_arg_type): Ditto. (function_instance::hash): Ditto. (function_instance::call_properties): Ditto. (function_instance::reads_global_state_p): Ditto. (function_instance::modifies_global_state_p): Ditto. (function_instance::could_trap_p): Ditto. (function_builder::function_builder): Ditto. (function_builder::~function_builder): Ditto. (function_builder::allocate_argument_types): Ditto. (function_builder::register_function_group): Ditto. (function_builder::append_name): Ditto. (function_builder::finish_name): Ditto. (function_builder::get_attributes): Ditto. (function_builder::add_function): Ditto. (function_builder::add_unique_function): Ditto. (function_call_info::function_call_info): Ditto. (function_expander::function_expander): Ditto. (function_expander::add_input_operand): Ditto. (function_expander::generate_insn): Ditto. (registered_function_hasher::hash): Ditto. (registered_function_hasher::equal): Ditto. (builtin_decl): Ditto. (expand_builtin): Ditto. (gt_ggc_mx): Define for using GCC garbage collect. (gt_pch_nx): Define for using GCC garbage collect. * config/riscv/riscv-vector-builtins.def (DEF_RVV_OP_TYPE): New macro. (DEF_RVV_PRED_TYPE): Ditto. (vbool64_t): Add suffix. (vbool32_t): Ditto. (vbool16_t): Ditto. (vbool8_t): Ditto. (vbool4_t): Ditto. (vbool2_t): Ditto. (vbool1_t): Ditto. (vint8mf8_t): Ditto. (vuint8mf8_t): Ditto. (vint8mf4_t): Ditto. (vuint8mf4_t): Ditto. (vint8mf2_t): Ditto. (vuint8mf2_t): Ditto. (vint8m1_t): Ditto. (vuint8m1_t): Ditto. (vint8m2_t): Ditto. (vuint8m2_t): Ditto. (vint8m4_t): Ditto. (vuint8m4_t): Ditto. (vint8m8_t): Ditto. (vuint8m8_t): Ditto. (vint16mf4_t): Ditto. (vuint16mf4_t): Ditto. (vint16mf2_t): Ditto. (vuint16mf2_t): Ditto. (vint16m1_t): Ditto. (vuint16m1_t): Ditto. (vint16m2_t): Ditto. (vuint16m2_t): Ditto. (vint16m4_t): Ditto. (vuint16m4_t): Ditto. (vint16m8_t): Ditto. (vuint16m8_t): Ditto. (vint32mf2_t): Ditto. (vuint32mf2_t): Ditto. (vint32m1_t): Ditto. (vuint32m1_t): Ditto. (vint32m2_t): Ditto. (vuint32m2_t): Ditto. (vint32m4_t): Ditto. (vuint32m4_t): Ditto. (vint32m8_t): Ditto. (vuint32m8_t): Ditto. (vint64m1_t): Ditto. (vuint64m1_t): Ditto. (vint64m2_t): Ditto. (vuint64m2_t): Ditto. (vint64m4_t): Ditto. (vuint64m4_t): Ditto. (vint64m8_t): Ditto. (vuint64m8_t): Ditto. (vfloat32mf2_t): Ditto. (vfloat32m1_t): Ditto. (vfloat32m2_t): Ditto. (vfloat32m4_t): Ditto. (vfloat32m8_t): Ditto. (vfloat64m1_t): Ditto. (vfloat64m2_t): Ditto. (vfloat64m4_t): Ditto. (vfloat64m8_t): Ditto. (vv): Ditto. (vx): Ditto. (v): Ditto. (wv): Ditto. (wx): Ditto. (x_x_v): Ditto. (vf2): Ditto. (vf4): Ditto. (vf8): Ditto. (vvm): Ditto. (vxm): Ditto. (x_x_w): Ditto. (v_v): Ditto. (v_x): Ditto. (vs): Ditto. (mm): Ditto. (m): Ditto. (vf): Ditto. (vm): Ditto. (wf): Ditto. (vfm): Ditto. (v_f): Ditto. (ta): Ditto. (tu): Ditto. (ma): Ditto. (mu): Ditto. (tama): Ditto. (tamu): Ditto. (tuma): Ditto. (tumu): Ditto. (tam): Ditto. (tum): Ditto. * config/riscv/riscv-vector-builtins.h (GCC_RISCV_VECTOR_BUILTINS_H): New macro. (RVV_REQUIRE_RV64BIT): Ditto. (RVV_REQUIRE_ZVE64): Ditto. (RVV_REQUIRE_ELEN_FP_32): Ditto. (RVV_REQUIRE_ELEN_FP_64): Ditto. (enum operand_type_index): New enum. (DEF_RVV_OP_TYPE): New macro. (enum predication_type_index): New enum. (DEF_RVV_PRED_TYPE): New macro. (enum rvv_base_type): New enum. (struct rvv_builtin_suffixes): New struct. (struct rvv_arg_type_info): Ditto. (struct rvv_type_info): Ditto. (struct rvv_op_info): Ditto. (class registered_function): New class. (class function_base): Ditto. (class function_shape): Ditto. (struct function_group_info): New struct. (class GTY): New class. (class function_builder): Ditto. (class function_call_info): Ditto. (function_call_info::function_returns_void_p): New function. (class function_expander): New class. (function_instance::operator!=): New function. (function_expander::expand): Ditto. (function_expander::add_input_operand): Ditto. (function_base::call_properties): Ditto.
2022-10-21i386: Auto vectorize sdot_prod, udot_prod with VNNIINT8 instruction.Haochen Jiang3-11/+153
gcc/ChangeLog: * config/i386/sse.md (ssedvecmode): Rename from VI1SI. (ssedvecmodelower): Rename from vi1si. (sdot_prod<mode>): New define_expand. (udot_prod<mode>): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/vnniint8-auto-vectorize-1.c: New test. * gcc.target/i386/vnniint8-auto-vectorize-2.c: Ditto.
2022-10-21Support Intel AVX-VNNI-INT8Kong Lingling34-34/+758
gcc/ChangeLog * common/config/i386/cpuinfo.h (get_available_features): Detect avxvnniint8. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AVXVNNIINT8_SET): New. (OPTION_MASK_ISA2_AVXVNNIINT8_UNSET): Ditto. (ix86_handle_option): Handle -mavxvnniint8. * common/config/i386/i386-cpuinfo.h (enum processor_features): Add FEATURE_AVXVNNIINT8. * common/config/i386/i386-isas.h: Add ISA_NAME_TABLE_ENTRY for avxvnniint8. * config.gcc: Add avxvnniint8intrin.h. * config/i386/avxvnniint8intrin.h: New file. * config/i386/cpuid.h (bit_AVXVNNIINT8): New. * config/i386/i386-builtin.def: Add new builtins. * config/i386/i386-c.cc (ix86_target_macros_internal): Define __AVXVNNIINT8__. * config/i386/i386-options.cc (isa2_opts): Add -mavxvnniint8. (ix86_valid_target_attribute_inner_p): Handle avxvnniint8. * config/i386/i386-isa.def: Add DEF_PTA(AVXVNNIINT8) New.. * config/i386/i386.opt: Add option -mavxvnniint8. * config/i386/immintrin.h: Include avxvnniint8intrin.h. * config/i386/sse.md (UNSPEC_VPMADDUBSWACCD UNSPEC_VPMADDUBSWACCSSD,UNSPEC_VPMADDWDACCD, UNSPEC_VPMADDWDACCSSD): Rename according to new style. (vpdp<vpdotprodtype>_<mode>): New define_insn. * doc/extend.texi: Document avxvnniint8. * doc/invoke.texi: Document -mavxvnniint8. * doc/sourcebuild.texi: Document target avxvnniint8. gcc/testsuite/ChangeLog * g++.dg/other/i386-2.C: Add -mavxvnniint8. * g++.dg/other/i386-3.C: Ditto. * gcc.target/i386/avx-check.h: Add avxvnniint8 check. * gcc.target/i386/sse-12.c: Add -mavxvnniint8. * gcc.target/i386/sse-13.c: Ditto. * gcc.target/i386/sse-14.c: Ditto. * gcc.target/i386/sse-22.c: Ditto. * gcc.target/i386/sse-23.c: Ditto. * gcc.target/i386/funcspec-56.inc: Add new target attribute. * lib/target-supports.exp (check_effective_target_avxvnniint8): New. * gcc.target/i386/avxvnniint8-1.c: Ditto. * gcc.target/i386/avxvnniint8-vpdpbssd-2.c: Ditto. * gcc.target/i386/avxvnniint8-vpdpbssds-2.c: Ditto. * gcc.target/i386/avxvnniint8-vpdpbsud-2.c: Ditto. * gcc.target/i386/avxvnniint8-vpdpbsuds-2.c: Ditto. * gcc.target/i386/avxvnniint8-vpdpbuud-2.c: Ditto. * gcc.target/i386/avxvnniint8-vpdpbuuds-2.c: Ditto. Co-authored-by: Hongyu Wang <hongyu.wang@intel.com> Co-authored-by: Haochen Jiang <haochen.jiang@intel.com>
2022-10-21Support Intel AVX-IFMAHongyu Wang43-82/+563
gcc/ * common/config/i386/i386-common.cc (OPTION_MASK_ISA_AVXIFMA_SET, OPTION_MASK_ISA2_AVXIFMA_UNSET, OPTION_MASK_ISA2_AVX2_UNSET): New macro. (ix86_handle_option): Handle -mavxifma. * common/config/i386/i386-cpuinfo.h (processor_types): Add FEATURE_AVXIFMA. * common/config/i386/i386-isas.h: Add ISA_NAME_TABLE_ENTRY for avxifma. * common/config/i386/cpuinfo.h (get_available_features): Detect avxifma. * config.gcc: Add avxifmaintrin.h * config/i386/avx512ifmavlintrin.h: (_mm_madd52lo_epu64): Change to macro. (_mm_madd52hi_epu64): Likewise. (_mm256_madd52lo_epu64): Likewise. (_mm256_madd52hi_epu64): Likewise. * config/i386/avxifmaintrin.h: New header. * config/i386/cpuid.h (bit_AVXIFMA): New. * config/i386/i386-builtin.def: Add new builtins, and correct pattern names for AVX512IFMA. * config/i386/i386-builtins.cc (def_builtin): Handle AVX-IFMA builtins like AVX-VNNI. * config/i386/i386-c.cc (ix86_target_macros_internal): Define __AVXIFMA__. * config/i386/i386-expand.cc (ix86_check_builtin_isa_match): Relax ISA masks for AVXIFMA. * config/i386/i386-isa.def: Add AVXIFMA. * config/i386/i386-options.cc (isa2_opts): Add -mavxifma. (ix86_valid_target_attribute_inner_p): Handle avxifma. * config/i386/i386.md (isa): Add attr avxifma and avxifmavl. * config/i386/i386.opt: Add option -mavxifma. * config/i386/immintrin.h: Inculde avxifmaintrin.h. * config/i386/sse.md (avx_vpmadd52<vpmadd52type>_<mode>): Remove. (vpamdd52<vpmadd52type><mode><sd_maskz_name>): Remove. (vpamdd52huq<mode>_maskz): Rename to ... (vpmadd52huq<mode>_maskz): ... this. (vpamdd52luq<mode>_maskz): Rename to ... (vpmadd52luq<mode>_maskz): ... this. (vpmadd52<vpmadd52type><mode>): New define_insn. (vpmadd52<vpmadd52type>v8di): Likewise. (vpmadd52<vpmadd52type><mode>_maskz_1): Likewise. (vpamdd52<vpmadd52type><mode>_mask): Rename to ... (vpmadd52<vpmadd52type><mode>_mask): ... this. * doc/invoke.texi: Document -mavxifma. * doc/extend.texi: Document avxifma. * doc/sourcebuild.texi: Document target avxifma. gcc/testsuite/ * gcc.target/i386/avx-check.h: Add avxifma check. * gcc.target/i386/avx512ifma-vpmaddhuq-1.c: Remane.. * gcc.target/i386/avx512ifma-vpmaddhuq-1a.c: To this. * gcc.target/i386/avx512ifma-vpmaddluq-1.c: Ditto. * gcc.target/i386/avx512ifma-vpmaddluq-1a.c: Ditto. * gcc.target/i386/avx512ifma-vpmaddhuq-1b.c: New Test. * gcc.target/i386/avx512ifma-vpmaddluq-1b.c: Ditto. * gcc.target/i386/avx-ifma-1.c: Ditto. * gcc.target/i386/avx-ifma-2.c: Ditto. * gcc.target/i386/avx-ifma-3.c: Ditto. * gcc.target/i386/avx-ifma-4.c: Ditto. * gcc.target/i386/avx-ifma-5.c: Ditto. * gcc.target/i386/avx-ifma-6.c: Ditto. * gcc.target/i386/avx-ifma-vpmaddhuq-2.c: Ditto. * gcc.target/i386/avx-ifma-vpmaddluq-2.c: Ditto. * gcc.target/i386/sse-12.c: Add -mavxifma. * gcc.target/i386/sse-13.c: Ditto. * gcc.target/i386/sse-14.c: Ditto. * gcc.target/i386/sse-22.c: Ditto. * gcc.target/i386/sse-23.c: Ditto. * g++.dg/other/i386-2.C: Ditto. * g++.dg/other/i386-3.C: Ditto. * gcc.target/i386/funcspec-56.inc: Add new target attribute. * lib/target-supports.exp (check_effective_target_avxifma): New.
2022-10-21Daily bump.GCC Administrator11-1/+333
2022-10-20Fortran: error recovery with references of bad array constructors [PR105633]Harald Anlauf2-3/+15
gcc/fortran/ChangeLog: PR fortran/105633 * expr.cc (find_array_section): Move check for NULL pointers so that both subscript triplets and vector subscripts are covered. gcc/testsuite/ChangeLog: PR fortran/105633 * gfortran.dg/pr105633.f90: New test. Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
2022-10-20[PR c++/106654] Handle non-irange ranges in get_range_global for default defs.Aldy Hernandez1-1/+1
With the upcoming [[assume]] work, Andrew has pointed out that non-irange ranges are not handled in get_range_global for SSA_NAME_IS_DEFAULT_DEF. This patch fixes the oversight. PR c++/106654 gcc/ChangeLog: * value-query.cc (get_range_global): Handle non integer ranges for default def SSA names.
2022-10-20Add op[12]_range for UNORDERED_LT entries in range-op.Aldy Hernandez1-0/+64
gcc/ChangeLog: * range-op-float.cc (foperator_unordered_lt::op1_range): New. (foperator_unordered_lt::op2_range): New.
2022-10-20testsuite: Sanitize fails for SP FPU on ArmTorbjörn SVENSSON28-64/+345
This patch stops reporting fails for Arm targets with single precision floating point unit for types wider than 32 bits (the width of float on arm-none-eabi). As reported in PR102017, fenv is reported as supported in recent versions of newlib. At the same time, for some Arm targets, the implementation in libgcc does not support exceptions and thus, the test fails with a call to abort(). gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_fenv_exceptions_double): New. (check_effective_target_fenv_exceptions_long_double): New. * gcc.dg/c2x-float-7.c: Split into 3 tests... * gcc.dg/c2x-float-7a.c: Float part of c2x-float-7.c. * gcc.dg/c2x-float-7b.c: Double part of c2x-float-7.c. * gcc.dg/c2x-float-7c.c: Long double part of c2x-float-7.c. * gcc.dg/pr95115.c: Switch to fenv_exceptions_double. * gcc.dg/torture/float32x-nan-floath.c: Likewise. * gcc.dg/torture/float32x-nan.c: Likewise. * gcc.dg/torture/float64-nan-floath.c: Likewise. * gcc.dg/torture/float64-nan.c: Likewise. * gcc.dg/torture/inf-compare-1.c: Likewise. * gcc.dg/torture/inf-compare-2.c: Likewise. * gcc.dg/torture/inf-compare-3.c: Likewise. * gcc.dg/torture/inf-compare-4.c: Likewise. * gcc.dg/torture/inf-compare-5.c: Likewise. * gcc.dg/torture/inf-compare-6.c: Likewise. * gcc.dg/torture/inf-compare-7.c: Likewise. * gcc.dg/torture/inf-compare-8.c: Likewise. * gcc.dg/torture/pr52451.c: Likewise. * gcc.dg/torture/pr82692.c: Likewise. * gcc.dg/torture/inf-compare-1-float.c: New test. * gcc.dg/torture/inf-compare-2-float.c: New test. * gcc.dg/torture/inf-compare-3-float.c: New test. * gcc.dg/torture/inf-compare-4-float.c: New test. * gcc.dg/torture/inf-compare-5-float.c: New test. * gcc.dg/torture/inf-compare-6-float.c: New test. * gcc.dg/torture/inf-compare-7-float.c: New test. * gcc.dg/torture/inf-compare-8-float.c: New test. Co-Authored-By: Yvan ROUX <yvan.roux@foss.st.com> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2022-10-20c++: constraint matching, TEMPLATE_ID_EXPR, current instPatrick Palka2-6/+32
Here we're crashing during constraint matching for the instantiated hidden friends due to two issues with dependent substitution into a TEMPLATE_ID_EXPR that names a template from the current instantiation (as for C<1> with T=T from maybe_substitute_reqs_for): * tsubst_copy substitutes into such a TEMPLATE_DECL by looking it up from the substituted class scope. But for this lookup to work when the args are dependent, we need to substitute the class scope with entering_scope=true so that we obtain the primary template type A<T> (which has TYPE_BINFO) instead of the implicit instantiation A<T> (which doesn't). * lookup_and_finish_template_variable shouldn't instantiate a TEMPLATE_ID_EXPR that names a TEMPLATE_DECL which has more than one level of (unsubstituted) parameters (such as A<T>::C). gcc/cp/ChangeLog: * pt.cc (lookup_and_finish_template_variable): Don't instantiate if the template's scope is dependent. (tsubst_copy) <case TEMPLATE_DECL>: Pass entering_scope=true when substituting the class scope. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-friend10.C: New test.
2022-10-20ipa-visibility: Optimize TLS access [PR99619]Artem Klimov9-1/+145
Fix PR99619, which asks to optimize TLS model based on visibility. The fix is implemented as an IPA optimization: this allows to take optimized visibility status into account (as well as avoid modifying all language frontends). 2022-04-17 Artem Klimov <jakmobius@gmail.com> gcc/ChangeLog: PR middle-end/99619 * ipa-visibility.cc (function_and_variable_visibility): Promote TLS access model afer visibility optimizations. * varasm.cc (have_optimized_refs): New helper. (optimize_dyn_tls_for_decl_p): New helper. Use it ... (decl_default_tls_model): ... here in place of 'optimize' check. gcc/testsuite/ChangeLog: PR middle-end/99619 * gcc.dg/tls/vis-attr-gd.c: New test. * gcc.dg/tls/vis-attr-hidden-gd.c: New test. * gcc.dg/tls/vis-attr-hidden.c: New test. * gcc.dg/tls/vis-flag-hidden-gd.c: New test. * gcc.dg/tls/vis-flag-hidden.c: New test. * gcc.dg/tls/vis-pragma-hidden-gd.c: New test. * gcc.dg/tls/vis-pragma-hidden.c: New test. Co-Authored-By: Alexander Monakov <amonakov@gcc.gnu.org> Signed-off-by: Artem Klimov <jakmobius@gmail.com>
2022-10-20A false UNORDERED_<cond> means neither operand can be a NAN.Aldy Hernandez1-10/+41
The false side of UNORDERED_<cond> means neither operand can be a NAN. Adjust all the op[12]_range entries for the UNORDERED operators such that a known NAN on one operands means the other operands is undefined. gcc/ChangeLog: * range-op-float.cc (foperator_unordered_le::op1_range): Adjust false side with a NAN operand. (foperator_unordered_le::op2_range): Same. (foperator_unordered_gt::op1_range): Same. (foperator_unordered_gt::op2_range): Same. (foperator_unordered_ge::op1_range): Same. (foperator_unordered_ge::op2_range): Same. (foperator_unordered_equal::op1_range): Same.
2022-10-20c++ modules: handle CONCEPT_DECL in node_template_info [PR102963]Patrick Palka3-0/+15
Here node_template_info is overlooking that CONCEPT_DECL has TEMPLATE_INFO too, which causes get_originating_module_decl for the CONCEPT_DECL to not return the corresponding TEMPLATE_DECL, which leads to an ICE from import_entity_index while pretty printing the CONCEPT_DECL's module suffix as part of the static assert failure elaboration. PR c++/102963 gcc/cp/ChangeLog: * module.cc (node_template_info): Handle CONCEPT_DECL. gcc/testsuite/ChangeLog: * g++.dg/modules/concept-7_a.C: New test. * g++.dg/modules/concept-7_b.C: New test.
2022-10-20vect: Fix vectype when widening container type in bitfield pattern [PR107326]Andre Vieira3-4/+72
The 'vect_recog_bitfield_ref_pattern' was not correctly adapting the vectype when widening the container. gcc/ChangeLog: PR tree-optimization/107326 * tree-vect-patterns.cc (vect_recog_bitfield_ref_pattern): Change vectype when widening container. gcc/testsuite/ChangeLog: * gcc.dg/vect/pr107326.c: New test. * gcc.dg/vect/vect-bitfield-read-7.c: New test.
2022-10-20libstdc++: Redefine __from_chars_alnum_to_val's tablePatrick Palka1-31/+28
After the C++23 constexpr <charconv> patch r13-3313-g378a0f1840e694 we have some modules testsuite regressions: FAIL: g++.dg/modules/xtreme-header-4_b.C -std=c++2b (test for excess errors) FAIL: g++.dg/modules/xtreme-header_b.C -std=c++2b (test for excess errors) Like with PR105297, the cause seems to be the deduced type of __table resolving ahead of time to a local class type, which trips up modules. And unfortunately that PR's minimal workaround of making __tables's initializer value dependent doesn't help in this case. So this patch works around this by avoiding using a local class for the table type. And I suppose we should use a static data member to define the table once for all dialects (including C++14) instead of having to define it twice in C++23 mode (once as a static local variable and again as a variable template for sake of constexpr evaluation). libstdc++-v3/ChangeLog: * include/std/charconv (__detail::__from_chars_alnum_to_val_table): Redefine as a class template containing the members type, value and _S_make_table. Don't use a local class as the table type. (__detail::__table): Remove. (__detail::__from_chars_alnum_to_val): Adjust after the above.
2022-10-20Do not set NAN flags for VARYING ranges when !HONOR_NANS.Aldy Hernandez3-8/+18
Since NANs can't appear in ranges for !HONOR_NANS, there's no reason to set them in a VARYING range. gcc/ChangeLog: * value-range.h (frange::set_varying): Do not set NAN flags for !HONOR_NANS. * value-range.cc (frange::normalize_kind): Adjust for no NAN when !HONOR_NANS. (frange::verify_range): Same. * range-op-float.cc (maybe_isnan): Remove flag_finite_math_only check.
2022-10-20Replace finite_operands_p with maybe_isnan.Aldy Hernandez1-23/+18
The finite_operands_p function was incorrectly named, as it only returned TRUE when !NAN. This was leftover from the initial implementation of frange. Using the maybe_isnan() nomenclature is more consistent and easier to understand. gcc/ChangeLog: * range-op-float.cc (finite_operand_p): Remove. (finite_operands_p): Rename to... (maybe_isnan): ...this. (frelop_early_resolve): Use maybe_isnan instead of finite_operands_p. (foperator_equal::fold_range): Same. (foperator_equal::op1_range): Same. (foperator_not_equal::fold_range): Same. (foperator_lt::fold_range): Same. (foperator_le::fold_range): Same. (foperator_gt::fold_range): Same. (foperator_ge::fold_range): Same.
2022-10-20testsuite: Add some missing -Wno-psabi optionsJakub Jelinek2-2/+2
The following testcases FAIL on i686-linux due to excess diagnostics for -Wpsabi. 2022-10-20 Jakub Jelinek <jakub@redhat.com> * gcc.target/i386/pr107271.c: Add -Wno-psabi to dg-options. * gcc.dg/debug/btf/btf-function-3.c: Likewise.
2022-10-20passes: Fix a comment typoJakub Jelinek1-1/+1
This patch fixes a single typo in comment. 2022-10-20 Jakub Jelinek <jakub@redhat.com> * passes.cc (pass_manager::register_pass): Fix a comment typo - copmilation -> compilation.
2022-10-20libgomp: Add offload_device_gcn check, add requires-4a.c testTobias Burnus4-1/+65
Duplicate libgomp.c-c++-common/requires-4.c (as ...-4a.c) but with using a heap-allocated instead of static memory for a variable. This change and the added offload_device_gcn check prepare for pseudo-USM, where the device hardware cannot access all host memory but only managed and pinned memory; for those, requires-4.c will fail and the new check permits to add target { ! { offload_device_nvptx || offload_device_gcn } } to requires-4.c; however, it has not been added yet as pseuo-USM support is not yet on mainline. (Review is pending for the USM patches.) include/ChangeLog: * gomp-constants.h (GOMP_DEVICE_HSA): Comment out unused define. libgomp/ChangeLog: * testsuite/lib/libgomp.exp (check_effective_target_offload_device_gcn): New. * testsuite/libgomp.c-c++-common/on_device_arch.h (device_arch_gcn, on_device_arch_gcn): New. * testsuite/libgomp.c-c++-common/requires-4a.c: New test; copied from requires-4.c but using heap-allocated memory.
2022-10-20Avoid PHI - PHI recurrence in vectorizationRichard Biener1-8/+3
The reported regression of libgomp loop-14.C shows that there isn't generally a good reliable place to insert the permute upfront so the following simply restricts recurrence vectorization to the cases where the latch value isn't defined by a PHI. * tree-vect-loop.cc (vect_phi_first_order_recurrence_p): Disallow latch PHI defs. (vectorizable_recurr): Revert previous change.
2022-10-20Add 'libgomp.oacc-c-c++-common/private-big-1.c' [PR105421]Thomas Schwinge1-0/+100
After commit r13-3404-g7c55755d4c760de326809636531478fd7419e1e5 "amdgcn: Use FLAT addressing for all functions with pointer arguments [PR105421]", "big" private data now works for GCN offloading, too. PR target/105421 libgomp/ * testsuite/libgomp.oacc-c-c++-common/private-big-1.c: New.
2022-10-20amdgcn: Use FLAT addressing for all functions with pointer arguments [PR105421]Julian Brown1-6/+9
The GCN backend uses a heuristic to determine whether to use FLAT or GLOBAL addressing in a particular (offload) function: namely, if a function takes a pointer-to-scalar parameter, it is assumed that the pointer may refer to "flat scratch" space, and thus FLAT addressing must be used instead of GLOBAL. I came up with this heuristic initially whilst working on support for moving OpenACC gang-private variables into local-data share (scratch) memory. The assumption that only scalar variables would be transformed in that way turned out to be wrong. For example, prior to the next patch in the series, Fortran compiler-generated temporary structures were treated as gang private and moved to LDS space, typically overflowing the region allocated for such variables. That will no longer happen after that patch is applied, but there may be other cases of structs moving to LDS space now or in the future that this patch may be needed for. 2022-10-14 Julian Brown <julian@codesourcery.com> PR target/105421 gcc/ * config/gcn/gcn.cc (gcn_detect_incoming_pointer_arg): Any pointer argument forces FLAT addressing mode, not just pointer-to-non-aggregate.
2022-10-20Make 'autoreconf' work for 'gcc', 'libobjc'Thomas Schwinge4-4/+8
With that, we may then run plain 'autoreconf' for all of GCC's subpackages, instead of for some of those (that don't use Automake) manually having to run the applicable combination of 'aclocal', 'autoconf', 'autoheader'. See also 'AC_CONFIG_MACRO_DIRS'/'AC_CONFIG_MACRO_DIR' usage elsewhere. gcc/ * configure.ac (AC_CONFIG_MACRO_DIRS): Instantiate. * configure: Regenerate. libobjc/ * configure.ac (AC_CONFIG_MACRO_DIRS): Instantiate. * configure: Regenerate.
2022-10-20aarch64: Commonise some folding codeRichard Sandiford3-7/+10
Add an aarch64_sve::gimple_folder helper for folding calls to integer constants. SME will make more use of this. gcc/ * config/aarch64/aarch64-sve-builtins.h (gimple_folder::fold_to_cstu): New member function. * config/aarch64/aarch64-sve-builtins.cc (gimple_folder::fold_to_cstu): Define. * config/aarch64/aarch64-sve-builtins-base.cc (svcnt_bhwd_impl::fold): Use it.
2022-10-20aarch64: Use using directives to inherit constructorsRichard Sandiford3-87/+24
Now that the codebase is C++11, we can use using directives to inherit constructors from base classes. gcc/ * config/aarch64/aarch64-sve-builtins-functions.h (quiet) (rtx_code_function, rtx_code_function_rotated, unspec_based_function) (unspec_based_function_rotated, unspec_based_function_exact_insn) (unspec_based_fused_function, unspec_based_fused_lane_function): Replace constructors with using directives. * config/aarch64/aarch64-sve-builtins-base.cc (svcnt_bhwd_pat_impl) (svcreate_impl, svdotprod_lane_impl, svget_impl, svld1_extend_impl) (svld1_gather_extend_impl, svld234_impl, svldff1_gather_extend) (svset_impl, svst1_scatter_truncate_impl, svst1_truncate_impl) (svst234_impl, svundef_impl): Likewise. * config/aarch64/aarch64-sve-builtins-sve2.cc (svldnt1_gather_extend_impl, svmovl_lb_impl): Likewise. (svstnt1_scatter_truncate_impl): Likewise.
2022-10-20aarch64: Replace CONSTEXPR with constexprRichard Sandiford5-83/+83
Move away from the pre-C++11 compatibility macro CONSTEXPR. gcc/ * config/aarch64/aarch64-sve-builtins-base.cc: Replace CONSTEXPR with constexpr throughout. * config/aarch64/aarch64-sve-builtins-functions.h: Likewise. * config/aarch64/aarch64-sve-builtins-shapes.cc: Likewise. * config/aarch64/aarch64-sve-builtins-sve2.cc: Likewise. * config/aarch64/aarch64-sve-builtins.cc: Likewise.
2022-10-20aarch64: Prevent generation of /M BRKAS and BRKBSRichard Sandiford3-18/+16
Bit of a brown-paper-bag bug, but: GCC was generating non-existent merging forms of BRKAS and BRKBS. Those instructions only support zero predication (although BRKA and BRKB support both). gcc/ * config/aarch64/aarch64-sve.md (*aarch64_brk<brk_op>_cc): Remove merging alternative. (*aarch64_brk<brk_op>_ptest): Likewise. gcc/testsuite/ * gcc.target/aarch64/sve/acle/general/brka_1.c: Expect a separate PTEST instruction. * gcc.target/aarch64/sve/acle/general/brkb_1.c: Likewise.
2022-10-20aarch64: Fix matching of BRKNSRichard Sandiford4-10/+90
Unlike other flag-setting SVE instructions, BRKNS sets the flags based on an all-true governing predicate, rather than the GP operand. gcc/ * config/aarch64/iterators.md (SVE_BRKP): New iterator. * config/aarch64/aarch64-sve.md (*aarch64_brkn_cc): New pattern. (*aarch64_brkn_ptest): Likewise. (*aarch64_brk<brk_op>_cc): Restrict to SVE_BRKP. (*aarch64_brk<brk_op>_ptest): Likewise. gcc/testsuite/ * gcc.target/aarch64/sve/acle/general/brkn_1.c: Expect separate PTEST instructions. * gcc.target/aarch64/sve/acle/general/brkn_2.c: New test.
2022-10-20c/107305 - avoid ICEing with invalid GIMPLE input to the GIMPLE FERichard Biener4-8/+35
The GIMPLE FE was designed to defer semantic error checking to the GIMPLE IL verifier. But that can end up causing spurious ICEs earlier and in fact it will report an internal error. The following tries to improve the situation by explicitely calling into the verifier from the parser and intructing it to not ICE but instead zap the parsed body after an error is discovered. PR c/107305 PR c/107306 gcc/c/ * gimple-parser.cc (c_parser_parse_gimple_body): Verify the parsed IL and zap the body on error. gcc/ * tree-cfg.h (verify_gimple_in_seq): Add parameter to indicate whether to emit an ICE. Add return value. (verify_gimple_in_cfg): Likewise. * tree-cfg.cc (verify_gimple_in_seq): Likewise. (verify_gimple_in_cfg): Likewise. gcc/testsuite/ * gcc.dg/gimplefe-error-15.c: New testcase.
2022-10-20vect: Simplify first for shifted value generation [PR107240]Kewen Lin1-5/+6
As PR107240 shows, when both the value to be shifted and the count used for shifting are constants, it can be simplified to one constant value, and doesn't actually require to check if the current target supports vector shift operations or not. This patch uses a canonical way proposed by Richi to generate the shifted value, if it can be simplified, the shift operation would be gone, otherwise it's the same as before. It can help to fix the failures of vect-bitfield-write-{2,3}.c on Power. PR tree-optimization/107240 2022-10-20 Richard Biener <rguenther@suse.de> gcc/ChangeLog: * tree-vect-patterns.cc (vect_recog_bit_insert_pattern): Attempt to simplify shifted value first.
2022-10-20Add C++ library interface dataUlrich Drepper6-547/+2419
This patch adds a CSV file with information about the API of the standard C++ library. This information can be used in multiple ways. So far there are two use cases: - to generate the module export list for the standard C++ library - to create the name hints to compiler emits when symbols in the std namespace are not found Adding more uses can be easily done by potentially adding more columns to the CSV file and adding to the Python script which generates the output file. contrib/ 2022-10-18 Jonathan Wakely <jwakely@redhat.com> Ulrich Drepper <drepper@redhat.com> * gcc_update: Add rule for gcc/cp/std-name-hint.gperf. gcc/cp/ 2022-10-18 Jonathan Wakely <jwakely@redhat.com> Ulrich Drepper <drepper@redhat.com> * Make-lang.in: Add rules to generate std-name-hint.gperf. Adjust rule to generate std-name-hint.h to allow chain rule. * std-name-hint.h: Regenerated. * std-name-hint.gperf: This file is now generated. * cxxapi-data.csv: New file. CSV file with C++ API data. * gen-cxxapi-file.py: New file. Generate std-name-hint.gperf and module export source (in future).
2022-10-19Add assume support to VRP.Andrew MacLeod7-3/+342
This provides an assume_query class using rangers GORI module to determine what ranges would be applied to any SSA NAMES in the function if the return value were [1, 1]. Any parameter ranges are stored in the SSA_NAME_RANGE_INFO field, and ranger's inferred range machinery is then used to look these up and match them to assume call parameteres in the bodies of other functions.. PR c++/106654 gcc/ * gimple-range-gori.h (compute_operand_range): Make public. * gimple-range-infer.cc (gimple_infer_range::check_assume_func): New. (gimple_infer_range::gimple_infer_range): Check for assume calls. * gimple-range-infer.h (check_assume_func): Add prototype. * gimple-range.cc (assume_query::assume_range_p): New. (assume_query::range_of_expr): New. (assume_query::assume_query): New. (assume_query::calculate_op): New. (assume_query::calculate_phi): New. (assume_query::check_taken_edge): New. (assume_query::calculate_stmt): New. (assume_query::dump): New. * gimple-range.h (class assume_query): New. * tree-vrp.cc (pass_assumptions::execute): Add processing. gcc/testsuite/ * g++.dg/cpp23/attr-assume-opt.C: New.
2022-10-20Daily bump.GCC Administrator12-1/+322
2022-10-19c: C2x %wN, %wfN format checkingJoseph Myers8-37/+400
C2x adds printf and scanf wN and wfN length modifiers (wN for int_leastN_t / uint_leastN_t, also usable for intN_t and uintN_t which are now required to be the same type as the "least" versions when both are supported; wfN for int_fastN_t / uint_fastN_t). Add corresponding format checking support for those length modifiers, for all the standard integer conversion speciciers plus the recommended integer specifier %B. Note that, as with the %b support, this only deals with format checking, not other format handling elsewhere in the compiler (in particular, it doesn't add any -Wformat-overflow support; cf. Frolov Daniil's patch <https://gcc.gnu.org/pipermail/gcc-patches/2022-September/600790.html> adding such support for %b and %B, which I think is still pending review). And of course library support is a separate matter for each library implementation (I hope to add corresponding glibc support in due course). None of the tables of format conversions for kinds of formats not supporting the new length modifiers are updated; they don't need updating because the entries not matching some length modifier listed for that kind of format can never be accessed, and the tables generally thus already only explicitly covered a sufficient initial subsequence of the length modifiers, rather than listing a full 13 possibilities before this patch or 21 after it. %w (as used for HOST_WIDE_INT in GCC-internal formats) comes after the new modifiers in the FMT_LEN_* enumeration, but that's not a problem because the tables don't actually use FMT_LEN_w entries; rather, such entries get rewritten at runtime once GCC knows the value of HOST_WIDE_INT in the GCC it's compiling. Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc/c-family/ * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16, FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32 and FMT_LEN_wf64. (NOARGUMENTS, NOLENGTHS): Update definitions. (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64) (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64) (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64) (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32) (T_UF64, T2X_UF64): New macros. * c-format.cc (printf_length_specs, scanf_length_specs): Add wN and wfN length modifiers. (print_char_table, scan_char_table): Add entries using wN and wfN length modifiers. gcc/testsuite/ * gcc.dg/format/format.h (int_least8_t, int_least16_t) (int_least32_t, int_least64_t, uint_least8_t, uint_least16_t) (uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t) (int_fast32_t, int_fast64_t, uint_fast8_t, uint_fast16_t) (uint_fast32_t, uint_fast64_t): New typedefs. * gcc.dg/format/c11-printf-1.c, gcc.dg/format/c11-scanf-1.c, gcc.dg/format/c2x-printf-1.c, gcc.dg/format/c2x-scanf-1.c, gcc.dg/format/ext-9.c: Add tests using wN and wfN length modifiers.
2022-10-19Always check result from build_<COND> in range-op-float.ccAldy Hernandez1-21/+26
A result of false from build_<COND> in range-ops means the result is final and needs no further adjustments. This patch documents this, and changes all uses to check the result. There should be no change in functionality. gcc/ChangeLog: * range-op-float.cc (build_le): Document result. (build_lt): Same. (build_ge): Same. (foperator_ge::op2_range): Check result of build_*. (foperator_unordered_le::op1_range): Same. (foperator_unordered_le::op2_range): Same. (foperator_unordered_gt::op1_range): Same. (foperator_unordered_gt::op2_range): Same. (foperator_unordered_ge::op1_range): Same. (foperator_unordered_ge::op2_range): Same.
2022-10-19analyzer: fix ICE on __builtin_ms_va_copy [PR105765]David Malcolm3-16/+897
gcc/analyzer/ChangeLog: PR analyzer/105765 * varargs.cc (get_BT_VALIST_ARG): Rename to... (get_va_copy_arg): ...this, and update logic for determining level of indirection of va_copy's argument to use type of argument, rather than looking at va_list_type_node, to correctly handle __builtin_ms_va_copy. (get_stateful_BT_VALIST_ARG): Rename to... (get_stateful_va_copy_arg): ...this. (va_list_state_machine::on_va_copy): Update for renaming. (region_model::impl_call_va_copy): Likewise. gcc/testsuite/ChangeLog: PR analyzer/105765 * gcc.dg/analyzer/stdarg-1-ms_abi.c: New test, based on stdarg-1.c. * gcc.dg/analyzer/stdarg-1-sysv_abi.c: Likewise. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2022-10-19libstdc++: Implement remaining P2474R2 changes to views::take/dropPatrick Palka2-0/+89
libstdc++-v3/ChangeLog: * include/std/ranges (views::__detail::__is_repeat_view): Define and later define a partial specialization. (views::__detail::__take_of_repeat_view): Declare and later define. (views::__detail::__drop_of_repeat_view): Likewise. (views::_Take::operator()): Return a repeat_view if the argument is a repeat_view as per P2474R2. (views::_Drop::operator()): Likewise. (repeat_view): Befriend __take/drop_of_repeat_view. * testsuite/std/ranges/repeat/1.cc (test04): New test.
2022-10-19c++: Mitigate -Wuseless-cast with classes [PR85043]Marek Polacek4-12/+54
-Wuseless-cast (not part of -Wall/-Wextra) warns here: struct S { }; void g (S&&); void f (S&& arg) { g (S(arg)); // warning: useless cast to type 'struct S' } which is wrong: the code will not compile without the cast because "arg" is an lvalue which cannot bind to S&&. This patch disables the warning when an object that isn't a prvalue is cast to a non-reference type. Therefore we still warn about the useless cast in "X(X{})". PR c++/85043 gcc/cp/ChangeLog: * typeck.cc (maybe_warn_about_useless_cast): Don't warn when a glvalue is cast to a non-reference type. gcc/ChangeLog: * doc/invoke.texi: Update documentation of -Wuseless-cast. gcc/testsuite/ChangeLog: * g++.dg/warn/Wuseless-cast.C: Remove dg-warning. * g++.dg/warn/Wuseless-cast3.C: New test.
2022-10-19testsuite: Default make check-g++ vs. tests for newest C++ standardJakub Jelinek1-1/+10
When adding tests for upcoming C++ version, one always has a dilemma whether to use explicit // { dg-options "-std=c++2b" } or -std=gnu++2b and similar, then the test works in all modes, but it might be forgotten later on to be converted into // { dg-do whatever { target c++23 } } test so that when 23 is tested by default and say 26 or 29 appears too, we test it also in those modes, or just go with // { dg-do whatever { target c++23 } } which has the disadvantage that it is skipped when testing by default and one only tests it if he asks for the newer version. The following patch changes it, such that it is safe to add // { dg-do whatever { target c++23 } } style tests and make those tested even in the default testing mode (when GXX_TESTSUITE_STDS or check-c++-all etc. aren't used). This is by searching for such dg-do lines and if there is an effective target newer than the latest by default tested language version, it will just use that language version instead of the default list. Without this change, the test would be UNSUPPORTED in currently all of 98 14 17 20 versions, with the patch it will be tested with a single 23 version. 2022-10-19 Jakub Jelinek <jakub@redhat.com> * lib/g++-dg.exp (g++-dg-runtest): When using defaulted std_list, if test has { dg-do * { target c++23 } } directive, use { 23 } with which the test will run instead of { 98 14 17 20 } which would make it UNSUPPORTED in all cases.
2022-10-19libstdc++: Fix typo in stride_view's operator- [PR107313]Patrick Palka2-1/+21
PR libstdc++/107313 libstdc++-v3/ChangeLog: * include/std/ranges (stride_view::_Iterator::operator-): Fix typo. * testsuite/std/ranges/adaptors/stride/1.cc (test03): New test.
2022-10-19testsuite: Fix up c2x-enum-1.c for 32-bit arches [PR107311]Jakub Jelinek1-1/+6
On Wed, Oct 19, 2022 at 02:57:59PM +0000, Joseph Myers wrote: > I think the type checked for e5a should be conditional on __LONG_MAX__ > > __INT_MAX__; everything else there should be OK regardless. This patch does that. 2022-10-19 Jakub Jelinek <jakub@redhat.com> PR c/107311 * gcc.dg/c2x-enum-1.c (enum e5): Expect e5a type inside of enum to be int rather than long if long isn't wider than int.
2022-10-19Use Value_Range when applying inferred ranges.Andrew MacLeod1-1/+1
Applying an inferred range is using int_range_ma as the temporary rather than the general purpose Value_Range. This causes it to trap if we have a non-integral inferred range. * gimple-range-cache.cc (ranger_cache::range_from_dom): Use Value_Range not int_range_max.