[Ada] Improve pretty-printing of iterated component associations

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Pretty-printing used mostly in the debugger now handles more Ada 2022 syntax features. In particular, now it correctly handles expressions like "[for E of A when E /= X => E]". Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sprint.adb (Sprint_Node_Actual): Handle iterator_s

[Ada] Fix syntax in documentation

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Leading to a poorly formatted example section. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst: Fix rest syntax * gnat_ugn.texi: Regenerate.diff --git a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst b/gcc/ada/doc/gnat

[Ada] Cleanup expansion of attribute Priority

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Semantically neutral cleanup after the main fix for expansion of attribute Priority. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * einfo-utils.adb (Number_Entries): Refine type of a local variable. * exp_attr.adb (Expand_N_Attribute_Reference): Rename Conctyp to

[Ada] Fix crash for Default_Initial_Condition on derived enumeration type

2022-09-05 Thread Marc Poulhiès via Gcc-patches
This fixes a crash on the declaration of a private derived enumeration type with the Default_Initial_Condition aspect and in the process makes a couple of related adjustments: 1) removes the early freezing of implicit character and numeric base types and 2) fixes an oversight in the implementation

[Ada] Remove excessive guards against inserting empty lists of actions

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Call to Insert_Actions with empty list does nothing, so there is no need to guard against such calls. Code cleanup; behavior is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * freeze.adb (Freeze_Itype): Remove excessive guard. * sem_ch5.adb (Analyze_Loop_

[Ada] Cleanup analysis of iterator specifications

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch5.adb (Check_Subtype_Definition): Remove redundant call to Present; style cleanup.diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb --- a/gcc/ada/sem_ch5.adb +++ b/gcc/a

[Ada] Cleanup analysis of quantified expressions with empty ranges

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Cleanup handling of quantified expressions before using it as an inspiration for fixing the handling of iterated component associations. Behavior is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch4.adb (Is_Empty_Range): Move error reporting to the

[Ada] Fix resolution of iterated component association

2022-09-05 Thread Marc Poulhiès via Gcc-patches
For iterator specification appearing inside an iterated component association, we just did ad-hoc, incomplete checks and delayed a proper analysis until the iterated component association is expanded into loop (and then reanalyzed). However, when the iterated component association is not expanded,

[Ada] New gnatbind switch -k

2022-09-05 Thread Marc Poulhiès via Gcc-patches
This switch can be used to disable the effect of -F when using -n explicitly or implicitly. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * bindgen.adb (Gen_Elab_Calls): Check for Check_Elaboration_Flags. * bindusg.adb (Display): Add -k. * opt.ads (Check_Elab

[Ada] Detect expansion of iterated component associations into loops

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Iterated component associations are expanded into loops, which GNAT should detect as violating restriction No_Implicit_Loops; same for iterated element associations and delta array aggregates. Part of cleanups for correct handling of iterated component associations in SPARK. Tested on x86_64-pc-l

[Ada] Suppress warnings in trivial subprograms with finalization

2022-09-05 Thread Marc Poulhiès via Gcc-patches
There are heuristics for suppressing warnings about unused objects in trivial cases. In particular, we try to suppress warnings here: function F (A : Integer) return Some_Type; X : Some_Type; begin raise Not_Yet_Implemented; return X; end F; But it doesn't work if Some_

[Ada] Enable Error_Msg_GNAT_Extension for mixed decl/stmts

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Enable mixing of declarative items and statements under the -gnatX switch. The previous version used the -gnat2022 switch. In addition, change the error message so that it advertises the new feature when it is disabled. Instead of: declarations must come before "begin" we now say (without -gnatX

[Ada] Cleanup resolution of iterated component association

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Tune names of local entities. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_aggr.adb (Resolve_Iterated_Component_Association): Change generic name Ent to a more intuitive Scop; rename Remove_Ref to Remove_Reference, so it can be instantiated as a traver

[Ada] Fix detection of unused warning suppression

2022-09-05 Thread Marc Poulhiès via Gcc-patches
The comment for Warnings_Off says: "clients should generally not test this flag directly, but instead use function Has_Warnings_Off". Primarily a code cleanup, as this only affects minor a corner case. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Validate_U

[Ada] Secondary stack and i-c*

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Extend the previous changes related to Ada.Tags trigerring a dependency on the secondary stack to various i-c* packages. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * ali.adb (Scan_ALI): Special case i-c*.ali when setting Sec_Stack_Used.diff --git a/gcc/ada/ali.adb

[Ada] Fix bogus discriminant check failure for type with predicate

2022-09-05 Thread Marc Poulhiès via Gcc-patches
This reorders the processing in Freeze_Entity_Checks so that building the predicate functions, which first requires building discriminated checking functions for record types with a variant part, is done after processing and checking this variant part. Tested on x86_64-pc-linux-gnu, committed on t

[Ada] Cleanup resolution of aggregates with mixed component associations

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Code cleanup only; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_aggr.adb (Resolve_Array_Aggregate): Change an inconsistent use of False into its local equivalent Failure.diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb --- a/gc

[Ada] Fix double identifiers in iterated component association

2022-09-05 Thread Marc Poulhiès via Gcc-patches
The iterated_component_association grammar construct appears in Ada RM in two syntactic forms: with iterator_specification and with defining_identifier. This is now properly reflected in the GNAT AST, while previously we had two defining_identifiers regardless of the syntactic form. Cleanup relate

[Ada] Small cleanup in body of System.Value_R

2022-09-05 Thread Marc Poulhiès via Gcc-patches
This is mostly stylistic but also adds a couple of missing comments. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-valuer.adb (Scan_Decimal_Digits): Consistently avoid initializing local variables. (Scan_Integral_Digits): Likewise. (Scan_R

[Ada] Create internal type for null array aggregate as an itype

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Internal type created for the null array aggregate of Ada 2022 was created as a temporary entity and then flagged as internal, but it is better to create this type directly as an itype. In particular, when the null array aggregate appears in a spec expression, its type declaration will not be atta

[Ada] Bad Default_Initial_Condition check for a not-default-initialized object

2022-09-05 Thread Marc Poulhiès via Gcc-patches
No Default_Initial_Condition check should be generated for an object declaration that has an explicit initial value. Previously this was implemented by testing the Has_Init_Expression flag, but this only works if the object declaration was created by the parser (since only the parser sets that attr

[Ada] Cleanup iteration over aggregate component associations

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Code cleanup related to fixes for iterated component associations in GNATprove ; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_aggr.adb (Resolve_Container_Aggregate): Style cleanup. (Resolve_Record_Aggregate): Remove redundant g

[Ada] Move check for null array aggregates to expansion

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Despite recent changes to runtime checks for null array aggregates, GNATprove still struggles with N_Raise_Constraint_Error nodes inserted into AST by aggregate resolution. The ultimate fix is to move these checks to expansion (which is disabled in GNATprove mode) and explicitly emit a proof check

[Ada] Remove no longer referenced GNATprove utility routine for itypes

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Code cleanup related to itypes for Ada 2022 null array aggregates. Remove routine that was added in 2011 but is not referenced by GNATprove since 2015. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.ads (Itype_Has_Declaration): Remove spec. * sem_util.adb (

[Ada] Single-element Append performance improvement

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Ada.Containers.Vectors has two Append procedures that take an Element value; one takes a Count parameter and one does not (the count is implicitly one for the latter). For the former version, there was code that took a faster path if certain conditions were met and otherwise took a slower path; one

[Ada] Remove VMS specific routine that is no longer referenced

2022-09-05 Thread Marc Poulhiès via Gcc-patches
Code cleanup related to resctrition No_Local_Allocators. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_util.ads (Entry_Names_OK): Remove spec. * exp_util.adb (Entry_Names_OK): Remove body.diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb --- a/gcc/ada/ex

[Ada] Fix insertion of a runtime check for null array aggregate

2022-09-05 Thread Marc Poulhiès via Gcc-patches
A null array aggregate of Ada 2022 requires a conditional runtime check that was inserted as an if-statement. While gigi can handle statements inserted into a list of declarations, in GNATprove such a statement will cause a crash. It is better to insert a conditional raise node, which is properly h

[Ada] Fix inconsistent building of itypes for null array aggregates

2022-09-05 Thread Marc Poulhiès via Gcc-patches
To analyze Ada 2022 null array aggregates we introduced a dedicated routine and bypassed the code for ordinary array aggregates. However, the types for the array indexes created by this dedicated routine differed from the types created for ordinary array aggregates, i.e. itypes for null array aggre

Re: libsanitizer: merge from upstream

2022-09-05 Thread Martin Liška
On 9/4/22 21:50, Iain Sandoe wrote: > Hi Martin, > >> On 30 Aug 2022, at 11:53, Martin Liška wrote: >> >> On 5/4/22 10:59, Martin Liška wrote: >>> Hello. >> I've just done one more merge from upstream. >> Upstream revision: 84a71d5259c2682403cdbd8710592410a2f128ab. > > Which (again) breaks boots

Re: libsanitizer: merge from upstream

2022-09-05 Thread Rainer Orth
Hi Martin, > On 9/4/22 21:50, Iain Sandoe wrote: >> Hi Martin, >> >>> On 30 Aug 2022, at 11:53, Martin Liška wrote: >>> >>> On 5/4/22 10:59, Martin Liška wrote: Hello. >>> I've just done one more merge from upstream. >>> Upstream revision: 84a71d5259c2682403cdbd8710592410a2f128ab. >> >> Wh

Re: [PATCH][DOCS] gcc-13: document removal of STABS

2022-09-05 Thread Martin Liška
On 9/2/22 10:29, Gerald Pfeifer wrote: > Hi Martin, > > On Fri, 2 Sep 2022, Martin Liška wrote: >> +The support for emitting the STABS debugging format has been removed >> + (includes -gstabs and -gxcoff options) >> which means >> + the support for dbx debugger is removed. > > how

Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-05 Thread Martin Liška
On 9/2/22 10:54, Richard Biener wrote: > On Fri, Sep 2, 2022 at 9:00 AM Martin Liška wrote: >> >> On 9/1/22 13:18, Richard Biener wrote: >>> I presume WarnRemoved will diagnose use of -gstabs but not fail >>> compilation. Will -gstabs then still enable -g (with the default debug >>> format)? >> >

Re: [PATCH] rs6000: Don't ICE when we disassemble an MMA variable [PR101322]

2022-09-05 Thread Kewen.Lin via Gcc-patches
on 2022/9/1 22:17, Peter Bergner wrote: > On 9/1/22 3:29 AM, Kewen.Lin wrote: >>> I have no idea why ptr_vector_*_type would behave differently here than >>> build_pointer_type (vector_*_type_node). Using the build_pointer_type() >>> fixed it for me, so that's why I went with it. :-) Maybe this i

Re: [PATCH] libcpp, v3: Named universal character escapes and delimited escape sequence tweaks

2022-09-05 Thread Jakub Jelinek via Gcc-patches
On Sat, Sep 03, 2022 at 12:54:31PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Sat, Sep 03, 2022 at 12:29:52PM +0200, Jakub Jelinek wrote: > > On Thu, Sep 01, 2022 at 03:00:28PM -0400, Jason Merrill wrote: > > > We might as well use the same flag name, and document it to mean what it > > > cur

Re: [PATCH v2] rs6000/test: Fix empty TU in some cases of effective targets [PR106345]

2022-09-05 Thread Kewen.Lin via Gcc-patches
Hi Segher, Gentle ping this patch as you wanted empty TU issue to be fixed first at the discussion [1]. Thanks in advance for your time! [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-September/600927.html BR, Kewen on 2022/7/25 14:26, Kewen.Lin via Gcc-patches wrote: > Hi, > > As the fai

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-09-05 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 29 Aug 2022 at 11:38, Prathamesh Kulkarni wrote: > > On Wed, 17 Aug 2022 at 18:09, Prathamesh Kulkarni > wrote: > > > > Hi, > > The attached prototype patch extends fold_vec_perm to fold VEC_PERM_EXPR > > in VLA manner, and currently handles the following cases: > > (a) fixed len arg0, ar

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-09-05 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 29 Aug 2022 at 11:53, Prathamesh Kulkarni wrote: > > On Thu, 18 Aug 2022 at 18:20, Prathamesh Kulkarni > wrote: > > > > On Thu, 18 Aug 2022 at 18:14, Prathamesh Kulkarni > > wrote: > > > > > > On Wed, 17 Aug 2022 at 17:01, Richard Biener > > > wrote: > > > > > > > > On Tue, Aug 16, 202

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-05 Thread Richard Biener via Gcc-patches
On Mon, Sep 5, 2022 at 8:24 AM Aldy Hernandez via Gcc-patches wrote: > > Intersecting two ranges where one is a NAN is keeping the sign bit of > the NAN range. This is not correct as the sign bits may not match. > > I think the only time we're absolutely sure about the intersection of > a NAN and

Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-05 Thread Richard Biener via Gcc-patches
On Mon, Sep 5, 2022 at 9:59 AM Martin Liška wrote: > > On 9/2/22 10:54, Richard Biener wrote: > > On Fri, Sep 2, 2022 at 9:00 AM Martin Liška wrote: > >> > >> On 9/1/22 13:18, Richard Biener wrote: > >>> I presume WarnRemoved will diagnose use of -gstabs but not fail > >>> compilation. Will -gst

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-05 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 05, 2022 at 11:00:54AM +0200, Richard Biener wrote: > On Mon, Sep 5, 2022 at 8:24 AM Aldy Hernandez via Gcc-patches > wrote: > > > > Intersecting two ranges where one is a NAN is keeping the sign bit of > > the NAN range. This is not correct as the sign bits may not match. > > > > I t

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-09-05 Thread Richard Biener via Gcc-patches
On Mon, Sep 5, 2022 at 10:54 AM Prathamesh Kulkarni wrote: > > On Mon, 29 Aug 2022 at 11:53, Prathamesh Kulkarni > wrote: > > > > On Thu, 18 Aug 2022 at 18:20, Prathamesh Kulkarni > > wrote: > > > > > > On Thu, 18 Aug 2022 at 18:14, Prathamesh Kulkarni > > > wrote: > > > > > > > > On Wed, 17 Au

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-05 Thread Aldy Hernandez via Gcc-patches
On Mon, Sep 5, 2022 at 11:06 AM Jakub Jelinek wrote: > > On Mon, Sep 05, 2022 at 11:00:54AM +0200, Richard Biener wrote: > > On Mon, Sep 5, 2022 at 8:24 AM Aldy Hernandez via Gcc-patches > > wrote: > > > > > > Intersecting two ranges where one is a NAN is keeping the sign bit of > > > the NAN ran

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-05 Thread Richard Biener via Gcc-patches
On Mon, Sep 5, 2022 at 11:06 AM Jakub Jelinek wrote: > > On Mon, Sep 05, 2022 at 11:00:54AM +0200, Richard Biener wrote: > > On Mon, Sep 5, 2022 at 8:24 AM Aldy Hernandez via Gcc-patches > > wrote: > > > > > > Intersecting two ranges where one is a NAN is keeping the sign bit of > > > the NAN ran

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-05 Thread Richard Biener via Gcc-patches
On Mon, Sep 5, 2022 at 11:12 AM Aldy Hernandez wrote: > > On Mon, Sep 5, 2022 at 11:06 AM Jakub Jelinek wrote: > > > > On Mon, Sep 05, 2022 at 11:00:54AM +0200, Richard Biener wrote: > > > On Mon, Sep 5, 2022 at 8:24 AM Aldy Hernandez via Gcc-patches > > > wrote: > > > > > > > > Intersecting two

Re: [PATCH] rs6000: Use NO_EXPR to cast to MMA pointer types

2022-09-05 Thread Richard Biener via Gcc-patches
On Fri, Sep 2, 2022 at 7:24 PM Segher Boessenkool wrote: > > On Fri, Sep 02, 2022 at 12:02:54PM -0500, Peter Bergner wrote: > > On 9/2/22 11:31 AM, Segher Boessenkool wrote: > > > (Did you also look at non-MMA VIEW_CONVERT_EXPR uses btw?) > > > > I did. It seemed they were all related to pointers

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-09-05 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 5 Sept 2022 at 14:39, Richard Biener wrote: > > On Mon, Sep 5, 2022 at 10:54 AM Prathamesh Kulkarni > wrote: > > > > On Mon, 29 Aug 2022 at 11:53, Prathamesh Kulkarni > > wrote: > > > > > > On Thu, 18 Aug 2022 at 18:20, Prathamesh Kulkarni > > > wrote: > > > > > > > > On Thu, 18 Aug 202

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-05 Thread Aldy Hernandez via Gcc-patches
On Mon, Sep 5, 2022 at 11:14 AM Richard Biener wrote: > > On Mon, Sep 5, 2022 at 11:06 AM Jakub Jelinek wrote: > > > > On Mon, Sep 05, 2022 at 11:00:54AM +0200, Richard Biener wrote: > > > On Mon, Sep 5, 2022 at 8:24 AM Aldy Hernandez via Gcc-patches > > > wrote: > > > > > > > > Intersecting two

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-05 Thread Richard Biener via Gcc-patches
On Mon, Sep 5, 2022 at 11:28 AM Aldy Hernandez wrote: > > On Mon, Sep 5, 2022 at 11:14 AM Richard Biener > wrote: > > > > On Mon, Sep 5, 2022 at 11:06 AM Jakub Jelinek wrote: > > > > > > On Mon, Sep 05, 2022 at 11:00:54AM +0200, Richard Biener wrote: > > > > On Mon, Sep 5, 2022 at 8:24 AM Aldy H

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-05 Thread Aldy Hernandez via Gcc-patches
On Mon, Sep 5, 2022 at 11:18 AM Richard Biener wrote: > > On Mon, Sep 5, 2022 at 11:12 AM Aldy Hernandez wrote: > > > > On Mon, Sep 5, 2022 at 11:06 AM Jakub Jelinek wrote: > > > > > > On Mon, Sep 05, 2022 at 11:00:54AM +0200, Richard Biener wrote: > > > > On Mon, Sep 5, 2022 at 8:24 AM Aldy Her

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-05 Thread Richard Biener via Gcc-patches
On Mon, Sep 5, 2022 at 11:41 AM Aldy Hernandez wrote: > > On Mon, Sep 5, 2022 at 11:18 AM Richard Biener > wrote: > > > > On Mon, Sep 5, 2022 at 11:12 AM Aldy Hernandez wrote: > > > > > > On Mon, Sep 5, 2022 at 11:06 AM Jakub Jelinek wrote: > > > > > > > > On Mon, Sep 05, 2022 at 11:00:54AM +02

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-09-05 Thread Richard Sandiford via Gcc-patches
Sorry for the slow reply. I wrote a response a couple of weeks ago but I think it get lost in a machine outage. Prathamesh Kulkarni writes: > Hi, > The attached prototype patch extends fold_vec_perm to fold VEC_PERM_EXPR > in VLA manner, and currently handles the following cases: > (a) fixed len

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-05 Thread Aldy Hernandez via Gcc-patches
On Mon, Sep 5, 2022 at 11:53 AM Richard Biener wrote: > > On Mon, Sep 5, 2022 at 11:41 AM Aldy Hernandez wrote: > > > > On Mon, Sep 5, 2022 at 11:18 AM Richard Biener > > wrote: > > > > > > On Mon, Sep 5, 2022 at 11:12 AM Aldy Hernandez wrote: > > > > > > > > On Mon, Sep 5, 2022 at 11:06 AM Jak

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-05 Thread Richard Biener via Gcc-patches
On Mon, Sep 5, 2022 at 12:24 PM Aldy Hernandez wrote: > > On Mon, Sep 5, 2022 at 11:53 AM Richard Biener > wrote: > > > > On Mon, Sep 5, 2022 at 11:41 AM Aldy Hernandez wrote: > > > > > > On Mon, Sep 5, 2022 at 11:18 AM Richard Biener > > > wrote: > > > > > > > > On Mon, Sep 5, 2022 at 11:12 AM

Re: [PATCH v2] ipa-visibility: Optimize TLS access [PR99619]

2022-09-05 Thread Martin Jambor
Hi, On Tue, Aug 30 2022, Alexander Monakov wrote: >> I see, thank you for explaining the issue, and sorry if I was a bit stubborn. >> >> Does the attached patch (incremental change below) look better? It no longer >> has the 'shortcut' where iterating over referrers is avoided for the common >> c

[PATCH] bpf: Fix unused variable warning

2022-09-05 Thread Jan-Benedict Glaw
Hi! Building for for bpf-unknown-none target, recent GCCs will issue an unused variable warning as the REGNO_REG_CLASS macro doesn't actually use its argument. Reference the argument as (void) to silence the warning. .../gcc/configure --prefix=... --enable-werror-always --enable-languages=all --

Re: [PATCH V2] Extend vectorizer to handle nonlinear induction for neg, mul/lshift/rshift with a constant.

2022-09-05 Thread Richard Biener via Gcc-patches
On Mon, Aug 29, 2022 at 7:29 AM liuhongt via Gcc-patches wrote: > > >Looks good overall - a few comments inline. Also can you please add > >SLP support? > >I've tried hard to fill in gaps where SLP support is missing since my > >goal is still to get > >rid of non-SLP. > For slp with different ind

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-09-05 Thread Richard Biener via Gcc-patches
On Mon, Sep 5, 2022 at 11:27 AM Prathamesh Kulkarni wrote: > > On Mon, 5 Sept 2022 at 14:39, Richard Biener > wrote: > > > > On Mon, Sep 5, 2022 at 10:54 AM Prathamesh Kulkarni > > wrote: > > > > > > On Mon, 29 Aug 2022 at 11:53, Prathamesh Kulkarni > > > wrote: > > > > > > > > On Thu, 18 Aug

Re: [PATCH v2] coroutines: Ensure there's a top level bind when rewriting [PR106188]

2022-09-05 Thread Arsen Arsenović via Gcc-patches
Hi, On Monday, 5 September 2022 00:09:51 CEST Iain Sandoe wrote: > LGTM, but I cannot actually approve it - please wait for an ack from > Jason or Nathan (or one of the other global maintainers). Will do. Thank you for your assistance. Have a good day, -- Arsen Arsenović signature.asc Descript

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-05 Thread Aldy Hernandez via Gcc-patches
On Mon, Sep 5, 2022 at 12:38 PM Richard Biener wrote: > > On Mon, Sep 5, 2022 at 12:24 PM Aldy Hernandez wrote: > > > > On Mon, Sep 5, 2022 at 11:53 AM Richard Biener > > wrote: > > > > > > On Mon, Sep 5, 2022 at 11:41 AM Aldy Hernandez wrote: > > > > > > > > On Mon, Sep 5, 2022 at 11:18 AM Ric

[PATCH][sanitizer/106558] asan: fix unsafe optimization of Asan checks.

2022-09-05 Thread Yuri Gribov via Gcc-patches
Hi, This patch fixes incorrect Asan optimization in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106558 . It successfully passes bootstrap-asan, regular bootstrap and regression testing (on x86_64). With this patch number of optimizations has reduced only slightly (146062 -> 145824 on bootstrap-a

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-05 Thread Richard Biener via Gcc-patches
On Mon, Sep 5, 2022 at 1:45 PM Aldy Hernandez wrote: > > On Mon, Sep 5, 2022 at 12:38 PM Richard Biener > wrote: > > > > On Mon, Sep 5, 2022 at 12:24 PM Aldy Hernandez wrote: > > > > > > On Mon, Sep 5, 2022 at 11:53 AM Richard Biener > > > wrote: > > > > > > > > On Mon, Sep 5, 2022 at 11:41 AM

[PATCH] openmp: Introduce gimple_omp_ordered_standalone_p

2022-09-05 Thread Jakub Jelinek via Gcc-patches
Hi! On Sat, Sep 03, 2022 at 10:07:27AM +0200, Jakub Jelinek via Gcc-patches wrote: > Incrementally, I'd like to change the way we differentiate between > stand-alone and block-associated ordered constructs, because the current > way of looking for presence of doacross clause doesn't work well if t

Re: [PATCH][DOCS] Mention removed ports in GCC 13.

2022-09-05 Thread Gerald Pfeifer
On Fri, 26 Aug 2022, Richard Biener via Gcc-patches wrote: >> Ready for master? > OK Actually both Richi and me missed a little detail: >> - ... >> +The support for the cr16-elf, >> tilegx*-linux and tilepro*-linux >> + configurations has been removed. >> +

Re: [PATCH] libgo: Access to glibc-specific field in struct sigevent

2022-09-05 Thread Sören Tempel via Gcc-patches
Hello Ian, Have you had the chance to look at this yet? Let me know if there is a better way to do this. Greetings, Sören Sören Tempel wrote: > Hi Ian, > > Thanks for your input! > > I am not familiar with Go runtime internals at all, but the patch below > at least compiles for me. Let me kn

[PATCH] debug () for predicates

2022-09-05 Thread Richard Biener via Gcc-patches
The following adds a debug () member to the predicate class. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. * gimple-predicate-analysis.h (predicate::debug): New. (predicate::dump): Add FILE * argument, add base overload. * gimple-predicate-analys

[PATCH] Unify MAX_POSTDOM_CHECK and --param uninit-control-dep-attempts

2022-09-05 Thread Richard Biener via Gcc-patches
The following unifies both limits, in particular the MAX_POSTDOM_CHECK tends to be too low and is not user-controllable. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. * gimple-predicate-analysis.cc (MAX_POSTDOM_CHECK): Remove. (compute_control_dep_chain)

[PATCH] Remove MAX_SWITCH_CASES limit

2022-09-05 Thread Richard Biener via Gcc-patches
The following removes the MAX_SWITCH_CASES limit to fight quadraticness when looking up case labels from edges. Instead use the {start,end}_recording_case_labels facility for that. For it to be usable I've exported get_cases_for_edge from tree-cfg.cc. Bootstrapped on x86_64-unknown-linux-gnu, te

Re: [committed] openmp: Partial OpenMP 5.2 doacross and omp_cur_iteration support

2022-09-05 Thread Tobias Burnus
On 03.09.22 10:07, Jakub Jelinek wrote: The following patch implements part of the OpenMP 5.2 changes related to ordered loops ... Fortran bits to it attached. OK for mainline? Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Ges

Re: [PATCH V2] arm: add -static-pie support

2022-09-05 Thread Andrea Corallo via Gcc-patches
Lance Fredrickson via Gcc-patches writes: > Yes, this is a 1st submission. > Yes, I guess I was going for DCO rules. > I will look at running the test suite. Does this need to be done on > the target? because my arm target is a measly dual core 1ghz embedded > chip and low ram. Netgear R7000 rout

[pushed] aarch64: Remove lazy SIMD builtin initialisation

2022-09-05 Thread Richard Sandiford via Gcc-patches
At one time the aarch64 port registered the Advanced SIMD builtins lazily, when we first encountered a set of target flags that includes +simd. These days we always initialise them at start-up, temporarily forcing a conducive set of flags if necessary. This patch removes some vestiges of the old

[PATCH][RFC] Unify MAX_NUM_CHAINS and MAX_CHAIN_LEN to --param uninit-max-predicate-size

2022-09-05 Thread Richard Biener via Gcc-patches
The following exposes the MAX_NUM_CHAINS and MAX_CHAIN_LEN to the user by adding a --param uninit-max-predicate-size and re-doing the limits on the whole predicate expression size rather than limiting the number of OR and AND elements separately. The following goes a step further and for a single

[PATCH][committed] aarch64: Suggest an -mcpu option when user passes CPU name to -march

2022-09-05 Thread Kyrylo Tkachov via Gcc-patches
Hi all, This small patch helps users who confuse -march and -mcpu on AArch64. Sometimes users pass -march with a CPU name, where they most likely wanted to use -mcpu, which would select the right architecture features *and* tune for their desired CPU. Currently we'll just error out with an unkown

Re: [PATCH][committed] aarch64: Suggest an -mcpu option when user passes CPU name to -march

2022-09-05 Thread Richard Earnshaw via Gcc-patches
On 05/09/2022 14:35, Kyrylo Tkachov via Gcc-patches wrote: Hi all, This small patch helps users who confuse -march and -mcpu on AArch64. Sometimes users pass -march with a CPU name, where they most likely wanted to use -mcpu, which would select the right architecture features *and* tune for t

Re: [PATCH 1/2] Using pli(paddi) and rotate to build 64bit constants

2022-09-05 Thread Segher Boessenkool
On Mon, Sep 05, 2022 at 02:25:29PM +0800, Jiufu Guo wrote: > > On Fri, Sep 02, 2022 at 02:56:21PM +0800, Jiufu Guo wrote: > > Or force the testcase to use r0 some other way. Well, "forcing" cannot > > be done, but we can probably encourage it (via a local register asm for > > example, or by tying

[PATCH] Decimal floats can never be an frange::singleton_p.

2022-09-05 Thread Aldy Hernandez via Gcc-patches
As Jakub mentioned in the PR, because many numbers have multiple possible representations, we can't reliably return true here. I'll commit this if tests pass. I wonder if its worth even handling decimal floats in frange, since there's a lot of things we can't represent. I suppose even though we

Re: [PATCH 1/1 V5] RISC-V: Support Zmmul extension

2022-09-05 Thread Kito Cheng via Gcc-patches
Binutils has been landing zmmul support, so committed with minor fixes. On Fri, Jul 22, 2022 at 8:35 AM Kito Cheng wrote: > > On Fri, Jul 22, 2022 at 2:43 AM Palmer Dabbelt wrote: > > > > On Thu, 21 Jul 2022 02:03:35 PDT (-0700), gcc-patches@gcc.gnu.org wrote: > > > LGTM, will merge once binuils

Re: [PATCH] Decimal floats can never be an frange::singleton_p.

2022-09-05 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 05, 2022 at 03:47:01PM +0200, Aldy Hernandez wrote: > As Jakub mentioned in the PR, because many numbers have multiple > possible representations, we can't reliably return true here. > > I'll commit this if tests pass. > > I wonder if its worth even handling decimal floats in frange,

Re: [PATCH, OpenMP, Fortran] requires unified_shared_memory 2/2: insert USM allocators into libgfortran

2022-09-05 Thread Chung-Lin Tang
On 2022/8/15 7:15 PM, Chung-Lin Tang wrote: On 2022/8/15 7:06 PM, Chung-Lin Tang wrote: I know this is a big pile of yarn wrt how the main program/libgomp/libgfortran  interacts, but it's finally working. Again tested without regressions. Preparing to commit to  devel/omp/gcc-12, and seeking

Re: [PATCH v2] rs6000/test: Fix empty TU in some cases of effective targets [PR106345]

2022-09-05 Thread Segher Boessenkool
Hi! On Mon, Jul 25, 2022 at 02:26:15PM +0800, Kewen.Lin wrote: > As the failure of test case gcc.target/powerpc/pr92398.p9-.c in > PR106345 shows, some test sources for some powerpc effective > targets use empty translation unit wrongly. > * lib/target-supports.exp (check_effective_target_p

Re: [PATCH] rs6000: Use NO_EXPR to cast to MMA pointer types

2022-09-05 Thread Segher Boessenkool
On Mon, Sep 05, 2022 at 11:25:21AM +0200, Richard Biener wrote: > On Fri, Sep 2, 2022 at 7:24 PM Segher Boessenkool > wrote: > > On Fri, Sep 02, 2022 at 12:02:54PM -0500, Peter Bergner wrote: > > > On 9/2/22 11:31 AM, Segher Boessenkool wrote: > > > > (Did you also look at non-MMA VIEW_CONVERT_EXP

Re: [PING] nvptx: forward '-v' command-line option to assembler, linker

2022-09-05 Thread Tom de Vries via Gcc-patches
On 6/7/22 17:41, Thomas Schwinge wrote: Subject: [PING] nvptx: forward '-v' command-line option to assembler, linker From: Thomas Schwinge Date: 6/7/22, 17:41 To: Tobias Burnus , , "Tom de Vries" Hi! On 2022-05-30T09:06:21+0200, Tobias Burnus wrote: On 29.05.22 22:49, Thomas Schwinge

[committed] libstdc++: Use built-ins for more variable templates

2022-09-05 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/type_traits (is_trivial_v, is_trivially_copyable_v) (is_standard_layout_v, is_pod_v, is_literal_type_v): Use built-in instead of class template. (is_same_v): Add partial spec

Re: [PATCH] Decimal floats can never be an frange::singleton_p.

2022-09-05 Thread Aldy Hernandez via Gcc-patches
Final version of the patch. Disable frange for DECIMAL_FLOAT_MODE_P altogether. Tested on x86-64 Linux with regstrap as well as mpfr tests. On Mon, Sep 5, 2022 at 3:47 PM Aldy Hernandez wrote: > > As Jakub mentioned in the PR, because many numbers have multiple > possible representations, we ca

[COMMITTED] [PR middle-end/106824] Do not ICE when updating a NAN to a non-NAN.

2022-09-05 Thread Aldy Hernandez via Gcc-patches
Updating a definite NAN to a definitely not NAN was an assertion failure, but it turns out we can have such a scenario while attempting to thread an impossible path. This patch updates the range to undefined. What happens in the testcase is that we are trying to thread path that starts like this:

Re: [committed] openmp: Partial OpenMP 5.2 doacross and omp_cur_iteration support

2022-09-05 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 05, 2022 at 03:01:07PM +0200, Tobias Burnus wrote: > On 03.09.22 10:07, Jakub Jelinek wrote: > > The following patch implements part of the OpenMP 5.2 changes related > > to ordered loops ... > > Fortran bits to it attached. > > OK for mainline? > > Tobias > - > Sieme

Re: [PATCH v2 1/2] xtensa: Eliminate unused stack frame allocation/freeing

2022-09-05 Thread Max Filippov via Gcc-patches
Hi Suwa-san, On Fri, Sep 2, 2022 at 3:57 AM Takayuki 'January June' Suwa wrote: > > Changes from v1: > (xtensa_expand_epilogue): Fixed forgetting to consider > hard_frame_pointer_rtx when sharing codes. > > --- > In the example below, 'x' is once placed on the stack frame and then read > into

[committed] libstdc++: Move __success_type and __failure_type later in file

2022-09-05 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/type_traits (__success_type, __failure_type): Move definitions later in the file. --- libstdc++-v3/include/std/type_traits | 25 + 1 file changed, 13 insertions(+), 12 de

Re: [PATCH 9/15] arm: Set again stack pointer as CFA reg when popping if necessary

2022-09-05 Thread Andrea Corallo via Gcc-patches
Andrea Corallo via Gcc-patches writes: > Hi all, > > this patch enables 'arm_emit_multi_reg_pop' to set again the stack > pointer as CFA reg when popping if this is necessary. > > /gcc/ > > * config/arm/arm.cc (arm_emit_multi_reg_pop): If the frame pointer > was set define again the s

Re: [PATCH 7/15] arm: Emit build attributes for PACBTI target feature

2022-09-05 Thread Andrea Corallo via Gcc-patches
Andrea Corallo via Gcc-patches writes: > This patch emits assembler directives for PACBTI build attributes as > defined by the > ABI. > > > > gcc/ChangeLog: > > * config/arm/arm.c (arm_file_start): Emit EABI att

Re: [PATCH 10/15] arm: Implement cortex-M return signing address codegen

2022-09-05 Thread Andrea Corallo via Gcc-patches
Ping Andrea

Re: [PATCH 11/15] aarch64: Make bti pass generic so it can be used by the arm backend

2022-09-05 Thread Andrea Corallo via Gcc-patches
Andrea Corallo via Gcc-patches writes: > Hi all, > > this patch splits and restructures the aarch64 bti pass code in order > to have it usable by the arm backend as well. These changes have no > functional impact. > > The original patch was approved here: >

Re: [PATCH 12/15] arm: implement bti injection

2022-09-05 Thread Andrea Corallo via Gcc-patches
Andrea Corallo via Gcc-patches writes: > Hi all, > > this patch enables Branch Target Identification Armv8.1-M Mechanism > [1]. > > This is achieved by using the bti pass made common with Aarch64. > > The pass iterates through the instructions and adds the necessary BTI > instructions at the begi

[PATCH] libstdc++: Refactor implementation of operator+ for std::string

2022-09-05 Thread Will Hawkins
Based on Jonathan's work, here is a patch for the implementation of operator+ on std::string that makes sure we always use the best allocation strategy. I have attempted to learn from all the feedback that I got on a previous submission -- I hope I did the right thing. Passes abi and conformance

Re: [PATCH] rs6000: Use NO_EXPR to cast to MMA pointer types

2022-09-05 Thread Richard Biener via Gcc-patches
> Am 05.09.2022 um 16:53 schrieb Segher Boessenkool > : > > On Mon, Sep 05, 2022 at 11:25:21AM +0200, Richard Biener wrote: >>> On Fri, Sep 2, 2022 at 7:24 PM Segher Boessenkool >>> wrote: >>> On Fri, Sep 02, 2022 at 12:02:54PM -0500, Peter Bergner wrote: On 9/2/22 11:31 AM, Segher Boes

Re: [committed] c: C2x removal of unprototyped functions

2022-09-05 Thread Joseph Myers
On Fri, 2 Sep 2022, Richard Biener via Gcc-patches wrote: > To catch these cases with a diagnostic earlier is > -Wstrict-prototypes -Wold-style-declaration enough to diagnose all cases > that the new standard will reject? I think so. > I suppose -W*-c2x-compat are not the correct vehicle to diag

[COMMITTED] Do not fold __builtin_signbit if NAN is a possibility.

2022-09-05 Thread Aldy Hernandez via Gcc-patches
I had some queued up work to try harder to keep the sign bit up to date in the presence of NANs, but after the discussion with Richi regarding the representation of NAN and signs in the frange, I've decided to put it aside until after Cauldron, since it'll probably get rewritten anyhow. So for now

[PATCH][WIP?] analyzer: support for symbolic values in the out-of-bounds checker [PR106625]

2022-09-05 Thread Tim Lange
Hi, below is my patch, adding support for reasoning about buffer overflows and overreads with symbolic offsets and capacities. I've already had one off-list feedback from Dave after sending him my preliminary work. Below, I'll be also answering some of the questions that came up during the first

[PATCH] riscv: implement TARGET_MODE_REP_EXTENDED

2022-09-05 Thread Philipp Tomsich
TARGET_MODE_REP_EXTENDED is supposed to match LOAD_EXTEND_OP, so this adds an implementation using the same logic as in LOAD_EXTEND_OP. This reduces the number of extension operations, as evidenced in the reduction of dynamic instructions for the xz benchmark in SPEC CPU: # dy

[committed] preprocessor: Disable trigraphs for C2x

2022-09-05 Thread Joseph Myers
ISO C2x removes trigraphs, so disable them accordingly for -std=c2x (they can still be enabled using -trigraphs). Bootstrapped with no regressions for x86_64-pc-linux-gnu. libcpp/ * init.cc (lang_defaults): Disable trigraphs for C2x. gcc/testsuite/ * gcc.dg/cpp/c11-trigraphs-1.c,

Re: [PATCH] bpf: Fix unused variable warning

2022-09-05 Thread Jose E. Marchesi via Gcc-patches
Hi Jan. > Building for for bpf-unknown-none target, recent GCCs will issue an unused > variable warning as the REGNO_REG_CLASS macro doesn't actually use its > argument. Reference the argument as (void) to silence the warning. > > .../gcc/configure --prefix=... --enable-werror-always --enable-la

  1   2   >