Re: [PATCH] rs6000: Parameterize some const values for density test

2021-09-20 Thread Kewen.Lin via Gcc-patches
on 2021/9/18 上午6:26, Segher Boessenkool wrote: > Hi! > > On Wed, Sep 15, 2021 at 04:52:49PM +0800, Kewen.Lin wrote: >> This patch follows the discussion here[1], where Segher suggested >> parameterizing those exact magic constants for density heuristics, >> to make it easier to tweak if need. >>

Re: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-20 Thread Jeff Law via Gcc-patches
On 9/20/2021 6:23 PM, Segher Boessenkool wrote: Hi! On Sun, Sep 19, 2021 at 09:14:55AM -0600, Jeff Law wrote: On 9/6/2021 8:24 AM, Segher Boessenkool wrote: On Mon, Sep 06, 2021 at 12:32:13PM +0100, Roger Sayle wrote: I think the current documentation is sufficient. During compilation,

Re: [PATCH] rs6000: Parameterize some const values for density test

2021-09-20 Thread Kewen.Lin via Gcc-patches
Hi Bill, Thanks for the review! on 2021/9/18 上午12:27, Bill Schmidt wrote: > Hi Kewen, > > On 9/15/21 3:52 AM, Kewen.Lin wrote: >> Hi, >> >> This patch follows the discussion here[1], where Segher suggested >> parameterizing those exact magic constants for density heuristics, >> to make it

Re: [PATCH] rs6000: Modify the way for extra penalized cost

2021-09-20 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the review! on 2021/9/18 上午6:01, Segher Boessenkool wrote: > Hi! > > On Thu, Sep 16, 2021 at 09:14:15AM +0800, Kewen.Lin wrote: >> The way with nunits * stmt_cost can get one much exaggerated >> penalized cost, such as: for V16QI on P8, it's 16 * 20 = 320, >> that's why we

Re: [PATCH] rs6000: Modify the way for extra penalized cost

2021-09-20 Thread Kewen.Lin via Gcc-patches
Hi Bill, Thanks for the review! on 2021/9/18 上午12:34, Bill Schmidt wrote: > Hi Kewen, > > On 9/15/21 8:14 PM, Kewen.Lin wrote: >> Hi, >> >> This patch follows the discussion here[1], where Segher pointed >> out the existing way to guard the extra penalized cost for >> strided/elementwise loads

Re: [PATCH v2] ipa-inline: Add target info into fn summary [PR102059]

2021-09-20 Thread Kewen.Lin via Gcc-patches
Hi Martin, on 2021/9/17 下午7:26, Martin Jambor wrote: > Hi, > > On Fri, Sep 17 2021, Kewen.Lin wrote: >> on 2021/9/16 下午9:19, Martin Jambor wrote: >>> On Thu, Sep 16 2021, Kewen.Lin wrote: on 2021/9/15 下午8:51, Martin Jambor wrote: > On Wed, Sep 08 2021, Kewen.Lin wrote: >> >

Re: [PATCH] ipa-fnsummary: Remove inconsistent bp_pack_value

2021-09-20 Thread Kewen.Lin via Gcc-patches
Hi Richi, Thanks for the review! on 2021/9/17 下午6:04, Richard Biener wrote: > On Fri, Sep 17, 2021 at 12:03 PM Richard Biener > wrote: >> >> On Fri, Sep 17, 2021 at 11:43 AM Kewen.Lin wrote: >>> >>> Hi, >>> >>> When changing target_info with bitfield, I happened to find this >>> inconsistent

Re: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-20 Thread Segher Boessenkool
Hi! On Sun, Sep 19, 2021 at 09:14:55AM -0600, Jeff Law wrote: > On 9/6/2021 8:24 AM, Segher Boessenkool wrote: > >On Mon, Sep 06, 2021 at 12:32:13PM +0100, Roger Sayle wrote: > >>I think the current documentation is sufficient. During compilation, > >>GCC's > >>combine pass will often

Re: [PATCH v3] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-09-20 Thread Marek Polacek via Gcc-patches
On Mon, Sep 20, 2021 at 09:08:09PM +0200, Jakub Jelinek wrote: > On Mon, Sep 20, 2021 at 02:37:03PM -0400, Marek Polacek wrote: > > > So, wouldn't be this better specified as > > > Wno-attributes= > > > Common Joined RejectNegative > > > (not sure if RejectNegative is actually needed for an option

[COMMITTED] Use EDGE_EXECUTABLE in ranger and return UNDEFINED for those edges.

2021-09-20 Thread Andrew MacLeod via Gcc-patches
The patch sets the EXECUTABLE property on edges like VRP does, and then removes that flag when an edge is determined to be un-executable. This information is then used to return UNDEFINED for any requests on un-executable edges, and to register equivalencies if all executable edges of a PHI

[COMMITTED] Use EDGE_EXECUTABLE in ranger and return UNDEFINED for those edges.

