[PATCH 6/6] ssa-fre-4.c: Enable for all targets and adjust scan match

2025-01-04 Thread H.J. Lu
Since the C frontend no longer promotes char argument, enable ssa-fre-4.c for all targets and adjust scan match. PR middle-end/112877 * gcc.dg/tree-ssa/ssa-fre-4.c: Enable for all targets and adjust scan match. Signed-off-by: H.J. Lu --- gcc/testsuite/gcc.dg/tree-ssa/ssa

[PATCH 4/6] vect-simd-clone-1[6-8][cd].c: Expect in-branch clones for x86

2025-01-04 Thread H.J. Lu
Since the C frontend no longer promotes char and short arguments, expect in-branch clones for x86. PR middle-end/112877 * gcc.dg/vect/vect-simd-clone-16c.c: Expect in-branch clones for x86. * gcc.dg/vect/vect-simd-clone-16d.c: Likewise. * gcc.dg/vect/vect-si

[PATCH v7 0/6] Correct outgoing integer argument promotion

2025-01-04 Thread H.J. Lu
Changes from v6: 1. Drop the PR middle-end/14907 fix for GCC 15. 2. Add a testcase for PR middle-end/118288. Changes from v5: 1. Properly check x86 targets in gfortran.dg/pr112877-1.f90. Changes from v4: 1. Rename gcc/testsuite/gfortran.dg/pr14907-1.f90 to gcc/testsuite/gfortran.dg/pr112877-1.

[PATCH 2/6] Drop targetm.promote_prototypes from C, C++ and Ada frontends

2025-01-04 Thread H.J. Lu
Remove the targetm.calls.promote_prototypes call from C, C++ and Ada frontends. gcc/ PR c/48274 PR middle-end/112877 PR middle-end/118288 * gimple.cc (gimple_builtin_call_types_compatible_p): Remove the targetm.calls.promote_prototypes call. * tree.

[PATCH 5/6] scev-cast.c: Enable for all targets and adjust scan matches

2025-01-04 Thread H.J. Lu
Since the C frontend no longer promotes char argument, enable scev-cast.c for all targets and adjust scan matches. PR middle-end/112877 * gcc.dg/tree-ssa/scev-cast.c: Enable for all targets and adjust scan match. Signed-off-by: H.J. Lu --- gcc/testsuite/gcc.dg/tree-ssa/s

[PATCH 1/6] Honor TARGET_PROMOTE_PROTOTYPES during RTL expand

2025-01-04 Thread H.J. Lu
Promote integer arguments smaller than int if TARGET_PROMOTE_PROTOTYPES returns true. gcc/ PR middle-end/112877 * calls.c (initialize_argument_information): Promote small integer arguments if TARGET_PROMOTE_PROTOTYPES returns true. gcc/testsuite/ PR middle-end/11

[PATCH 3/6] i386: Adjust apx-ndd.c for frontend promotion removal

2025-01-04 Thread H.J. Lu
Since the C frontend no longer promotes integer argument smaller than int, the apx-ndd.c codgen is slightly different: apx-ndd.s (original)2024-11-10 06:07:09.894876973 +0800 apx-ndd.s (updated) 2024-11-10 06:06:59.371860565 +0800 @@ -17,7 +17,7 @@ foo_add_char: foo1_add_char: .LFB1:

[PATCH] ipa-cp: Fold-convert values when necessary (PR 118138)

2025-01-04 Thread Martin Jambor
Hi, PR 118138 and quite a few duplicates that it has acquired in a short time show that even though we are careful to make sure we do not loose any bits when newly allowing type conversions in jump-functions, we still need to perform the fold conversions during IPA constant propagation and not jus

Subject: [PATCH] ipa-cp: Make dumping of bit masks representing -1 nicer

2025-01-04 Thread Martin Jambor
Hi, dumps of the lattices representing bit-values and of propagation results of bit-values can print a really long hexadecimal value when the bit-value represents -1 (all bits set). This patch simply detect that situation and prints the string "-1" in that case, making the dumps somewhat nicer.

