Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 01:42:03PM +, Jonathan Yong wrote: > On 2/1/24 13:06, Xi Ruoyao wrote: > > On Thu, 2024-02-01 at 14:01 +0100, Jakub Jelinek wrote: > > > On Thu, Feb 01, 2024 at 12:45:31PM +, Jonathan Yong wrote: > > > > Attached patch OK? Copied

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 02:13:11PM +0100, Jakub Jelinek wrote: > Or hwint.h could define PRIusize_t etc. macros and some corresponding type > to be used in casts, something like > #if SIZE_MAX == LONG_LONG_MAX > #define PRIusize_t HOST_LONG_LONG_FORMAT "u" > #define fmt_

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 02:53:47PM +, Jonathan Yong wrote: > On 2/1/24 14:33, Xi Ruoyao wrote: > > > > I mean if you are casting it to unsigned HOST_WIDE_INT, you should use > > HOST_WIDE_INT_PRINT_UNSIGNED, If you are casting it to size_t you > > cannot use it (as Jakub has explained). > >

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 03:55:51PM +0100, Jakub Jelinek wrote: > No, besides the formatting being incorrect both in ChangeLog and in the > patch, this pessimizes ILP32 hosts unnecessarily. So like this instead? 2024-02-01 Jakub Jelinek * hwint.h (GCC_PRISZ, fmt_

Re: [PATCH] x86-64: Find a scratch register for large model profiling

2024-02-01 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 10:15:30AM -0800, H.J. Lu wrote: > --- a/gcc/config/i386/i386.cc > +++ b/gcc/config/i386/i386.cc > @@ -22749,6 +22749,31 @@ current_fentry_section (const char **name) >return true; > } > > +/* Return an unused caller-saved register at entry for profile. */ > + > +sta

Re: [PATCH] libgcc: Fix up i386/t-heap-trampoline [PR113403]

2024-02-01 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 07:58:29PM +, Iain Sandoe wrote: > Thanks, looks silly pasto that somehow managed to survive default testing > options. > > Tested x86_64-darwin (along with the warning suppression patch) and > tested for ftrampoline-impl={heap,stack} and {static,shared}-libgcc. Thanks

[PATCH] tree-ssa-math-opts: Fix is_widening_mult_rhs_p - unbreak bootstrap [PR113705]

2024-02-01 Thread Jakub Jelinek
egtested on x86_64-linux and i686-linux plus tested on the testcase using cross to aarch64-linux, ok for trunk? 2024-02-01 Jakub Jelinek PR middle-end/113705 * tree-ssa-math-opts.cc (is_widening_mult_rhs_p): Use wide_int_from around wi::to_wide in order to compare va

[PATCH] lower-bitint: Handle uninitialized large/huge SSA_NAMEs as inline asm inputs [PR113699]

2024-02-02 Thread Jakub Jelinek
on x86_64-linux and i686-linux, ok for trunk? 2024-02-02 Jakub Jelinek PR middle-end/113699 * gimple-lower-bitint.cc (bitint_large_huge::lower_asm): Handle uninitialized large/huge _BitInt SSA_NAME inputs. * gcc.dg/bitint-81.c: New test. --- gcc/gimple-lower

[PATCH] lower-bitint: Handle casts from large/huge _BitInt to pointer/reference types [PR113692]

2024-02-02 Thread Jakub Jelinek
. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-02 Jakub Jelinek PR tree-optimization/113692 * gimple-lower-bitint.cc (bitint_large_huge::lower_stmt): Handle casts from large/huge BITINT_TYPEs to POINTER_TYPE/REFERENCE_TYPE as

[PATCH] testsuite: Add another bitint testcase [PR113691]

2024-02-02 Thread Jakub Jelinek
Hi! This is fixed by the PR113692 patch. Will commit as obvious if that patch makes it in. 2024-02-02 Jakub Jelinek PR tree-optimization/113691 * gcc.dg/bitint-83.c: New test. --- gcc/testsuite/gcc.dg/bitint-83.c.jj 2024-02-01 12:32:39.555709390 +0100 +++ gcc/testsuite

Re: [PATCH] LoongArch: libsanitizer: Enable build lsan and tsan for loongarch64.

2024-02-02 Thread Jakub Jelinek
On Tue, Jan 30, 2024 at 10:09:51AM +0800, Lulu Cheng wrote: > From: chenguoqi > > libsanitizer/ChangeLog: > > * configure.tgt: Enable tsan and lsan for loongarch64. > * tsan/Makefile.am: Add tsan_rtl_loongarch64.S to > EXTRA_libtsan_la_SOURCES. This line is too long and should read

[committed] libgcc: Export XF, TF, HF and BFmode specific _BitInt symbols from libgcc_s.so.1 [PR113700]

2024-02-02 Thread Jakub Jelinek
FUNC GLOBAL DEFAULT on x86_64-linux which it wasn't before. Tested on x86_64-linux, committed to trunk as obvious. 2024-02-02 Jakub Jelinek PR target/113700 * config/i386/libgcc-glibc.ver (GCC_14.0.0): Remove __PFX prefixes from symbol names. --- libgcc/config/i

Re: [PATCH v2] x86-64: Find a scratch register for large model profiling