2021-09-20 Thread Andrew MacLeod via Gcc-patches
The patch sets the EXECUTABLE property on edges like VRP does, and then removes that flag when an edge is determined to be un-executable. This information is then used to return UNDEFINED for any requests on un-executable edges, and to register equivalencies if all executable edges of a PHI

[COMMITTED] Relation oracle: Make each def a new equivalency record.

2021-09-20 Thread Andrew MacLeod via Gcc-patches
The current equivalence oracle is not "killing" back edge equivalence sets sometimes.   Missing is that a definition starts a new equivalence set at that point, with nothing in it but the def itself. Creating this new equivalence set will ensure that any subsequent comparisons with values

Re: [Patch] Fortran: Fix -Wno-missing-include-dirs handling [PR55534]

2021-09-20 Thread Harald Anlauf via Gcc-patches
Hi Tobias, Am 20.09.21 um 22:33 schrieb Tobias Burnus: And v3 – I realized that testcases would be useful. Thus, now with added testcases. :-) I was about to recommend a testcase I prepared when your revised patch arrived. Will not bother you with it, as you seem to provide really good

Re: [PATCH v4] c++: Fix cp_tree_equal for template value args using dependent sizeof/alignof/noexcept expressions

2021-09-20 Thread Jason Merrill via Gcc-patches
On 9/17/21 12:44, Barrett Adair wrote: I think the patch is in good shape now, thanks for the help. canon-type*.C fail with trunk and pass with patch, dependent-name*.C are regression tests that pass with both. I removed the dg-ice from constexpr-52830.C. I didn't dig much into the churn

Re: [Patch] Fortran: Fix -Wno-missing-include-dirs handling [PR55534]

2021-09-20 Thread Tobias Burnus
And v3 – I realized that testcases would be useful. Thus, now with added testcases. :-) Tobias On 17.09.21 20:45, Tobias Burnus wrote: I seemingly messed up a bit in previous patch – corrected version attached. OK? Tobias PS: Due to now enabling the missing-include-dir warning also for

Re: [PATCH] c++: fix wrong fixit hints for misspelled typedef [PR77565]

2021-09-20 Thread Jason Merrill via Gcc-patches
On 9/17/21 13:31, Michel Morin wrote: On Fri, Sep 17, 2021 at 3:23 AM Jason Merrill wrote: On 9/16/21 11:50, Michel Morin wrote: On Thu, Sep 16, 2021 at 5:44 AM Jason Merrill wrote: On 9/14/21 04:29, Michel Morin via Gcc-patches wrote: On Tue, Sep 14, 2021 at 7:14 AM David Malcolm

Re: [PATCH] c++: consider built-in operator candidates first

2021-09-20 Thread Jason Merrill via Gcc-patches
On 9/20/21 15:32, Patrick Palka wrote: On Mon, 20 Sep 2021, Jason Merrill wrote: On 9/20/21 12:46, Patrick Palka wrote: During operator overload resolution, we currently consider non-member candidates before built-in candidates. This didn't make a difference before r12-3346, but after this

Re: [PATCH v2] C++: add type checking for static local vector variable in template

2021-09-20 Thread Jason Merrill via Gcc-patches
On 9/18/21 01:53, wangpc wrote: This patch moves verify_type_context from start_decl_1 to cp_finish_decl to do more type checking such as static local vector variable in C++ template. Applied, thanks. Though a couple of issues with the patch formatting: 2021-08-06 wangpc

Re: [PATCH] c++: consider built-in operator candidates first

2021-09-20 Thread Patrick Palka via Gcc-patches
On Mon, 20 Sep 2021, Jason Merrill wrote: > On 9/20/21 12:46, Patrick Palka wrote: > > During operator overload resolution, we currently consider non-member > > candidates before built-in candidates. This didn't make a difference > > before r12-3346, but after this change add_candidates will

Re: [PATCH] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-09-20 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 20, 2021 at 02:37:03PM -0400, Marek Polacek wrote: > > So, wouldn't be this better specified as > > Wno-attributes= > > Common Joined RejectNegative > > (not sure if RejectNegative is actually needed for an option > > starting with Wno- )? > > Looks like RejectNegative is not needed.

Re: [PATCH v2] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-09-20 Thread Marek Polacek via Gcc-patches
On Mon, Sep 20, 2021 at 02:37:03PM -0400, Marek Polacek wrote: > > > +/* { dg-additional-options "-Wno-attributes=yoyodyne::attr_new" } */ > > > +/* { dg-additional-options "-Wno-attributes=c4::__attr__" } */ > > > > When writing __attr__, does that imply we won't warn about both > > c4::attr and

Re: [PATCH] c++: consider built-in operator candidates first

2021-09-20 Thread Jason Merrill via Gcc-patches
On 9/20/21 12:46, Patrick Palka wrote: During operator overload resolution, we currently consider non-member candidates before built-in candidates. This didn't make a difference before r12-3346, but after this change add_candidates will avoid computing excess argument conversions if we've

