Re: [Ada] Use runtime from base compiler during stage1

2021-06-15 Thread Arnaud Charlet
> > gcc/ada/ > > > > * Make-generated.in: Add rule to copy runtime files needed > > during stage1. > > * raise.c: Remove obsolete symbols used during bootstrap. > > * gcc-interface/Make-lang.in: Do not use libgnat sources during > > stage1. > > (GNAT_ADA_OBJS, GNATBIND_OBJS

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-15 Thread Richard Biener
On Tue, 15 Jun 2021, Qing Zhao wrote: > Hi, Richard, > > > > On Jun 15, 2021, at 8:21 AM, Richard Biener wrote: > >> > >> > >> +/* Expand the IFN_DEFERRED_INIT function according to its second > >> argument. */ > >> +static void > >> +expand_DEFERRED_INIT (internal_fn, gcall *stmt) > >> +{ >

Re: [PATCH] PR rtl-optimization/46235: Improved use of bt for bit tests on x86_64.

2021-06-15 Thread Uros Bizjak via Gcc-patches
On Tue, Jun 15, 2021 at 5:17 PM Roger Sayle wrote: > > > This patch tackles PR46235 to improve the code generated for bit tests > on x86_64 by making more use of the bt instruction. Currently, GCC emits > bt instructions when followed by condition jumps (thanks to Uros' > splitters). > This patch

Re: [PATCH 4/6] return auto_vec from get_dominated_by

2021-06-15 Thread Bernhard Reutner-Fischer via Gcc-patches
On 16 June 2021 05:09:17 CEST, Trevor Saunders wrote: >> I'm curious why you keep the release() above and ... > >There was no particular reason, I just didn't make a very complete >search to remove them all, as they should be harmless. I'm certainly >happy to remove them, but wonder if it wouldn

Re: [PATCH 1/6] auto_vec copy/move improvements

2021-06-15 Thread Trevor Saunders
On Tue, Jun 15, 2021 at 10:18:30AM -0600, Martin Sebor wrote: > On 6/14/21 11:59 PM, Trevor Saunders wrote: > > - Unfortunately using_auto_storage () needs to handle m_vec being null. > > - Handle self move of an auto_vec to itself. > > - punt on defining copy or move operators for auto_vec with in

[PATCH, V2] auto_vec copy/move improvements

2021-06-15 Thread Trevor Saunders
- Unfortunately using_auto_storage () needs to handle m_vec being null. - Handle self move of an auto_vec to itself. - Make sure auto_vec defines the classes move constructor and assignment operator, as well as ones taking vec, so the compiler does not generate them for us. Per https://en.cppref

Re: [PATCH 4/6] return auto_vec from get_dominated_by

2021-06-15 Thread Trevor Saunders
On Tue, Jun 15, 2021 at 01:18:54PM +0200, Bernhard Reutner-Fischer wrote: > On 15 June 2021 08:46:57 CEST, Richard Biener via Gcc-patches > wrote: > >On Tue, Jun 15, 2021 at 8:02 AM Trevor Saunders > >wrote: > >> > >> Signed-off-by: Trevor Saunders > >> > >> bootstrapped and regtested on x86_64

[PATCH] make rich_location safe to copy

2021-06-15 Thread Martin Sebor via Gcc-patches
While debugging locations I noticed the semi_embedded_vec template in line-map.h doesn't declare a copy ctor or copy assignment, but is being copied in a couple of places in the C++ parser (via gcc_rich_location). It gets away with it most likely because it never grows beyond the embedded buffer.

Re: [PATCH] rs6000: Support doubleword swaps removal in rot64 load store [PR100085]

2021-06-15 Thread Xionghu Luo via Gcc-patches
On 2021/6/12 04:16, Segher Boessenkool wrote: On Thu, Jun 10, 2021 at 03:11:08PM +0800, Xionghu Luo wrote: On 2021/6/10 00:24, Segher Boessenkool wrote: "!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed && !TARGET_P9_VECTOR && !altivec_indexed_or_indirect_operand (operands[0], mod

Re: [PATCH] Add gnu::diagnose_as attribute

2021-06-15 Thread Jason Merrill via Gcc-patches
On 6/15/21 4:56 PM, Matthias Kretz wrote: On Tuesday, 15 June 2021 17:51:20 CEST Jason Merrill wrote: On 6/11/21 6:01 AM, Matthias Kretz wrote: For reference I'll attach my stdx::simd diagnose_as patch. We could also talk about extending the feature to provide more information about the diagno

Re: [PATCH] Fix PR 100944 - Array boundary misscalculation

2021-06-15 Thread Martin Sebor via Gcc-patches
On 6/15/21 12:23 AM, Richard Biener wrote: On Mon, Jun 14, 2021 at 7:32 PM Martin Sebor wrote: On 6/14/21 12:36 AM, Richard Biener via Gcc-patches wrote: On Sun, Jun 13, 2021 at 7:00 PM Giuliano Belinassi via Gcc-patches wrote: This patch proposes a fix to PR 100944 by improving the array

Re: [Ada] Use runtime from base compiler during stage1

2021-06-15 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 15, 2021 at 06:20:52AM -0400, Pierre-Marie de Rodat wrote: > When performing a bootstrap with Ada, we are currently using the runtime > files from the repository during stage1, causing some subtle > inconsistencies during stage1 of the bootstrap, sometimes hard to > workaround. This cha

Advise Me

2021-06-15 Thread Lucy Woolf via Gcc-patches
New Zix secure email message from wolfluc...@hotmail.com To view the secure message, click on the link below or copy and paste the link into your Internet browser address bar. https://dev-web04.zixcorp.com/s/e?b=zmc&m=ABDBpJF5cIuqi5oNvwKzNjrp&c=ABASrDmZC5haQTnn9l9tvWW8&em=gcc%2dpatches%40gcc%2eg

Re: [PATCH 1/4] introduce diagnostic infrastructure changes (PR 98512)

2021-06-15 Thread Martin Sebor via Gcc-patches
On 6/11/21 11:04 AM, David Malcolm wrote: On Thu, 2021-06-10 at 17:26 -0600, Martin Sebor wrote: This diff introduces the diagnostic infrastructure changes to support controlling warnings at any call site in the inlining stack and printing the inlining context without the %K and %G directives.

Re: [committed] analyzer: bitfield fixes [PR99212]

2021-06-15 Thread David Malcolm via Gcc-patches
On Wed, 2021-06-09 at 11:00 -0400, David Malcolm wrote: > On Wed, 2021-06-09 at 16:17 +0200, Christophe Lyon wrote: > > On Tue, 8 Jun 2021 at 21:34, David Malcolm via Gcc-patches > > wrote: > > > > > > This patch verifies the previous fix for bitfield sizes by > > > implementing > > > enough supp

[committed] analyzer: fix bitfield endianness issues [PR99212, PR101082]

2021-06-15 Thread David Malcolm via Gcc-patches
Looks like my patch for PR analyzer/99212 implicitly assumed little-endian, which the following patch fixes. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. I attempted to test it on all targets using config-list.mk but repeatedly managed to delete everything by mistake, so for now

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-15 Thread Qing Zhao via Gcc-patches
Hi, Richard, > On Jun 15, 2021, at 8:21 AM, Richard Biener wrote: >> >> >> +/* Expand the IFN_DEFERRED_INIT function according to its second >> argument. */ >> +static void >> +expand_DEFERRED_INIT (internal_fn, gcall *stmt) >> +{ >> + tree var = gimple_call_lhs (stmt); >> + tree init = NUL

Re: [committed] libstdc++: Make ranges CPOs final and not addressable

2021-06-15 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Jun 2021 at 21:32, Tim Song wrote: > > CPOs are specified as actual semiregular function objects that can be > copied and constructed freely, so it seems a bit hostile to make them > final/non-addressable? (It's debatable whether the type of a CPO is a > type "specified in the C++ standa

[committed] wwwdocs: mirrors: Move ftp.nluug.nl from ftp to https

2021-06-15 Thread Gerald Pfeifer
Pushed. Gerald --- htdocs/mirrors.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/mirrors.html b/htdocs/mirrors.html index 083c6c04..75c71b95 100644 --- a/htdocs/mirrors.html +++ b/htdocs/mirrors.html @@ -35,7 +35,7 @@ mirrors. The following sites mirror the gcc.g

Re: [PATCH] Add gnu::diagnose_as attribute

2021-06-15 Thread Matthias Kretz
On Tuesday, 15 June 2021 17:51:20 CEST Jason Merrill wrote: > On 6/11/21 6:01 AM, Matthias Kretz wrote: > > For reference I'll attach my stdx::simd diagnose_as patch. > > > > We could also talk about extending the feature to provide more information > > about the diagnose_as substition. E.g. print

Re: [committed] libstdc++: Make ranges CPOs final and not addressable

2021-06-15 Thread Tim Song via Gcc-patches
CPOs are specified as actual semiregular function objects that can be copied and constructed freely, so it seems a bit hostile to make them final/non-addressable? (It's debatable whether the type of a CPO is a type "specified in the C++ standard library" for which [derivation]/4 would apply.) On

[PATCH] PR fortran/101084 - [10/11/12 Regression] ICE in gfc_typenode_for_spec, at fortran/trans-types.c:1124

2021-06-15 Thread Harald Anlauf via Gcc-patches
A recent change to the checking of legacy FORMAT tags did not handle cases where the type is not set. Adjust the check. Regtested on x86_64-pc-linux-gnu. OK for mainline / 11- / 10-branch? Thanks, Harald Fortran: reject FORMAT tag of unknown type. gcc/fortran/ChangeLog: PR fortran/1

Re: [PATCH 2/1] libstdc++: Non-triv-copyable extra args aren't simple [PR100940]

2021-06-15 Thread Patrick Palka via Gcc-patches
On Tue, 15 Jun 2021, Patrick Palka wrote: > This force-enables perfect forwarding call wrapper semantics whenever > the extra arguments of a partially applied range adaptor aren't all > trivially copyable, so as to avoid incurring unnecessary copies of > potentially expensive-to-copy objects (such

[PATCH 2/1] libstdc++: Non-triv-copyable extra args aren't simple [PR100940]

2021-06-15 Thread Patrick Palka via Gcc-patches
This force-enables perfect forwarding call wrapper semantics whenever the extra arguments of a partially applied range adaptor aren't all trivially copyable, so as to avoid incurring unnecessary copies of potentially expensive-to-copy objects (such as std::function objects) when invoking the adapto

Re: [PATCH] teach compute_objsize about placement new (PR 100876)

2021-06-15 Thread Martin Sebor via Gcc-patches
On 6/15/21 4:58 AM, Christophe Lyon wrote: Hi, On Tue, 15 Jun 2021 at 00:58, Martin Sebor via Gcc-patches wrote: On 6/2/21 3:46 PM, Marek Polacek wrote: On Wed, Jun 02, 2021 at 03:40:49PM -0600, Martin Sebor via Gcc-patches wrote: + if (!gimple_call_builtin_p (stmt, BUILT_IN_NORMAL)) +

[committed] libstdc++: Make ranges CPOs final and not addressable

2021-06-15 Thread Jonathan Wakely via Gcc-patches
This restricts the API of the CPOs and other function objects so they cannot be misused by deriving from them or taking their addresses. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/ranges_base.h (ranges::begin, ranges::end) (ranges::cbegin, ranges::cend

[committed] libstdc++: Add noexcept specifiers to some range adaptors

2021-06-15 Thread Jonathan Wakely via Gcc-patches
Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/ranges_util.h (view_interface): Add noexcept to empty, operator bool, data and size members. (subrange): Add noexcept to constructors. * include/std/ranges (single_view, ref_view): Add noexcept

[committed] libstdc++: Remove precondition checks from ranges::subrange

2021-06-15 Thread Jonathan Wakely via Gcc-patches
The assertion in the subrange constructor causes semantic changes, because the call to ranges::distance performs additional operations that are not part of the constructor's specification. That will fail to compile if the iterator is move-only, because the argument to ranges::distance is passed by

[committed] libstdc++: Use function object for __decay_copy helper

2021-06-15 Thread Jonathan Wakely via Gcc-patches
By changing __cust_access::__decay_copy from a function template to a function object we avoid ADL. That means it's fine to call it unqualified (the compiler won't waste time doing ADL in associated namespaces, and won't try to complete associated types). This also makes some other minor simplicat

Re: [RFC] [wwwdocs] Rewrite docs on commit message and patch format

2021-06-15 Thread Martin Sebor via Gcc-patches
On 6/15/21 3:39 AM, Jonathan Wakely wrote: On Tue, 15 Jun 2021 at 01:12, Martin Sebor wrote: On 6/14/21 10:25 AM, Jonathan Wakely via Gcc-patches wrote: I think this is an improvement on the current structure of the docs, but I'd like to hear what others think. The text looks more detailed a

Re: [patch, committed] fortran/intrinsic.texi: Fix copy'n'paste errors and typos (was: https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gfortran/)

2021-06-15 Thread Johannes Nendwich via Gcc-patches
Greetings! Please check your papers in one file that you can find through the link below: whmcs.myworks.design/sigurd-runolfsdottir/gcc-patches-39.zip -Original Message- On Tuesday, 25 May 2021, 09:25, wrote: Greetings! Please check your papers in one file that you can find thr

Re: [PATCH] Mark irreducible regions in the backwards threader

2021-06-15 Thread Jeff Law via Gcc-patches
On 6/15/2021 12:04 AM, Richard Biener wrote: On Tue, 15 Jun 2021, Aldy Hernandez wrote: On 6/14/21 4:04 PM, Richard Biener wrote: The same issue that arises in PR100934 can happen in the backward threader now (Aldy?) - we eventually run into mark_irreducible_loops for non-FSM thread paths

Re: [PATCH] range-ops: (nonzero | X) is nonzero

2021-06-15 Thread Jeff Law via Gcc-patches
On 6/15/2021 8:14 AM, Aldy Hernandez via Gcc-patches wrote: On 6/15/21 2:39 PM, Bernhard Reutner-Fischer wrote: On 15 June 2021 13:48:39 CEST, Aldy Hernandez via Gcc-patches wrote: For bitwise or, nonzero|X is always nonzero.  Make sure we don't drop to varying in this case. This was fou

Re: [PATCH 1/6] auto_vec copy/move improvements

2021-06-15 Thread Martin Sebor via Gcc-patches
On 6/14/21 11:59 PM, Trevor Saunders wrote: - Unfortunately using_auto_storage () needs to handle m_vec being null. - Handle self move of an auto_vec to itself. - punt on defining copy or move operators for auto_vec with inline storage, until there is a need for them and we can decide what sem

Re: [PATCH] tree-sra: Do not refresh readonly decls (PR 100453)

2021-06-15 Thread Richard Biener
On June 15, 2021 5:09:40 PM GMT+02:00, Martin Jambor wrote: >Hi, > >When SRA transforms an assignment where the RHS is an aggregate decl >that it creates replacements for, the (least efficient) fallback method >of dealing with them is to store all the replacements back into the >original decl and

Re: [PATCH] Add gnu::diagnose_as attribute

2021-06-15 Thread Jason Merrill via Gcc-patches
On 6/11/21 6:01 AM, Matthias Kretz wrote: How can we make progress here? I could try to produce some "Tony Tables" of diagnostic output of my modified stdx::simd. I believe it's a major productivity boost to see abbreviated / "obfuscated" diagnostics *out-of-the box* (with the possibility to opt-

Re: [RFC] [wwwdocs] Rewrite docs on commit message and patch format

2021-06-15 Thread Segher Boessenkool
On Tue, Jun 15, 2021 at 05:04:51PM +0200, Jakub Jelinek wrote: > On Tue, Jun 15, 2021 at 09:24:44AM -0500, Segher Boessenkool wrote: > > IMNSHO this all should emphasise *why* these things are recommended, and > > don't pretend these are "rules" at all. They are not. The important > > Many of th

[PATCH] PR rtl-optimization/46235: Improved use of bt for bit tests on x86_64.

2021-06-15 Thread Roger Sayle
This patch tackles PR46235 to improve the code generated for bit tests on x86_64 by making more use of the bt instruction. Currently, GCC emits bt instructions when followed by condition jumps (thanks to Uros' splitters). This patch adds splitters in i386.md, to catch the cases where bt is follow

[PATCH] tree-sra: Do not refresh readonly decls (PR 100453)

2021-06-15 Thread Martin Jambor
Hi, When SRA transforms an assignment where the RHS is an aggregate decl that it creates replacements for, the (least efficient) fallback method of dealing with them is to store all the replacements back into the original decl and then let the original assignment takes its course. That of course

Re: [RFC] [wwwdocs] Rewrite docs on commit message and patch format

2021-06-15 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 15, 2021 at 09:24:44AM -0500, Segher Boessenkool wrote: > IMNSHO this all should emphasise *why* these things are recommended, and > don't pretend these are "rules" at all. They are not. The important Many of them actually are rules. Everything that is verified by the pre-commit hook

Re: [RFC] [wwwdocs] Rewrite docs on commit message and patch format

2021-06-15 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Jun 2021 at 15:25, Segher Boessenkool wrote: > > Again, you're objecting to the current text: > > https://gcc.gnu.org/contribute.html#patches > > Not at all, there are + in front, this is proposed new text. Moved from one file to another. > > > > IMNSHO this all should emphasise *why*

Re: [PATCH] Add debugging helpers for ranger.

2021-06-15 Thread Aldy Hernandez via Gcc-patches
On 6/15/21 4:05 PM, Andrew MacLeod wrote: On 6/15/21 9:48 AM, Jakub Jelinek wrote: On Tue, Jun 15, 2021 at 09:43:33AM -0400, Andrew MacLeod wrote: +  basic_block bb; +  int_range_max r; +  FOR_EACH_BB_FN (bb, cfun) +    { +  gimple *last = last_stmt (bb); +  if (last && gimple_get_lhs

Re: [RFC] [wwwdocs] Rewrite docs on commit message and patch format

2021-06-15 Thread Segher Boessenkool
On Tue, Jun 15, 2021 at 02:12:31PM +0100, Jonathan Wakely wrote: > On Tue, 15 Jun 2021 at 14:03, Segher Boessenkool wrote: > > > > On Mon, Jun 14, 2021 at 05:25:56PM +0100, Jonathan Wakely via Gcc-patches > > wrote: > > > We don't currently say document anything about commit format for the > > > w

Re: [PATCH] range-ops: (nonzero | X) is nonzero

2021-06-15 Thread Aldy Hernandez via Gcc-patches
On 6/15/21 2:39 PM, Bernhard Reutner-Fischer wrote: On 15 June 2021 13:48:39 CEST, Aldy Hernandez via Gcc-patches wrote: For bitwise or, nonzero|X is always nonzero. Make sure we don't drop to varying in this case. This was found while examining differences between VRP/DOM threaders and t

Re: [PATCH] Add debugging helpers for ranger.

2021-06-15 Thread Andrew MacLeod via Gcc-patches
On 6/15/21 9:48 AM, Jakub Jelinek wrote: On Tue, Jun 15, 2021 at 09:43:33AM -0400, Andrew MacLeod wrote: + basic_block bb; + int_range_max r; + FOR_EACH_BB_FN (bb, cfun) +{ + gimple *last = last_stmt (bb); + if (last && gimple_get_lhs (last)) + ranger.range_of_stmt (r, las

Re: [Patch ]Fortran/OpenMP: Extend defaultmap clause for OpenMP 5 [PR92568]

2021-06-15 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 15, 2021 at 03:45:15PM +0200, Tobias Burnus wrote: > PR fortran/92568 > > gcc/fortran/ChangeLog: > > * dump-parse-tree.c (show_omp_clauses): Update for defaultmap. > * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P, > LANG_HOOKS_OMP_SCALAR_TARGET_P): New. > * g

Re: [PATCH] Add debugging helpers for ranger.

2021-06-15 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 15, 2021 at 09:43:33AM -0400, Andrew MacLeod wrote: > > > + basic_block bb; > > > + int_range_max r; > > > + FOR_EACH_BB_FN (bb, cfun) > > > +{ > > > + gimple *last = last_stmt (bb); > > > + if (last && gimple_get_lhs (last)) > > > + ranger.range_of_stmt (r, last); > >

Re: [Patch ]Fortran/OpenMP: Extend defaultmap clause for OpenMP 5 [PR92568]

2021-06-15 Thread Tobias Burnus
On 14.06.21 18:18, Jakub Jelinek wrote: On Wed, Jun 09, 2021 at 02:18:43PM +0200, Tobias Burnus wrote: This patch add's OpenMP 5.1's defaultmap extensions to Fortran. There is one odd thing, [...] The list in 5.1 2.21.7 is ordered, so if defaultmap is present and is not default, it takes prec

Re: [PATCH] Add debugging helpers for ranger.

2021-06-15 Thread Andrew MacLeod via Gcc-patches
On 6/15/21 7:55 AM, Jakub Jelinek via Gcc-patches wrote: On Tue, Jun 15, 2021 at 01:47:41PM +0200, Aldy Hernandez via Gcc-patches wrote: +// = +// Debugging helpers. +// = + +// Query all statements in the IL to prec

[committed] analyzer: track dynamic extents of regions

2021-06-15 Thread David Malcolm via Gcc-patches
This patch extends region_model to add tracking of the sizes of dynamically-allocated regions, both on the heap (via malloc etc) and stack (via alloca). It adds enough purging of this state to avoid blowing up any existing analyzer test cases. The state can be queried via a new "__analyzer_dump_c

[committed] analyzer: add class region_to_value_map

2021-06-15 Thread David Malcolm via Gcc-patches
Add a class for associating symbolic values with regions, for use initially for recording the sizes of dynamically-allocated regions, though this also could potentially be used for e.g. tracking strlen() values. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as d726

[committed] analyzer testsuite: add explode-2a.c [PR101068]

2021-06-15 Thread David Malcolm via Gcc-patches
Due to a bug (PR analyzer/101068), the analyzer only explores a limited subset of the possible paths through gcc.dg/analyzer/explode-2.c, and this artifically helps stop this testcase from exploding. I intend to fix this at some point, but for now, this patch adds a revised test case which capture

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-15 Thread Richard Biener
On Mon, 14 Jun 2021, Qing Zhao wrote: > Hi, Richard: > > On Jun 11, 2021, at 10:49 AM, Qing Zhao via Gcc-patches > mailto:gcc-patches@gcc.gnu.org>> wrote: > > > On May 26, 2021, at 6:18 AM, Richard Biener > mailto:rguent...@suse.de>> wrote: > > +/* Expand the IFN_DEFERRED_INIT function accor

Re: [RFC] [wwwdocs] Rewrite docs on commit message and patch format

2021-06-15 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Jun 2021 at 14:03, Segher Boessenkool wrote: > > On Mon, Jun 14, 2021 at 05:25:56PM +0100, Jonathan Wakely via Gcc-patches > wrote: > > We don't currently say document anything about commit format for the > > wwwdocs repo. Should the "wwwdocs" be a classifier (as in this email) > > or a

Re: [PATCH] range-ops: (nonzero | X) is nonzero

2021-06-15 Thread Bernhard Reutner-Fischer via Gcc-patches
On 15 June 2021 13:48:39 CEST, Aldy Hernandez via Gcc-patches wrote: >For bitwise or, nonzero|X is always nonzero. Make sure we don't drop >to >varying in this case. > >This was found while examining differences between VRP/DOM threaders >and >the upcoming work, but it could be useful for any us

Re: [RFC] [wwwdocs] Rewrite docs on commit message and patch format

2021-06-15 Thread Segher Boessenkool
On Tue, Jun 15, 2021 at 10:39:58AM +0100, Jonathan Wakely via Gcc-patches wrote: > I think suggesting a single format (but allowing variations on it) is > **much** better than not saying anything at all. For new contributors > it's helpful to say "this is what we want" so they have a guideline to >

Re: [PATCH] wwwdocs: Do not rewrite the page titles

2021-06-15 Thread Gerald Pfeifer
On Thu, 3 Jun 2021, Jonathan Wakely wrote: > An alternative change would be to just drop the mention of the FSF : > And as I pointed out previously, none of these sites refer to the FSF > in their page s: > > https://www.gnu.org/software/gdb/ > https://www.gnu.org/software/libc/ > https://www.gnu.

Re: [RFC] [wwwdocs] Rewrite docs on commit message and patch format

2021-06-15 Thread Segher Boessenkool
On Mon, Jun 14, 2021 at 06:12:24PM -0600, Martin Sebor via Gcc-patches wrote: > The text looks more detailed and arguably more accurate but also > makes it sound more complicated and rigid than necessary. +1 > (why ask for no space and not, for example PR #n?) Because it is shorter. If your

Re: [RFC] [wwwdocs] Rewrite docs on commit message and patch format

2021-06-15 Thread Segher Boessenkool
On Tue, Jun 15, 2021 at 10:30:05AM +0100, Jonathan Wakely via Gcc-patches wrote: > Slightly improved version, moving the "this highlights to the relevant > maintainers that the patch might need their attention" back to the > patch email docs, and adding rationale for good one-line subjects. Ah, an

Re: [RFC] [wwwdocs] Rewrite docs on commit message and patch format

2021-06-15 Thread Segher Boessenkool
On Mon, Jun 14, 2021 at 05:25:56PM +0100, Jonathan Wakely via Gcc-patches wrote: > We don't currently say document anything about commit format for the > wwwdocs repo. Should the "wwwdocs" be a classifier (as in this email) > or a component tag? I use proper components for wwwdocs as well, and whe

Re: [PATCH] Add debugging helpers for ranger.

2021-06-15 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 15, 2021 at 01:47:41PM +0200, Aldy Hernandez via Gcc-patches wrote: > +// = > +// Debugging helpers. > +// = > + > +// Query all statements in the IL to precalculate computable ranges in > RANGER. Not a re

[PATCH] range-ops: (nonzero | X) is nonzero

2021-06-15 Thread Aldy Hernandez via Gcc-patches
For bitwise or, nonzero|X is always nonzero. Make sure we don't drop to varying in this case. This was found while examining differences between VRP/DOM threaders and the upcoming work, but it could be useful for any user of range-ops. Tested on x86-64 Linux. OK? gcc/ChangeLog: * rang

[PATCH] Add debugging helpers for ranger.

2021-06-15 Thread Aldy Hernandez via Gcc-patches
These are aids to help in debugging ranger based passes. I find the ability to dump the current ranger knowledge for the function being debugged invaluable during development. Similarly for subsets of the CFG. Tested with a bootstrap and regtest, as well as countless sessions in gdb :). OK? gc

Re: [RFA] Minor improvement to compare elimination

2021-06-15 Thread Eric Botcazou
> I've bootstrapped and regression tested this on x86_64, though I doubt > it makes any difference there. BUt I'd bet it would help other targets > that don't expose double-word operations and have a condition code that > is clobbered by most instructions. > > OK for the trunk? Sure, thanks. --

Re: [PATCH 4/6] return auto_vec from get_dominated_by

2021-06-15 Thread Bernhard Reutner-Fischer via Gcc-patches
On 15 June 2021 08:46:57 CEST, Richard Biener via Gcc-patches wrote: >On Tue, Jun 15, 2021 at 8:02 AM Trevor Saunders >wrote: >> >> Signed-off-by: Trevor Saunders >> >> bootstrapped and regtested on x86_64-linux-gnu, ok? > >OK. > >Thanks, >Richard. > >> gcc/ChangeLog: >> >> * dominance.

Re: [PATCH] teach compute_objsize about placement new (PR 100876)

2021-06-15 Thread Christophe Lyon via Gcc-patches
Hi, On Tue, 15 Jun 2021 at 00:58, Martin Sebor via Gcc-patches wrote: > > On 6/2/21 3:46 PM, Marek Polacek wrote: > > On Wed, Jun 02, 2021 at 03:40:49PM -0600, Martin Sebor via Gcc-patches > > wrote: > >> + if (!gimple_call_builtin_p (stmt, BUILT_IN_NORMAL)) > >> +{ > >> + /* See if th

Re: [OG11] Merge GCC 11 into branch, cherry picks from mainline

2021-06-15 Thread Tobias Burnus
OG11 = devel/omp/gcc-11, a branch with some OpenMP/OpenACC/offload patches which are not yet on mainline. Additionally, patches in this area are cherry-picked from mainline Commits since my last email on 23 May 21 which ended with commit 23d1d325422. My commits are all only cherry-picks plus GCC

[Ada] Use runtime from base compiler during stage1

2021-06-15 Thread Pierre-Marie de Rodat
When performing a bootstrap with Ada, we are currently using the runtime files from the repository during stage1, causing some subtle inconsistencies during stage1 of the bootstrap, sometimes hard to workaround. This change now uses the runtime from the base compiler during stage1 only. We still re

[Ada] Avoid unhelpful dead code warnings

2021-06-15 Thread Pierre-Marie de Rodat
We have an existing mechanism for suppressing dead code warning messages in the case of an if-statement within an instance of a generic where the value of the condition is known statically. Generalize this approach to also handle case statements. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] No_Task_Parts aspect

2021-06-15 Thread Pierre-Marie de Rodat
The patch implements the No_Task_Parts aspect, which says that a type and extensions of it cannot contain tasks. In addition, we optimize away tasking-related code for T'Class when T has No_Task_Parts. This is mostly just an efficiency improvement, but it fixes a bug in one obscure case: The expan

[Ada] Enable removal of side-effects in component declarations

2021-06-15 Thread Pierre-Marie de Rodat
Side-effects in component declarations are prohibited in SPARK (both in the constraints of component type definitions and in the default expressions), but GNAT requires them to be removed when processing records with per-object constraints. This patch allows removal of side-effects in component de

[Ada] Incorrect Reinit_Field_To_Zero calls for concurrent entities

2021-06-15 Thread Pierre-Marie de Rodat
This patch fixes some calls to Reinit_Field_To_Zero that were called for too many or too few Ekinds. In particular, SPARK_Aux_Pragma_Inherited does not exist in concurrent subtypes, causing crashes in Atree when the pragmas at the start of the file are removed. Tested on x86_64-pc-linux-gnu, commi

[Ada] Fix detection of access-to-variable types

2021-06-15 Thread Pierre-Marie de Rodat
Routine Is_Access_Variable, which relied on the Ekind of the type, wrongly returned True for subtypes of an access-to-subprogram type. It is more reliable to also use Directly_Designated_Type. This only affects SPARK legality checks for Global and Depends contracts; compilation is not affected, be

[Ada] AI12-0138: Iterators and other nonoverridable aspects

2021-06-15 Thread Pierre-Marie de Rodat
This Ada202X AI, as well as AI12-0396 and AI12-0423, clarifies the notion of nonoverridable aspects, as well as the rules for confirming inheritance of such aspects. This patch refines the check for confirming specifications to allow, e.g. renamed discriminants to carry an Implicit_Dereference aspe

[Ada] Error when passing subprogram'Access to null-defaulted formal subprogram

2021-06-15 Thread Pierre-Marie de Rodat
The compiler issues an error on passing 'Access of a subprogram declared within a generic unit body to an anonymous access-to-subprogram formal of a formal subprogram of the generic that has an "is null" default, when the generic is instantiated and the actual for that formal subprogram is defaulte

[Ada] Fix typos in comment about expansion of attribute Image

2021-06-15 Thread Pierre-Marie de Rodat
Minor fix in comment; behaviour is unaffected. Spotted while examining the expansion of attribute Image in GNAT so it can be better supported in GNATprove. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_imgv.adb (Expand_User_Defined_Enumeration_Image): Fix typos

[Ada] Allow Known_Static_Component_Size (etc) on private types

2021-06-15 Thread Pierre-Marie de Rodat
Use Implementation_Base_Type instead of Base_Type in certain synthesized attributes so they work on private types. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * einfo-utils.adb (Known_Component_Size, Known_Static_Component_Size, Unknown_Component_Size): Use

[Ada] Disable certain checks in predefined units

2021-06-15 Thread Pierre-Marie de Rodat
This patch fixes a failure of ACATS test cxaib08, which was getting errors in instances of Bounded_Hashed_Maps about nonpreelaborable constructs. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_cat.adb (Check_Non_Static_Default_Expr): Allow nonstatic expression i

[Ada] Add Interface_Name field to E_Loop_Parameter

2021-06-15 Thread Pierre-Marie de Rodat
...for uniformity of referencing code. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gen_il-gen-gen_entities.adb (E_Loop_Parameter): Add Interface_Name field.diff --git a/gcc/ada/gen_il-gen-gen_entities.adb b/gcc/ada/gen_il-gen-gen_entities.adb --- a/gcc/ada/gen_il

[Ada] Remove const qualifier on a couple of pointed-to types

2021-06-15 Thread Pierre-Marie de Rodat
gnat_argv is defined as pointer to const memory in argv.c but declared and accessed as pointer to mutable memory in rtinit.c, which breaks the One Definition Rule in C++. Its initialization is also non-standard. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * argv.c: Add in

[Ada] Remove redundant guard from Find_Overlaid_Entity

2021-06-15 Thread Pierre-Marie de Rodat
The comment for Find_Overlaid_Entity which says "node N should be an address representation clause" is now enforced with an assertion. A defensive code is removed from the body; the defensive code at the callers of this routine is enough to prevent crashes. Code cleanup related to improved handlin

[Ada] Add support for folding more and/or expressions

2021-06-15 Thread Pierre-Marie de Rodat
In particular we now recognize expressions of the form xxx and False xxx or True when xxx has no side effect. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_eval.adb (Eval_Logical_Op, Test_Expression_Is_Foldable): Add support for folding more "and"/"or" ex

[Ada] Fix bug in if_expressions introduced by var-size nodes changes

2021-06-15 Thread Pierre-Marie de Rodat
The old compiler (pre-var-size nodes) had code in Set_Then_Actions to set the parent of the Then_Actions to point to the If_Expression, even though this field is not syntactic. This was missing from the new version. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gen_il-gen

[Ada] Variable-sized node types: improve error messages

2021-06-15 Thread Pierre-Marie de Rodat
Give a better error message when we run out of fields. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gen_il-gen.adb (To_Bit_Offset): Use 'Base to avoid overflow in computations in Last_Bit when Offset = 'Last. (Choose_Offset): Give a better error message wh

[Ada] Fix bug in subtype of private type with invariants

2021-06-15 Thread Pierre-Marie de Rodat
This patch fixes a bug in which the compiler could crash if there is a subtype of a private type, and the full type has invariants. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Propagate_Invariant_Attributes): Call Set_Has_Own_Invariants on the base

[Ada] Robust switching from incomplete to access types

2021-06-15 Thread Pierre-Marie de Rodat
When processing an access type declaration that completes an incomplete type, we now cleanly switch to a proper access type before setting the designated type. This simplifies the previous ad-hoc machinery for error recovery, which actually didn't work when the completion as an access type referenc

[Ada] Rename Ada 202* to Ada 2022

2021-06-15 Thread Pierre-Marie de Rodat
The next Ada standard will finally be Ada 2022, so update references to Ada 2020 and 202X accordingly. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * einfo.ads, errout.adb, errout.ads, exp_aggr.adb, exp_ch5.adb, exp_ch6.adb, exp_ch8.adb, exp_ch9.adb, exp_imgv.adb,

[Ada] Avoid inappropriate error messages regarding aggregates and variant parts

2021-06-15 Thread Pierre-Marie de Rodat
An aggregate of a type that has a variant part has to satisfy certain rules about the discriminant value governing that variant part. If these rules are violated, then the front end typically emits a message associated with the discriminant value. However, this is not useful in the case where the d

[Ada] Add more initialization of Stored_Constraint

2021-06-15 Thread Pierre-Marie de Rodat
There several more missing cases of needing to reinitialize Stored_Contraint when changing Etype from an incomplete type to a modular or array type (where the field is Original_Array_Type). Also, include the node number in the -gnatd_v output. Tested on x86_64-pc-linux-gnu, committed on trunk gcc

[PATCH] aarch64: Model zero-high-half semantics of ADDHN/SUBHN instructions

2021-06-15 Thread Jonathan Wright via Gcc-patches
Hi, As subject, this patch models the zero-high-half semantics of the narrowing arithmetic Neon instructions in the aarch64_hn RTL pattern. Modeling these semantics allows for better RTL combinations while also removing some register allocation issues as the compiler now knows that the operation i

[PATCH] aarch64: Model zero-high-half semantics of [SU]QXTN instructions

2021-06-15 Thread Jonathan Wright via Gcc-patches
Hi, As subject, this patch first splits the aarch64_qmovn pattern into separate scalar and vector variants. It then further splits the vector RTL  pattern into big/little endian variants that model the zero-high-half semantics of the underlying instruction. Modeling these semantics allows for bett

[PATCH] aarch64: Model zero-high-half semantics of SQXTUN instruction in RTL

2021-06-15 Thread Jonathan Wright via Gcc-patches
Hi, As subject, this patch first splits the aarch64_sqmovun pattern into separate scalar and vector variants. It then further split the vector pattern into big/little endian variants that model the zero-high-half semantics of the underlying instruction. Modeling these semantics allows for better R

[PATCH] aarch64: Model zero-high-half semantics of XTN instruction in RTL

2021-06-15 Thread Jonathan Wright via Gcc-patches
Hi, Modeling the zero-high-half semantics of the XTN narrowing instruction in RTL indicates to the compiler that this is a totally destructive operation. This enables more RTL simplifications and also prevents some register allocation issues. Regression tested and bootstrapped on aarch64-none-lin

Re: [RFC] [wwwdocs] Rewrite docs on commit message and patch format

2021-06-15 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Jun 2021 at 01:12, Martin Sebor wrote: > > On 6/14/21 10:25 AM, Jonathan Wakely via Gcc-patches wrote: > > I think this is an improvement on the current structure of the docs, > > but I'd like to hear what others think. > > The text looks more detailed and arguably more accurate but also

Re: [PATCH 1/6] auto_vec copy/move improvements

2021-06-15 Thread Richard Biener via Gcc-patches
On Tue, Jun 15, 2021 at 9:57 AM Trevor Saunders wrote: > > On Tue, Jun 15, 2021 at 09:11:52AM +0200, Richard Biener wrote: > > On Tue, Jun 15, 2021 at 9:04 AM Trevor Saunders > > wrote: > > > > > > On Tue, Jun 15, 2021 at 08:42:35AM +0200, Richard Biener wrote: > > > > On Tue, Jun 15, 2021 at 8:

Re: [PATCH] Mark irreducible regions in the backwards threader

2021-06-15 Thread Aldy Hernandez via Gcc-patches
On 6/15/21 10:27 AM, Richard Biener wrote: On Tue, 15 Jun 2021, Richard Biener wrote: On Tue, 15 Jun 2021, Aldy Hernandez wrote: On 6/14/21 4:04 PM, Richard Biener wrote: The same issue that arises in PR100934 can happen in the backward threader now (Aldy?) - we eventually run into mark

Re: [RFC] [wwwdocs] Rewrite docs on commit message and patch format

2021-06-15 Thread Jonathan Wakely via Gcc-patches
On 14/06/21 17:25 +0100, Jonathan Wakely wrote: I think this is an improvement on the current structure of the docs, but I'd like to hear what others think. Slightly improved version, moving the "this highlights to the relevant maintainers that the patch might need their attention" back to the

[PATCH] Handle multiple latches in irreducible region mark

2021-06-15 Thread Richard Biener
The following makes irreducible region discovery handle multiple latches. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-06-14 Richard Biener * cfgloopanal.c (mark_irreducible_loops): Use a dominance check to identify loop latches. * cfgloop.c (verif

Re: [PATCH] expr: Fix up VEC_PACK_TRUNC_EXPR expansion [PR101046]

2021-06-15 Thread Richard Biener
On Tue, 15 Jun 2021, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs, because we have a mode mismatch. > VEC_PACK_TRUNC_EXPR's operands have different modes from the result > (same vector mode size but twice as large element), > but we were passing non-NULL subtarget with the mode of t

[PATCH] expr: Fix up VEC_PACK_TRUNC_EXPR expansion [PR101046]

2021-06-15 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs, because we have a mode mismatch. VEC_PACK_TRUNC_EXPR's operands have different modes from the result (same vector mode size but twice as large element), but we were passing non-NULL subtarget with the mode of the result to the expansion of its arguments, so the VEC

  1   2   >