- Apr 26, 2023
-
-
Jakub Jelinek authored
2023-04-26 Jakub Jelinek <jakub@redhat.com> * gennews (files): Add files for GCC 13. (cherry picked from commit f2f721d1)
-
GCC Administrator authored
- Apr 25, 2023
-
-
Joseph Myers authored
* gcc.pot: Regenerate.
-
Jakub Jelinek authored
The following testcase reduced from newlib ICEs on powerpc-linux, with -O2 -m32 -mpowerpc64 since r12-6433 PR102239 optimization was added and on the original testcase since some ranger improvements in GCC 13 made it no longer latent on newlib. The problem is that the *branch_anddi3_dot define_insn_and_split relies on the *rotldi3_mask_dot define_insn_and_split being recognized during splitting. The rs6000_is_valid_rotate_dot_mask function checks whether the mask is a CONST_INT which is a valid mask, but *rotl<mode>3_mask_dot in addition to checking that it is a valid mask also has (<MODE>mode == Pmode || UINTVAL (operands[3]) <= 0x7fffffff) test in the condition. For TARGET_64BIT that doesn't add any further requirements, but for !TARGET_64BIT && TARGET_POWERPC64 if the AND second operand is larger than INT_MAX it will not be recognized. The rs6000_is_valid_rotate_dot_mask function is used solely in one spot, condition of *branch_anddi3_dot, so the following patch adjusts it to check for that as well. 2023-04-25 Jakub Jelinek <jakub@redhat.com> PR target/109566 * config/rs6000/rs6000.cc (rs6000_is_valid_rotate_dot_mask): For !TARGET_64BIT, don't return true if UINTVAL (mask) << (63 - nb) is larger than signed int maximum. * gcc.target/powerpc/pr109566.c: New test. (cherry picked from commit 97f8f2d0)
-
GCC Administrator authored
-
- Apr 24, 2023
-
-
Joseph Myers authored
* hr.po, sv.po, zh_CN.po: Update.
-
Rainer Orth authored
install.texi needs some updates for GCC 13 and trunk: * We used a mixture of Solaris 2 and Solaris references. Since Solaris 1/SunOS 4 is ancient history by now, consistently use Solaris everywhere. Likewise, explicit references to Solaris 11 can go in many places since Solaris 11.3 and 11.4 is all GCC supports. * Some caveats apply to both Solaris/SPARC and x86, like the difference between as and gas. * Some specifics are obsolete, like the /usr/ccs/bin path whose contents was merged into /usr/bin in Solaris 11.0 already. Likewise, /bin/sh is ksh93 since Solaris 11.0, so there's no need to explicitly use /bin/ksh. * I've removed the reference to OpenCSW: there's barely a need for external sites to get additional packages. OpenCSW is mostly unmaintained these days and has been found to be rather harmful then helping. * The section on assembler and linker to use was partially duplicated. Better keep the info in one place. * GNAT is bundled in recent Solaris 11.4 updates, so recommend that. Tested on i386-pc-solaris2.11 with make doc/gccinstall.{info,pdf} and inspection of the latter. 2023-04-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> gcc: * doc/install.texi: Consistently use Solaris rather than Solaris 2. Remove explicit Solaris 11 references. Markup fixes. (Options specification, --with-gnu-as): as and gas always differ on Solaris. Remove /usr/ccs/bin reference. (Installing GCC: Binaries, Solaris (SPARC, Intel)): Remove. (i?86-*-solaris2*): Merge assembler, linker recommendations ... (*-*-solaris2*): ... here. Update bundled GCC versions. Don't refer to pre-built binaries. Remove /bin/sh warning. Update assembler, linker recommendations. Document GNAT bootstrap compiler. (sparc-sun-solaris2*): Remove non-UltraSPARC reference. (sparc64-*-solaris2*): Move content... (sparcv9-*-solaris2*): ...here. Add GDC for 64-bit bootstrap compilers.
-
GCC Administrator authored
-
- Apr 23, 2023
-
-
GCC Administrator authored
-
- Apr 22, 2023
-
-
Jakub Jelinek authored
The following testcase ICEs on x86, foo function since my r14-22 improvement, but bar already since r13-4122. The problem is the same, in the if expression related_vector_mode is called and that starts with gcc_assert (VECTOR_MODE_P (vector_mode)); but nothing in the fneg/fadd match.pd pattern actually checks if the VEC_PERM type has VECTOR_MODE_P (vec_mode). In this case it has BLKmode and so it ICEs. The following patch makes sure we don't ICE on it. 2023-04-22 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/109583 * match.pd (fneg/fadd simplify): Don't call related_vector_mode if vec_mode is not VECTOR_MODE_P. * gcc.dg/pr109583.c: New test. (cherry picked from commit c58c0771)
-
GCC Administrator authored
-
- Apr 21, 2023
-
-
Lulu Cheng authored
gcc/ChangeLog: * doc/extend.texi: Add section for LoongArch Base Built-in functions. (cherry picked from commit 5015cdf3)
-
Andrew MacLeod authored
Do not ignore UNDEFINED name arguments when registering two-way equivalences from PHIs. PR tree-optimization/109564 gcc/ * gimple-range-fold.cc (fold_using_range::range_of_phi): Do no ignore UNDEFINED range names when deciding if all PHI arguments are the same, gcc/testsuite/ * gcc.dg/torture/pr109564-1.c: New testcase. * gcc.dg/torture/pr109564-2.c: Likewise. * gcc.dg/tree-ssa/evrp-ignore.c: XFAIL. * gcc.dg/tree-ssa/vrp06.c: Likewise. (cherry picked from commit 17aa9ddb)
-
GCC Administrator authored
-
- Apr 20, 2023
-
-
Alejandro Colomar authored
gcc/ChangeLog: * doc/extend.texi (Common Function Attributes): Remove duplicate word. Signed-off-by:
Alejandro Colomar <alx@kernel.org>
-
GCC Administrator authored
-
- Apr 19, 2023
-
-
Patrick Palka authored
Aside from correcting how try_class_unification copies multi-dimensional 'targs', r13-377-g3e948d645bc908 also made it ggc_free this copy as an optimization. But this is wrong since the call to unify within might've captured the args in persistent memory such as the satisfaction cache (as part of constrained auto deduction). PR c++/109556 gcc/cp/ChangeLog: * pt.cc (try_class_unification): Don't ggc_free the copy of 'targs'. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-placeholder13.C: New test. (cherry picked from commit 5e284ebb)
-
Jonathan Wakely authored
This reverts commit 762be064.
-
Jonathan Wakely authored
This reverts commit ed933888.
-
Jakub Jelinek authored
This testcase was reduced such that it isn't valid C++23, so with my usual testing with GXX_TESTSUITE_STDS=98,11,14,17,20,2b it fails: FAIL: g++.dg/pr109524.C -std=gnu++2b (test for excess errors) .../gcc/testsuite/g++.dg/pr109524.C: In function 'nn hh(nn)': .../gcc/testsuite/g++.dg/pr109524.C:35:12: error: cannot bind non-const lvalue reference of type 'nn&' to an rvalue of type 'nn' .../gcc/testsuite/g++.dg/pr109524.C:17:6: note: initializing argument 1 of 'nn::nn(nn&)' The following patch fixes that and I've verified it doesn't change anything on what the test was testing, it still ICEs in r13-7198 and passes in r13-7203, now in all language modes (except for 98 where it is intentionally UNSUPPORTED). 2023-04-19 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/109524 * g++.dg/pr109524.C (nn::nn): Change argument type from nn & to const nn &. (cherry picked from commit 794ffdb0)
-
Christophe Lyon authored
When I committed the patches to enable support for DFP on AArch64, I forgot to update the installation documentation. This patch adds AArch64 as needed (same as i386/x86_64). 2023-04-17 Christophe Lyon <christophe.lyon@arm.com> gcc/ * doc/install.texi (enable-decimal-float): Add AArch64. (cherry picked from commit cbddd574)
-
Palmer Dabbelt authored
These functions are NOPs on the soft-float ABIs. Since we're already forcing the ISA, let's just force the ABI too. gcc/testsuite/ChangeLog: * gcc.target/riscv/xtheadfmv-fmv.c: Force the ilp32d ABI. (cherry picked from commit c16848ed)
-
Palmer Dabbelt authored
The RVV test harness currently sets the ISA according to the target tuple, but doesn't also set the ABI. This just sets the ABI to match the ISA, though we should really also be respecting the user's specific ISA to test. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/rvv.exp (gcc_mabi): New variable. (cherry picked from commit e6b050da)
-
Palmer Dabbelt authored
The test case that was added is rv64i-specific, as there's better ways to generate this code on rv32i (where the long/int cast is a NOP) and on rv64i_zba (where we have word shifts). This renames the original test case and adds two more for those targets. gcc/testsuite/ChangeLog: PR target/106602 * gcc.target/riscv/pr106602.c: Moved to... * gcc.target/riscv/pr106602-rv64i.c: ...here. * gcc.target/riscv/pr106602-rv32i.c: New test. * gcc.target/riscv/pr106602-rv64i_zba.c: New test. (cherry picked from commit 8c010f6f)
-
GCC Administrator authored
-
- Apr 18, 2023
-
-
Jonathan Wakely authored
The linker script is preprocessed with $(top_builddir)/config.h not the include/$target/bits/c++config.h version, which means that configure macros do not have the _GLIBCXX_ prefix yet. The _GLIBCXX_SYMVER_GNU and _GLIBCXX_SHARED checks are redundant, because the gnu.ver file is only used for _GLIBCXX_SYMVER_GNU and the linker script is only used for the shared library. Remove those. libstdc++-v3/ChangeLog: PR libstdc++/108969 * config/abi/pre/gnu.ver: Fix preprocessor condition. (cherry picked from commit 6067ae45)
-
Jonathan Wakely authored
Since GCC 13 the global iostream objects are only initialized once in libstdc++, and not by a std::ios::Init object in every translation unit that includes <iostream>. To avoid using uninitialized streams defined in an older libstdc++.so, translation units using the global iostreams should depend on the GLIBCXX_3.4.31 symver. Define std::cin as std::__io::cin and then export it as std::cin@@GLIBCXX_3.4.31 so that references to std::cin bind to the new symver. Also export it as @GLIBCXX_3.4 for backwards compatibility libstdc++-v3/ChangeLog: PR libstdc++/108969 * src/Makefile.am: Move globals_io.cc to here. * src/Makefile.in: Regenerate. * src/c++98/Makefile.am: Remove globals_io.cc from here. * src/c++98/Makefile.in: Regenerate. * src/c++98/globals_io.cc [_GLIBCXX_SYMVER_GNU] (cin): Adjust symbol name and then export with GLIBCXX_3.4.31 symver. (cout, cerr, clog, wcin, wcout, wcerr, wclog): Likewise. * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Regenerate. * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Regenerate. * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Regenerate. * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Regenerate. * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Regenerate. * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Regenerate. * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Regenerate. * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Regenerate. * config/abi/pre/gnu.ver: Add iostream objects to new symver.
-
Kito Cheng authored
Document which version of RISC-V vector intrinsics has implemented in GCC. gcc/ChangeLog: * doc/extend.texi (Target Builtins): Add RISC-V Vector Intrinsics. (RISC-V Vector Intrinsics): Document GCC implemented which version of RISC-V vector intrinsics and its reference. (cherry picked from commit 14c1a8df)
-
Richard Biener authored
Access diagnostics visits the SSA def-use chains to diagnose things like dangling pointer uses. When that runs into PHIs it tries to prove all incoming pointers of which one is the currently visited use are related to decide whether to keep looking for the PHI def uses. That turns out to be overly optimistic and thus costly. The following scraps the existing handling for simply requiring that we eventually visit all incoming pointers of the PHI during the def-use chain analysis and only then process uses of the PHI def. Note this handles backedges of natural loops optimistically, diagnosing the first iteration. There's gcc.dg/Wuse-after-free-2.c containing a testcase requiring this. PR tree-optimization/109539 * gimple-ssa-warn-access.cc (pass_waccess::check_pointer_uses): Re-implement pointer relatedness for PHIs. (cherry picked from commit fdbaab2d)
-
Patrick Palka authored
PR libstdc++/108827 libstdc++-v3/ChangeLog: * include/bits/ranges_cmp.h (__cpp_lib_ranges): Bump value for C++23. * include/std/ranges (range_adaptor_closure): Define for C++23. * include/std/version (__cpp_lib_ranges): Bump value for C++23. * testsuite/std/ranges/version_c++23.cc: Bump expected value of __cpp_lib_ranges. * testsuite/std/ranges/range_adaptor_closure.cc: New test. (cherry picked from commit cb5c71d1)
-
Patrick Palka authored
This patch also renames __cpp_lib_fold to __cpp_lib_ranges_fold as per the current draft standard. libstdc++-v3/ChangeLog: * include/bits/ranges_algo.h (__cpp_lib_ranges_contains): Define for C++23. (__cpp_lib_ranges_iota): Likewise. (__cpp_lib_ranges_find_last): Likewise. (__cpp_lib_fold): Rename to ... (__cpp_lib_ranges_fold): ... this. * include/std/version: As above. * testsuite/25_algorithms/fold_left/1.cc: Adjust after renaming __cpp_lib_fold. * testsuite/std/ranges/version_c++23.cc: Verify values of the above feature-test macros. (cherry picked from commit 95525c5b)
-
Patrick Palka authored
PR libstdc++/109525 libstdc++-v3/ChangeLog: * include/std/ranges (views::_AsConst::operator()): Add missing const to constant_range test. * testsuite/std/ranges/adaptors/as_const/1.cc (test02): Improve formatting. Adjust expected type of v2. (test03): New test. (cherry picked from commit 4ec4ceaf)
-
Jakub Jelinek authored
rust: Disable --enable-languages=rust and silently exclude it from --enable-languages=all for GCC 13 As discussed on IRC, gccrs can't compile the standard libraries yet and requires annoying -frust-incomplete-and-experimental-compiler-do-not-use option to compile anything. As such it is better to disable this at least for GCC 13.1, we'd keep it allowed on the trunk where hopefully support to compile at least some standard libraries will land soon and eventually a borrow checker. If enough Rust support is backported from trunk to 13 branch before 13.2, we could revert this change then. Tested on x86_64-linux with --enable-languages=c,c++,rust and --enable-languages=c,c++,all , ok for 13 branch? 2023-04-18 Jakub Jelinek <jakub@redhat.com> * configure.ac: For --enable-languages= mentioning explicitly rust emit an error, if included in all etc., silently disable rust. * configure: Regenerated.
-
Iain Sandoe authored
The mechanism for location dyld has altered from Darwin22 since dyld is now in the shared cache. The implemented mechanism for walking the cache uses Apple Blocks which GCC does not yet support, and the fallback to the original mechanism does not work there. Until a suitable work-around can be found, unsupport Darwin22+. Signed-off-by:
Iain Sandoe <iain@sandoe.co.uk> libsanitizer/ChangeLog: * configure.tgt: Unsupport Darwin22+ until a mechanism can be found to locate dyld in the shared cache. (cherry picked from commit e722a1f4)
-
GCC Administrator authored
-
- Apr 17, 2023
-
-
Patrick Palka authored
Here when level lowering the bound ttp TT<typename T::type> via the substitution T=C, we're neglecting to canonicalize (and thereby strip of simple typedefs) the substituted template arguments {A<int>} before determining the new canonical type via hash table lookup. This leads to a hash mismatch ICE for the two equivalent types TT<int> and TT<A<int>> since iterative_hash_template_arg assumes type arguments are already canonicalized. We can fix this by canonicalizing or coercing the substituted arguments directly, but seeing as creation and ordinary substitution of bound ttps both go through lookup_template_class, which in turn performs the desired coercion/canonicalization, it seems preferable to make this code path go through lookup_template_class as well. PR c++/109531 gcc/cp/ChangeLog: * pt.cc (tsubst) <case BOUND_TEMPLATE_TEMPLATE_PARM>: In the level-lowering case just use lookup_template_class to rebuild the bound ttp. gcc/testsuite/ChangeLog: * g++.dg/template/canon-type-20.C: New test. * g++.dg/template/ttp36.C: New test. (cherry picked from commit 2245459c)
-
Jakub Jelinek authored
2023-04-17 Jakub Jelinek <jakub@redhat.com> * DEV-PHASE: Set to prerelease.
-
Martin Jambor authored
It turns out that since addition of the code that can identify globals which are only read from, the code that keeps track of the references can decrement their count for the same calls, once during IPA-CP and then again during inlining. Fixed by adding a special flag to the pass-through variant and simply wiping out the reference to the refdesc structure from the constant ones. Moreover, during debugging of the issue I have discovered that the code removing references could remove a reference associated with the same statement but of a wrong type. In all cases it wanted to remove an IPA_REF_ADDR reference so removing a lesser one instead should do no harm in practice, but we should try to be consistent and so this patch extends symtab_node::find_reference so that it searches for a reference of a given type only. gcc/ChangeLog: 2023-04-14 Martin Jambor <mjambor@suse.cz> PR ipa/107769 PR ipa/109318 * cgraph.h (symtab_node::find_reference): Add parameter use_type. * ipa-prop.h (ipa_pass_through_data): New flag refdesc_decremented. (ipa_zap_jf_refdesc): New function. (ipa_get_jf_pass_through_refdesc_decremented): Likewise. (ipa_set_jf_pass_through_refdesc_decremented): Likewise. * ipa-cp.cc (ipcp_discover_new_direct_edges): Provide a value for the new parameter of find_reference. (adjust_references_in_caller): Likewise. Make sure the constant jump function is not used to decrement a refdec counter again. Only decrement refdesc counters when the pass_through jump function allows it. Added a detailed dump when decrementing refdesc counters. * ipa-prop.cc (ipa_print_node_jump_functions_for_edge): Dump new flag. (ipa_set_jf_simple_pass_through): Initialize the new flag. (ipa_set_jf_unary_pass_through): Likewise. (ipa_set_jf_arith_pass_through): Likewise. (remove_described_reference): Provide a value for the new parameter of find_reference. (update_jump_functions_after_inlining): Zap refdesc of new jfunc if the previous pass_through had a flag mandating that we do so. (propagate_controlled_uses): Likewise. Only decrement refdesc counters when the pass_through jump function allows it. (ipa_edge_args_sum_t::duplicate): Provide a value for the new parameter of find_reference. (ipa_write_jump_function): Assert the new flag does not have to be streamed. * symtab.cc (symtab_node::find_reference): Add parameter use_type, use it in searching. gcc/testsuite/ChangeLog: 2023-04-06 Martin Jambor <mjambor@suse.cz> PR ipa/107769 PR ipa/109318 * gcc.dg/ipa/pr109318.c: New test. * gcc.dg/lto/pr107769_0.c: Likewise.
-
Philipp Tomsich authored
AmpereOne (-mcpu=ampere1) breaks LDP instructions into two uops. Given the chance that this causes instructions to slip into the next decoding cycle and the additional overheads when handling cacheline-crossing LDP instructions, we disable the generation of LDP isntructions through the tuning structure from instruction combining (such as in peephole2). Given the code-density benefits in builtins and prologue/epilogue expansion, we allow LDPs there. This commit: * adds a new tuning option AARCH64_EXTRA_TUNE_NO_LDP_COMBINE * allows -moverride=tune=... to override this These changes are benchmark-driven, yielding the following changes (with a net-overall improvement): 503.bwaves_r. -0.88% 507.cactuBSSN_r 0.35% 508.namd_r 3.09% 510.parest_r -2.99% 511.povray_r 5.54% 519.lbm_r 15.83% 521.wrf_r 0.56% 526.blender_r 2.47% 527.cam4_r 0.70% 538.imagick_r 0.00% 544.nab_r -0.33% 549.fotonik3d_r. -0.42% 554.roms_r 0.00% ------------------------- = total 1.79% Signed-off-by:
Philipp Tomsich <philipp.tomsich@vrull.eu> Co-Authored-By:
Di Zhao <di.zhao@amperecomputing.com> gcc/ChangeLog: * config/aarch64/aarch64-tuning-flags.def (AARCH64_EXTRA_TUNING_OPTION): Add AARCH64_EXTRA_TUNE_NO_LDP_COMBINE. * config/aarch64/aarch64.cc (aarch64_operands_ok_for_ldpstp): Check for the above tuning option when processing loads. gcc/testsuite/ChangeLog: * gcc.target/aarch64/ampere1-no_ldp_combine.c: New test.
-