Re: [PATCH] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-09-20 Thread Marek Polacek via Gcc-patches
On Mon, Sep 20, 2021 at 07:38:59PM +0200, Jakub Jelinek wrote: > On Mon, Sep 20, 2021 at 01:06:58PM -0400, Marek Polacek via Gcc-patches wrote: > > Not a review, just a few nits: > > I think it would be useful to clarify that -Wno-attributes=list doesn't > actually imply -Wno-attributes Agreed,

Re: [PATCH] Factor out `find_a_program` helper around `find_a_file`

2021-09-20 Thread Gerald Pfeifer
On Sun, 19 Sep 2021, Jeff Law via Gcc-patches wrote: > On 8/4/2021 12:21 PM, John Ericson wrote: >> The helper is for `--print-prog-name` and similar things. Since all >> executable finding goes through it, we can move the default overrides >> into that path too. This also ensures that if some is

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-09-20 Thread Fāng-ruì Sòng via Gcc-patches
PING^5 https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html On Sat, Sep 4, 2021 at 12:11 PM Fāng-ruì Sòng wrote: > > PING^4 https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html > > One major design goal of PIE was to avoid copy relocations. > The original patch for GCC 5

Re: [PATCH] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-09-20 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 20, 2021 at 01:06:58PM -0400, Marek Polacek via Gcc-patches wrote: Not a review, just a few nits: I think it would be useful to clarify that -Wno-attributes=list doesn't actually imply -Wno-attributes > --- a/gcc/common.opt > +++ b/gcc/common.opt > @@ -88,6 +88,9 @@ void

Re: [PATCH] Obsolete hppa[12]*-*-hpux10* and hppa[12]*-*-hpux11*

2021-09-20 Thread Jeff Law via Gcc-patches
On 9/20/2021 10:46 AM, Richard Biener wrote: On Mon, 20 Sep 2021, Richard Biener wrote: On Mon, 20 Sep 2021, Jeff Law wrote: On 9/20/2021 1:00 AM, Richard Biener wrote: This obsoletes the 32bit hppa-hpux configurations which only support STABS as debuginfo format. As discussed, I'm

[PATCH] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-09-20 Thread Marek Polacek via Gcc-patches
It is desirable for -Wattributes to warn about e.g. [[deprecate]] void g(); // typo, should warn However, -Wattributes also warns about vendor-specific attributes (that's because lookup_scoped_attribute_spec -> find_attribute_namespace finds nothing), which, with -Werror, causes grief. We don't

PING^3 [PATCH] x86: Update memcpy/memset inline strategies for -mtune=generic

2021-09-20 Thread H.J. Lu via Gcc-patches
On Mon, Sep 13, 2021 at 6:38 AM H.J. Lu wrote: > > On Tue, Sep 7, 2021 at 8:01 PM H.J. Lu wrote: > > > > On Sun, Aug 22, 2021 at 8:28 AM H.J. Lu wrote: > > > > > > On Tue, Mar 23, 2021 at 09:19:38AM +0100, Richard Biener wrote: > > > > On Tue, Mar 23, 2021 at 3:41 AM Hongyu Wang > > > >

Re: [PATCH] Obsolete hppa[12]*-*-hpux10* and hppa[12]*-*-hpux11*

2021-09-20 Thread Richard Biener via Gcc-patches
On Mon, 20 Sep 2021, Richard Biener wrote: > On Mon, 20 Sep 2021, Jeff Law wrote: > > > > > > > On 9/20/2021 1:00 AM, Richard Biener wrote: > > > This obsoletes the 32bit hppa-hpux configurations which only support > > > STABS as debuginfo format. > > > > > > As discussed, I'm going to push

[PATCH] c++: consider built-in operator candidates first

2021-09-20 Thread Patrick Palka via Gcc-patches
During operator overload resolution, we currently consider non-member candidates before built-in candidates. This didn't make a difference before r12-3346, but after this change add_candidates will avoid computing excess argument conversions if we've already seen a strictly viable candidate, so

Re: [PATCH] Obsolete hppa[12]*-*-hpux10* and hppa[12]*-*-hpux11*

2021-09-20 Thread Richard Biener via Gcc-patches
On Mon, 20 Sep 2021, Jeff Law wrote: > > > On 9/20/2021 1:00 AM, Richard Biener wrote: > > This obsoletes the 32bit hppa-hpux configurations which only support > > STABS as debuginfo format. > > > > As discussed, I'm going to push this (and a changes.html entry) when > > it was included in a

Re: [HELP Needed!][PATCH] testsuite: Fix gcc.target/aarch64/auto-init-* tests.

2021-09-20 Thread Qing Zhao via Gcc-patches
> On Sep 20, 2021, at 10:59 AM, Richard Earnshaw > wrote: > > > > On 20/09/2021 16:51, Qing Zhao via Gcc-patches wrote: >>> On Sep 20, 2021, at 9:36 AM, Richard Earnshaw >>> wrote: >>> >>> >>> >>> On 20/09/2021 14:55, Qing Zhao wrote: > On Sep 20, 2021, at 8:18 AM, Richard Earnshaw

