Re: [PATCH] Remove poly_int_pod

2023-09-28 Thread Jakub Jelinek
On Thu, Sep 28, 2023 at 10:55:46AM +0100, Richard Sandiford wrote: > Tested on aarch64-linux-gnu & x86_64-linux-gnu. Also tested with > Jakub's vec.h patch with the static_asserts uncommented; there were > no errors from poly_int-related stuff. OK to install? LGTM (mostly as the general idea, bu

Re: [PATCH] Remove poly_int_pod

2023-09-29 Thread Jakub Jelinek
On Fri, Sep 29, 2023 at 08:31:47AM +0200, Richard Biener wrote: > > IIRC the primary reason we settled on gcc-4.8.x was RHEL7/Centos7. With > > RHEL 7 approaching EOL moving the baseline forward would seem to make sense. > > > > I'd want to know if this affects folks using SuSE's enterprise distro

Re: [RFC] > WIDE_INT_MAX_PREC support in wide_int and widest_int

2023-09-29 Thread Jakub Jelinek
On Thu, Sep 28, 2023 at 04:03:55PM +0200, Jakub Jelinek wrote: > Bet we should make wide_int_storage and widest_int_storage GTY ((user)) and > just declare but don't define the handlers or something similar. That doesn't catch anything, but the following incremental patch co

Re: [RFC] > WIDE_INT_MAX_PREC support in wide_int and widest_int

2023-09-29 Thread Jakub Jelinek
On Thu, Sep 28, 2023 at 11:53:53AM -0400, Aldy Hernandez wrote: > > ipa_bits is even worse, because unlike niter analysis, I think it is very > > much desirable to support IPA VRP of all supported _BitInt sizes. Shall > > we perhaps use trailing_wide_int storage in there, or conditionally > > rwid

[PATCH] use *_grow_cleared rather than *_grow on vect_unpromoted_value

