Re: [PATCH] PR middle-end/88345: Honor -falign-functions=N even optimized for size.

2022-10-06 Thread Palmer Dabbelt
On Thu, 06 Oct 2022 21:03:25 PDT (-0700), kito.ch...@sifive.com wrote: From: Monk Chiang Currnetly setting of -falign-functions=N will be ignored if the function is optimized for size or marked as cold function. However function alignment requirement is needed even optimized for size in some

Re: [PATCH] Set discriminators for call stmts on the same line within the same basic block

2022-10-06 Thread Jason Merrill via Gcc-patches
On 10/6/22 23:50, Eugene Rozenfeld wrote: Thank you for the review Jason. I fixed formatting and updated the commit description: OK. Call statements are possible split points of a basic block so they may end up in different basic blocks by the time

[PATCH] PR middle-end/88345: Honor -falign-functions=N even optimized for size.

2022-10-06 Thread Kito Cheng
From: Monk Chiang Currnetly setting of -falign-functions=N will be ignored if the function is optimized for size or marked as cold function. However function alignment requirement is needed even optimized for size in some situations, RISC-V target is an example, RISC-V kernel implement

Re: [PATCH] Set discriminators for call stmts on the same line within the same basic block

2022-10-06 Thread Eugene Rozenfeld via Gcc-patches
Thank you for the review Jason. I fixed formatting and updated the commit description: Call statements are possible split points of a basic block so they may end up in different basic blocks by the time pass_ipa_auto_profile executes. This change will also simplify

Go patch committed: better argument checking for builtins

2022-10-06 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend by Than McIntosh does some better argument type checking for some builtin functions. This avoids a compiler crash on cases like panic(panic("bad")). This fixes https://go.dev/issue/56071. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to

[PATCH v3] c-family: ICE with [[gnu::nocf_check]] [PR106937]

2022-10-06 Thread Marek Polacek via Gcc-patches
On Thu, Oct 06, 2022 at 05:42:41PM -0400, Jason Merrill wrote: > On 10/4/22 19:06, Marek Polacek wrote: > > On Fri, Sep 30, 2022 at 09:12:24AM -0400, Jason Merrill wrote: > > > On 9/29/22 18:49, Marek Polacek wrote: > > > > When getting the name of an attribute, we ought to use > > > >

Re: [PATCH RFC] c++: fix broken conversion in coroutines

2022-10-06 Thread Iain Sandoe
> On 6 Oct 2022, at 22:44, Jason Merrill wrote: > > On 10/3/22 23:53, Jason Merrill wrote: >> On 9/30/22 18:50, Iain Sandoe wrote: >>> Hi Jason, >>> On 30 Sep 2022, at 23:06, Jason Merrill wrote: You can't use CONVERT_EXPR to convert between two class types, and it was

[committed] libgcc, arc: Fix build

2022-10-06 Thread Jakub Jelinek via Gcc-patches
Hi! On Thu, Oct 06, 2022 at 10:05:29PM +, Joseph Myers wrote: > I'm seeing the following build failure for arc-linux-gnu after this > commit. (Note that this is for building GCC *after* glibc, not for an > initial inhibit_libc bootstrap build of GCC.) > > In file included from >

Re: Patch ping (Re: [PATCH] libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for)

2022-10-06 Thread Joseph Myers
I'm seeing the following build failure for arc-linux-gnu after this commit. (Note that this is for building GCC *after* glibc, not for an initial inhibit_libc bootstrap build of GCC.) In file included from /scratch/jmyers/glibc-bot/src/gcc/libgcc/unwind-dw2.c:413: ./md-unwind-support.h: In

Re: [PATCH v3] c++: fixes for derived-to-base reference binding [PR107085]

2022-10-06 Thread Jason Merrill via Gcc-patches
On 10/6/22 17:43, Marek Polacek wrote: On Thu, Oct 06, 2022 at 02:00:40PM -0400, Jason Merrill wrote: On 10/6/22 13:51, Marek Polacek wrote: On Thu, Oct 06, 2022 at 10:58:44AM -0400, Jason Merrill wrote: On 10/6/22 10:49, Marek Polacek wrote: On Wed, Oct 05, 2022 at 08:25:29PM -0400, Jason

Re: [PATCH RFC] c++: fix broken conversion in coroutines

2022-10-06 Thread Jason Merrill via Gcc-patches
On 10/3/22 23:53, Jason Merrill wrote: On 9/30/22 18:50, Iain Sandoe wrote: Hi Jason, On 30 Sep 2022, at 23:06, Jason Merrill wrote: You can't use CONVERT_EXPR to convert between two class types, and it was breaking copy elision. Unfortunately, this patch breaks

Re: [PATCH] Add __builtin_iseqsig()

2022-10-06 Thread Joseph Myers
My reading of the bug given as a reason for not testing that FE_INVALID is raised for (both quiet and signaling) NaN arguments is that it's specifically about constant arguments. That is, it ought to be possible to have a testcase that verifies FE_INVALID is raised when appropriate (and not

[PATCH v3] c++: fixes for derived-to-base reference binding [PR107085]