Re: [HELP Needed!][PATCH] testsuite: Fix gcc.target/aarch64/auto-init-* tests.

2021-09-20 Thread Richard Earnshaw via Gcc-patches
On 20/09/2021 16:51, Qing Zhao via Gcc-patches wrote: On Sep 20, 2021, at 9:36 AM, Richard Earnshaw wrote: On 20/09/2021 14:55, Qing Zhao wrote: On Sep 20, 2021, at 8:18 AM, Richard Earnshaw wrote: On 20/09/2021 13:47, Qing Zhao wrote: On Sep 20, 2021, at 5:43 AM, Richard

Re: [HELP Needed!][PATCH] testsuite: Fix gcc.target/aarch64/auto-init-* tests.

2021-09-20 Thread Qing Zhao via Gcc-patches
> On Sep 20, 2021, at 9:36 AM, Richard Earnshaw > wrote: > > > > On 20/09/2021 14:55, Qing Zhao wrote: >>> On Sep 20, 2021, at 8:18 AM, Richard Earnshaw >>> wrote: >>> >>> >>> >>> On 20/09/2021 13:47, Qing Zhao wrote: > On Sep 20, 2021, at 5:43 AM, Richard Earnshaw > wrote:

Re: [PATCH] c: [PR32122] Require pointer types for computed gotos

2021-09-20 Thread Jeff Law via Gcc-patches
On 9/19/2021 10:14 PM, apinski--- via Gcc-patches wrote: From: Andrew Pinski So GCC has always accepted non-pointer types in computed gotos but that was wrong based on the documentation: Any expression of type void * is allowed. So this fixes the problem by requiring the type to be a

[PATCH] x86: Clean up gcc.target/i386/auto-init-* tests

2021-09-20 Thread H.J. Lu via Gcc-patches
On Fri, Sep 17, 2021 at 10:32 AM Qing Zhao via Gcc-patches wrote: > > > > > On Sep 17, 2021, at 11:59 AM, Jakub Jelinek wrote: > > > > On Fri, Sep 17, 2021 at 04:55:22PM +, Qing Zhao wrote: > >> This is the patch to fix gcc.target/i386/auto-init-* tests. > >> > >> I have tested the change at

Re: [Patch]GCC11 - Fortran: combined directives - order(concurrent) not on distribute (was: Re: [Patch] Fortran/OpenMP: unconstrained/reproducible ordered modifier)

2021-09-20 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 20, 2021 at 05:01:32PM +0200, Tobias Burnus wrote: > On 20.09.21 11:55, Jakub Jelinek via Fortran wrote: > > So the FE was splitting the order clause to distribute already before, > > perhaps we should undo that for gcc 11 which doesn't claim any OpenMP 5.1 > > support. > > The

[Patch]GCC11 - Fortran: combined directives - order(concurrent) not on distribute (was: Re: [Patch] Fortran/OpenMP: unconstrained/reproducible ordered modifier)

2021-09-20 Thread Tobias Burnus
On 20.09.21 11:55, Jakub Jelinek via Fortran wrote: So the FE was splitting the order clause to distribute already before, perhaps we should undo that for gcc 11 which doesn't claim any OpenMP 5.1 support. The difference is e.g. the distribute parallel do order(concurrent) copyin(thr) case which

Re: [PATCH] Obsolete hppa[12]*-*-hpux10* and hppa[12]*-*-hpux11*

2021-09-20 Thread Jeff Law via Gcc-patches
On 9/20/2021 1:00 AM, Richard Biener wrote: This obsoletes the 32bit hppa-hpux configurations which only support STABS as debuginfo format. As discussed, I'm going to push this (and a changes.html entry) when it was included in a bootstrap/regtest cycle. 2021-09-20 Richard Biener gcc/

Re: [pushed] Driver: Fix bootstrap with DEFAULT_{ASSEMBLER,LINKER,DSYMUTIL}.

2021-09-20 Thread Jeff Law via Gcc-patches
On 9/20/2021 12:50 AM, Iain Sandoe wrote: Hi The patch at r12-3662-g5fee8a0a9223d factored the code for printing the names of programes into a separate function. However the moved editions that print out the names of the assembler, linker (and dsymutil on Darwin) when those are specified at

Re: [HELP Needed!][PATCH] testsuite: Fix gcc.target/aarch64/auto-init-* tests.

2021-09-20 Thread Richard Earnshaw via Gcc-patches
On 20/09/2021 14:55, Qing Zhao wrote: On Sep 20, 2021, at 8:18 AM, Richard Earnshaw wrote: On 20/09/2021 13:47, Qing Zhao wrote: On Sep 20, 2021, at 5:43 AM, Richard Earnshaw wrote: On 17/09/2021 20:48, Qing Zhao via Gcc-patches wrote: Hi, There are much less issues with

Re: [HELP Needed!][PATCH] testsuite: Fix gcc.target/aarch64/auto-init-* tests.