2024-02-02 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 03:02:47PM -0800, H.J. Lu wrote: > @@ -2763,6 +2789,8 @@ construct_container (machine_mode mode, machine_mode > orig_mode, >{ >case X86_64_INTEGER_CLASS: >case X86_64_INTEGERSI_CLASS: > + if (!in_return) > + set_int_parameter_registers_bit

Re: [PATCH 2/2] aarch64: Add support for _BitInt

2024-02-02 Thread Jakub Jelinek
On Thu, Jan 25, 2024 at 05:45:01PM +, Andre Vieira wrote: > This patch adds support for C23's _BitInt for the AArch64 port when compiling > for little endianness. Big Endianness requires further target-agnostic > support and we therefor disable it for now. > > gcc/ChangeLog: > > * conf

Re: [PATCH 1/2] bitint: Use TARGET_ARRAY_MODE for large bitints where target supports it

2024-02-02 Thread Jakub Jelinek
On Thu, Jan 25, 2024 at 05:45:00PM +, Andre Vieira wrote: > > This patch ensures we use TARGET_ARRAY_MODE to determine the storage mode of > large bitints that are represented as arrays in memory. This is required to > support such bitints for aarch64 and potential other targets with similar

Re: [PATCH 1/2] libdecnumber: fixed undefined behavior in `decFloatFMA`

2024-02-02 Thread Jakub Jelinek
On Fri, Feb 02, 2024 at 10:09:05AM -0500, Ian McCormack wrote: > This patch fixes a minor instance of undefined behavior in libdecnumber. It > was discovered in the Rust bindings for libdecnumber (`dec`) using a custom > version of MIRI that can execute foreign functions. > > Within the function

Re: [PATCH 1/2] libdecnumber: fixed undefined behavior in `decFloatFMA`

2024-02-02 Thread Jakub Jelinek
On Fri, Feb 02, 2024 at 04:32:09PM +0100, Jakub Jelinek wrote: > Anyway, I think all of > decBasic.c: for (; UBTOUI(umsd)==0 && umsd+3 decBasic.c: for (; *umsd==0 && umsd decBasic.c: for (; UBTOUI(hi->msd)==0 && hi->msd+3lsd;) hi->msd+=4; > dec

Re: [PATCH v4] x86-64: Find a scratch register for large model profiling

2024-02-02 Thread Jakub Jelinek
On Fri, Feb 02, 2024 at 07:42:00AM -0800, H.J. Lu wrote: > --- a/gcc/config/i386/i386.cc > +++ b/gcc/config/i386/i386.cc > @@ -22749,6 +22749,39 @@ current_fentry_section (const char **name) >return true; > } > > +/* Return an caller-saved register, which isn't live, at entry for > + profi

Re: [PATCH] c++: Don't advertise cxx_constexpr_string_builtins [PR113658]

2024-02-02 Thread Jakub Jelinek
On Fri, Feb 02, 2024 at 11:27:09AM -0500, Marek Polacek wrote: > > With -pedantic-errors we would have __has_extension behaving like > > __has_feature, and I wanted to check in the test that this doesn't get > > reported as a feature or extension. > > Oh I see. A comment to that effect might be

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-02 Thread Jakub Jelinek
On Fri, Feb 02, 2024 at 11:43:21PM +, Jonathan Yong wrote: > On 2/1/24 15:33, Jonathan Yong wrote: > > On 2/1/24 15:25, Jakub Jelinek wrote: > > > On Thu, Feb 01, 2024 at 03:55:51PM +0100, Jakub Jelinek wrote: > > > > No, besides the formatting being incorrec

[PATCH] ggc-common: Fix save PCH assertion

2024-02-03 Thread Jakub Jelinek
on s390x on the testcase which was ICEing in 1-100 iterations and there it survived 7750 attempts without ICE (forgot to stop it earlier), ok for trunk? 2024-02-03 Jakub Jelinek * ggc-common.cc (gt_pch_save): Allow addr to be equal to mmi.preferred_base + mmi.size - sizeof (void *

[PATCH] wide-int: Fix up wi::bswap_large [PR113722]

2024-02-03 Thread Jakub Jelinek
't invoked on widest_int, so we are always invoked on wide_int or similar and those have preallocated result sized for the corresponding precision (i.e. BLOCKS_NEEDED (precision)). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-03 Jakub Jelinek PR

[PATCH] lower-bitint: Remove single label _BitInt switches [PR113737]

2024-02-04 Thread Jakub Jelinek
lowing patch just removes those after making the single successor edge EDGE_FALLTHRU. I've done it even if !optimize just in case in case we'd end up with single case label from earlier passes. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-05 Jakub Jelin

[PATCH] c: Avoid ICE with _BitInt(N) : 0 bitfield [PR113740]

2024-02-04 Thread Jakub Jelinek
build_bitint_type assertion that precision is >= (unsigned ? 1 : 2). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-05 Jakub Jelinek PR c/113740 * c-decl.cc (finish_struct): Only use build_bitint_type if bit-field has width larger or equal to mini

[PATCH] contrib: Fill in HOST{CC,CFLAGS,CXX,CXXFLAGS} in test_installed

2024-02-05 Thread Jakub Jelinek
rigger it as well, just later. The following patch fills it in as cc and c++ with empty flags to compile those, I believe that is what e.g. make uses by default, so it should be a reasonable default. We IMHO shouldn't default to GCC_UNDER_TEST because that might be a cross-compiler etc.

Re: [PATCH] libgcc: Export i386 symbols added after GCC_7.0.0 on Solaris [PR113700]

2024-02-06 Thread Jakub Jelinek
On Tue, Feb 06, 2024 at 10:00:18AM +0100, Rainer Orth wrote: > 2024-02-01 Rainer Orth > > libgcc: > * config/i386/libgcc-sol2.ver (GCC_14.0.0): Added all symbols from > i386/libgcc-glibc.ver (GCC_12.0.0, GCC_13.0.0, GCC_14.0.0). > * config/i386/libgcc-glibc.ver: Request

[PATCH] tree-ssa-math-opts: Fix up convert_{mult, plusminus}_to_widen [PR113759]

2024-02-06 Thread Jakub Jelinek
ing that effectively also doing the important part of the r14-8680 convert_mult_to_widen changes in convert_plusminus_to_widen. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-06 Jakub Jelinek PR tree-optimization/113759 * tree-ssa-math-opts.cc (c

[PATCH] lower-bitint: Encode address space qualifiers in VIEW_CONVERT_EXPRs [PR113736]

2024-02-06 Thread Jakub Jelinek
/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-06 Jakub Jelinek PR tree-optimization/113736 * gimple-lower-bitint.cc (bitint_large_huge::limb_access): Use var's address space for MEM_REF or VIEW_CONVERT_EXPRs. * gcc.dg/bitint-86.c: New

[PATCH] asan: Don't fold some strlens with -fsanitize=address [PR110676]

2024-02-06 Thread Jakub Jelinek
for trunk? 2024-02-06 Jakub Jelinek PR sanitizer/110676 * gimple-fold.cc (gimple_fold_builtin_strlen): For -fsanitize=address reset maxlen to sizetype maximum. * gcc.dg/asan/pr110676.c: New test. --- gcc/gimple-fold.cc.jj 2024-01-31 12:24:51.714239628 +01

Re: [PATCH] libssp: Fix gets-chk.c compilation on Solaris

2024-02-06 Thread Jakub Jelinek
On Tue, Feb 06, 2024 at 11:33:17AM +0100, Rainer Orth wrote: > 2023-12-07 Rainer Orth > > libssp: > * configure.ac (AC_CHECK_DECLS): Check for gets. > * configure, config.h.in: Regenerate. > * gets-chk.c (gets): Guard declaration with !HAVE_DECL_GETS. Ok, thanks.

Re: [PATCH]middle-end: fix ICE when moving statements to empty BB [PR113731]

2024-02-06 Thread Jakub Jelinek
On Mon, Feb 05, 2024 at 03:31:20PM +0100, Richard Biener wrote: > On Mon, 5 Feb 2024, Tamar Christina wrote: > > > It looks like LOOP_VINFO_EARLY_BRK_STORES is "reverse"? Is that > > > why you are doing gsi_move_before + gsi_prev? Why do gsi_prev > > > at all? > > > > > > > As discussed on IRC,

[committed] aarch64: Fix build against libc++ in c++11 mode [PR113763]

2024-02-06 Thread Jakub Jelinek
from unsigned int to unsigned char because 0xff has to fit into unsigned char on all hosts. Bootstrapped/regtested on aarch64-linux, preapproved by Richard in the PR, committed to trunk. 2024-02-06 Jakub Jelinek PR target/113763 * config/aarch64/aarch64.cc

Re: [PATCH] x86-64: Return 10_REG if there is no scratch register

2024-02-06 Thread Jakub Jelinek
On Tue, Feb 06, 2024 at 10:57:24AM -0800, H.J. Lu wrote: > If we can't find a scratch register for large model profiling, return > R10_REG. > > PR target/113689 > * config/i386/i386.cc (x86_64_select_profile_regnum): Return > R10_REG after sorry. Ok, thanks. Jakub

[PATCH] c++: Disallow this specifier except for parameter declarations [PR113788]

2024-02-06 Thread Jakub Jelinek
cp_parser_parameter_declaration that this specifier didn't appear I think it is far easier and closer to what the standard says to only parse this specifier when called from cp_parser_parameter_declaration. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-06 Jakub Je

[PATCH] range-op: Fix up ABSU_EXPR handling [PR113756]

2024-02-06 Thread Jakub Jelinek
86_64-linux and i686-linux, ok for trunk? 2024-02-06 Jakub Jelinek PR tree-optimization/113756 * range-op.cc (update_known_bitmask): For GIMPLE_UNARY_RHS, use TYPE_SIGN (lh.type ()) instead of sign for widest_int::from of lh_bits value and mask. * gc

[PATCH] wide-int: Fix mul_internal overflow handling [PR113753]

2024-02-06 Thread Jakub Jelinek
he result within prec. Bootstrapped/regtested on x86_64-linux and i686-linux, and additionally tested with make check-gcc -k -j32 GCC_TEST_RUN_EXPENSIVE=1 RUNTESTFLAGS="GCC_TEST_RUN_EXPENSIVE=1 dg-torture.exp=*bitint*" Ok for trunk? 2024-02-06 Jakub Jelinek PR tree-optimization/

[wwwdocs] Add 2 more C++26 core papers

2024-02-07 Thread Jakub Jelinek
Hi! cppreference has 2 more Kona papers listed and it seems eel.is/c++draft/ has those papers incorporated. Ok for wwwdocs? diff --git a/htdocs/projects/cxx-status.html b/htdocs/projects/cxx-status.html index c265edc0..65030980 100644 --- a/htdocs/projects/cxx-status.html +++ b/htdocs/projects/c

Re: [PATCH] ranger: Grow BBs in relation oracle as needed [PR113735]

2024-02-07 Thread Jakub Jelinek
On Tue, Feb 06, 2024 at 01:28:06PM +0100, Aldy Hernandez wrote: > The relation oracle grows the internal vector of SSAs as needed, but > due to an oversight was not growing the basic block vector. This > fixes the oversight. > > OK for trunk? > > PR tree-optimization/113735 > > gcc/testsu

Re: [PATCH]middle-end: don't cache restart_loop in vectorizable_live_operations [PR113808]

2024-02-08 Thread Jakub Jelinek
On Thu, Feb 08, 2024 at 10:37:14AM +, Tamar Christina wrote: > PR tree-optimization/113808 > * tree-vect-loop.cc (vectorizable_live_operation): Don't cache the > value cross iterations. > > gcc/testsuite/ChangeLog: > > PR tree-optimization/113808 > * gfortran.dg

Re: [PATCH]middle-end: don't cache restart_loop in vectorizable_live_operations [PR113808]

2024-02-08 Thread Jakub Jelinek
On Thu, Feb 08, 2024 at 10:54:07AM +, Tamar Christina wrote: > > Please either drop lastprivate(k) clause or use linear(k:1) > > The iteration var of simd loop without collapse or with > > collapse(1) is implicitly linear with the step, and even linear > > means the value from the last iteratio

[PATCH] bitint: Fix handling of VIEW_CONVERT_EXPRs to minimally supported huge INTEGER_TYPEs [PR113783]

2024-02-09 Thread Jakub Jelinek
_modes on those when one of the modes is BLKmode - we want to fall through into the adjust_address on the MEM. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-09 Jakub Jelinek PR tree-optimization/113783 * gimple-lower-bitint.cc (bitint_large

[PATCH] lower-bitint: Attempt not to emit always true conditions in handle_cast [PR113774]

2024-02-09 Thread Jakub Jelinek
s readable by using single_comparison for that and handling it in the code later differently I've chosen to just emit a condition which will be always true and let cfg cleanup clean it up. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-09 Jakub Jelinek PR tree

[PATCH] lower-bitint: Fix up additions of EH edges [PR113818]

2024-02-09 Thread Jakub Jelinek
ICEs during checking at the end of the pass). This patch adds a function to do that and uses it whenever adding EH edges. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-09 Jakub Jelinek PR tree-optimization/113818 * gimple-lower-bitint.cc

[PATCH] expand: Fix asm goto expansion [PR113415]

2024-02-09 Thread Jakub Jelinek
r trunk? Or do need to handle even CODE_LABELs? 2024-02-09 Jakub Jelinek PR middle-end/113415 * cfgexpand.cc (expand_asm_stmt): For asm goto, use duplicate_insn_chain to duplicate after_rtl_seq sequence instead of hand written loop with emit_insn of copy_insn and

Patch ping

2024-02-09 Thread Jakub Jelinek
Hi! I'd like to ping 2 patches: https://gcc.gnu.org/pipermail/gcc-patches/2024-January/644580.html PR113617 P1 - Handle private COMDAT function symbol reference in readonly data section More details in the https://gcc.gnu.org/pipermail/gcc-patches/2024-January/thread.html#644121 and https://gcc

Re: [COMMITTED 13/25] gccrs: remove old generics hack to reuse generic symbols from previous seg

2024-02-09 Thread Jakub Jelinek
On Wed, Feb 07, 2024 at 12:43:59PM +0100, arthur.co...@embecosm.com wrote: > From: Philip Herron > > This patch introduces one regression because generics are getting better > understood over time. The code here used to apply generics with the same > symbol from previous segments which was a bit

Re: [PATCH] middle-end/113576 - zero padding of vector bools when expanding compares

2024-02-09 Thread Jakub Jelinek
On Fri, Feb 09, 2024 at 10:24:25AM +0100, Richard Biener wrote: > The following zeros paddings of vector bools when expanding compares > and the mode used for the compare is an integer mode. In that case > targets cannot distinguish between a 4 element and 8 element vector > compare (both get to t

[PATCH] Use HOST_SIZE_T_PRINT_* and HOST_WIDE_INT_T_PRINT_* some more

2024-02-10 Thread Jakub Jelinek
trunk? 2024-02-10 Jakub Jelinek gcc/ * ipa-icf.cc (sem_item_optimizer::process_cong_reduction, sem_item_optimizer::dump_cong_classes): Use HOST_SIZE_T_PRINT_UNSIGNED and casts to fmt_size_t instead of "%lu" and casts to unsigned long.

[PATCH] Add %[zt][diox] support to pretty-print

2024-02-10 Thread Jakub Jelinek
apped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-10 Jakub Jelinek gcc/ * pretty-print.cc (pp_integer_with_precision): Handle precision 3 for size_t and precision 4 for ptrdiff_t. Formatting fix. (pp_format): Document %{t,z}{d,i,u,o,x}. Implement t

[PATCH] gimple-low: Fix up handling of volatile automatic vars in assume attribute [PR110754]

2024-02-10 Thread Jakub Jelinek
nally accessed in the assume attribute expression. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? I guess we want to backport it to 13 eventually too. 2024-02-10 Jakub Jelinek PR middle-end/110754 * gimple-low.cc (assumption_copy_decl): For TREE_THIS_VOL

[PATCH] libgcc: Fix BIL_TYPE_SIZE == 32 support in _BitInt <-> dfp support

2024-02-10 Thread Jakub Jelinek
nabled the bitint support there), ok for trunk? 2024-02-10 Jakub Jelinek * soft-fp/fixddbitint.c (__bid_fixddbitint): Fix up BIL_TYPE_SIZE == 32 shifts. * soft-fp/fixsdbitint.c (__bid_fixsdbitint): Likewise. * soft-fp/fixtdbitint.c (__bid_fixtdbitint): Likewise.

[PATCH] libgcc: Fix a bug in _BitInt -> dfp conversions

2024-02-10 Thread Jakub Jelinek
le. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux (including the _BitInt enablement there), ok for trunk? 2024-02-10 Jakub Jelinek * soft-fp/floatbitintdd.c (__bid_floatbitintdd): Or in all remainder limbs into inexact rather than just first two.

[PATCH] lower-bitint: Fix up .{ADD,SUB}_OVERFLOW lowering

2024-02-10 Thread Jakub Jelinek
ted incorrect idx and so partly did the wrong thing, e.g. overwrote the result from the previous .UADDC. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-10 Jakub Jelinek * gimple-lower-bitint.cc (itint_large_huge::lower_addsub_overflow):

[RFC PATCH] i386: Enable _BitInt support on ia32

2024-02-10 Thread Jakub Jelinek
he test, either make it x86_64 specific, add say -msse2 option for ia32, move to gcc.dg/vect/ And bitint-24.c case seems to be miscompilation of __floatbitintxf when built with -O2 -m32, it works fine when compiled with -O0 -m32. Will address that next week. 2024-02-10 Jakub Jelinek *

Re: [RFC PATCH] i386: Enable _BitInt support on ia32

2024-02-10 Thread Jakub Jelinek
On Sat, Feb 10, 2024 at 11:19:16AM +0100, Jakub Jelinek wrote: > And bitint-24.c case seems to be miscompilation of __floatbitintxf > when built with -O2 -m32, it works fine when compiled with -O0 -m32. > Will address that next week. Ugh, -O2 -m32 -march=i686 works fine, -O2 -m32 -m

Re: [PATCH] x86, libgcc: Implement ia32 basic heap trampoline [PR113855].

2024-02-10 Thread Jakub Jelinek
On Sat, Feb 10, 2024 at 05:14:44PM +, Iain Sandoe wrote: > PR target/113855 > > gcc/ChangeLog: > > * config/i386/darwin.h (DARWIN_HEAP_T_LIB): Moved to be > available to all sub-targets. > * config/i386/darwin32-biarch.h (DARWIN_HEAP_T_LIB): Delete. > * config/i3

Re: [PATCH] gcc/Makefile.in: Fix install-info target if BUILD_INFO is empty

2024-02-12 Thread Jakub Jelinek
On Mon, Feb 12, 2024 at 11:13:49AM +0100, Christophe Lyon wrote: > On Sun, 11 Feb 2024 at 06:56, Alexandre Oliva wrote: > > > > Hello, Christophe, > > > > On Feb 10, 2024, Christophe Lyon wrote: > > > > > gcc/ > > > * Makefile.in: Add no-info dependency. > > > * configure.ac: Se

Re: [PATCH] libgomp: testsuite: Don't XPASS libgomp.c/alloc-pinned-1.c etc. on non-Linux targets [PR113448]

2024-02-12 Thread Jakub Jelinek
On Mon, Feb 12, 2024 at 01:30:31PM +, Andrew Stubbs wrote: > On 05/02/2024 13:04, Rainer Orth wrote: > > Two libgomp tests XPASS on Solaris (any non-Linux target actually) since > > their introduction: > > > > XPASS: libgomp.c/alloc-pinned-1.c execution test > > XPASS: libgomp.c/alloc-pinned-2

[PATCH] testsuite: Fix up gcc.dg/pr113693.c for ia32

2024-02-12 Thread Jakub Jelinek
86_64-linux and i686-linux (with the ia32 _BitInt enablement patch), ok for trunk? 2024-02-12 Jakub Jelinek * gcc.dg/pr113693.c: Guard _BitInt(837) use with __BITINT_MAXWIDTH__ >= 837. Use dg-prune-output instead of dg-message for dbgcnt message. --- gcc/testsuit

[PATCH] gengtype: Use HOST_SIZE_T_PRINT_UNSIGNED in another spot

2024-02-12 Thread Jakub Jelinek
Hi! This patch depends on the libiberty/vprintf-support.c change. Ok for trunk if that one is approved? 2024-02-12 Jakub Jelinek * gengtype.cc (adjust_field_rtx_def): Use HOST_SIZE_T_PRINT_UNSIGNED and cast to fmt_size_t instead of %lu and cast to unsigned long. --- gcc

[PATCH] attribs: Don't canonicalize lookup_scoped_attribute_spec argument [PR113674]

2024-02-12 Thread Jakub Jelinek
hould have been canonicalized already, in other spots where it is called it is already canonicalized before. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-12 Jakub Jelinek PR c++/113674 * attribs.cc (extract_attribute_substring): R

[PATCH] lower-bitint: Fix handle_cast when used e.g. in comparisons of precisions multiple of limb_prec [PR113849]

2024-02-12 Thread Jakub Jelinek
precision which is a multiple of limb_prec. So, the following patch punts on the optimization in that case and goes for the conditionals in the loop for that case. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-12 Jakub Jelinek PR tree-optimization/113849

Re: [PATCH] attribs: Don't canonicalize lookup_scoped_attribute_spec argument [PR113674]

2024-02-12 Thread Jakub Jelinek
On Mon, Feb 12, 2024 at 01:15:55PM -0500, Marek Polacek wrote: > On Mon, Feb 12, 2024 at 06:30:55PM +0100, Jakub Jelinek wrote: > > The C and C++ FEs when parsing attributes already canonicalize them > > (i.e. if they start with __ and end with __ substrings, we remove those). >

[PATCH] hwint: Fix up preprocessor conditions for GCC_PRISZ/fmt_size_t

2024-02-12 Thread Jakub Jelinek
comparing SIZE_MAX against signed maxima, but SIZE_MAX is unsigned maximum. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-13 Jakub Jelinek * hwint.h (GCC_PRISZ, fmt_size_t): Fix preprocessor conditions, instead of comparing SIZE_M

[PATCH] libgcc: Fix UB in FP_FROM_BITINT

2024-02-13 Thread Jakub Jelinek
0U, 0U the reduction can skip the most significant limb and msb then would be the one below it), so if iprec > 0, we already don't call __builtin_clzll on 0. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-13 Jakub Jelinek * soft-fp/bitint.h (FP_FROM

[PATCH] pretty-print: Fix up ptrdiff handling for %tu, %to, %tx

2024-02-13 Thread Jakub Jelinek
. So the only actual limitation is that it doesn't support ptrdiff_t wider than long long int. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-13 Jakub Jelinek * pretty-print.cc (PTRDIFF_MAX): Define if not yet defined. (pp_integer_with_pre

[PATCH] Add %[zt][diox] tests to gcc.dg/format/

2024-02-13 Thread Jakub Jelinek
On Mon, Feb 12, 2024 at 04:10:33PM +, Joseph Myers wrote: > On Sat, 10 Feb 2024, Jakub Jelinek wrote: > > > * c-format.cc (gcc_diag_length_specs): Add t and z modifiers. > > (PP_FORMAT_CHAR_TABLE, gcc_gfc_char_table): Add entries for t and > > z modifie

[PATCH] libgcc: Implement -mx32 [PR113855]

2024-02-13 Thread Jakub Jelinek
= 44 || a != 43) __builtin_abort (); return 0; } but I must say I'm also surprised we have no tests for this in the testsuite. Sure, we'd also need to add some effective target whether -ftrampoline-impl=heap can be used for a link/runtime test or not. 2024-02-13 Jakub Jelinek

Re: [Patch] OpenMP: Handle DECL_ASSEMBLER_NAME with 'declare variant'

2024-02-13 Thread Jakub Jelinek
On Tue, Feb 13, 2024 at 03:54:28PM +0100, Tobias Burnus wrote: > Inomp_resolve_declare_variant, a code path generates a new decl for the base > function – in doing so, it ignores the assembler name. As the included > Fortran example shows, this will lead to a linker error. Solution: Also copy > ove

Re: [PATCH v2] x86: Support x32 and IBT in heap trampoline

2024-02-13 Thread Jakub Jelinek
On Tue, Feb 13, 2024 at 08:40:52AM -0800, H.J. Lu wrote: > Add x32 and IBT support to x86 heap trampoline implementation with a > testcase. > > 2024-02-13 Jakub Jelinek > H.J. Lu > > libgcc/ > > PR target/113855 > * config/i386/heap-

Re: [Patch] OpenMP: Reject non-const 'condition' trait in Fortran (was: [Patch] OpenMP: Handle DECL_ASSEMBLER_NAME with 'declare variant')

2024-02-13 Thread Jakub Jelinek
On Tue, Feb 13, 2024 at 06:31:02PM +0100, Tobias Burnus wrote: > PR middle-end/113904 > > gcc/c/ChangeLog: > > * c-parser.cc (c_parser_omp_context_selector): Handle splitting of > OMP_TRAIT_PROPERTY_EXPR into OMP_TRAIT_PROPERTY_{DEV_NUM,BOOL}_EXPR. > > gcc/cp/ChangeLog: > >

Re: [PATCH] c++: DR 569, DR 1693: fun with semicolons [PR113760]

2024-02-13 Thread Jakub Jelinek
On Tue, Feb 13, 2024 at 02:24:11PM -0500, Marek Polacek wrote: > Sadly, I must admit this is looking like GCC 15 material. If deferred for GCC 15, can't we at least do some minimal change and just guard the member pedwarn with cxx_dialect < something? Given that -Wextra-semi isn't on by default no

Re: [PATCH] x86-64: Use push2/pop2 only if the incoming stack is 16-byte aligned

2024-02-13 Thread Jakub Jelinek
On Tue, Feb 13, 2024 at 11:58:00AM -0800, H.J. Lu wrote: > Since push2/pop2 requires 16-byte stack alignment, don't use them if the > incoming stack isn't 16-byte aligned. > > gcc/ > > PR target/113876 > * config/i386/i386.cc (ix86_pro_and_epilogue_can_use_push2pop2): > Return f

Re: [PATCH] [libiberty] remove TBAA violation in iterative_hash, improve code-gen

2024-02-14 Thread Jakub Jelinek
On Wed, Feb 14, 2024 at 04:13:51PM +0100, Richard Biener wrote: > The following removes the TBAA violation present in iterative_hash. > As we eventually LTO that it's important to fix. This also improves > code generation for the >= 12 bytes loop by using | to compose the > 4 byte words as at leas

Re: [PATCH] [libiberty] remove TBAA violation in iterative_hash, improve code-gen

2024-02-14 Thread Jakub Jelinek
On Wed, Feb 14, 2024 at 05:09:39PM +0100, Richard Biener wrote: > > > > Am 14.02.2024 um 16:22 schrieb Jakub Jelinek : > > > > On Wed, Feb 14, 2024 at 04:13:51PM +0100, Richard Biener wrote: > >> The following removes the TBAA violation present in iterative_has

Re: [PATCH v2] x86: Support x32 and IBT in heap trampoline

2024-02-14 Thread Jakub Jelinek
On Wed, Feb 14, 2024 at 07:59:26PM +, Iain Sandoe wrote: > I have just one question; > > from your patch the use of endbr* seems to be unconditionally based on the > flags used to build libgcc. > > However, I was expecting that the use of extended trampolines like this would > depend on c

[PATCH] icf: Reset SSA_NAME_{PTR,RANGE}_INFO in successfully merged functions [PR113907]

2024-02-14 Thread Jakub Jelinek
LTO vs. LTO unnecessarily. Bootstrapped/regtested on x86_64-linux and i686-linux. 2024-02-15 Jakub Jelinek PR middle-end/113907 * ipa-icf.cc (sem_item_optimizer::merge_classes): Reset SSA_NAME_RANGE_INFO and SSA_NAME_PTR_INFO on successfully ICF merged functions.

[PATCH] lower-bitint: Ensure we don't get coalescing ICEs for (ab) SSA_NAMEs used in mul/div/mod [PR113567]

2024-02-14 Thread Jakub Jelinek
ed on x86_64-linux and i686-linux, ok for trunk? 2024-02-15 Jakub Jelinek PR tree-optimization/113567 * gimple-lower-bitint.cc (gimple_lower_bitint): For large/huge _BitInt multiplication, division or modulo with SSA_NAME_OCCURS_IN_ABNORMAL_PHI lhs and at least o

[PATCH] expand: Fix handling of asm goto outputs vs. PHI argument adjustments [PR113921]

2024-02-15 Thread Jakub Jelinek
e branches (fortunately non-supported compilers aren't affected because GCC 11 was the first one to support asm goto with outputs), in cfgexpand.cc it won't apply cleanly due to the PR113415 fix, but manually applying it there will work. 2024-02-15 Jakub Jelinek PR middle-end/11392

[PATCH] gccrs: Avoid *.bak suffixed tests - use dg-skip-if instead

2024-02-15 Thread Jakub Jelinek
On Fri, Feb 09, 2024 at 11:03:38AM +0100, Jakub Jelinek wrote: > On Wed, Feb 07, 2024 at 12:43:59PM +0100, arthur.co...@embecosm.com wrote: > > From: Philip Herron > > > > This patch introduces one regression because generics are getting better > > understood over

Re: [PATCH] Do not record dependences from debug stmts in tail merging

2024-02-15 Thread Jakub Jelinek
On Thu, Feb 15, 2024 at 11:00:29AM +0100, Richard Biener wrote: > The following avoids recording BB dependences for debug stmt uses. > > Bootstrap and regtest running on x86_64-unknown-linux-gnu. > > It's unlikely a dependence is just because of debug stmts so > actual compare-debug issues are ve

[committed] testsuite: Add testcase for already fixed PR [PR107385]

2024-02-15 Thread Jakub Jelinek
Hi! This testcase has been fixed by the PR113921 fix, but unlike testcase in there this one is not target specific. Tested on x86_64-linux -m32/-m64, committed to trunk as obvious. 2024-02-15 Jakub Jelinek PR middle-end/107385 * gcc.dg/pr107385.c: New test. --- gcc

[committed] testsuite: Require lra effective target for pr107385.c

2024-02-15 Thread Jakub Jelinek
ed on x86_64-linux, committed to trunk and other release branches. Thanks to Andrew Pinski for noticing this on IRC. 2024-02-15 Jakub Jelinek PR middle-end/107385 * gcc.dg/pr107385.c: Require lra effective target. --- gcc/testsuite/gcc.dg/pr107385.c.jj 2024-02-15 15:51:24.1712

[PATCH] c++: Fix up parameter pack diagnostics on xobj vs. varargs functions [PR113802]

2024-02-16 Thread Jakub Jelinek
hen emits the diagnostics. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-16 Jakub Jelinek PR c++/113802 * parser.cc (cp_parser_parameter_declaration): Don't emit PR113307 diagnostics too early, instead for the declarator->paramet

[PATCH] dwarf2out: Emit DW_AT_export_symbols on anon unions/structs [PR113918]

2024-02-16 Thread Jakub Jelinek
Hi! DWARF5 added DW_AT_export_symbols both for use on inline namespaces (where we emit it), but also on anonymous unions/structs (and we didn't emit that attribute there). The following patch fixes it. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-16

[PATCH] c++: Diagnose this specifier on template parameters [PR113929]

2024-02-16 Thread Jakub Jelinek
on x86_64-linux and i686-linux, ok for trunk? 2024-02-16 Jakub Jelinek PR c++/113929 * parser.cc (cp_parser_parameter_declaration): Diagnose this specifier on template parameter declaration. * g++.dg/parse/pr113929.C: New test. --- gcc/cp/parser.cc.jj 2024-02-15

[PATCH] testsuite: Fix up lra effective target

2024-02-16 Thread Jakub Jelinek
s effective target and use lra || nvptx-*-* for that? 2024-02-16 Jakub Jelinek * lib/target-supports.exp (check_effective_target_lra): Rewrite to list some heavily used always LRA targets and otherwise check the -fdump-rtl-reload-details dump for messages specific

Re: [PATCH] libsanitizer: Intercept __makecontext_v2 on Solaris/SPARC [PR113785]

2024-02-16 Thread Jakub Jelinek
On Fri, Feb 16, 2024 at 01:32:04PM +0100, Rainer Orth wrote: > c-c++-common/asan/swapcontext-test-1.c FAILs on Solaris/SPARC: > > FAIL: c-c++-common/asan/swapcontext-test-1.c -O0 execution test > FAIL: c-c++-common/asan/swapcontext-test-1.c -O1 execution test > FAIL: c-c++-common/asan/swapco

Re: [PATCH] libstdc++: atomic: Add missing clear_padding in __atomic_float constructor

2024-02-16 Thread Jakub Jelinek
On Fri, Feb 16, 2024 at 01:51:54PM +, Jonathan Wakely wrote: > Ah, although __atomic_compare_exchange only takes pointers, the > compiler replaces that with a call to __atomic_compare_exchange_n > which takes the newval by value, which presumably uses an 80-bit FP > register and so the padding

Re: [PATCH] Turn on LRA on all targets

2024-02-16 Thread Jakub Jelinek
On Fri, Feb 16, 2024 at 02:23:54PM +, Maciej W. Rozycki wrote: > On Fri, 16 Feb 2024, Segher Boessenkool wrote: > > > > Conversely no heuristics is required to unwind VAX frames, because they > > > are fixed in layout by hardware, fully self-described, and with the > > > hardware frame poin

Re: [RFA/RFC] C++/OpenMP: Supporting (first)private for member variables [PR110347] - or VALUE_EXPR and gimplify

2024-02-16 Thread Jakub Jelinek
On Fri, Feb 16, 2024 at 04:15:05PM +0100, Tobias Burnus wrote: > I have no idea whether that would - nor whether that would be > the way forward. - Thoughts? Don't have time to dive through this now in detail, just want to point out why we ignore DECL_VALUE_EXPR on the magic var during gimplificat

Re: [PATCH] dwarf2out: Emit DW_AT_export_symbols on anon unions/structs [PR113918]

2024-02-16 Thread Jakub Jelinek
On Fri, Feb 16, 2024 at 10:48:28AM -0500, Jason Merrill wrote: > On 2/16/24 04:14, Jakub Jelinek wrote: > > DWARF5 added DW_AT_export_symbols both for use on inline namespaces (where > > we emit it), but also on anonymous unions/structs (and we didn't emit that > >

Re: [RFA/RFC] C++/OpenMP: Supporting (first)private for member variables [PR110347] - or VALUE_EXPR and gimplify

2024-02-16 Thread Jakub Jelinek
Hi! Ah, and the reason why it doesn't work on target is that it has the everything is mapped assumption: if ((ctx->region_type & ORT_TARGET) != 0) { if (ctx->region_type & ORT_ACC) /* For OpenACC, as remarked above, defer expansion. */ shared = false; else

Re: [PATCH] testsuite: Disable slow and unneeded test variants

2024-02-16 Thread Jakub Jelinek
On Fri, Feb 16, 2024 at 07:52:17PM +0200, Dimitar Dimitrov wrote: > The issue in PR112344 is triggered only at -O2, so there is little value > in running the test at lower optimization levels. At the same time the That is generally not true. We had hundreds of cases in the history where a test wr

[PATCH] dwarf2out, v2: Emit DW_AT_export_symbols on anon unions/structs [PR113918]

2024-02-16 Thread Jakub Jelinek
On Fri, Feb 16, 2024 at 04:52:20PM +0100, Jakub Jelinek wrote: > On Fri, Feb 16, 2024 at 10:48:28AM -0500, Jason Merrill wrote: > > On 2/16/24 04:14, Jakub Jelinek wrote: > > > DWARF5 added DW_AT_export_symbols both for use on inline namespaces (where > > > we emit

[PATCH] dwarf2out, v3: Emit DW_AT_export_symbols on anon unions/structs [PR113918]

2024-02-16 Thread Jakub Jelinek
PE_P there works for C++, but C doesn't have anything like that. All it uses is DECL_NAME == NULL on FIELD_DECL + RECORD_OR_UNION_TYPE_P on its type to determine anon struct/union. The patch below has updated cp_type_dwarf_attribute, otherwise the same as before. 2024-02-16 Jakub

Re: [PATCH] c++: Fix up parameter pack diagnostics on xobj vs. varargs functions [PR113802]

2024-02-16 Thread Jakub Jelinek
140:32: error: parameter packs not expanded with '...': /usr/src/gcc/gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics3.C:148:31: error: parameter packs not expanded with '...': /usr/src/gcc/gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics3.C:149:38: error: parameter packs

Re: [PATCH] c++: Fix up parameter pack diagnostics on xobj vs. varargs functions [PR113802]

2024-02-16 Thread Jakub Jelinek
On Fri, Feb 16, 2024 at 10:20:26PM +0100, Jakub Jelinek wrote: > I've tried that (see below), but am getting > Excess errors: > /usr/src/gcc/gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics3.C:33:29: > error: parameter packs not expanded with '...': And the reaso

Re: [PATCH] c++: Fix up parameter pack diagnostics on xobj vs. varargs functions [PR113802]

2024-02-16 Thread Jakub Jelinek
On Fri, Feb 16, 2024 at 10:47:47PM +0100, Jakub Jelinek wrote: > The following patch works. Or yet another option would be instead of (sometimes) clearing declarator->parameter_pack_p when we diagnose this bug for error recovery ignore the this specifier. With the following patch (testsuite

[PATCH] fortran: gfc_trans_subcomponent_assign fixes [PR113503]

2024-02-17 Thread Jakub Jelinek
nd_decl expressions, so hacks like save the previous value, overwrite it temporarily over some call that will use expr2 and restore afterwards aren't needed - there are no such calls, so the following patch fixes it just by not messing up with expr2->ts.u.cl->backend_decl, only set

<    4   5   6   7   8   9   10   11   12   13   >