2022-10-06 Thread Marek Polacek via Gcc-patches
On Thu, Oct 06, 2022 at 02:00:40PM -0400, Jason Merrill wrote: > On 10/6/22 13:51, Marek Polacek wrote: > > On Thu, Oct 06, 2022 at 10:58:44AM -0400, Jason Merrill wrote: > > > On 10/6/22 10:49, Marek Polacek wrote: > > > > On Wed, Oct 05, 2022 at 08:25:29PM -0400, Jason Merrill wrote: > > > > >

Re: [PATCH v2] c-family: ICE with [[gnu::nocf_check]] [PR106937]

2022-10-06 Thread Jason Merrill via Gcc-patches
On 10/4/22 19:06, Marek Polacek wrote: On Fri, Sep 30, 2022 at 09:12:24AM -0400, Jason Merrill wrote: On 9/29/22 18:49, Marek Polacek wrote: When getting the name of an attribute, we ought to use get_attribute_name, which handles both [[ ]] and __attribute__(()) forms. Failure to do so may

Re: [PATCH, v2] Fortran: error recovery for invalid types in array constructors [PR107000]

2022-10-06 Thread Harald Anlauf via Gcc-patches
Hi Mikael, > Gesendet: Donnerstag, 06. Oktober 2022 um 22:14 Uhr > Von: "Mikael Morin" > An: "Harald Anlauf" > Cc: "fortran" , "gcc-patches" > Betreff: Re: [PATCH, v2] Fortran: error recovery for invalid types in array > constructors [PR107000] > > Le 05/10/2022 à 23:40, Harald Anlauf a écrit 

[PATCH, rs6000] Fix addg6s builtin with long long parameters. (PR100693)