2021-09-20 Thread Qing Zhao via Gcc-patches
> On Sep 20, 2021, at 8:18 AM, Richard Earnshaw > wrote: > > > > On 20/09/2021 13:47, Qing Zhao wrote: >>> On Sep 20, 2021, at 5:43 AM, Richard Earnshaw >>> wrote: >>> >>> >>> >>> On 17/09/2021 20:48, Qing Zhao via Gcc-patches wrote: Hi, There are much less issues with

Re: [HELP Needed!][PATCH] testsuite: Fix gcc.target/aarch64/auto-init-* tests.

2021-09-20 Thread Richard Earnshaw via Gcc-patches
On 20/09/2021 13:47, Qing Zhao wrote: On Sep 20, 2021, at 5:43 AM, Richard Earnshaw wrote: On 17/09/2021 20:48, Qing Zhao via Gcc-patches wrote: Hi, There are much less issues with aarch64/auto-init-* test cases. Different -march values (from ‘armv8-a’, ‘armv8.1-a’, till ‘armv8.6-a’,

[Ada] Present and No functions for type Uint

2021-09-20 Thread Pierre-Marie de Rodat
Declare Present and No functions for type Uint, analogous to other types such as Node_Id, and use them as appropriate. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * uintp.ads, uintp.adb (Present, No): New functions for comparing with No_Uint. * checks.adb,

[Ada] Fix shadowing in conditions for inlining

2021-09-20 Thread Pierre-Marie de Rodat
Cleanup related to inlining-for-proof and detection of overlaying actual parameters in GNATprove; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * inline.adb (Has_Excluded_Declaration): Rename and reduce scope of a local variable.diff --git

[Ada] Remove redundant checks for non-empty list of aspects

2021-09-20 Thread Pierre-Marie de Rodat
Cleanup related to inlining-for-proof and detection of overlaying actual parameters in GNATprove; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * inline.adb (Has_Excluded_Declaration): Remove redundant guard; the guarded code will call First

[Ada] Clean up Uint fields, remove unused routines

2021-09-20 Thread Pierre-Marie de Rodat
Remove unused routines. Remove 2-parameter versions of Init_Alignment and friends. Replace calls with direct calls to Set_Alignment and friends. These routines aren't really doing anything worth an extra abstraction. Change remaining Init_ routines to Reinit_, because these are not usually

[Ada] Accept volatile properties on constant objects

2021-09-20 Thread Pierre-Marie de Rodat
Aspects Volatile and its related properties, i.e. Async_Readers, Async_Writers, Effective_Reads, Effective_Writes and No_Caching, are now allowed on stand-alone constant objects in SPARK. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * contracts.adb (Add_Contract_Item):

[Ada] Accept volatile expressions as non-scalar actual parameters

2021-09-20 Thread Pierre-Marie de Rodat
This change removes an old, incomplete and duplicated code that implemented the very first wording of a SPARK RM rule related to volatile expressions acting as actual parameters. Current the rule says: "[a name denoting] an effectively volatile object for reading [can be] an actual parameter in a

[Ada] Use OS_Time for interface to TZ functions.

2021-09-20 Thread Pierre-Marie de Rodat
A recent regression caused by the parameterization of time_t was due to the unusual declaration used for time_t in the interface to TZ functions in sysdep.c. The root cause was the Long_Integer size of 32 bits used on x86_64-windows. The incident was temporarily fixed by reverting the declaration

[Ada] Cleanups related to building of dispatch tables

2021-09-20 Thread Pierre-Marie de Rodat
Code cleanup only; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch7.adb (Expand_N_Package_Declaration): Fix wording in comment. * exp_disp.adb (Mark_DT): Remove unnecessary initialization of I_Depth.diff --git

[Ada] Add support for PE-COFF PIE to System.Dwarf_Line

2021-09-20 Thread Pierre-Marie de Rodat
This makes it possible for System.Dwarf_Line to handle Position-Independent Executables on Windows systems by translating the run-time addresses it is provided with into addresses in the executable. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * adaint.c

[Ada] Adjust latest change for ELF platforms

2021-09-20 Thread Pierre-Marie de Rodat
Shared libraries effectively have a "static" load address of zero in ELF. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-objrea.adb (Get_Load_Address): Return 0 for ELF.diff --git a/gcc/ada/libgnat/s-objrea.adb b/gcc/ada/libgnat/s-objrea.adb ---

[Ada] SPARK proof of the Ada.Strings.Fixed library

2021-09-20 Thread Pierre-Marie de Rodat
Introduced pragmas to prove with SPARK the behaviours of most of the functions and procedures from Ada.Strings.Fixed. Procedure Move and all procedures that rely on it (Insert, Delete, Overwrite, Replace_Slice) have incomplete contracts and can have runtime errors. Function Count is given without

[Ada] Fix repeated generation of dispatch tables in CodePeer mode

2021-09-20 Thread Pierre-Marie de Rodat
Routine Make_DT that generates dispatch tables for tagged types might be called twice: when the tagged type is frozen (if it requires freezing) and once the enclosing package is fully analyzed. The Has_Dispatch_Table flag on a type prevents dispatch tables being generated twice. However, this flag

[Ada] Fix condition in op interpretation resolution

2021-09-20 Thread Pierre-Marie de Rodat
A previous patch fixed crashes on comparisons of string literals with access to strings by making sure that resolution of operations was only performed when operand types are actually compatible. However, the check was incomplete. Indeed, using only Has_Compatible_Type does not cover the case

[Ada] Spurious link error with child unit and different Assertion modes.

2021-09-20 Thread Pierre-Marie de Rodat
This patch fixes a spurious link error on a compilation that involves a child unit that must be compiled with assertions enabled, and a parent that is compiled without. The error occurs when the parent includes instantiations that involve constructs such as predicates or pre/ postconditions, and

[Ada] Refine types of local constants that store Etype results

2021-09-20 Thread Pierre-Marie de Rodat
Calls to Etype return entities, even though the signature of the Etype routine says it returns nodes. Fixed automatically with: $ sed -i 's/ Node_Id := Etype/ Entity_Id := Etype/' *.adb Found while reviewing changes in GNATprove related to aliasing checks. Tested on x86_64-pc-linux-gnu,

[Ada] Implementation of Preelaborable_Initialization attribute for AI12-0409

2021-09-20 Thread Pierre-Marie de Rodat
This set of changes implements the Preelaborable_Initialization attribute, corresponding to the existing aspect/pragma, as defined by AI12-0409 (RM2022 10.2.1(11.6/5-11.8/5). This includes semantic checking of restrictions on the prefix, and support for the aspect expression being given by an

[Ada] Small cleanup in System.Dwarf_Line

2021-09-20 Thread Pierre-Marie de Rodat
The unit has got "with" and "use" clauses both for Ada.Exceptions.Traceback and System.Traceback_Entries, but the former is essentially a forwarder for the latter so can be eliminated. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-dwalin.ads: Remove clause for

[Ada] Work around CodePeer bug by declaring variable

2021-09-20 Thread Pierre-Marie de Rodat
This commit works around a CodePeer bug where CodePeer thinks Get_32_Bit_Val returns something uninitialized. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * atree.adb (Get_32_Bit_Field): Declare result before returning.diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb ---

[Ada] Don't examine all discriminants when looking for the first one

2021-09-20 Thread Pierre-Marie de Rodat
A minor performance improvement; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.adb (Build_Discriminant_Constraints): Exit once a first discriminant is found and the Discrim_Present flag is set.diff --git a/gcc/ada/sem_ch3.adb

[Ada] Fix assertion in GNATprove_Mode

2021-09-20 Thread Pierre-Marie de Rodat
Avoid calling List_Rep_Info in Generate_SCIL and GNATprove_Mode, because the representation info is not there. Otherwise, we fail an assertion. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gnat1drv.adb (Gnat1drv): Avoid calling List_Rep_Info in Generate_SCIL and

[Ada] Spurious accessibility error on allocator in generic instance

2021-09-20 Thread Pierre-Marie de Rodat
This patch fixes an error in the compiler whereby an allocator for a limited type within a generic instance may cause spurious compile-time warnings and run-time errors. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4.adb (Expand_N_Type_Conversion): Add guard to

[Ada] Refactor scan_backend_switch to share logic across backends

2021-09-20 Thread Pierre-Marie de Rodat
This commit refactors scan_backend_switch to share logic across adabkend.adb and back_end.adb. A side effect of this refactor is that `-fdump-diagnostics-format` is now available with other backends. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * adabkend.adb

[Ada] Only assign type to op if compatible

2021-09-20 Thread Pierre-Marie de Rodat
Before this commit, the following program would make the compiler crash: procedure Main is ConstantString1 : aliased String := "Class1"; My_Access : access String := ConstantString1'Access; begin if "Class1" = My_Access then null; end if; end Main; This was because when an

[Ada] Move Build_And_Insert_Cuda_Initialization to Expand_CUDA_Package

2021-09-20 Thread Pierre-Marie de Rodat
This commit makes Build_And_Insert_Cuda_Initialization an internal procedure and creates a new Expand_CUDA_Package procedure which calls Build_And_Insert_Cuda_Initialization. This is a small, self-contained refactoring that does not impact any feature or fix any bug - it just makes future commits

[Ada] usage.adb: make -gnatw.c description clearer

2021-09-20 Thread Pierre-Marie de Rodat
The term "unrepped" can be hard to understand for users. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * usage.adb (Usage): Update -gnatw.c messages.diff --git a/gcc/ada/usage.adb b/gcc/ada/usage.adb --- a/gcc/ada/usage.adb +++ b/gcc/ada/usage.adb @@ -483,8 +483,10 @@ begin

[Ada] Remove inappropriate test from Is_By_Reference_Type

2021-09-20 Thread Pierre-Marie de Rodat
The result returned by the predicate may change depending on whether an error was posted on the type, which complicates further error reporting. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_aux.adb (Is_By_Reference_Type): Do not test Error_Posted.diff --git

Re: [HELP Needed!][PATCH] testsuite: Fix gcc.target/aarch64/auto-init-* tests.

2021-09-20 Thread Qing Zhao via Gcc-patches
> On Sep 20, 2021, at 5:43 AM, Richard Earnshaw > wrote: > > > > On 17/09/2021 20:48, Qing Zhao via Gcc-patches wrote: >> Hi, >> There are much less issues with aarch64/auto-init-* test cases. >> Different -march values (from ‘armv8-a’, ‘armv8.1-a’, till ‘armv8.6-a’, >> ‘armv8-r’) do not

Re: [PATCH] [og10] OpenACC: Shared memory layout optimisation

2021-09-20 Thread Julian Brown
On Fri, 17 Sep 2021 16:26:50 +0200 Thomas Schwinge wrote: > > @@ -1449,8 +1634,120 @@ oacc_do_neutering (void) > > > + addr_range ar > > + = first_fit_range (conflicts, size, align, > > _shm_bounds); + > > + splay_tree_delete (conflicts); > > + > > + if (ar.invalid ()) > >

Re: [PATCH] analyzer: Impose recursion limit on indirect calls.

2021-09-20 Thread Ankur Saini via Gcc-patches
[ Sorry for very late response ] > On 27-Aug-2021, at 6:28 PM, Martin Liška wrote: > > On 8/27/21 14:44, Ankur Saini wrote: >> While working on patch to convert most of the 8 whitespace characters to >> tabs in the analyzer’s source, I see this weird behaviour where at some >> places

[PATCH] Allow different vector types for stmt groups

2021-09-20 Thread Richard Biener via Gcc-patches
This allows vectorization (in practice non-loop vectorization) to have a stmt participate in different vector type vectorizations. It allows us to remove vect_update_shared_vectype and replace it by pushing/popping STMT_VINFO_VECTYPE from SLP_TREE_VECTYPE around vect_analyze_stmt and

Re: [PATCH, Fortran] Fixes for F2018 C838 (PR fortran/101334)

2021-09-20 Thread Thomas Koenig via Gcc-patches
Hi Sandra, This patch fixes some bugs in handling of assumed-rank arguments revealed by the TS29113 testsuite, allowing xfails to be removed from those testcases.  It was previously failing to diagnose an error when passing an assumed-rank argument to a procedure via a non-assumed-rank

Re: [HELP Needed!][PATCH] testsuite: Fix gcc.target/aarch64/auto-init-* tests.

2021-09-20 Thread Richard Earnshaw via Gcc-patches
On 17/09/2021 20:48, Qing Zhao via Gcc-patches wrote: Hi, There are much less issues with aarch64/auto-init-* test cases. Different -march values (from ‘armv8-a’, ‘armv8.1-a’, till ‘armv8.6-a’, ‘armv8-r’) do not change the pattern match. Only 1. -mabi=ilp32/lp64 impact two of the testing

[PATCH] Use the proper vectype

2021-09-20 Thread Richard Biener via Gcc-patches
The following uses the SLP node vectype rather than the vectype stored in the DR group. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-09-17 Richard Biener * tree-vect-stmts.c (vectorizable_load): Use the vectype from the SLP node. ---

Re: [Patch] Fortran/OpenMP: unconstrained/reproducible ordered modifier

2021-09-20 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 17, 2021 at 11:42:13PM +0200, Tobias Burnus wrote: > Fortran/OpenMP: unconstrained/reproducible ordered modifier > > gcc/fortran/ChangeLog: > > * gfortran.h (gfc_omp_clauses): Add order_unconstrained. > * dump-parse-tree.c (show_omp_clauses): Dump it. > * openmp.c

[PATCH] vect alignmet enhance TLC

2021-09-20 Thread Richard Biener via Gcc-patches
This properly marks the loop as for a runtime alias peel rather than (pointlessly) going through DR_MISALIGNMENT. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-09-20 Richard Biener * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Store -1 for

[PATCH] IBM Z: Provide rawmemchr{qi,hi,si} expander

2021-09-20 Thread Stefan Schulze Frielinghaus via Gcc-patches
This patch implements the rawmemchr expander as introduced in https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579649.html Bootstrapped and regtested in conjunction with the patch from above on IBM Z. Ok for mainline? >From 551362cda54048dc1a51588112f11c070ed52020 Mon Sep 17 00:00:00

[PATCH] Avoid premature alignment setting in vect_duplicate_ssa_name_ptr_info

2021-09-20 Thread Richard Biener via Gcc-patches
This removes adjusting alignment based on the vectorized accesses and instead keeps what was set on the original access. The code generating the actual accesses make sure to properly align the vectorized accesses based on the generated pointer already and the vectorizers alignment is always based

Re: [PATCH 00/13] ARM/MVE use vectors of boolean for predicates

2021-09-20 Thread Christophe LYON via Gcc-patches
Ping? On 13/09/2021 10:33, Christophe LYON via Gcc-patches wrote: ping? On 07/09/2021 11:15, Christophe Lyon wrote: This patch series addresses PR 100757 and 101325 by representing vectors of predicates (MVE VPR.P0 register) as vectors of booleans rather than using HImode. As this implies a

Re: [PING^2] Re: Fix 'hash_table::expand' to destruct stale Value objects

2021-09-20 Thread Richard Biener via Gcc-patches
On Fri, Sep 17, 2021 at 5:52 PM Thomas Schwinge wrote: > > Hi! > > On 2021-09-17T15:03:18+0200, Richard Biener > wrote: > > On Fri, Sep 17, 2021 at 2:39 PM Jonathan Wakely > > wrote: > >> On Fri, 17 Sept 2021 at 13:08, Richard Biener > >> wrote: > >> > On Fri, Sep 17, 2021 at 1:17 PM Thomas

Re: [PATCH] darwin: support aarch64-darwin host

2021-09-20 Thread Iain Sandoe
Hello Yuta thanks for your patch and interest. > On 17 Sep 2021, at 16:26, Yuta Saito via Gcc-patches > wrote: > Currently, building gcc for aarch64-darwin host fails due to missing > host_hooks definition. > > This patch adds host_hooks definition for aarch64-darwin. > aarch64-darwin is not

[ping] Fix PR C++/64697

2021-09-20 Thread Eric Botcazou
This fixes a regression for MinGW with recent binutils: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578756.html Thanks in advance. -- Eric Botcazou

[PATCH] libgcc, emutls: Allow building weak definitions of the emutls functions.

2021-09-20 Thread Iain Sandoe
Hi, The non-Darwin part of this patch is trivial but raises a couple of questions A/ We define builtins to support emulated TLS. These are defined with void * pointers The implementation (in libgcc) uses the correct type (struct __emutls_object *) in both a forward declaration of the functions

Re: [PATCH, Fortran] Fix testcases that violate C838, + revealed ICE

2021-09-20 Thread Tobias Burnus
On 20.09.21 06:02, Sandra Loosemore wrote: This patch fixes 3 testcases that violate F2018 C838 by passing an assumed-rank argument to a procedure via an assumed-sized dummy, by wrapping the call in a SELECT RANK construct. But wait, there's more! This triggered an ICE due to a null pointer

Re: [PATCH, Fortran] Fixes for F2018 C838 (PR fortran/101334)

2021-09-20 Thread Tobias Burnus
On 20.09.21 06:01, Sandra Loosemore wrote: This patch fixes some bugs in handling of assumed-rank arguments revealed by the TS29113 testsuite, allowing xfails to be removed from those testcases. It was previously failing to diagnose an error when passing an assumed-rank argument to a procedure

[PATCH] Obsolete hppa[12]*-*-hpux10* and hppa[12]*-*-hpux11*

2021-09-20 Thread Richard Biener via Gcc-patches
This obsoletes the 32bit hppa-hpux configurations which only support STABS as debuginfo format. As discussed, I'm going to push this (and a changes.html entry) when it was included in a bootstrap/regtest cycle. 2021-09-20 Richard Biener gcc/ * config.gcc: Obsolete hppa[12]*-*-hpux10*

Re: [PATCH] Factor out `find_a_program` helper around `find_a_file`

2021-09-20 Thread Iain Sandoe
Hi Folks > On 19 Sep 2021, at 23:41, Iain Sandoe wrote: > >> On 19 Sep 2021, at 16:10, Jeff Law via Gcc-patches >> wrote: >> >> On 8/4/2021 12:21 PM, John Ericson wrote: >>> The helper is for `--print-prog-name` and similar things. Since all >>> executable finding goes through it, we can

[pushed] Driver: Fix bootstrap with DEFAULT_{ASSEMBLER,LINKER,DSYMUTIL}.

2021-09-20 Thread Iain Sandoe
Hi The patch at r12-3662-g5fee8a0a9223d factored the code for printing the names of programes into a separate function. However the moved editions that print out the names of the assembler, linker (and dsymutil on Darwin) when those are specified at configure-time were not adjusted accordingly,

Re: [PATCH] tree-optimization/65206 - dependence analysis on mixed pointer/array

2021-09-20 Thread Richard Biener via Gcc-patches
On Fri, 17 Sep 2021, Richard Biener wrote: > On September 17, 2021 6:36:10 PM GMT+02:00, Richard Sandiford > wrote: > >Richard Biener via Gcc-patches writes: > >> On Fri, 17 Sep 2021, Richard Biener wrote: > >> > >>> On Fri, 17 Sep 2021, Richard Sandiford wrote: > >>> > >>> > Richard Biener

Re: [committed] avoid assuming cfun is nonnull [PR102243]

2021-09-20 Thread Richard Biener via Gcc-patches
On Mon, Sep 20, 2021 at 1:33 AM Martin Sebor via Gcc-patches wrote: > > After the front end passes control to the middle end cfun is never > null (I'm pretty sure) cfun is NULL during IPA pass execution, it's set to non-NULL by the pass manager when we execute a non-IPA pass on a specific