2023-09-29 Thread Jakub Jelinek
can be enabled as well and gcc builds. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? The second patch waits for the poly_int_pod removal commit and has been just build tested but not bootstrapped yet. 2023-09-29 Jakub Jelinek * tree-vect-patterns.cc (v

Re: [PATCH] vec.h, v3: Make some ops work with non-trivially copy constructible and/or destructible types

2023-09-29 Thread Jakub Jelinek
On Fri, Sep 29, 2023 at 11:00:01AM +0100, Jonathan Wakely wrote: > > +/* Destruct N elements in DST. */ > > + > > +template > > +inline void > > +vec_destruct (T *dst, unsigned n) > > +{ > > + for ( ; n; ++dst, --n) > > +dst->~T (); > > +} > > + > > /* Control data for vectors. This contai

[PATCH] vec.h: Guard most of static assertions for GCC >= 5

2023-09-29 Thread Jakub Jelinek
e GCC >= 5 which claims the last C++14 language features, or what provides all C++14 library features, or GCC >= 6 which uses -std=c++14 by default?), this patch then can be reverted. Ok for trunk? 2023-09-29 Jakub Jelinek * vec.h (quick_insert, ordered_remove, unord

Re: [RFC] > WIDE_INT_MAX_PREC support in wide_int and widest_int

2023-09-29 Thread Jakub Jelinek
On Fri, Sep 29, 2023 at 11:30:06AM +0100, Richard Sandiford wrote: > Yeah, think I agree with this. widest_int really combined two things: > > (a) a way of storing any integer IL value without loss of precision > > (b) a way of attaching sign information > > Arithmetic on widest_int is dubious,

[committed] lowerbitint: Fix 2 bitint lowering bugs [PR111625]

2023-09-30 Thread Jakub Jelinek
_proc to treat it like the !optimized case, full bitint precision. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2023-09-30 Jakub Jelinek PR middle-end/111625 PR middle-end/111637 * gimple-lower-bitint.cc (range_to_prec): Use prec or -pr

[committed] gimple-match-head: Fix a pasto in function comment

2023-09-30 Thread Jakub Jelinek
Hi! This function comment has been pasted from gimple_bitwise_equal_p and haven't been adjusted for different function name. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2023-09-30 Jakub Jelinek * gimple-match-he

[PATCH] match.pd: Avoid another build_nonstandard_integer_type call [PR111369]

2023-09-30 Thread Jakub Jelinek
11369, where one of the bitint*.c tests FAILs with GCC_TEST_RUN_EXPENSIVE=1. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2023-09-30 Jakub Jelinek PR middle-end/111369 * match.pd (a?~t:t -> (-(a))^t): Always convert to type rather th

Re: [PATCH] match.pd: Avoid another build_nonstandard_integer_type call [PR111369]

2023-09-30 Thread Jakub Jelinek
On Sat, Sep 30, 2023 at 11:44:59AM +0200, Jakub Jelinek wrote: > I really can't figure out why one would need to add extra casts. > type must be an integral type which has BIT_NOT_EXPR applied on it > which yields all ones and we need a type in which negating 0 or 1 > range wi

Re: [PATCH] RISC-V: Use safe_grow_cleared for vector info [PR111469]

2023-10-02 Thread Jakub Jelinek
On Sun, Oct 01, 2023 at 07:03:51AM +0800, 钟居哲 wrote: > LGTM. > > juzhe.zh...@rivai.ai > > diff --git a/gcc/config/riscv/riscv-vsetvl.cc > b/gcc/config/riscv/riscv-vsetvl.cc > index af8c31d873c..4b06d93e7f9 100644 > --- a/gcc/config/riscv/riscv-vsetvl.cc > +++ b/gcc/config/riscv/riscv-vsetvl.cc

Re: [PATCH]middle-end: Recursively check is_trivially_copyable_or_pair in vec.h

2023-10-02 Thread Jakub Jelinek
On Mon, Oct 02, 2023 at 01:38:53PM +0100, Tamar Christina wrote: > Hi All, > > I recently committed a patch that uses a nested std::pair in the second > argument. > It temporarily adds a second ranking variable for sorting and then later > drops it. > > This hits the newly added assert in vec.h

Re: [PATCH]middle-end: Recursively check is_trivially_copyable_or_pair in vec.h

2023-10-03 Thread Jakub Jelinek
On Tue, Oct 03, 2023 at 10:27:16AM +, Tamar Christina wrote: > +/* Structure used to track meta-data on PHI arguments used to generate > + most efficient comparison sequence to slatten a PHI node. */ ^^^ typo (at least, never heard of this word, a

Re: [PATCH]middle-end: Recursively check is_trivially_copyable_or_pair in vec.h

2023-10-03 Thread Jakub Jelinek
On Tue, Oct 03, 2023 at 11:41:01AM +, Tamar Christina wrote: > > We have stablesort method instead of > > qsort but that would require consistent ordering in the vector (std::sort > > doesn't ensure stable sorting either). > > > > If it is a non-issue, the patch is ok with the above nits fixed

Re: [PATCH] contrib/mklog.py: Fix issues reported by flake8

2023-10-03 Thread Jakub Jelinek
On Tue, Oct 03, 2023 at 02:02:40PM +0200, Martin Jambor wrote: > Hi, > > the testing infrastructure built by Martin Liška contains checking a > few python scripts in contrib witha tool flake8. That tool recently > complains that: > > contrib/mklog.py:360:45: E711 comparison to None should be '

[PATCH] match.pd: Fix up a ? cst1 : cst2 regression on signed bool [PR111668]

2023-10-03 Thread Jakub Jelinek
ght to be created 129+ bit precision BOOLEAN_TYPEs). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2023-10-03 Jakub Jelinek PR tree-optimization/111668 * match.pd (a ? CST1 : CST2): Handle the a ? -1 : 0 and a ? 0 : -1 cases before the

[PATCH] match.pd: Avoid other build_nonstandard_integer_type calls [PR111369]

2023-10-03 Thread Jakub Jelinek
Hi! On Sat, Sep 30, 2023 at 11:57:38AM +0200, Jakub Jelinek wrote: > > This fixes PR111369, where one of the bitint*.c tests FAILs with > > GCC_TEST_RUN_EXPENSIVE=1. > > Though, I think there is an preexisting issue which the > build_nonstandard_integer_type didn't help

Re: [Patch] libgomp.texi: Clarify that no other OpenMP context selectors are implemented

2023-10-04 Thread Jakub Jelinek
On Wed, Oct 04, 2023 at 01:08:15PM +0200, Tobias Burnus wrote: > I got confused myself when reading > > https://gcc.gnu.org/onlinedocs/libgomp/OpenMP-Context-Selectors.html > > Especially with regards to other platforms like PowerPC. > > It turned out that the list is complete, kind of. For 'arc

Re: [committed] libstdc++: Define std::numeric_limits<_FloatNN> before C++23

2023-10-04 Thread Jakub Jelinek
On Wed, Oct 04, 2023 at 09:47:34AM -0700, Pranav Kant wrote: > Thanks for bringing this to my attention. I am working on a fix. Will keep > this thread posted. > > Clang *does* define this macro only when float128 type is available. But > the problem seems to be that clang doesn't define _Float128

[PATCH] ipa: Remove ipa_bits

2023-10-05 Thread Jakub Jelinek
this passes another bootstrap/regtest? Or defer until it is really needed (when the wide_int/widest_int changes are about to be committed)? 2023-10-05 Jakub Jelinek * ipa-prop.h (ipa_bits): Remove. (struct ipa_jump_func): Remove bits member.

[committed] sreal: Fix typo in function name

2023-10-05 Thread Jakub Jelinek
linux, committed to trunk. 2023-10-05 Jakub Jelinek * sreal.cc (verify_aritmetics): Rename to ... (verify_arithmetics): ... this. (sreal_verify_arithmetics): Adjust caller. --- gcc/sreal.cc.jj 2023-08-08 15:55:08.366138409 +0200 +++ gcc/sreal.cc2023-10-05

Re: [PATCH]middle-end: Recursively check is_trivially_copyable_or_pair in vec.h

2023-10-05 Thread Jakub Jelinek
On Thu, Oct 05, 2023 at 02:01:40PM +, Tamar Christina wrote: > gcc/ChangeLog: > > * tree-if-conv.cc (INCLUDE_ALGORITHM): Remove. > (typedef struct ifcvt_arg_entry): New. > (cmp_arg_entry): New. > (gen_phi_arg_condition, gen_phi_nest_statement, > predicate_scalar_p

Re: [PATCH] ipa: Remove ipa_bits

2023-10-05 Thread Jakub Jelinek
On Thu, Oct 05, 2023 at 04:42:42PM +0200, Jan Hubicka wrote: > It does look like a nice cleanup to me. > I wonder if you did some compare of the bit information propagated with > new code and old code? Theoretically they should be equivalent? Beyond testsuite, I've tried __attribute__((noinline,

Re: [PATCH]middle-end: Recursively check is_trivially_copyable_or_pair in vec.h

2023-10-05 Thread Jakub Jelinek
On Fri, Oct 06, 2023 at 02:23:06AM +, Tamar Christina wrote: > gcc/ChangeLog: > > * tree-if-conv.cc (INCLUDE_ALGORITHM): Remove. > (typedef struct ifcvt_arg_entry): New. > (cmp_arg_entry): New. > (gen_phi_arg_condition, gen_phi_nest_statement, > predicate_scalar_p

Re: [PATCH] wide-int: Allow up to 16320 bits wide_int and change widest_int precision to 32640 bits [PR102989]

2023-10-09 Thread Jakub Jelinek
On Mon, Oct 09, 2023 at 01:54:19PM +0100, Richard Sandiford wrote: > > I've additionally built it with the incremental attached patch and > > on make -C gcc check-gcc check-g++ -j32 -k it didn't show any > > wide_int/widest_int heap allocations unless a > 128-bit _BitInt or wb/uwb > > constant need

[PATCH] wide-int: Remove rwide_int, introduce dw_wide_int

2023-10-09 Thread Jakub Jelinek
On Mon, Oct 09, 2023 at 12:55:02PM +0200, Jakub Jelinek wrote: > This makes wide_int unusable in GC structures, so for dwarf2out > which was the only place which needed it there is a new rwide_int type > (restricted wide_int) which supports only up to RWIDE_INT_MAX_ELTS limbs > i

Re: [PATCH] wide-int: Allow up to 16320 bits wide_int and change widest_int precision to 32640 bits [PR102989]

2023-10-09 Thread Jakub Jelinek
On Mon, Oct 09, 2023 at 03:44:10PM +0200, Jakub Jelinek wrote: > Thanks, just quick answers, will work on patch adjustments after trying to > get rid of rwide_int (seems dwarf2out has very limited needs from it, just > some routine to construct it in GCed memory (and never change a

Re: [PATCH] x86: set spincount 1 for x86 hybrid platform [PR109812]

2023-10-10 Thread Jakub Jelinek
On Tue, Oct 10, 2023 at 12:59:52PM +0800, Jun Zhang wrote: > include/ChangeLog: > > * omphook.h: define RUNOMPHOOK macro. ChangeLog formatting. The description should start with capital letter. If you add a new file, you should just mention : New file. or something similar. But much more

Re: [PATCH] wide-int: Remove rwide_int, introduce dw_wide_int

2023-10-10 Thread Jakub Jelinek
On Tue, Oct 10, 2023 at 09:30:31AM +, Richard Biener wrote: > On Mon, 9 Oct 2023, Jakub Jelinek wrote: > > > On Mon, Oct 09, 2023 at 12:55:02PM +0200, Jakub Jelinek wrote: > > > This makes wide_int unusable in GC structures, so for dwarf2out > > > which was

Re: [PATCH] tree-optimization/111519 - strlen optimization skips clobbering store

2023-10-10 Thread Jakub Jelinek
On Tue, Oct 10, 2023 at 10:49:04AM +, Richard Biener wrote: > The following fixes a mistake in count_nonzero_bytes which happily > skips over stores clobbering the memory we load a value we store > from and then performs analysis on the memory state before the > intermediate store. > > The pat

Re: [PATCH] tree-optimization/111519 - strlen optimization skips clobbering store

2023-10-10 Thread Jakub Jelinek
(stmt) != vuse, because we save a copy of the strinfo state at the end of basic blocks and only throw that away after we process all dominator children. But we'd need to figure out at which bb to look and temporarily switch the vectors. 2023-10-10 Richard Biener Jakub Jeli

[PATCH] dwarf2out: Stop using wide_int in GC structures

2023-10-10 Thread Jakub Jelinek
Hi! On Tue, Oct 10, 2023 at 09:30:31AM +, Richard Biener wrote: > On Mon, 9 Oct 2023, Jakub Jelinek wrote: > > > This makes wide_int unusable in GC structures, so for dwarf2out > > > which was the only place which needed it there is a new rwide_int type > > &g

C++ patch ping^2

2023-10-10 Thread Jakub Jelinek
Hi! I'd like to ping a couple of C++ patches. - c++, v2: Implement C++26 P2169R4 - Placeholder variables with no name [PR110349] https://gcc.gnu.org/pipermail/gcc-patches/2023-September/630802.html - c++: Implement C++26 P2361R6 - Unevaluated strings [PR110342] https://gcc.gnu.org/pipermail

Re: [PATCH] wide-int: Allow up to 16320 bits wide_int and change widest_int precision to 32640 bits [PR102989]

2023-10-10 Thread Jakub Jelinek
On Tue, Oct 10, 2023 at 06:41:50PM +0100, Richard Sandiford wrote: > > On the wide_int side, I see > > 155291 576 > > (supposedly because of bound_wide_int, where we create wide_int_ref from > > the 576-bit precision bound_wide_int and then create 576-bit wide_int when > > using unary or binary op

Re: [PATCH] x86: set spincount 1 for x86 hybrid platform [PR109812]

2023-10-10 Thread Jakub Jelinek
On Wed, Oct 11, 2023 at 02:47:56AM +, Zhang, Jun wrote: > Sorry, I don't know how to place wait.h. This patch is only for x86. > Wait.h is in libgomp/config/linux/. > if I directly place do_adjust_default_spincount in wait.h, > it maybe need #ifdef __x86_64__, and also need a wait.h in include

Re: [PATCH v2] x86: set spincount 1 for x86 hybrid platform

2023-10-11 Thread Jakub Jelinek
On Wed, Oct 11, 2023 at 04:39:28PM +0800, Jun Zhang wrote: > include/ChangeLog: > > * spincount.h: New file. > > libgomp/ChangeLog: > > * env.c (initialize_env): Use do_adjust_default_spincount. > * config/linux/x86/spincount.h: New file. Ok. Jakub

Re: Principles of the C99 testsuite conversion

2023-10-11 Thread Jakub Jelinek
On Wed, Oct 11, 2023 at 08:17:49AM -0600, Jeff Law wrote: > > > On 10/11/23 08:10, Richard Earnshaw (lists) wrote: > > On 11/10/2023 14:56, Jeff Law wrote: > > > > > > > > > On 10/11/23 04:39, Florian Weimer wrote: > > > > I've started to look at what it is required to convert the testsuite to

[PATCH] libstdc++: Fix tr1/8_c_compatibility/cstdio/functions.cc regression with recent glibc

2023-10-12 Thread Jakub Jelinek
that too. By using va_arg one hides the value of it from the compiler (volatile keyword would do too, or making the FILE* stream a function argument, but then it might need to be guarded by #if or something). Tested on x86_64-linux, ok for trunk? 2023-10-12 Jakub Jelinek * testsuit

Re: [PATCH] wide-int: Allow up to 16320 bits wide_int and change widest_int precision to 32640 bits [PR102989]

2023-10-12 Thread Jakub Jelinek
On Thu, Oct 12, 2023 at 11:54:14AM +0100, Richard Sandiford wrote: > Jakub Jelinek writes: > > @@ -2036,11 +2075,20 @@ wi::lrshift_large (HOST_WIDE_INT *val, c > >unsigned int xlen, unsigned int xprecision, > >unsigned int precisio

[committed] wide-int: Fix build with gcc < 12 or clang++ [PR111787]

2023-10-12 Thread Jakub Jelinek
same + complains about missing needs_write_val_arg static data member in some wi::int_traits specializations. I've so far rebuilt just stage3 gcc subdirectory with this patch and Tobias and William made it with it through stage1. Committed to unbreak build for others. 2023-10-12 Jak

Re: [Patch] libgomp.texi: Clarify OMP_TARGET_OFFLOAD=mandatory

2023-10-12 Thread Jakub Jelinek
On Thu, Oct 12, 2023 at 06:37:00PM +0200, Tobias Burnus wrote: > libgomp.texi: Clarify OMP_TARGET_OFFLOAD=mandatory > > In OpenMP 5.0/5.1, the semantic of OMP_TARGET_OFFLOAD=mandatory was > insufficiently specified; 5.2 clarified this with extensions/clarifications > (omp_initial_device, omp_inval

Re: [Patch] Fortran: Support OpenMP's 'allocate' directive for stack vars

2023-10-13 Thread Jakub Jelinek
On Tue, Oct 10, 2023 at 06:46:35PM +0200, Tobias Burnus wrote: > * parse.cc (check_omp_allocate_stmt): Permit procedure pointers > here (rejected later) for less mislreading diagnostic. s/misl/mis/ > libgomp/ChangeLog: > > * libgomp.texi: Fill in something here. > @@ -7220,8

[PATCH] wide-int: Fix estimation of buffer sizes for wide_int printing [PR111800]

2023-10-14 Thread Jakub Jelinek
round with > 32000 f hex digits in there. Not to mention we shouldn't really care about state of bits beyond the precision and I think we always have the type in question around (x.val is INTEGER_CST of the right type and we just to::widest it, just x.mask is widest_int). 2023-10-14

[PATCH] wide-int, v2: Fix estimation of buffer sizes for wide_int printing [PR111800]

2023-10-14 Thread Jakub Jelinek
is left for the callers, those would make the inlines uninlinable and not doing what they should. 2023-10-14 Jakub Jelinek PR tree-optimization/111800 gcc/ * wide-int-print.h (print_dec_buf_size, print_decs_buf_size, print_decu_buf_size, print_hex_buf_size): New inline f

Re: [patch] libgomp.texi: Update "Enabling OpenMP"

2023-10-14 Thread Jakub Jelinek
On Sat, Oct 14, 2023 at 03:46:52PM -0600, Sandra Loosemore wrote: > On 10/14/23 13:43, Tobias Burnus wrote: > > When browsing libgomp doc, I came across > > https://gcc.gnu.org/onlinedocs/libgomp/Enabling-OpenMP.html>> First, I > > found especially the Fortran part difficult to read. Secondly, > >

[PATCH] wide-int-print: Don't print large numbers hexadecimally for print_dec{,s,u}

2023-10-17 Thread Jakub Jelinek
r trunk? 2023-10-17 Jakub Jelinek * wide-int-print.h (print_dec_buf_size): For length, divide number of bits by 3 and add 3 instead of division by 4 and adding 4. * wide-int-print.cc (print_decs): Remove superfluous ()s. Don't call print_hex, instead call pri

Re: [PATCH] openmp: Add support for the 'indirect' clause in C/C++

2023-10-17 Thread Jakub Jelinek
On Tue, Oct 17, 2023 at 03:12:46PM +0200, Tobias Burnus wrote: > C++11 (and C23) attribute do not seem to be properly handled: > > [[omp::decl (declare target,indirect(1))]] > int foo(void) { return 5; } > [[omp::decl (declare target indirect)]] > int bar(void) { return 8; } Isn't that correct? D

Re: [r14-4629 Regression] FAIL: gcc.dg/vect/vect-simd-clone-18f.c scan-tree-dump-times vect "[\\n\\r] [^\\n]* = foo\\.simdclone" 2 on Linux/x86_64

2023-10-18 Thread Jakub Jelinek
On Wed, Oct 18, 2023 at 07:14:36AM +, Richard Biener wrote: > It's interesting that when the target has AVX512 enabled we get > AVX512 style masks used also for SSE and AVX vector sizes but the > OMP SIMD clones for SSE and AVX vector sizes use SSE/AVX style > masks and only the AVX512 size clo

Re: [Patch] Fortran: Support OpenMP's 'allocate' directive for stack vars

2023-10-18 Thread Jakub Jelinek
On Wed, Oct 18, 2023 at 11:12:44AM +0200, Thomas Schwinge wrote: > Hi Tobias! > > On 2023-10-13T15:29:52+0200, Tobias Burnus wrote: > > => Updated patch attached > > When cherry-picking this commit 2d3dbf0eff668bed5f5f168b3cafd8590c54 > "Fortran: Support OpenMP's 'allocate' directive for sta

[PATCH] tree-ssa-math-opts: Fix up match_uaddc_usubc [PR111845]

2023-10-18 Thread Jakub Jelinek
p3 + op4)); Fixed by the change to inspect also rhs[2] when rhs[1] didn't yield what we were searching for (if non-NULL) - rhs[0] is inspected in the first loop and has different handling for the MINUS_EXPR case. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Re: [PATCH] Support g++ 4.8 as a host compiler.

2023-10-18 Thread Jakub Jelinek
On Sun, Oct 15, 2023 at 12:43:10PM +0100, Richard Sandiford wrote: > It seemed like there was considerable support for bumping the minimum > to beyond 4.8. I think we should wait until a decision has been made > before adding more 4.8 workarounds. I think adding a workaround until that decision i

Re: [Patch] OpenMP: Avoid ICE with LTO and 'omp allocate (was: [Patch] Fortran: Support OpenMP's 'allocate' directive for stack vars)

2023-10-18 Thread Jakub Jelinek
On Wed, Oct 18, 2023 at 12:56:01PM +0200, Tobias Burnus wrote: > On 18.10.23 11:36, Jakub Jelinek wrote: > > On Wed, Oct 18, 2023 at 11:12:44AM +0200, Thomas Schwinge wrote: > > > +FAIL: gfortran.dg/gomp/allocate-13.f90 -O (internal compiler > > > error: tree c

Re: [PATCH] Support g++ 4.8 as a host compiler.

2023-10-18 Thread Jakub Jelinek
mplate poly_int(); line in there. Bet gcc 4.8/4.9 was unhappy about the template variadic ctor accepting empty pack and being like the default ctor but not defaulted in that case. Making it guaranteed that it has at least one argument say through template poly_int(const U &, const T &...

Re: [PATCH] Support g++ 4.8 as a host compiler.

2023-10-18 Thread Jakub Jelinek
On Wed, Oct 18, 2023 at 01:33:40PM +0200, Jakub Jelinek wrote: > Making it guaranteed that it has at least one argument say through > template poly_int(const U &, const T &...) {} > fixes it for 4.8/4.9 as well. So, perhaps (but so far totally untested, the other bootstrap

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-10-18 Thread Jakub Jelinek
On Wed, Oct 18, 2023 at 05:28:10PM +, waffl3x wrote: > I've seen plenty of these G_ or _ macros on strings around like in > grokfndecl for these errors. > > G_("static member function %qD cannot have cv-qualifier") > G_("non-member function %qD cannot have cv-qualifier") > > G_("static member

Re: gcc 13.2 is missing warnings?

2023-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2023 at 07:39:43AM -0400, Eric Sokolowsky via Gcc wrote: > I am using gcc 13.2 on Fedora 38. Consider the following program. > > #include > int main(int argc, char **argv) > { > printf("Enter a number: "); > int num = 0; > scanf("%d", &num); > > switch (num) >

Re: [PATCH] ABOUT-GCC-NLS: add usage guidance

2023-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2023 at 11:11:30AM -0400, Jason Merrill wrote: > A recent question led me to look at this file again, and it occurred to me > that > it could use to offer more guidance. OK for trunk? > > -- 8< -- > > gcc/ChangeLog: > > * ABOUT-GCC-NLS: Add usage guidance. > --- > gcc/AB

Re: [pushed] c++: use G_ instead of _

2023-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2023 at 11:31:58AM -0400, Jason Merrill wrote: > --- a/gcc/cp/decl.cc > +++ b/gcc/cp/decl.cc > @@ -3607,8 +3607,8 @@ identify_goto (tree decl, location_t loc, const > location_t *locus, > { >bool complained > = emit_diagnostic (diag_kind, loc, 0, > -de

Re: [PATCH RFA] diagnostic: rename new permerror overloads

2023-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2023 at 11:45:01AM -0400, Jason Merrill wrote: > OK for trunk? > > -- 8< -- > > While checking another change, I noticed that the new permerror overloads > break gettext with "permerror used incompatibly as both > --keyword=permerror:2 --flag=permerror:2:gcc-internal-format and >

Re: [testsuite/guality, committed] Prevent optimization of local in vla-1.c

2018-07-02 Thread Jakub Jelinek
On Mon, Jul 02, 2018 at 09:44:04AM +0200, Richard Biener wrote: > Given the array has size i + 1 it's upper bound should be 'i' and 'i' > should be available via DW_OP_[GNU_]entry_value. > > I see it is > > <175> DW_AT_upper_bound : 10 byte block: 75 1 8 20 24 8 20 26 31 > 1c (DW_OP_b

[C++ PATCH] Fix extern_decl_map handling (PR c++/3698, PR c++/86208)

2018-07-03 Thread Jakub Jelinek
ap + && VAR_OR_FUNCTION_DECL_P (decl) + && DECL_EXTERNAL (decl)) +{ + struct cxx_int_tree_map *h, in; + in.uid = DECL_UID (decl); + h = cp_function_chain->extern_decl_map->find_with_hash (&in, in.uid); + if (h && !mark_used (h->t

[C++ PATCH] Hide __for_{range,begin,end} symbols (PR c++/85515)

2018-07-03 Thread Jakub Jelinek
ut of scope. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-07-02 Jakub Jelinek PR c++/85515 * parser.c (build_range_temp): Use "__for range" instead of "__for_range". (cp_convert_range_for): Use &

Re: [C++ PATCH] Hide __for_{range,begin,end} symbols (PR c++/85515)

2018-07-03 Thread Jakub Jelinek
On Tue, Jul 03, 2018 at 11:34:51AM +0200, Richard Biener wrote: > Can we make them DECL_ARTIFICIAL and/or make name-lookup never They are DECL_ARTIFICIAL already. > lookup DECL_ARTIFICIAL vars instead? Not sure about that, will try to gather some statistics on how often we rely on name-lookup of

Re: [C++ PATCH] Hide __for_{range,begin,end} symbols (PR c++/85515)

2018-07-03 Thread Jakub Jelinek
On Tue, Jul 03, 2018 at 11:58:31AM +0200, Richard Biener wrote: > On Tue, Jul 3, 2018 at 11:43 AM Jakub Jelinek wrote: > > > > On Tue, Jul 03, 2018 at 11:34:51AM +0200, Richard Biener wrote: > > > Can we make them DECL_ARTIFICIAL and/or make name-lookup never > >

Re: [C++ PATCH] Hide __for_{range,begin,end} symbols (PR c++/85515)

2018-07-03 Thread Jakub Jelinek
On Tue, Jul 03, 2018 at 01:24:28PM +0200, Jakub Jelinek wrote: > On Tue, Jul 03, 2018 at 11:58:31AM +0200, Richard Biener wrote: > > On Tue, Jul 3, 2018 at 11:43 AM Jakub Jelinek wrote: > > > > > > On Tue, Jul 03, 2018 at 11:34:51AM +0200, Richard Biener wrot

Re: [PATCH] Fix bootstrap on ia64 with old GCC version.

2018-07-03 Thread Jakub Jelinek
On Tue, Jul 03, 2018 at 07:22:19PM +0200, Martin Liška wrote: > In order to make GCC 4.1 happy and build current tip, we need to define > static constants out of a class definition. > > Ready for trunk? > Thanks, > Martin > > gcc/ChangeLog: > > 2018-07-03 Martin Liska > > * tree-switch

Re: [PATCH] P0556R3 Integral power-of-2 operations, P0553R2 Bit operations

2018-07-03 Thread Jakub Jelinek
On Tue, Jul 03, 2018 at 10:02:47PM +0100, Jonathan Wakely wrote: > +#ifndef _GLIBCXX_BIT > +#define _GLIBCXX_BIT 1 > + > +#pragma GCC system_header > + > +#if __cplusplus >= 201402L > + > +#include > +#include > + > +namespace std _GLIBCXX_VISIBILITY(default) > +{ > +_GLIBCXX_BEGIN_NAMESPACE_VERS

Re: [PATCH] P0556R3 Integral power-of-2 operations, P0553R2 Bit operations

2018-07-04 Thread Jakub Jelinek
On Tue, Jul 03, 2018 at 11:24:00PM +0100, Jonathan Wakely wrote: > > Wouldn't it be better to use some branchless pattern that > > GCC can also optimize well, like: > > return (__x << __sN) | (__x >> ((-_sN) & (_Nd - 1))); > > (iff _Nd is always power of two), > > _Nd is 20 for one of the INT

Re: [PATCH] P0556R3 Integral power-of-2 operations, P0553R2 Bit operations

2018-07-04 Thread Jakub Jelinek
On Wed, Jul 04, 2018 at 09:14:04AM +0100, Jonathan Wakely wrote: > > Unfortunately it is not correct if _Nd is not power of two. > > E.g. for __sN 1, -1U % 20 is 15, not 19. > > So it would need to be > > return (__x << __sN) | (__x >> ((_Nd - __sN) % _Nd)); > > Unfortunately, our rotate patte

[PATCH] Move ((A & N) + B) & M -> (A + B) & M etc. optimization from fold-const.c to match.pd (PR tree-optimization/86401)

2018-07-05 Thread Jakub Jelinek
fold-const.c to avoid too much duplication). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-07-05 Jakub Jelinek PR tree-optimization/86401 * fold-const.c (fold_binary_loc) : Move the ((A & N) + B) & M -> (A + B) & M et

Re: [PATCH][PR sanitizer/84250] Avoid global symbols collision when using both ASan and UBSan

2018-07-05 Thread Jakub Jelinek
On Wed, Jul 04, 2018 at 08:20:47PM +0300, Maxim Ostapenko wrote: > On 07/04/2018 05:45 AM, Jeff Law wrote: > > On 05/23/2018 11:15 AM, Maxim Ostapenko wrote: > >> as described in PR, when using both ASan and UBSan > >> (-fsanitize=address,undefined ), we have symbols collision for global > >> funct

Re: [PATCH] Fix several AVX512 intrinsic mask arguments.

2018-07-05 Thread Jakub Jelinek
On Thu, Jul 05, 2018 at 08:30:27PM +0300, Grazvydas Ignotas wrote: > gcc/ChangeLog: > > 2018-07-05 Grazvydas Ignotas > > * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask, > _mm512_mask_cmp_epu8_mask): Fix mask arguments. LGTM, but 1) I think it would be nice to add a run

Re: [PATCH] Fix several AVX512 intrinsic mask arguments.

2018-07-06 Thread Jakub Jelinek
On Thu, Jul 05, 2018 at 11:57:26PM +0300, Grazvydas Ignotas wrote: > I think it would be more efficient if you took care of it. I won't > have time for at least a few days anyway. Here is what I have ATM, but will still need to work on the testsuite side for it and bootstrap/regtest it. In additio

Re: [committed][gcc][patch] Require sse for testcase on i686.

2018-07-07 Thread Jakub Jelinek
e meantime, I've committed following fix as obvious: 2018-07-07 Jakub Jelinek PR target/84711 * gcc.dg/vect/pr84711.c: Remove unnecessary sse dg-require-effective-target. Add -msse not just on i386-*, but on all i?86-* and x86_64-*. --- gcc/testsuite/gcc.dg/vect

[PATCH] Don't fold nextafter/nexttoward if -ftrapping-math or -fmath-errno if they produce denormal results (PR c/86420)

2018-07-07 Thread Jakub Jelinek
is 0 and first arg isn't: return r->cl == rvc_zero; but actually it is true also for all denormal returns except for the x == y case, so the following patch uses: return r->cl == rvc_zero || REAL_EXP (r) < fmt->emin; instead. Bootstrapped/regtested on x86_64-linux a

[PATCH] Fix __mmask* types on many AVX512 intrinsics

2018-07-07 Thread Jakub Jelinek
Hi! On Fri, Jul 06, 2018 at 12:47:07PM +0200, Jakub Jelinek wrote: > On Thu, Jul 05, 2018 at 11:57:26PM +0300, Grazvydas Ignotas wrote: > > I think it would be more efficient if you took care of it. I won't > > have time for at least a few days anyway. Here is the complet

Re: [PATCH] Don't fold nextafter/nexttoward if -ftrapping-math or -fmath-errno if they produce denormal results (PR c/86420)

2018-07-07 Thread Jakub Jelinek
On Sat, Jul 07, 2018 at 11:55:17AM +0200, Marc Glisse wrote: > On Sat, 7 Jul 2018, Jakub Jelinek wrote: > > > 2018-07-07 Jakub Jelinek > > > > PR c/86420 > > * real.c (real_nextafter): Return true if result is denormal. > > I have a question on the

Re: [committed][gcc][patch] Require sse for testcase on i686.

2018-07-07 Thread Jakub Jelinek
On Sat, Jul 07, 2018 at 11:07:28AM +, Tamar Christina wrote: > > On Fri, Jul 06, 2018 at 11:46:43AM +0100, Tamar Christina wrote: > > > This fixes an ABI warning generated on i686-pc-linux-gnu when using > > > `vector_size` with no sse enabled explicitly. > > > > > > Regtested single test on x8

Re: [PATCH][debug] Handle debug references to skipped params

2018-07-08 Thread Jakub Jelinek
On Sun, Jul 08, 2018 at 11:22:41AM +0200, Tom de Vries wrote: > --- a/gcc/cfgexpand.c > +++ b/gcc/cfgexpand.c > @@ -5141,6 +5141,10 @@ expand_debug_source_expr (tree exp) > >switch (TREE_CODE (exp)) > { > +case VAR_DECL: > + if (DECL_ABSTRACT_ORIGIN (exp)) > + return expand_

Re: [PATCH] Fix __mmask* types on many AVX512 intrinsics

2018-07-09 Thread Jakub Jelinek
On Sun, Jul 08, 2018 at 02:39:40AM +0300, Grazvydas Ignotas wrote: > > I guess we want to backport it soon, but would appreciate somebody testing > > it on real AVX512-{BW,VL} hw before doing the backports. > > I've run the testsuite with this patch applied and all tests passed on > i7-7800X. Tha

Re: [PATCH] Fix __mmask* types on many AVX512 intrinsics

2018-07-09 Thread Jakub Jelinek
On Mon, Jul 09, 2018 at 12:00:46PM +0300, Grazvydas Ignotas wrote: > On Mon, Jul 9, 2018 at 10:37 AM, Jakub Jelinek wrote: > > On Sun, Jul 08, 2018 at 02:39:40AM +0300, Grazvydas Ignotas wrote: > >> > I guess we want to backport it soon, but would appreciate somebody > &

[committed] Fix OpenMP class iterators in distribute parallel for (PR c++/86443)

2018-07-10 Thread Jakub Jelinek
g the outer composite constructs right around the innermost one. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2018-07-10 Jakub Jelinek PR c++/86443 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition to finding the inner OM

[committed] Save/restore OpenMP linear clause modifiers in modules (PR fortran/86421)

2018-07-10 Thread Jakub Jelinek
Hi! This patch (in a backwards compatible way) handles saving and restoring of linear clause modifiers. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2018-07-10 Jakub Jelinek PR fortran/86421 * module.c (omp_declare_simd_clauses): Add LINEAR with

[PATCH] Fix -fcompare-debug issue in cp_maybe_instrument_return (PR sanitizer/86406)

2018-07-10 Thread Jakub Jelinek
hough. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-07-10 Jakub Jelinek PR sanitizer/86406 * cp-gimplify.c (cp_maybe_instrument_return): Skip trailing DEBUG_BEGIN_STMTs. * g++.dg/ubsan/pr86406.C: New test. --- gcc/

Re: [PATCH] Fix -fcompare-debug issue in cp_maybe_instrument_return (PR sanitizer/86406)

2018-07-10 Thread Jakub Jelinek
On Tue, Jul 10, 2018 at 10:01:10AM +0200, Richard Biener wrote: > On Tue, 10 Jul 2018, Jakub Jelinek wrote: > > cp_maybe_instrument_return is looking for a return stmt at the end of > > function to decide whether to omit -fsanitize=return instrumentation or > > __builtin_unre

Re: [RFC] Fix recent popcount change is breaking

2018-07-10 Thread Jakub Jelinek
On Tue, Jul 10, 2018 at 03:17:48PM +0200, Richard Biener wrote: > On Tue, Jul 10, 2018 at 3:06 PM Kugan Vivekanandarajah > > Jeff told me that the recent popcount built-in detection is causing > > kernel build issues as > > ERROR: "__popcountsi2" > > [drivers/net/wireless/broadcom/brcm80211/brcmfma

Re: [PATCH] PR debug/86459 - Fix -gsplit-dwarf -g3 gcc_assert

2018-07-10 Thread Jakub Jelinek
On Wed, Jul 11, 2018 at 12:20:08AM +0200, Mark Wielaard wrote: > There was a typo in the output_macinfo_op gcc_assert. > The function is called dwarf_FORM, not dwarf_form. > Add the provided testcase from the bug to test -gsplit-dwarf -g3. > > gcc/ChangeLog: > > PR debug/86459 > * dwa

Re: [committed] Fix OpenMP class iterators in distribute parallel for (PR c++/86443)

2018-07-11 Thread Jakub Jelinek
On Tue, Jul 10, 2018 at 09:18:18AM +0200, Jakub Jelinek wrote: > Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. I found two small issues and one big issue (results being declare target) which break the test if using non-shared memory offloading. This should fix

[PATCH] Fix store-merging wrong-code issue (PR tree-optimization/86492)

2018-07-11 Thread Jakub Jelinek
). Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk and 8.2? 2018-07-11 Jakub Jelinek PR tree-optimization/86492 * gimple-ssa-store-merging.c (imm_store_chain_info::coalesce_immediate_stores): Call check_no_overlap even for the

Re: [PATCH] Fix PR86462

2018-07-12 Thread Jakub Jelinek
On Thu, Jul 12, 2018 at 12:29:20PM +0200, Richard Biener wrote: > After my PR86413 fix to always annotate existing lexical block DIEs with > range attributes debuginfo grows significantly in case we previously > had "stale" lexical block DIEs without any variables. > > The following fixes this by

Re: [PATCH] Fix PR86462

2018-07-12 Thread Jakub Jelinek
On Thu, Jul 12, 2018 at 01:01:14PM +0200, Richard Biener wrote: > No, I don't think so. OK, I'll remove the loop over > BLOCK_NON_LOCALIZED_VAR and keep the original check for it. > > I also simplified stuff by hoisting the TREE_USED and friends checks. > > Bootstrap & regtest running on x86_64

[PATCH] Add testcase for already fixed bug

2018-07-12 Thread Jakub Jelinek
= x.u; instead. As the testcase is sufficiently different from PR85698 testcase, I've committed this one too to trunk. 2018-07-12 Jakub Jelinek * gcc.dg/torture/20180712-1.c: New test. --- gcc/testsuite/gcc.dg/torture/20180712-1.c.jj2018-07-12 13:14:46.513068757 +02

Re: [PATCH] Fix PR84829

2018-07-12 Thread Jakub Jelinek
On Wed, Jul 04, 2018 at 09:41:17AM +0200, Richard Biener wrote: > > The following removes adding -lieee to the link command when -mieee-fp > is specified for GNU targets as suggested by Joseph in the PR. It doesn't > touch m32r so the fix may be incomplete depending on the C library used. > > I'

[committed] #pragma omp declare target fixes

2018-07-12 Thread Jakub Jelinek
, committed to trunk and 8.2. 2018-07-12 Jakub Jelinek * c-attribs.c (c_common_attribute_table): Add "omp declare target implicit" attribute. * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable type here, instead add "omp dec

Re: [PATCH] Properly unshare TYPE_SIZE_UNIT/DECL_FIELD_OFFSET (PR86216)

2018-07-13 Thread Jakub Jelinek
On Fri, Jul 13, 2018 at 01:49:38PM +0200, Richard Biener wrote: > The testcase in the PR, while previously ICEing because the C++ FE doesn't > properly capture VLA size fields, now ICEs because gimplification > introduces SSA uses that appear in a different function than its > definition. This hap

C++ patch ping

2018-07-13 Thread Jakub Jelinek
Hi! I'd like to ping the following C++ patches: - PR c++/85515 make range for temporaries unspellable during parsing and only turn them into spellable for debug info purposes http://gcc.gnu.org/ml/gcc-patches/2018-07/msg00086.html - PR c++/3698, PR c++/86208 extern_decl_map & TREE_USED f

Re: C++ patch ping

2018-07-13 Thread Jakub Jelinek
On Fri, Jul 13, 2018 at 12:24:02PM -0400, Nathan Sidwell wrote: > On 07/13/2018 09:49 AM, Jakub Jelinek wrote: > > Hi! > > > > I'd like to ping the following C++ patches: > > > > - PR c++/85515 > >make range for temporaries unspellable during pars

Re: [PATCH][debug] Fix pre_dec handling in vartrack

2018-07-16 Thread Jakub Jelinek
On Sun, Jul 15, 2018 at 11:21:56PM +0200, Tom de Vries wrote: > 2018-07-15 Tom de Vries > > * var-tracking.c (vt_initialize): Fix pre_dec handling. Print adjusted > insn slim if dump_flags request TDF_SLIM. > > * gcc.target/i386/vartrack-1.c: New test. > > --- > --- a/gcc/v

  1   2   3   4   5   6   7   8   9   10   >