2022-10-06 Thread will schmidt via Gcc-patches
[PATCH, rs6000] Fix addg6s builtin with long long parameters. (PR100693) Hi, As reported in PR 100693, attempts to use __builtin_addg6s with long long arguments result in truncated results. Since the int and long long types can be coerced into each other, (documented further near the

Aw: Re: [PATCH, v2] Fortran: reject procedures and procedure pointers as IO element [PR107074]

2022-10-06 Thread Harald Anlauf via Gcc-patches
Hi Mikael, I definitely agree that we need a temporary for the result of MERGE(a,a,.true.), I just haven't found out how to do that. The reason for the bad one-liner was that in gfc_simplify_merge result = gfc_get_parentheses (result); actually does have issues, in that the subsequent

[COMMITTED] [PR107170] Avoid copying incompatible types in legacy VRP.

2022-10-06 Thread Aldy Hernandez via Gcc-patches
Legacy VRP is calling ranger deep inside the bowels, and then trying to copy an incompatible type. My previous patch in this area assumed that the only possibility out of vr_values::get_value_range for an unsupported type was VARYING, but UNDEFINED can also be returned. PR

Re: [PATCH, v2] Fortran: reject procedures and procedure pointers as IO element [PR107074]

2022-10-06 Thread Mikael Morin
Le 06/10/2022 à 10:37, Mikael Morin a écrit : Le 05/10/2022 à 22:40, Harald Anlauf a écrit : Hi Mikael, Gesendet: Mittwoch, 05. Oktober 2022 um 12:34 Uhr Von: "Mikael Morin" Please move the check to resolve_transfer in resolve.cc. I have done this, see attached updated patch. Regtests

Re: [PATCH, v2] Fortran: error recovery for invalid types in array constructors [PR107000]

2022-10-06 Thread Mikael Morin
Le 05/10/2022 à 23:40, Harald Anlauf a écrit : There is one last thing that I'm dissatisfied with. The handling of unknown types should be moved to reduce_binary, because the dispatching in reduce_binary doesn't handle EXPR_OP, so even if either or both operands are scalar, they are handled by

[committed] analyzer: fixes to call_summary_replay::dump_to_pp

2022-10-06 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-3137-g30d6356773a838. gcc/analyzer/ChangeLog: * call-summary.cc (call_summary_replay::dump_to_pp): Bulletproof against NULL caller regions/svalues. Signed-off-by: David Malcolm ---

[committed] analyzer: fix another ICE in PR 107158

2022-10-06 Thread David Malcolm via Gcc-patches
I overreduced PR analyzer/107158 in r13-3096-gef878564140cbc, and there was another ICE in the original reproducer, which this patch fixes. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-3138-g629b4813e91aba. gcc/analyzer/ChangeLog: PR

[PATCH v2] libstdc++: basic_filebuf: don't flush more often than necessary.

2022-10-06 Thread Charles-Francois Natali via Gcc-patches
`basic_filebuf::xsputn` would bypass the buffer when passed a chunk of size 1024 and above, seemingly as an optimisation. This can have a significant performance impact if the overhead of a `write` syscall is non-negligible, e.g. on a slow disk, on network filesystems, or simply during IO

Re: [PATCH] c++, v3: Improve handling of foreigner namespace attributes

2022-10-06 Thread Jason Merrill via Gcc-patches
On 10/6/22 14:29, Jakub Jelinek wrote: On Thu, Oct 06, 2022 at 01:30:18PM -0400, Jason Merrill wrote: Yes, except I was thinking the new function would take the attribute TREE_LIST as its parameter so that all the callers don't have to also call get_attribute_namespace. Ok, here it is in

[PATCH] c++, v3: Improve handling of foreigner namespace attributes

2022-10-06 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 06, 2022 at 01:30:18PM -0400, Jason Merrill wrote: > Yes, except I was thinking the new function would take the attribute > TREE_LIST as its parameter so that all the callers don't have to also call > get_attribute_namespace. Ok, here it is in patch form. 2022-10-06 Jakub Jelinek

[PATCH RFA] gimplify: prevent some C++ temporary elision

2022-10-06 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, OK for trunk? -- >8 -- In this testcase, we were optimizing away the temporary for f(), but C++17 and above are clear that there is a temporary, and because its destructor has visible side-effects we can't optimize it away under the as-if rule. So disable this

Re: [PATCH v2] c++: fixes for derived-to-base reference binding [PR107085]

2022-10-06 Thread Jason Merrill via Gcc-patches
On 10/6/22 13:51, Marek Polacek wrote: On Thu, Oct 06, 2022 at 10:58:44AM -0400, Jason Merrill wrote: On 10/6/22 10:49, Marek Polacek wrote: On Wed, Oct 05, 2022 at 08:25:29PM -0400, Jason Merrill wrote: On 10/5/22 17:27, Marek Polacek wrote: This PR reports that struct Base {};

Re: [PATCH v2] c++: fixes for derived-to-base reference binding [PR107085]

2022-10-06 Thread Marek Polacek via Gcc-patches
On Thu, Oct 06, 2022 at 10:58:44AM -0400, Jason Merrill wrote: > On 10/6/22 10:49, Marek Polacek wrote: > > On Wed, Oct 05, 2022 at 08:25:29PM -0400, Jason Merrill wrote: > > > On 10/5/22 17:27, Marek Polacek wrote: > > > > This PR reports that > > > > > > > > struct Base {}; > > > >

[PATCH] Fix gdb FilteringTypePrinter (again)

2022-10-06 Thread François Dumont via Gcc-patches
Hi Looks like the previous patch was not enough. When using it in the context of a build without dual abi and versioned namespace I started having failures again. I guess I hadn't rebuild everything properly. This time I think the problem was in those lines:     if self.type_obj ==

Re: [RFC] c++: parser - Support for target address spaces in C++

2022-10-06 Thread Jason Merrill via Gcc-patches
On 10/6/22 10:34, Paul Iannetta wrote: Hi, Presently, GCC supports target address spaces as a GNU extension (cf. `info -n "(gcc)Named Address Spaces"`). This is however supported only by the C frontend, which is a bit sad, since all the GIMPLE machinery is readily available and, moreover, LLVM

Re: [PATCH] c++, v2: Improve handling of foreigner namespace attributes

2022-10-06 Thread Jason Merrill via Gcc-patches
On 10/6/22 13:20, Jakub Jelinek wrote: On Thu, Oct 06, 2022 at 09:42:47AM -0400, Jason Merrill wrote: - tree t = lookup_attribute ("fallthrough", attr); + tree t = lookup_attribute (NULL, "fallthrough", attr); + if (t == NULL_TREE) +t = lookup_attribute ("gnu", "fallthrough", attr);

Re: [PATCH][AArch64] Improve immediate expansion [PR106583]

2022-10-06 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, > Did you consider handling the case where the movks aren't for > consecutive bitranges?  E.g. the patch handles: > but it looks like it would be fairly easy to extend it to: > >  0x12345678 Yes, with a more general search loop we can get that case too - it doesn't trigger

[PATCH] Reduce DF computation at -O0

2022-10-06 Thread Eric Botcazou via Gcc-patches
Hi, even at -O0 there may be a fair amount of DF computation performed when compiling large units and part of it appears to be useless. Bootstrapped/regtested on x86-64/Linux, OK for the mainline? 2022-10-06 Eric Botcazou * function.cc (thread_prologue_and_epilogue_insns): Update

[PATCH] c++, v2: Improve handling of foreigner namespace attributes

2022-10-06 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 06, 2022 at 09:42:47AM -0400, Jason Merrill wrote: > > - tree t = lookup_attribute ("fallthrough", attr); > > + tree t = lookup_attribute (NULL, "fallthrough", attr); > > + if (t == NULL_TREE) > > +t = lookup_attribute ("gnu", "fallthrough", attr); > > Maybe lookup_attribute

Re: [PING 2] [PATCH] libstdc++: basic_filebuf: don't flush more often than necessary.

2022-10-06 Thread Jonathan Wakely via Gcc-patches
On Thu, 6 Oct 2022 at 17:33, Charles-François Natali wrote: > > On Thu, Oct 6, 2022, 14:29 Jonathan Wakely wrote: >> >> Sorry for the lack of review. I've been trying to remember (and find) >> some previous discussions related to this topic, but haven't managed >> to find it yet. > > > No

Re: [PATCH] undef offsetof before defining it in stddef.h

2022-10-06 Thread Olivier Hainque via Gcc-patches
> On 6 Oct 2022, at 14:17, Richard Biener wrote: >> >> Ok to commit? > > OK. Thanks!

Re: [PATCH] Introduce DWARF_VERSION_DEFAULT (and redefine for VxWorks)

2022-10-06 Thread Olivier Hainque via Gcc-patches
> On 6 Oct 2022, at 14:15, Richard Biener wrote: > >> Is this ok to commit? > > I think this is reasonable, thus OK. Great, thanks Richard :-)

