Re: [v4][PATCH 1/2] Handle component_ref to a structre/union field including C99 FAM [PR101832]

2023-03-09 Thread Richard Biener via Gcc-patches
On Thu, 9 Mar 2023, Qing Zhao wrote: > > > > On Mar 9, 2023, at 7:20 AM, Richard Biener wrote: > > > > On Fri, 24 Feb 2023, Qing Zhao wrote: > > > >> GCC extension accepts the case when a struct with a C99 flexible array > >> member > >> is embedded into another struct or union (possibly rec

Re: [PATCH]middle-end: don't form FMAs when multiplication is not single use. [PR108583]

2023-03-09 Thread Richard Biener via Gcc-patches
On Fri, 10 Mar 2023, Hongtao Liu wrote: > On Fri, Mar 10, 2023 at 3:37 AM Tamar Christina via Gcc-patches > wrote: > > > > Hi All, > > > > The testcase > > > > typedef unsigned int vec __attribute__((vector_size(32))); > > vec > > f3 (vec a, vec b, vec c) > > { > > vec d = a * b; > > return d

Re: [PATCH]middle-end: don't form FMAs when multiplication is not single use. [PR108583]

2023-03-09 Thread Richard Biener via Gcc-patches
On Thu, 9 Mar 2023, Tamar Christina wrote: > Hi All, > > The testcase > > typedef unsigned int vec __attribute__((vector_size(32))); > vec > f3 (vec a, vec b, vec c) > { > vec d = a * b; > return d + ((c + d) >> 1); > } > > shows a case where we don't want to form an FMA due to the MUL not

[PATCH] Fix PR 108874: aarch64 code regression with shift and ands

2023-03-09 Thread Andrew Pinski via Gcc-patches
After r6-2044-g98e30e515f184b, code like "((x & 0xff00ff00U) >> 8)" would be optimized like (x >> 8) & 0xff00ffU which is normally better except on aarch64, the shift right could be combined with another operation in some cases. So we need to add a few define_splits to the aarch64 backends that mat

Re: [PATCH] Fortran: fix ICE with bind(c) in block data [PR104332]

2023-03-09 Thread Jerry D via Gcc-patches
On 3/9/23 10:08 AM, Harald Anlauf via Fortran wrote: Dear all, the attached almost obvious patch fixes a NULL pointer dereference in a check of a symbol with the bind(c) attribute. Regtested on x86_64-pc-linux-gnu. OK for mainline? This PR is marked as 10/11/12/13 regression, thus it should q

[pushed] c++: signed __int128_t [PR108099]

2023-03-09 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- The code for handling signed + typedef was breaking on __int128_t, because it isn't a proper typedef: it doesn't have DECL_ORIGINAL_TYPE. PR c++/108099 gcc/cp/ChangeLog: * decl.cc (grokdeclarator): Handle non-typedef typed

[pushed] c++: overloaded fn in contract [PR108542]

2023-03-09 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- PR c++/108542 gcc/cp/ChangeLog: * class.cc (instantiate_type): Strip location wrapper. gcc/testsuite/ChangeLog: * g++.dg/contracts/contracts-err1.C: New test. --- gcc/cp/class.cc |

Re: [PATCH] libstdc++: Add missing free functions for atomic_flag [PR103934]

2023-03-09 Thread Thomas Rodgers via Gcc-patches
The second patch has now been backported and pushed to releases/gcc-12 and releases/gcc-11. On Mon, Feb 13, 2023 at 6:06 PM Thomas Rodgers wrote: > Tested x86_64-pc-linux-gnu. Pushed to trunk. > > The first patch has also been backported and pushed to releases/gcc-12 and > releases/gcc-11 > > Th

Re: [PATCH]middle-end: don't form FMAs when multiplication is not single use. [PR108583]

2023-03-09 Thread Hongtao Liu via Gcc-patches
On Fri, Mar 10, 2023 at 3:37 AM Tamar Christina via Gcc-patches wrote: > > Hi All, > > The testcase > > typedef unsigned int vec __attribute__((vector_size(32))); > vec > f3 (vec a, vec b, vec c) > { > vec d = a * b; > return d + ((c + d) >> 1); > } > > shows a case where we don't want to form

[PATCH V4] Rework 128-bit complex multiply and divide.

2023-03-09 Thread Michael Meissner via Gcc-patches
This patch reworks how the complex multiply and divide built-in functions are done. Previously GCC created built-in declarations for doing long double complex multiply and divide when long double is IEEE 128-bit. However, it did not support __ibm128 complex multiply and divide if long double is

Re: [PATCH] rs6000: Accept const pointer operands for MMA builtins [PR109073]

2023-03-09 Thread Peter Bergner via Gcc-patches
On 3/9/23 8:55 AM, Segher Boessenkool wrote: > On Thu, Mar 09, 2023 at 05:30:53PM +0800, Kewen.Lin wrote: >> on 2023/3/9 07:01, Peter Bergner via Gcc-patches wrote: >>> This patch was tested in both GCC 11 and GCC 10 on powerpc64le-linux and >>> showed no regressions. Ok for backports? > > It isn

[PATCH v2] ubsan: missed -fsanitize=bounds for compound ops [PR108060]

2023-03-09 Thread Marek Polacek via Gcc-patches
On Thu, Mar 09, 2023 at 09:44:49AM +0100, Jakub Jelinek wrote: > On Thu, Mar 09, 2023 at 08:12:47AM +, Richard Biener wrote: > > I think this is a reasonable way to address the regression, so OK. > > It is true that both C and C++ (including c++14_down and c++17 and later > where the latter ha

Re: [PATCH v2 4/5] Update texinfo.tex, remove the @gol macro/alias

2023-03-09 Thread Gerald Pfeifer
On Thu, 9 Mar 2023, Sandra Loosemore wrote: > This is OK, but I'd like to see this patch split into two separate > commits as well -- one for the texinfo.tex import, and one for the @gol > changes. I believe Arsen does not have git write access. Arsen, if that is indeed the case, I offer to pus

Re: [PATCH v2 5/5] update_web_docs_git: Update CSS reference to new manual CSS

2023-03-09 Thread Sandra Loosemore
On 2/23/23 03:27, Arsen Arsenović via Gcc-patches wrote: maintainer-scripts/ChangeLog: * update_web_docs_git (CSS): Update CSS reference to point to /texinfo-manuals.css. I'm going to defer to Gerald on this one, since I am ignorant of how documents are produced for the GCC we

Re: [PATCH v2 4/5] Update texinfo.tex, remove the @gol macro/alias

2023-03-09 Thread Sandra Loosemore
On 2/23/23 03:27, Arsen Arsenović via Gcc-patches wrote: The @gol macro appears to have existed as a workaround for a bug in old versions of makeinfo and/or texinfo.tex, where they would, in some types of output, fail to emit line breaks in @gccoptlists. After updating texinfo.tex, I noticed tha

Re: [PATCH v2 3/5] doc: Add @defbuiltin family of helpers, set documentlanguage

2023-03-09 Thread Sandra Loosemore
On 2/23/23 03:27, Arsen Arsenović via Gcc-patches wrote: The @defbuiltin{,x} macros are convenience macros for the often-repeated task of defining a built-in function in extend.texi. Usage of this macro should lead to a higher degree of consistency across pieces of text written by different peop

Re: [PATCH v2 0/5] A small Texinfo refinement

2023-03-09 Thread Sandra Loosemore via Gcc-patches
On 3/9/23 01:26, Richard Biener wrote: SLES 12 has texinfo 4.13a, SLES 15 has texinfo 6.5. We still provide up-to-date GCC for SLES 12 but we can probably manage in some ways when the texinfo requirement gets bumped. OK, this seems to be the oldest version anyone admits to actually using. I

Re: [PATCH] libcpp: Update to Unicode 15

2023-03-09 Thread Lewis Hyatt via Gcc-patches
On Fri, Nov 04, 2022 at 10:03:13AM +0100, Jakub Jelinek via Gcc-patches wrote: > Hi! > > The following pseudo-patch (for uname2c.h part > just a pseudo patch with a lot of changes replaced with ... > because it is too large but the important changes like > -static const char uname2c_dict[59418] =

Re: [PATCH 2/2] Rework 128-bit complex multiply and divide.

2023-03-09 Thread Michael Meissner via Gcc-patches
On Thu, Mar 09, 2023 at 04:16:21PM -0600, Segher Boessenkool wrote: > On Thu, Mar 09, 2023 at 11:11:34AM -0500, Michael Meissner wrote: > > On Fri, Mar 03, 2023 at 03:35:44PM -0600, Segher Boessenkool wrote: > > > > +/* { dg-final { scan-assembler "bl __divtc3" } } */ > > > > > > This name depends

Re: [PATCH] c++: noexcept and copy elision [PR109030]

2023-03-09 Thread Jason Merrill via Gcc-patches
On 3/9/23 14:32, Patrick Palka wrote: On Mon, 6 Mar 2023, Marek Polacek via Gcc-patches wrote: When processing a noexcept, constructors aren't elided: build_over_call has /* It's unsafe to elide the constructor when handling a noexcept-expression, it may evaluate to the wro

[PATCH 2/2] libstdc++: Add a test for FTM redefinitions

2023-03-09 Thread Arsen Arsenović via Gcc-patches
This test detects redefinitions by compiling stdc++.h with -Wsystem-headers. Thanks Patrick Palka for the suggestion. libstdc++-v3/ChangeLog: * testsuite/17_intro/versionconflict.cc: New test. --- libstdc++-v3/testsuite/17_intro/versionconflict.cc | 6 ++ 1 file changed, 6 insertion

[PATCH 1/2] libstdc++: Harmonize and other headers

2023-03-09 Thread Arsen Arsenović via Gcc-patches
Due to recent, large changes in libstdc++, the feature test macros declared in got out of sync with the other headers that possibly declare them. This patch resolves that. libstdc++-v3/ChangeLog: * include/bits/unique_ptr.h (__cpp_lib_constexpr_memory): Synchronize the definitio

Re: [PATCH 2/2] Rework 128-bit complex multiply and divide.

2023-03-09 Thread Segher Boessenkool
On Thu, Mar 09, 2023 at 11:11:34AM -0500, Michael Meissner wrote: > On Fri, Mar 03, 2023 at 03:35:44PM -0600, Segher Boessenkool wrote: > > > +/* { dg-final { scan-assembler "bl __divtc3" } } */ > > > > This name depends on what object format and ABI is in use (some have an > > extra leading under

Re: Fwd: Bugzilla Bug 81649 [PATCH]: Clarify LeakSanitizer in documentation

2023-03-09 Thread Jonny Grant
On 07/03/2023 23:42, Sandra Loosemore wrote: > On 3/1/23 05:53, Jonny Grant wrote: >> Hello >> I don't have write access, could someone review and apply this please? >> Kind regards >> Jonny > > Looks good; I've gone ahead and pushed it for you. > > -Sandra Awesome - thank you. My first gcc p

Ping^6: [PATCH] jit: Install jit headers in $(libsubincludedir) [PR 101491]

2023-03-09 Thread Lorenzo Salvadore via Gcc-patches
Hello, Ping https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606450.html Thanks, Lorenzo Salvadore > From f8e2c2ee89a7d8741bb65163d1f1c20edcd546ac Mon Sep 17 00:00:00 2001 > From: Lorenzo Salvadore develo...@lorenzosalvadore.it > > Date: Wed, 16 Nov 2022 11:27:38 +0100 > Subject: [PATCH

[pushed] c++: allocator temps in list of arrays [PR108773]

2023-03-09 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- The optimization to reuse the same allocator temporary for all string constructor calls was breaking on this testcase, because the temps were already in the argument to build_vec_init, and replacing them with references to one slot got confu

[pushed] testsuite: add various -Wanalyzer-null-dereference false +ve test cases

2023-03-09 Thread David Malcolm via Gcc-patches
There are various -Wanalyzer-null-dereference false +ves in bugzilla that I've been attempting to fix. Unfortunately I haven't made much progress, but it seems worth at least capturing the reduced reproducers as test cases, to make it easier to spot changes in behavior. Successfully regrtested on

Re: [PATCH v2 1/5] docs: Create Indices appendix

2023-03-09 Thread Arsen Arsenović via Gcc-patches
Sandra Loosemore writes: > On 2/23/23 03:27, Arsen Arsenović via Gcc-patches wrote: >> The GCC manual has multiple indices. By creating an appendix which >> lists them, we help makeinfo present a more accessible way for the >> reader to see all the indices. >> gcc/ChangeLog: >> * doc/gcc.t

[PATCH] c++, abi: Fix up class layout with bitfields [PR109039]

2023-03-09 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase FAILs, because starting with r12-6028 the S class has only 2 bytes, not enough to hold one 7-bit bitfield, one 8-bit bitfield and one 8-bit char field. The reason is that when end_of_class attempts to compute dsize, it simply adds byte_position of the field and DECL_SIZ

RE: [PATCH 3/4]middle-end: Implement preferred_div_as_shifts_over_mult [PR108583]

2023-03-09 Thread Tamar Christina via Gcc-patches
Hi, Here's the respun patch. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: PR target/108583 * target.def (preferred_div_as_shifts_over_mult): New. * doc/tm.texi.in: Document it. * doc/tm.texi: Regene

RE: [PATCH 2/4][ranger]: Add range-ops for widen addition and widen multiplication [PR108583]

2023-03-09 Thread Tamar Christina via Gcc-patches
Cheers, Thanks! I'll way for him to come back then 😊 Thanks, Tamar > -Original Message- > From: Aldy Hernandez > Sent: Wednesday, March 8, 2023 8:57 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; amacl...@redhat.com > Subject: Re: [PATCH 2/4][ranger]: Add range-ops for wi

[PATCH]middle-end: don't form FMAs when multiplication is not single use. [PR108583]

2023-03-09 Thread Tamar Christina via Gcc-patches
Hi All, The testcase typedef unsigned int vec __attribute__((vector_size(32))); vec f3 (vec a, vec b, vec c) { vec d = a * b; return d + ((c + d) >> 1); } shows a case where we don't want to form an FMA due to the MUL not being single use. In this case to form an FMA we have to redo the MUL

Re: [PATCH] c++: noexcept and copy elision [PR109030]

2023-03-09 Thread Patrick Palka via Gcc-patches
On Mon, 6 Mar 2023, Marek Polacek via Gcc-patches wrote: > When processing a noexcept, constructors aren't elided: build_over_call > has >/* It's unsafe to elide the constructor when handling > a noexcept-expression, it may evaluate to the wrong > value (c++/53025). */

[PATCH] testsuite: Handle default_packed targets in gcc.dg/plugin

2023-03-09 Thread Hans-Peter Nilsson via Gcc-patches
It's not obvious to me whether considered best to include or exclude these tests that depend on structure layout details. If excluding, the obvious alternative to this patch is then to add a top one-liner (to dg-skip-if the test for default_packed targets or a similar excluding expression). I'm fin

Re: [PATCHv2] Fix PR 108980: note without warning due to array bounds check

2023-03-09 Thread Jakub Jelinek via Gcc-patches
On Thu, Mar 09, 2023 at 10:03:20AM -0800, Andrew Pinski via Gcc-patches wrote: > The problem here is after r13-4748-g2a27ae32fabf85, in some > cases we were calling inform without a corresponding warning. > This changes the logic such that we only cause that to happen > if there was a warning happe

[PATCH] Fortran: fix ICE with bind(c) in block data [PR104332]

2023-03-09 Thread Harald Anlauf via Gcc-patches
Dear all, the attached almost obvious patch fixes a NULL pointer dereference in a check of a symbol with the bind(c) attribute. Regtested on x86_64-pc-linux-gnu. OK for mainline? This PR is marked as 10/11/12/13 regression, thus it should qualify for a backport. It's simple enough anyway. Tha

[PATCHv2] Fix PR 108980: note without warning due to array bounds check

2023-03-09 Thread Andrew Pinski via Gcc-patches
The problem here is after r13-4748-g2a27ae32fabf85, in some cases we were calling inform without a corresponding warning. This changes the logic such that we only cause that to happen if there was a warning happened before hand. Changes since * v1: Fix formating and dump message as suggested by Ja

Re: [PATCH] libstdc++: Implement LWG 3820/3849 changes to cartesian_product_view

2023-03-09 Thread Jonathan Wakely via Gcc-patches
On Wed, 8 Mar 2023 at 15:13, Patrick Palka via Libstdc++ wrote: > > The LWG 3820 testcase revealed a bug in _M_advance, which this patch > also fixes. > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? OK > > libstdc++-v3/ChangeLog: > > * include/std/ranges > (cartes

Re: [PATCH] libstdc++: extraneous begin in cartesian_product_view::end [PR107572]

2023-03-09 Thread Jonathan Wakely via Gcc-patches
On Tue, 7 Mar 2023 at 20:49, Patrick Palka via Libstdc++ wrote: > > On Tue, 7 Mar 2023, Patrick Palka wrote: > > > ranges::begin() isn't guaranteed to be equality-preserving for > > non-forward ranges, so in cartesian_product_view::end we need to be > > careful about calling begin() on the first r

Re: [PATCH] libstdc++: Implement P2520R0 changes to move_iterator's iterator_concept

2023-03-09 Thread Jonathan Wakely via Gcc-patches
On Wed, 8 Mar 2023 at 16:47, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps > backports? Yes for all. > > libstdc++-v3/ChangeLog: > > * include/bits/stl_iterator.h (move_iterator::_S_iter_concept): > Define. >

Re: [PATCH] libstdc++: Implement LWG 3715 changes to view_interface::empty

2023-03-09 Thread Jonathan Wakely via Gcc-patches
On Wed, 8 Mar 2023 at 15:53, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? OK. I think this would make sense for 12 too. > > libstdc++-v3/ChangeLog: > > * include/bits/ranges_util.h (view_interface::empty): Add > preferred over

Re: [PATCH] libstdc++: Make views::single/iota/istream SFINAE-friendly [PR108362]

2023-03-09 Thread Jonathan Wakely via Gcc-patches
On Wed, 8 Mar 2023 at 14:36, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps 12? Yes, OK for trunk and 12. > > PR libstdc++/108362 > > libstdc++-v3/ChangeLog: > > * include/std/ranges (__detail::__can_single_view): New

Re: AArch64 bfloat16 mangling

2023-03-09 Thread Richard Sandiford via Gcc-patches
Sorry for the slow response. Jakub Jelinek writes: > Hi! > > On Mon, Jan 30, 2023 at 11:07:23PM +, Richard Sandiford wrote: >> Jakub Jelinek writes: >> > https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605965.html >> > - ABI - aarch64: Add bfloat16_t support for aarch64 (enabling i

Re: [PATCH 2/2] Rework 128-bit complex multiply and divide.

2023-03-09 Thread Michael Meissner via Gcc-patches
On Fri, Mar 03, 2023 at 03:35:44PM -0600, Segher Boessenkool wrote: > > +complex_multiply_builtin_code (machine_mode mode) > > +{ > > + return (built_in_function) (BUILT_IN_COMPLEX_MUL_MIN + mode > > + - MIN_MODE_COMPLEX_FLOAT); > > +} > > There should be an assert that th

[committed] libstdc++: Really fix symver for __gnu_cxx11_ieee128::__try_use_facet [PR108882]

2023-03-09 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/108882 * config/os/gnu-linux/ldbl-ieee128-extra.ver: Fix incorrect patterns. --- libstdc++-v3/config/os/gnu-linux/ldbl-ieee128-extra.ver | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH 2/2] Rework 128-bit complex multiply and divide.

2023-03-09 Thread Michael Meissner via Gcc-patches
On Fri, Mar 03, 2023 at 03:35:44PM -0600, Segher Boessenkool wrote: > Hi! > > On Fri, Feb 03, 2023 at 12:53:05AM -0500, Michael Meissner wrote: > > This patch reworks how the complex multiply and divide built-in functions > > are > > done. > > > I tested all 3 patchs for PR target/107299 on: >

Re: [v4][PATCH 1/2] Handle component_ref to a structre/union field including C99 FAM [PR101832]

2023-03-09 Thread Qing Zhao via Gcc-patches
> On Mar 9, 2023, at 7:20 AM, Richard Biener wrote: > > On Fri, 24 Feb 2023, Qing Zhao wrote: > >> GCC extension accepts the case when a struct with a C99 flexible array member >> is embedded into another struct or union (possibly recursively). >> __builtin_object_size should treat such struct

Re: [PATCH RFC 1/3] c++: add __is_deducible trait [PR105841]

2023-03-09 Thread Jason Merrill via Gcc-patches
On 2/20/23 11:58, Patrick Palka wrote: On Sat, 18 Feb 2023, Jason Merrill via Gcc-patches wrote: Tested x86_64-pc-linux-gnu. Since this is fixing experimental (C++20) functionality, I think it's reasonable to apply now; I'm interested in other opinions, and thoughts about the user-facing funct

Re: Enable UTF-8 code page in driver and compiler on 64-bit mingw host [PR108865]

2023-03-09 Thread Jonathan Yong via Gcc-patches
On 3/9/23 13:33, Costas Argyris wrote: Pinging the list and mingw maintainer. Analysis and pre-approval here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108865 Thanks, pushed to master branch.

Re: [PATCH] rs6000: Accept const pointer operands for MMA builtins [PR109073]

2023-03-09 Thread Segher Boessenkool
Hi! On Thu, Mar 09, 2023 at 05:30:53PM +0800, Kewen.Lin wrote: > on 2023/3/9 07:01, Peter Bergner via Gcc-patches wrote: > > PR109073 shows a problem where GCC 11 and GCC 10 do not accept a const > > __vector_pair pointer operand to some MMA builtins, which GCC 12 and later > > correctly accept.

[pushed] [PR108999] LRA: For clobbered regs use operand mode instead of the biggest mode

2023-03-09 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108999 The patch was successfully bootstrapped and tested on i686, x86-64, aarch64, and ppc64 be/le. commit 3c75631fc09a22f2513fab80ef502c2a8b0f9121 Author: Vladimir N. Makarov Date: Thu Mar 9 08:41:09 2023 -0500 LR

Re: [PATCH] driver: Treat include path args the same way between cpp_unique_options and asm_options. [PR71850]

2023-03-09 Thread Costas Argyris via Gcc-patches
Pinging list and driver reviewer. Details here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71850 On Thu, 2 Mar 2023 at 19:25, Costas Argyris wrote: > This is a proposal to fix PR71850 by applying the existing logic for > passing include paths to cc1 to as. > > Thanks, > Costas > From 393aff0

Re: Enable UTF-8 code page in driver and compiler on 64-bit mingw host [PR108865]

2023-03-09 Thread Costas Argyris via Gcc-patches
Pinging the list and mingw maintainer. Analysis and pre-approval here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108865 On Wed, 8 Mar 2023 at 10:52, Costas Argyris wrote: > Added .manifest file to the make rule for utf8rc-mingw32.o, latest patch > attached. > > On Tue, 7 Mar 2023 at 15:27,

Re: [PATCH] middle-end/108995 - avoid folding when sanitizing overflow

2023-03-09 Thread Richard Biener via Gcc-patches
On Thu, 9 Mar 2023, Jakub Jelinek wrote: > On Wed, Mar 08, 2023 at 09:38:43AM +, Richard Biener via Gcc-patches > wrote: > > The following plugs one place in extract_muldiv where it should avoid > > folding when sanitizing overflow. > > > > I'm unsure about the testcase, I didn't find any th

Re: [PATCH] middle-end/108995 - avoid folding when sanitizing overflow

2023-03-09 Thread Jakub Jelinek via Gcc-patches
On Wed, Mar 08, 2023 at 09:38:43AM +, Richard Biener via Gcc-patches wrote: > The following plugs one place in extract_muldiv where it should avoid > folding when sanitizing overflow. > > I'm unsure about the testcase, I didn't find any that tests for > a runtime sanitizer error ... > > Boots

Re: [v4][PATCH 1/2] Handle component_ref to a structre/union field including C99 FAM [PR101832]

2023-03-09 Thread Richard Biener via Gcc-patches
On Fri, 24 Feb 2023, Qing Zhao wrote: > GCC extension accepts the case when a struct with a C99 flexible array member > is embedded into another struct or union (possibly recursively). > __builtin_object_size should treat such struct as flexible size. > > gcc/c/ChangeLog: > > PR tree-optim

[PATCH v2 2/2] combine: Try harder to form zero_extends [PR106594]

2023-03-09 Thread Richard Sandiford via Gcc-patches
g:c23a9c87cc62bd177fd0d4db6ad34b34e1b9a31f uses nonzero_bits information to convert sign_extends into zero_extends. That change is semantically correct in itself, but for the testcase in the PR, it leads to a series of unfortunate events, as described below. We try to combine: Trying 24 -> 25:

[PATCH v2 1/2] combine: Split code out of make_compound_operation_int

2023-03-09 Thread Richard Sandiford via Gcc-patches
This patch just splits some code out of make_compound_operation_int into a new function called make_compound_operation_and. It is a prerequisite for the fix for PR106594. It might (or might not) make sense to put more of the existing "and" handling into the new function, so that the subreg+lshift

[PATCH v2 0/2] Series of patch to fix PR106594

2023-03-09 Thread Richard Sandiford via Gcc-patches
This series of patches fixes PR106594, an aarch64 regression in which we fail to combine an extension into an address. The first patch just refactors code. The second patch contains the actual fix. The cover note for the second patch describes the problem and the fix. Tested on aarch64-linux-gn

Re: [PATCH v3] gcov: Fix "do-while" structure in case statement leads to incorrect code coverage [PR93680]

2023-03-09 Thread Richard Biener via Gcc-patches
On Wed, 8 Mar 2023, Xionghu Luo wrote: > > > On 2023/3/7 19:25, Richard Biener wrote: > >>> It would be nice to avoid creating blocks / preserving labels we'll > >>> immediately remove again. For that we do need some analysis > >>> before creating basic-blocks that determines whether a label is

Re: [PATCH] Avoid unnecessary epilogues from tree_unroll_loop

2023-03-09 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > The following fixes the condition determining whether we need an > epilogue. > > When r12-2429-g62acc72a957b56 introduced this check I didn't notice > the odd condition on review. Richard - do you remember if this > was on purpose? Oops, no, looks like a

[PATCH] tree-optimization/44794 - avoid excessive RTL unrolling on epilogues

2023-03-09 Thread Richard Biener via Gcc-patches
The following adjusts tree_[transform_and_]unroll_loop to set an upper bound on the number of iterations on the epilogue loop it creates. For the testcase at hand which involves array prefetching this avoids applying RTL unrolling to them when -funroll-loops is specified. Other users of this API

[PATCH] Avoid unnecessary epilogues from tree_unroll_loop

2023-03-09 Thread Richard Biener via Gcc-patches
The following fixes the condition determining whether we need an epilogue. When r12-2429-g62acc72a957b56 introduced this check I didn't notice the odd condition on review. Richard - do you remember if this was on purpose? I've noticed the mismatch with gcc.dg/tree-ssa/predcom-1.c for example. B

Re: [PATCH v2 0/5] A small Texinfo refinement

2023-03-09 Thread Arsen Arsenović via Gcc-patches
Sandra Loosemore writes: >> As an example, let's take this link: >> https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Warning-Options.html#index-Wpedantic >> This should place you below the item line this index entry refers to, >> and there aren't any copiable anchors (see equivalent in my render fo

Re: [PATCH] combine: Try harder to form zero_extends [PR106594]

2023-03-09 Thread Richard Sandiford via Gcc-patches
Segher Boessenkool writes: > On Wed, Mar 08, 2023 at 11:58:51AM +, Richard Sandiford wrote: >> Segher Boessenkool writes: >> > An #ifdef is a way of making a change that is not finished yet not hurt >> > the other targets. It still hurts generic development, which indirectly >> > hurts all t

Re: [PATCH v2 1/5] docs: Create Indices appendix

2023-03-09 Thread Arsen Arsenović via Gcc-patches
Sandra Loosemore writes: > On 2/23/23 03:27, Arsen Arsenović via Gcc-patches wrote: >> The GCC manual has multiple indices. By creating an appendix which >> lists them, we help makeinfo present a more accessible way for the >> reader to see all the indices. >> gcc/ChangeLog: >> * doc/gcc.t

Re: [PING, PING] Re: [PATCH 2/2] Corrected pr25521.c target matching.

2023-03-09 Thread Cupertino Miranda via Gcc-patches
[PING] Cupertino Miranda writes: > Hi Jeff, > > Please, please, give me some feedback on this one. > I just don't want to have to keep asking you for time on this small > pending patches that I also have to keep track on. > > I realized your committed the other one. Thank you ! > > Best regards

Re: [PATCH] rs6000: Accept const pointer operands for MMA builtins [PR109073]

2023-03-09 Thread Kewen.Lin via Gcc-patches
Hi Peter, on 2023/3/9 07:01, Peter Bergner via Gcc-patches wrote: > PR109073 shows a problem where GCC 11 and GCC 10 do not accept a const > __vector_pair pointer operand to some MMA builtins, which GCC 12 and later > correctly accept. Fixed here by initializing the builtins to accept const > poi

Re: [PATCH v2] vect: Check that vector factor is a compile-time constant

2023-03-09 Thread Richard Biener via Gcc-patches
On Thu, Mar 9, 2023 at 8:57 AM Michael Collison wrote: OK. Thanks, Richard. > 2023-03-05 Michael Collison > > * tree-vect-loop-manip.cc (vect_do_peeling): Use > result of constant_lower_bound instead of vf in case > vf is not a compile time constant. > --- > gcc/tree

Re: [PATCH] ubsan: missed -fsanitize=bounds for compound ops [PR108060]

2023-03-09 Thread Jakub Jelinek via Gcc-patches
On Thu, Mar 09, 2023 at 08:12:47AM +, Richard Biener wrote: > I think this is a reasonable way to address the regression, so OK. It is true that both C and C++ (including c++14_down and c++17 and later where the latter have different ordering rules) evaluate the lhs of MODIFY_EXPR after rhs, s

Re: [PATCH] range-op-float: Fix up reverse binary operations [PR109008]

2023-03-09 Thread Richard Biener via Gcc-patches
On Thu, 9 Mar 2023, Jakub Jelinek wrote: > Hi! > > The following testcase is reduced from miscompilation of scipy package. > If we have say lhs = [1., 1.] - [1., 1.] and want to compute the range > of lhs from it, we correctly determine it is [0., 0.] (if computations > are exact, we generally do

[PATCH] range-op-float: Fix up reverse binary operations [PR109008]

2023-03-09 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is reduced from miscompilation of scipy package. If we have say lhs = [1., 1.] - [1., 1.] and want to compute the range of lhs from it, we correctly determine it is [0., 0.] (if computations are exact, we generally don't try to round them further in frange_arithmetic).

Re: [PATCH v2 0/5] A small Texinfo refinement

2023-03-09 Thread Gerald Pfeifer
On Wed, 8 Mar 2023, Sandra Loosemore wrote: > I personally do not know how the manuals for the GCC web site are built gcc.gnu.org has texinfo 6.5. (It's a RHEL 8.7 system.) > If we do update the version, there's a version check in configure.ac and > some hack for "makeinfo 4.7 brokenness" in doc

Re: [PATCH v2 0/5] A small Texinfo refinement

2023-03-09 Thread Richard Biener via Gcc-patches
On Thu, Mar 9, 2023 at 2:20 AM Andrew Pinski via Gcc-patches wrote: > > On Wed, Mar 8, 2023 at 5:09 PM Sandra Loosemore > wrote: > > > > On 3/8/23 14:22, Arsen Arsenović wrote: > > > > > > Sandra Loosemore writes: > > > > > >> On 3/8/23 02:11, Arsen Arsenović wrote: > > >>> Sandra Loosemore wr

Re: [PATCH] -Wdangling-pointer: don't mark SSA lhs sets as stores

2023-03-09 Thread Alexandre Oliva via Gcc-patches
On Mar 8, 2023, Richard Biener wrote: > On Wed, Mar 8, 2023 at 2:04 PM Martin Liška wrote: >> Is the emitted warning correct? > For the reduced testcase yes, if !aio_bh_poll_s (or !aio_bh_poll_bh) > the stored pointer remains local. *nod*, before the recent patch, it would have failed to iss

Re: [PATCH] ubsan: missed -fsanitize=bounds for compound ops [PR108060]

2023-03-09 Thread Richard Biener via Gcc-patches
On Wed, 8 Mar 2023, Marek Polacek wrote: > In this PR we are dealing with a missing .UBSAN_BOUNDS, so the > out-of-bounds access in the test makes the program crash before > a UBSan diagnostic was emitted. In C and C++, c_genericize gets > > a[b] = a[b] | c; > > but in C, both a[b] are one id

Re: [wwwdocs] gcc-13/porting_to.html: Document C++ -fexcess-precision=standard

2023-03-09 Thread Jakub Jelinek via Gcc-patches
On Thu, Mar 09, 2023 at 08:09:02AM +0100, Gerald Pfeifer wrote: > I struggled a bit understanding this and so have come up with what I > hope is simpler (without changing the meaning). > > What do you think of the change below? LGTM, thanks. > > diff --git a/htdocs/gcc-13/porting_to.html b/htdo