[PATCH] libstdc++: add missing to_underlying to module std [PR106852]

2025-01-04 Thread Nicolas Werner
std::to_underlying was missing from the std module introduced in 7db55c0ba1baaf0e323ef7f9ef8c9cda077d40e9. This patch adds the missing export for this utility. There might be more exports missing, but this is the one I found when trying to compile some test projects. PR libstdc++/106852 libstdc+

Re: [PATCH] COBOL 1/8 hdr: header files

2025-01-04 Thread James K. Lowden
On Fri, 3 Jan 2025 19:46:38 +0100 Jakub Jelinek wrote: > Again, the question is if it needs to be supported everywhere, or > just error out on targets which don't have _Float128 Our preference is simply to error out on targets that don't support _Float128. I don't know how to do that. It can

[PATCH v2 2/4] testsuite: RISC-V: Skip V and Zvbb tests for ILP32E/ILP64E ABIs

2025-01-04 Thread Dimitar Dimitrov
Some tests add options for V and Zvbb extensions, but those extensions are not compatible with the E ABI variants. This leads to spurious test failures when toolchain's default ABI is ILP32E or ILP64E: spawn ... -march=rv32ecv_zvbb ... cc1: error: ILP32E ABI does not support the 'D' extension

[PATCH v2 3/4] testsuite: RISC-V: Skip tests using -mcpu= for ILP32E/ILP64E ABIs

2025-01-04 Thread Dimitar Dimitrov
The tests are specifying -mcpu with D extension, which is not compatible with the ILP32E and ILP64E ABIs. Fix by skipping the tests if toolchain's default ABI is an E variant. gcc/testsuite/ChangeLog: * gcc.target/riscv/pr109508.c: Skip for E ABI. * gcc.target/riscv/pr114139.c: D

[PATCH v2 1/4] testsuite: RISC-V: Add effective target for E ABI variant

2025-01-04 Thread Dimitar Dimitrov
Add new effective target check for either ILP32E or ILP64E ABI variants. Initial implementation only checks for RV32E or RV64E ISA, which in turn implies that ILP32E/ILP64E ABI is used. The RV32I+ILP32E and RV64I+ILP64E combinations are not yet caught by the check, but they do not seem to be wide

[PATCH v2 0/4] testsuite: RISC-V: Improve support for RV32E

2025-01-04 Thread Dimitar Dimitrov
Many test cases implicitly require some form of I ABI variant for RISC-V to be the default. Hence they fail when ILP32E is configured as the default ABI for the toolchain. Example error: spawn ... -march=rv32gc_zbb ... cc1: error: ILP32E ABI does not support the 'D' extension This p

Re: [RFC/RFA] [PR tree-optimization/92539] Improve code and avoid Warray-bounds false positive

2025-01-04 Thread Jeff Law
On 1/3/25 10:30 AM, Qing Zhao wrote: On Jan 3, 2025, at 11:41, Richard Biener wrote: Am 03.01.2025 um 16:22 schrieb Jeff Law : So this is an implementation of an idea I had a few years back and prototyped last spring to fix pr92539. pr92539 is a false positive Warray-bounds warning

Re: [RFC/RFA] [PR tree-optimization/92539] Improve code and avoid Warray-bounds false positive

2025-01-04 Thread Jeff Law
On 1/3/25 9:41 AM, Richard Biener wrote: Am 03.01.2025 um 16:22 schrieb Jeff Law : So this is an implementation of an idea I had a few years back and prototyped last spring to fix pr92539. pr92539 is a false positive Warray-bounds warning triggered by loop unrolling. The warning is in

[PATCH] c++: Don't ICE in build_class_member_access_expr during error recovery [PR118225]

2025-01-04 Thread Simon Martin
The invalid case in this PR trips on an assertion in build_class_member_access_expr that build_base_path would never return an error_mark_node, which is actually incorrect if the object involves a tree with an error_mark_node DECL_INITIAL, like here. This patch simply removes the assertion, even t