Re: [PING 2] [PATCH] libstdc++: basic_filebuf: don't flush more often than necessary.

2022-10-06 Thread Charles-François Natali via Gcc-patches
On Thu, Oct 6, 2022, 14:29 Jonathan Wakely wrote: > Sorry for the lack of review. I've been trying to remember (and find) > some previous discussions related to this topic, but haven't managed > to find it yet. > No worries! > The patch does look sensible (and is the same as the one attached

Re: [Patch] openmp: Map holds clause to IFN_ASSUME for Fortran

2022-10-06 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 06, 2022 at 06:15:52PM +0200, Tobias Burnus wrote: > On 06.10.22 14:17, Jakub Jelinek wrote: > > On Thu, Oct 06, 2022 at 12:55:01PM +0200, Tobias Burnus wrote: > > > I don't know whether it makes sense to handle – in the long run – the > > > case of se.pre/se.post being nonempty – and,

[PATCH] c++ modules: static var in inline function [PR104433]

2022-10-06 Thread Patrick Palka via Gcc-patches
The below testcase fails to link with the error undefined reference to `f()::y' ultimately because during stream out for the static VAR_DECL y we override DECL_EXTERNAL to true, which later during IPA confuses symbol_table::remove_unreachable_nodes into thinking it's safe to not emit the

Re: [Patch] openmp: Map holds clause to IFN_ASSUME for Fortran

2022-10-06 Thread Tobias Burnus
On 06.10.22 14:17, Jakub Jelinek wrote: On Thu, Oct 06, 2022 at 12:55:01PM +0200, Tobias Burnus wrote: I don't know whether it makes sense to handle – in the long run – the case of se.pre/se.post being nonempty – and, if so, how. I think it is essential not to throw those away, if se.pre or

gcc-12: FTBFS on hurd-i386

2022-10-06 Thread Svante Signell via Gcc-patches
Source: gcc-12 Version: 12_12.2.0-5 Severity: important Tags: patch User: debian-h...@lists.debian.org Usertags: hurd Affects: gcc-11, gcc-snapshot X-Debbugs-CC: debian-h...@lists.debian.org Hi, gcc-12-12.2.0-4/5 in sid FTBFS on hurd-i386 due to failing linkage of pthread_once (same error for

Re: [PATCH v2] c++: fixes for derived-to-base reference binding [PR107085]

2022-10-06 Thread Jason Merrill via Gcc-patches
On 10/6/22 10:49, Marek Polacek wrote: On Wed, Oct 05, 2022 at 08:25:29PM -0400, Jason Merrill wrote: On 10/5/22 17:27, Marek Polacek wrote: This PR reports that struct Base {}; struct Derived : Base {}; static_assert(__reference_constructs_from_temporary(Base const&, Derived));

[PATCH v2] c++: fixes for derived-to-base reference binding [PR107085]

2022-10-06 Thread Marek Polacek via Gcc-patches
On Wed, Oct 05, 2022 at 08:25:29PM -0400, Jason Merrill wrote: > On 10/5/22 17:27, Marek Polacek wrote: > > This PR reports that > > > >struct Base {}; > >struct Derived : Base {}; > >static_assert(__reference_constructs_from_temporary(Base const&, > > Derived)); > > > > doesn't

[RFC] c++: parser - Support for target address spaces in C++

2022-10-06 Thread Paul Iannetta via Gcc-patches
Hi, Presently, GCC supports target address spaces as a GNU extension (cf. `info -n "(gcc)Named Address Spaces"`). This is however supported only by the C frontend, which is a bit sad, since all the GIMPLE machinery is readily available and, moreover, LLVM supports this GNU extension both for C

Re: [PATCH 2/2] Split edge when edge locus and dest don't match

2022-10-06 Thread Jørgen Kvalsvik via Gcc-patches
On 06/10/2022 10:12, Richard Biener wrote: > On Wed, Oct 5, 2022 at 2:49 PM Martin Liška wrote: >> >> On 10/5/22 14:04, Jørgen Kvalsvik via Gcc-patches wrote: >>> Edges with locus are candidates for splitting so that the edge with >>> locus is the only edge out of a basic block, except when the

Re: [PATCH] c++: Improve handling of foreigner namespace attributes

2022-10-06 Thread Jason Merrill via Gcc-patches
On 10/5/22 08:04, Jakub Jelinek wrote: Hi! The following patch uses the new lookup_attribute overload and extra tests to avoid emitting weird warnings on foreign namespace attributes which we should just ignore (perhaps with a warning), but shouldn't imply any meaning to them just because they

Re: [PING 2] [PATCH] libstdc++: basic_filebuf: don't flush more often than necessary.

2022-10-06 Thread Jonathan Wakely via Gcc-patches
Sorry for the lack of review. I've been trying to remember (and find) some previous discussions related to this topic, but haven't managed to find it yet. The patch does look sensible (and is the same as the one attached to PR 63746) so I'll make sure to review it in time for the GCC 13 cut-off.

Re: [PING 2] [PATCH] libstdc++: basic_filebuf: don't flush more often than necessary.

2022-10-06 Thread Charles-François Natali via Gcc-patches
On Thu, Sep 22, 2022, 17:51 Charles-François Natali wrote: > > On Mon, Sep 5, 2022, 23:51 Charles-Francois Natali > wrote: > >> `basic_filebuf::xsputn` would bypass the buffer when passed a chunk of >> size 1024 and above, seemingly as an optimisation. >> >> This can have a significant

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-06 Thread Qing Zhao via Gcc-patches
> On Oct 6, 2022, at 4:29 AM, Richard Biener wrote: > > On Wed, Oct 5, 2022 at 8:18 PM Qing Zhao via Gcc-patches > wrote: >> >> >> >>> On Oct 5, 2022, at 1:36 PM, Martin Liška wrote: >>> >>> On 10/5/22 16:50, Qing Zhao wrote: I have two questions on this: >>> >>> Hello. >>>

Re: [PATCH] Add first-order recurrence autovectorization

2022-10-06 Thread Richard Biener via Gcc-patches
On Thu, Oct 6, 2022 at 2:13 PM Richard Biener wrote: > > On Fri, Sep 30, 2022 at 10:00 AM wrote: > > > > From: Ju-Zhe Zhong > > > > Hi, After fixing previous ICE. > > I add full implementation (insert permutation to get correct result.) > > > > The gimple IR is correct now I think: > > # t_21

Re: [GCC13][Patch][V6][PATCH 1/2] Add a new option -fstrict-flex-arrays[=n] and new attribute strict_flex_array

2022-10-06 Thread Qing Zhao via Gcc-patches
> On Oct 5, 2022, at 4:25 PM, Joseph Myers wrote: > > On Wed, 5 Oct 2022, Qing Zhao via Gcc-patches wrote: > >> + /* if not the last field, return false. */ > > Comments should start with an uppercase letter. > >> + /* if not an array field, return false. */ > >> + /* if there is a

Re: [PATCH] Fix wrong code generated by unroll-and-jam pass

2022-10-06 Thread Richard Biener via Gcc-patches
On Thu, Oct 6, 2022 at 1:09 PM Eric Botcazou wrote: > > > I'm wondering if testing DR_IS_WRITE (dra) is enough here and whether > > the logic also applies to RAW and WAR. So should it be either > > (DR_IS_WRITE (dra) || DR_IS_WRITE (drb)) or DR_IS_WRITE (dra) && > > DR_IS_WRITE (drb) instead? >

[PATCH] middle-end/107115 - avoid bogus redundant store removal during RTL expansion

2022-10-06 Thread Richard Biener via Gcc-patches
The following preserves the (premature) redundant store removal done in store_expr by appropriately guarding it with mems_same_for_tbaa_p. The testcase added needs scheduling disabled for now since there's a similar bug there still present. Bootstrapped and tested on x86_64-unknown-linux-gnu,

Re: [PATCH] undef offsetof before defining it in stddef.h

2022-10-06 Thread Richard Biener via Gcc-patches
On Fri, Sep 30, 2022 at 6:35 PM Olivier Hainque via Gcc-patches wrote: > > Hello, > > The attached patch is a proposal to #undef offsetof before > the #define we do in ginclude/stddef.h, which prevents redefinition > warnings from dg tests passing -Wsystem-headers on systems which > provide a

Re: [Patch] openmp: Map holds clause to IFN_ASSUME for Fortran

2022-10-06 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 06, 2022 at 12:55:01PM +0200, Tobias Burnus wrote: > Same as for C/C++, albeit a tiny bit longer patch. > > I don't know whether it makes sense to handle – in the long run – the > case of se.pre/se.post being nonempty – and, if so, how. I think it is essential not to throw those

Re: [PATCH] Introduce DWARF_VERSION_DEFAULT (and redefine for VxWorks)

2022-10-06 Thread Richard Biener via Gcc-patches
On Fri, Sep 30, 2022 at 6:18 PM Olivier Hainque via Gcc-patches wrote: > > Hello, > > This change is a proposal to introduce a target overridable macro > to replace the hardcoded value used in common.opt to initialize > dwarf_version. > > The main advantage compared to special code in a target >

Re: [PATCH] Add first-order recurrence autovectorization

2022-10-06 Thread Richard Biener via Gcc-patches
On Fri, Sep 30, 2022 at 10:00 AM wrote: > > From: Ju-Zhe Zhong > > Hi, After fixing previous ICE. > I add full implementation (insert permutation to get correct result.) > > The gimple IR is correct now I think: > # t_21 = PHI <_4(6), t_12(9)> > # i_22 = PHI > # vectp_a.6_26 = PHI > #

[PATCH][committed] aarch64: Remove redundant zero-extends with LDAR

2022-10-06 Thread Kyrylo Tkachov via Gcc-patches
Hi all, Like other loads in AArch64, the LDARB,LDARH,LDAR instructions clear out the top part of their destination register and we can thus avoid having to explicitly zero-extend it. We were missing a combine pattern that this patch adds. For one of the examples in the testcase we generated:

[PATCH][committed] aarch64: Add test for LDAR generation from __atomic_load_n

2022-10-06 Thread Kyrylo Tkachov via Gcc-patches
Hi all, I'd like a test to check the generation of LDAR for atomic_load_n. No new functionality added. Pushing to trunk. Thanks, Kyrill gcc/testsuite/ChangeLog: * gcc.target/aarch64/ldar_1.c: New test. ldar-test.patch Description: ldar-test.patch

Re: [PATCH] Fix wrong code generated by unroll-and-jam pass

2022-10-06 Thread Eric Botcazou via Gcc-patches
> I'm wondering if testing DR_IS_WRITE (dra) is enough here and whether > the logic also applies to RAW and WAR. So should it be either > (DR_IS_WRITE (dra) || DR_IS_WRITE (drb)) or DR_IS_WRITE (dra) && > DR_IS_WRITE (drb) instead? It's a self-dependence, i.e. dra == drb in the block. Or do you

[Patch] openmp: Map holds clause to IFN_ASSUME for Fortran

2022-10-06 Thread Tobias Burnus
Same as for C/C++, albeit a tiny bit longer patch. I don't know whether it makes sense to handle – in the long run – the case of se.pre/se.post being nonempty – and, if so, how. OK for mainline? Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201,

[RFC] Add op1_range for __builtin_signbit.

2022-10-06 Thread Aldy Hernandez via Gcc-patches
This is the op1_range range-op entry for __builtin_signbit. It allows us to wind back through a call to signbit. For example, on the true side of if (__builtin_signbit(x_5) != 0) we can crop down the range of x_5 to: [frange] float [-Inf, -0.0 (-0x0.0p+0)] -NAN Similarly on the false

Re: [PATCH v2] aarch64: update Ampere-1 core definition

2022-10-06 Thread Philipp Tomsich
Applied to master. Thanks! Philipp. On Thu, 6 Oct 2022 at 12:07, Richard Sandiford wrote: > Philipp Tomsich writes: > > This brings the extensions detected by -mcpu=native on Ampere-1 systems > > in sync with the defaults generated for -mcpu=ampere1. > > > > Note that some early kernel

Re: [PATCH v2] aarch64: fix off-by-one in reading cpuinfo

2022-10-06 Thread Philipp Tomsich
On Thu, 6 Oct 2022 at 12:06, Richard Sandiford wrote: > Philipp Tomsich writes: > > Fixes: 341573406b39 > > > > Don't subtract one from the result of strnlen() when trying to point > > to the first character after the current string. This issue would > > cause individual characters (where the

Re: [PATCH v2] aarch64: update Ampere-1 core definition

2022-10-06 Thread Richard Sandiford via Gcc-patches
Philipp Tomsich writes: > This brings the extensions detected by -mcpu=native on Ampere-1 systems > in sync with the defaults generated for -mcpu=ampere1. > > Note that some early kernel versions on Ampere1 may misreport the > presence of PAUTH and PREDRES (i.e., -mcpu=native will add 'nopauth' >

[PATCH] tree-optimization/107107 - tail-merging VN wrong-code

2022-10-06 Thread Richard Biener via Gcc-patches
The following fixes an unintended(?) side-effect of the special MODIFY_EXPR expression entries we add for tail-merging during VN. We shouldn't value-number the virtual operand differently here. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/107107

Re: [PATCH v2] aarch64: fix off-by-one in reading cpuinfo

2022-10-06 Thread Richard Sandiford via Gcc-patches
Philipp Tomsich writes: > Fixes: 341573406b39 > > Don't subtract one from the result of strnlen() when trying to point > to the first character after the current string. This issue would > cause individual characters (where the 128 byte buffers are stitched > together) to be lost. > >

[COMMITED] ada: Implementation of support for storage models in gigi

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou It is based on a new LOAD_EXPR node in GENERIC that is later turned into a bona-fide temporary during gimplification. gcc/ada/ * gcc-interface/ada-tree.def (LOAD_EXPR): New expression code. * gcc-interface/gigi.h (build_storage_model_load): Declare.

[COMMITED] ada: Minor potential bug in sem_ch6.adb

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird In sem_ch6.adb, the procedure Analyze_Procedure_Call is preceded with a comment: -- WARNING: This routine manages Ghost regions. Return statements must be -- replaced by gotos that jump to the end of the routine and restore the -- Ghost mode. Correct a violation of

[COMMITED] ada: Reject conditional goto in lock-free protected subprograms

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek In lock-free protected subprograms we don't allow goto statements; likewise, we now reject conditional goto statements. This fix only affects semantic checking mode with switch -gnatc. In ordinary compilation we already rejected conditional goto after it was expanded into

[COMMITED] ada: stack scrubbing: exemplify codegen changes

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Alexandre Oliva gcc/ada/ * doc/gnat_rm/security_hardening_features.rst: Add examples of codegen changes in stack scrubbing. * gnat_rm.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- .../gnat_rm/security_hardening_features.rst | 52

[COMMITED] ada: Cleanup related to lock-free protected subprograms

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Cleanup code and documentation; semantics is unaffected. gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Lock_Free): Remove inconsistent periods that end item descriptions. * sem_ch9.adb (Allows_Lock_Free_Implementation):

[COMMITED] ada: hardened conditionals: exemplify codegen changes

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Alexandre Oliva gcc/ada/ * doc/gnat_rm/security_hardening_features.rst: Add examples of codegen changes in hardened conditionals. * gnat_rm.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- .../gnat_rm/security_hardening_features.rst |

[COMMITED] ada: hardened booleans: exemplify codegen changes

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Alexandre Oliva Show the sort of code that is to be expected from using hardened booleans in Ada code. Mention that C traps instead of raising exceptions. gcc/ada/ * doc/gnat_rm/security_hardening_features.rst: Add examples of codegen changes in hardened booleans.

[PATCH v2] aarch64: update Ampere-1 core definition

2022-10-06 Thread Philipp Tomsich
This brings the extensions detected by -mcpu=native on Ampere-1 systems in sync with the defaults generated for -mcpu=ampere1. Note that some early kernel versions on Ampere1 may misreport the presence of PAUTH and PREDRES (i.e., -mcpu=native will add 'nopauth' and 'nopredres'). gcc/ChangeLog:

[COMMITED] ada: Add C declarations for Storage Model support

2022-10-06 Thread Marc Poulhiès via Gcc-patches
Add needed C declarations for Storage Model support in gigi. gcc/ada/ * fe.h (Has_Storage_Model_Type_Aspect) (Has_Designated_Storage_Model_Aspect, Storage_Model_Object) (Storage_Model_Copy_From, Storage_Model_Copy_To): Add declarations. * sem_util.ads: Add

[COMMITED] ada: Fix inserting of validity checks in lock-free protected subprograms

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Validity checks for statements in a lock-free implementation of protected subprogram were wrongly inserted in front of the original statements. This happened because the lock-free implementation was created as a shallow copy, where only the protected body statements were

[COMMITED] ada: Incorrect inferences drawn from if/elsif/while conditions with -gnatVo

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird Within the first (respectively, second) statement list of this if statement declare X : constant Integer := ... ; begin if X > 0 then ...; else ...; end if; end; we can safely assume that X is greater (respectively, not greater) than 0.

[COMMITED] ada: Accessibility error incorrectly flagged on call within Pre'Class expression

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Gary Dismukes The compiler was wrongly reporting an error on a function call within a Pre'Class expression when a formal of the aspect's subprogram was passed to an aliased formal. This occurred due to the call appearing with the return statement of the wrapper function created for the

[PATCH v2] aarch64: fix off-by-one in reading cpuinfo

2022-10-06 Thread Philipp Tomsich
Fixes: 341573406b39 Don't subtract one from the result of strnlen() when trying to point to the first character after the current string. This issue would cause individual characters (where the 128 byte buffers are stitched together) to be lost. gcc/ChangeLog: *

[COMMITED] ada: Clean up slice-of-component optimization

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff In the recursive case of Volatile_Or_Independent = False for array types, fall through into later checks, so for example we check the type of the prefix of a slice. The pattern here is "return True in certain cases, otherwise fall through into the final 'return False'". Remove

[COMMITED] ada: Do not issue compiler warnings in GNATprove mode

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Yannick Moy Use of pragma Warning with a string literal to set warning switches, should not impact GNATprove which is not subject to these switches. gcc/ada/ * sem_prag.adb (Analyze_Pragma): Ignore one variant of pragma Warnings in GNATprove mode. Tested on

[COMMITED] ada: Disable slice-of-component optimization in some cases

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff This patch disables the Fast_Copy_Bitfield optimization in certain rare cases that currently do not work (crash in gigi). We could improve Expand_Assign_Array_Bitfield_Fast to handle these cases properly, but that change is delicate, so for now, we simply disable the optimization.

[COMMITED] ada: Fix spurious warning on unreferenced refinement constituents

2022-10-06 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Listing an object as a state refinement constituent shouldn't be considered to be a reference, at least from the point of view of the machinery for detecting objects that are never referenced or written without being referenced. This patch fixes a spurious warning that

Re: [PATCH] aarch64: update Ampere-1 core definition

2022-10-06 Thread Philipp Tomsich
On Tue, 4 Oct 2022 at 18:43, Richard Sandiford wrote: > > Philipp Tomsich writes: > > This brings the extensions detected by -mcpu=native on Ampere-1 systems > > in sync with the defaults generated for -mcpu=ampere1. > > > > Note that some kernel versions may misreport the presence of PAUTH and

Re: [PATCH][pushed] contrib: run fetch before pushing Daily bump

2022-10-06 Thread Martin Liška
On 10/5/22 22:09, Tobias Burnus wrote: > On 05.10.22 20:41, Martin Liška wrote: >> +++ b/contrib/gcc-changelog/git_update_version.py >> @@ -127,6 +127,7 @@ def update_current_branch(ref_name): >>   repo.git.add(datestamp_path) >>   if not args.current: >>  

[committed] arc: Remove max-page-size and common-page-size forced setting

2022-10-06 Thread Claudiu Zissulescu via Gcc-patches
Max page size is defined in the ARC's BFD file, and the common page size is also set by the appropriate binutils macros. Remove them from LINK_SPEC. 2022-10-06 Claudiu Zissulescu * config/arc/linux.h (LINK_SPEC): Remove max-page-size and common-pave-size. Signed-off-by:

[committed] openmp: Map holds clause to IFN_ASSUME for C/C++

2022-10-06 Thread Jakub Jelinek via Gcc-patches
Hi! Now that [[assume (cond)]] support is in, this simple patch makes #pragma omp assume holds(cond) use it. Committed to trunk. 2022-10-06 Jakub Jelinek * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME call for holds clause on assume construct. *

Re: [PATCH] Add __builtin_iseqsig()

2022-10-06 Thread FX via Gcc-patches
ping*3 please? > Le 21 sept. 2022 à 11:40, FX a écrit : > > ping*2 > > <0001-Add-__builtin_iseqsig.patch> > >> Le 9 sept. 2022 à 19:55, FX a écrit : >> >> ping >> >> >>> Le 1 sept. 2022 à 23:02, FX a écrit : >>> >>> Attached patch adds __builtin_iseqsig() to the middle-end and C family

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-06 Thread Martin Liška
On 10/6/22 10:29, Richard Biener wrote: > On Wed, Oct 5, 2022 at 8:18 PM Qing Zhao via Gcc-patches > wrote: >> >> >> >>> On Oct 5, 2022, at 1:36 PM, Martin Liška wrote: >>> >>> On 10/5/22 16:50, Qing Zhao wrote: I have two questions on this: >>> >>> Hello. >>> 1. What’s the

Re: [PATCH, v2] Fortran: reject procedures and procedure pointers as IO element [PR107074]

2022-10-06 Thread Mikael Morin
Le 05/10/2022 à 22:40, Harald Anlauf a écrit : Hi Mikael, Gesendet: Mittwoch, 05. Oktober 2022 um 12:34 Uhr Von: "Mikael Morin" Please move the check to resolve_transfer in resolve.cc. I have done this, see attached updated patch. Regtests cleanly on x86_64-pc-linux-gnu. Strangely, the

Re: c: C2x typeof

2022-10-06 Thread Richard Biener via Gcc-patches
On Thu, Oct 6, 2022 at 3:22 AM Joseph Myers wrote: > > [C++ maintainers / global reviewers, note that there is a C++ > front-end change here needing review.] > > C2x adds typeof as a standard feature. In general this follows > existing GNU C semantics very closely, but there are various ways in

Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone

2022-10-06 Thread Richard Biener via Gcc-patches
On Wed, Oct 5, 2022 at 8:18 PM Qing Zhao via Gcc-patches wrote: > > > > > On Oct 5, 2022, at 1:36 PM, Martin Liška wrote: > > > > On 10/5/22 16:50, Qing Zhao wrote: > >> I have two questions on this: > > > > Hello. > > > >> > >> 1. What’s the motivation to enable -flive-patching with -flto? Is

Re: [PATCH] Support multilib-aware target lib flags self-specs overriding

2022-10-06 Thread Alexandre Oliva via Gcc-patches
On Jun 28, 2022, Alexandre Oliva wrote: > Support multilib-aware target lib flags self-specs overriding > This patch introduces -fmultiflags, short for multilib TFLAGS, as an > option that does nothing by default, but that can be added to TFLAGS > and mapped to useful options by driver

Re: [PATCH] Fix wrong code generated by unroll-and-jam pass

2022-10-06 Thread Richard Biener via Gcc-patches
On Wed, Oct 5, 2022 at 5:39 PM Eric Botcazou via Gcc-patches wrote: > > Hi, > > as shown by the attached testcase, there is a loophole in the unroll-and-jam > pass that can quickly result in wrong code generation. The code reads: > > if (!compute_data_dependences_for_loop (outer, true,

Re: [PATCH 2/2] Split edge when edge locus and dest don't match

2022-10-06 Thread Richard Biener via Gcc-patches
On Wed, Oct 5, 2022 at 2:49 PM Martin Liška wrote: > > On 10/5/22 14:04, Jørgen Kvalsvik via Gcc-patches wrote: > > Edges with locus are candidates for splitting so that the edge with > > locus is the only edge out of a basic block, except when the locuses > > match. The test checks the last

Re: Patch ping (Re: [PATCH] libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for)

2022-10-06 Thread Richard Biener via Gcc-patches
On Wed, Oct 5, 2022 at 12:34 PM Jakub Jelinek via Gcc-patches wrote: > > Hi! > > I'd like to ping this patch. The patch is OK. Richard. > Thanks. > > > 2022-09-19 Jakub Jelinek > > > > * unwind-dw2.h (REG_UNSAVED, REG_SAVED_OFFSET, REG_SAVED_REG, > > REG_SAVED_EXP,

RE: [PATCH][AArch64] Implement ACLE Data Intrinsics

2022-10-06 Thread Richard Biener via Gcc-patches
On Wed, 5 Oct 2022, Kyrylo Tkachov wrote: > > > > -Original Message- > > From: Andre Vieira (lists) > > Sent: Tuesday, October 4, 2022 11:34 AM > > To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org; > > Richard Sandiford ; Richard Biener > > > > Subject: Re: [PATCH][AArch64] Implement ACLE

Re: [PATCH] cselib: Skip BImode while keeping track of subvalue relations [PR107088]

2022-10-06 Thread Stefan Schulze Frielinghaus via Gcc-patches
On Wed, Oct 05, 2022 at 08:48:13PM -0600, Jeff Law via Gcc-patches wrote: > > On 10/4/22 05:28, Stefan Schulze Frielinghaus via Gcc-patches wrote: > > For BImode get_narrowest_mode evaluates to QImode but BImode < QImode. > > Thus FOR_EACH_MODE_UNTIL never reaches BImode and iterates until OImode

  1   2   >