Re: [PATCH v2] fix spelling of -linker-output-auto-nolto-rel

2021-12-01 Thread Olivier Hainque via Gcc-patches
Hi Rasmus, The VxWorks part is ok. The plugin part looks good to me as well, now in line with Richard's comment, but is not for me to approve. Thanks, and Thanks Richard for the original review. Cheers, Olivier > On 2 Dec 2021, at 08:22, Rasmus Villemoes wrote: > > The transposition nolto ->

[PATCH v2] fix spelling of -linker-output-auto-nolto-rel

2021-12-01 Thread Rasmus Villemoes
The transposition nolto -> notlo is confusing and it makes the long name even harder to read than it already is - I kept reading it as "not lo" until I realized it was a simple typo. Fixes: 5269b24605b1 (Silence warning in LTO mode on VxWorks) lto-plugin/ * lto-plugin.c: Fix -linker-outpu

Re: [PATCH] c++: Handle auto(x) in parameter-declaration-clause [PR103401]

2021-12-01 Thread Jason Merrill via Gcc-patches
On 12/1/21 10:16, Marek Polacek wrote: In C++23, auto(x) is valid, so decltype(auto(x)) should also be valid, so void f(decltype(auto(0))); should be just as void f(int); but currently, everytime we see 'auto' in a parameter-declaration-clause, we try to synthesize_implicit_template_par

Re: [PATCH] c++: ICE with unnamed tparm and concept [PR103408]

2021-12-01 Thread Jason Merrill via Gcc-patches
On 12/1/21 10:16, Marek Polacek wrote: Here we crash when issuing the "constraint C has type T, not bool" error, because pp_cxx_parameter_mapping wasn't prepared to see an anonymous template parameter. With this patch we print error: constraint 'auto() [with = 0]' has type '', not 'bool' The

Re: [PATCH] c++: Fix for decltype(auto) and parenthesized expr [PR103403]

2021-12-01 Thread Jason Merrill via Gcc-patches
On 12/1/21 10:16, Marek Polacek wrote: In r11-4758, I tried to fix this problem: int &&i = 0; decltype(auto) j = i; // should behave like int &&j = i; error wherein do_auto_deduction was getting confused with a REFERENCE_REF_P and it didn't realize its operand was a name, not an expressio

Re: [PATCH] c++: Fix bogus error with __integer_pack [PR94490]

2021-12-01 Thread Jason Merrill via Gcc-patches
On 12/1/21 12:22, Marek Polacek wrote: Here we issue a bogus: error: '(0 ? fake_tuple_size_v : fake_tuple_size_v)' is not a constant expression because cxx_constant_value in expand_integer_pack gets *(0 ? VIEW_CONVERT_EXPR(fake_tuple_size_v) : VIEW_CONVERT_EXPR(fake_tuple_size_v)) which is a

Re: [PATCH] Modify combine pattern by a pseudo AND with its nonzero bits [PR93453]

2021-12-01 Thread Kewen.Lin via Gcc-patches
Hi Haochen, on 2021/12/1 下午5:01, HAO CHEN GUI via Gcc-patches wrote: > Hi, > This patch modifies the combine pattern with a helper - > change_pseudo_and_mask when recog fails. > The helper converts a single pseudo to the pseudo AND with a mask if the > outer operator is IOR/XOR/PLUS > and the

[PR103149] introduce asmnesia internal function

2021-12-01 Thread Alexandre Oliva via Gcc-patches
This is now used by -fharden-conditional-branches and -fharden-compares to detach the values used in redundant hardening compares from their original locations. It eventually still expands to an asm statement, as before, but the temporary is only introduced at expand time, preventing gimple opti

Re: [PATCH] i386: Improve V8HI and V8HF inserts [PR102811]

2021-12-01 Thread Hongtao Liu via Gcc-patches
On Thu, Dec 2, 2021 at 6:07 AM Uros Bizjak wrote: > > Introduce vec_set_0 pattern for V8HI and V8HF modes to implement scalar > element 0 inserts to from a GP register, SSE register or memory. Also > add V8HI and V8HF AVX2 (x,x,x) alternative to PINSR insn pattern, which is > split after reload t

[committed] libphobos: Add missing ControlState variable for AArch64

2021-12-01 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a typo that occurred during the splitting of the std.math module into a package. Bootstrapped and regression tested on aarch64-linux-gnu, and committed to mainline. Regards, Iain. --- libphobos/ChangeLog: * src/std/math/hardware.d (FloatingPointControl.getControlSt

[committed] d: Disable the D runtime garbage collector after initializing (PR103520)

2021-12-01 Thread Iain Buclaw via Gcc-patches
Hi, This patch disables the D runtime garbage collector after initializing. Not all targets that support building libdruntime have a stable garbage collector, so to avoid running into problems where live memory allocated by the D GC is freed, disable all in-flight collections until a time when sc

[committed] d: Prefix object files from the root package with 'root-'

2021-12-01 Thread Iain Buclaw via Gcc-patches
Hi, This patch prefixes D object files from the root package with 'root-'. None of the front-end module names in either the dmd or root package collide just yet, but that does not mean they won't in the future. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. R

[PATCH v2] c++: ICE with auto(0) in requires-expression [PR103408]

2021-12-01 Thread Marek Polacek via Gcc-patches
On Wed, Dec 01, 2021 at 12:17:47PM -0500, Patrick Palka wrote: > On Wed, Dec 1, 2021 at 10:26 AM Marek Polacek via Gcc-patches > wrote: > > > > Here we ICE on > > > > int f() requires (auto(0)); > > > > in do_auto_deduction when handling the auto: we're in a non-templated > > requires-expression

[RFC]PR103271 ICE in assign_stack_temp_for_type with -ftrivial-auto-var-init=pattern and VLAs and -mno-strict-align on riscv64

2021-12-01 Thread Qing Zhao via Gcc-patches
Hi, As I studied, the issue with this bug is similar as PR102285: For the testing case: int qy (void) { int tw = 4; int fb[tw]; return fb[2]; /* { dg-warning "uninitialized" } */ } if compiled with /home/opc/Install/cross/bin/riscv64-unknown-linux-gnu-gcc -c -O1 -mno-strict-align -ft

[committed] analyzer: fix false leak seen in Juliet 1.3 [PR102471]

2021-12-01 Thread David Malcolm via Gcc-patches
Juliet 1.3's CWE415_Double_Free__malloc_free_*_67a.c were showing leak false positives in non-LTO builds; fixed thusly. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r12-5701-g860c56b5bc356960a4d0445dadc43ceddbe3c7e2. gcc/analyzer/ChangeLog: PR analyzer

Re: [PATCH] rs6000: Builtins test changes for test_fpscr_[d]rn_builtin_error.c

2021-12-01 Thread Segher Boessenkool
On Thu, Nov 18, 2021 at 10:36:52AM -0600, Bill Schmidt wrote: > Hi! This is the last patch broken out of the previous test suite patch > for the new builtins support. Whew :-) > One advantage of the new builtins support is uniform error messages for > arguments with restricted values. Previousl

Re: [PATCH] rs6000: Builtins test changes for pr80315-*.c, pr88100.c

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi! On 12/1/21 4:29 PM, Segher Boessenkool wrote: > On Thu, Nov 18, 2021 at 10:15:21AM -0600, Bill Schmidt wrote: >> Hi! This patch is broken out from the test case patch for the new >> builtins support. >> >> One advantage of the new builtins support is uniform error messages for >> arguments wi

Re: [PATCH] rs6000: Builtins test changes for pragma_misc9.c

2021-12-01 Thread Segher Boessenkool
On Thu, Nov 18, 2021 at 10:18:06AM -0600, Bill Schmidt wrote: > Hi! This patch is broken out from the test suite patch for the new > builtins support. This one is just a minor adjustment for the error > message wording. > > Tested on powerpc64le-linux-gnu and powerpc64-linux-gnu (-m32/-m64) > wi

Re: [PATCH] rs6000: Builtins test changes for pr80315-*.c, pr88100.c

2021-12-01 Thread Segher Boessenkool
On Thu, Nov 18, 2021 at 10:15:21AM -0600, Bill Schmidt wrote: > Hi! This patch is broken out from the test case patch for the new > builtins support. > > One advantage of the new builtins support is uniform error messages for > arguments with restricted values. Previously this was done in many p

Re: [PATCH] rs6000: Builtins test changes for compare-bytes tests

2021-12-01 Thread Segher Boessenkool
On Thu, Nov 18, 2021 at 07:47:38AM -0600, Bill Schmidt wrote: > Hi! This patch is broken out from the patch with test suite changes for the > new builtins support. > > With the old builtins support, cmpb-2.c produces: > warning: implicit declaration of function '__builtin_cmpb; did you mean >

[PATCH] i386: Improve V8HI and V8HF inserts [PR102811]

2021-12-01 Thread Uros Bizjak via Gcc-patches
Introduce vec_set_0 pattern for V8HI and V8HF modes to implement scalar element 0 inserts to from a GP register, SSE register or memory. Also add V8HI and V8HF AVX2 (x,x,x) alternative to PINSR insn pattern, which is split after reload to a sequence of PBROADCASTW and PBLENDW. The V8HF inserts fr

Re: [PATCH v2] rs6000: Fix a handful of 32-bit built-in function problems

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi! On 12/1/21 3:08 PM, Segher Boessenkool wrote: > On Tue, Nov 16, 2021 at 12:56:52PM -0600, Bill Schmidt wrote: >> Hi! I previously posted [1] to correct some problems with the new builtins >> support targeting 32-bit code gen. Based on the discussion, I've made some >> adjustments and would l

Re: [PATCH] rs6000: Builtins test changes for BFP scalar tests

2021-12-01 Thread Segher Boessenkool
On Wed, Nov 17, 2021 at 02:58:54PM -0600, Bill Schmidt wrote: > Hi! This patch is broken out of the previous patch for all the builtins test > suite adjustments. Here we have some slight changes in error messages due to > how the internals have changed between the old and new builtins methods. >

Re: [PATCH] rs6000: Builtins test changes for BFP scalar tests

2021-12-01 Thread Segher Boessenkool
On Thu, Nov 18, 2021 at 03:59:41PM -0600, Bill Schmidt wrote: > On 11/18/21 3:32 PM, Segher Boessenkool wrote: > > On Thu, Nov 18, 2021 at 03:30:48PM -0600, Bill Schmidt wrote: > >> On 11/18/21 3:16 PM, Segher Boessenkool wrote: > >>> On Wed, Nov 17, 2021 at 05:06:05PM -0600, Bill Schmidt wrote: >

[committed] wwwdocs: git: Go has a new home

2021-12-01 Thread Gerald Pfeifer
Pushed. --- htdocs/git.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/git.html b/htdocs/git.html index de8f0584..493b5734 100644 --- a/htdocs/git.html +++ b/htdocs/git.html @@ -329,7 +329,7 @@ in Git. gccgo This branch is for the Go front end to gcc. For mo

[committed] wwwdocs: gcc-12: Update link to our Bugzilla

2021-12-01 Thread Gerald Pfeifer
On the way tweak language a bit. Pushed. --- htdocs/gcc-12/changes.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index 45a8d99a..000501fb 100644 --- a/htdocs/gcc-12/changes.html +++ b/htdocs/gcc-12/changes.html @@

Re: [PATCH v2] rs6000: Fix a handful of 32-bit built-in function problems

2021-12-01 Thread Segher Boessenkool
On Tue, Nov 16, 2021 at 12:56:52PM -0600, Bill Schmidt wrote: > Hi! I previously posted [1] to correct some problems with the new builtins > support targeting 32-bit code gen. Based on the discussion, I've made some > adjustments and would like to submit this for consideration. > > We eventually

RE: [PATCH] Final value replacement improvements for until-wrap loops.

2021-12-01 Thread Roger Sayle
Hi Richard, Many thanks for the review. Here's the final version that I've committed, including your suggested improvements, following another make bootstrap and make -k check on x86_64-pc-linux-gnu with no new failures. Thanks again. 2021-12-01 Roger Sayle Richard Biener

Re: [RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-12-01 Thread Jason Merrill via Gcc-patches
On Tue, Sep 21, 2021 at 5:19 PM Jason Merrill wrote: > On Tue, Sep 21, 2021 at 4:30 PM Joseph Myers > wrote: > >> On Tue, 21 Sep 2021, Jakub Jelinek via Gcc-patches wrote: >> >> > On Tue, Sep 21, 2021 at 02:15:59PM +0100, Roger Sayle wrote: >> > > Can you double check? Integer division by zero

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-12-01 Thread Peter Bergner via Gcc-patches
On 12/1/21 1:07 PM, Richard Biener wrote: > On December 1, 2021 6:42:21 PM GMT+01:00, Peter Bergner > wrote: >> On 12/1/21 3:01 AM, Richard Biener wrote: >>> Given all this I suggest to exempt OPAQUE_TYPE from is_var_need_auto_init >>> instead of fixing up things at expansion time. >> >> The foll

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-12-01 Thread Richard Biener via Gcc-patches
On December 1, 2021 6:42:21 PM GMT+01:00, Peter Bergner wrote: >On 12/1/21 3:01 AM, Richard Biener wrote: >> Given all this I suggest to exempt OPAQUE_TYPE from is_var_need_auto_init >> instead of fixing up things at expansion time. > >The following fixes the ICE. The bootstrap/regtesting is sti

Re: [committed] libstdc++: Optimize ref-count updates in COW std::string

2021-12-01 Thread Jonathan Wakely via Gcc-patches
On Wed, 1 Dec 2021 at 18:16, Florian Weimer wrote: > > * Jonathan Wakely via Libstdc: > > > diff --git a/libstdc++-v3/include/bits/cow_string.h > > b/libstdc++-v3/include/bits/cow_string.h > > index ced395b80b8..4fae1d02981 100644 > > --- a/libstdc++-v3/include/bits/cow_string.h > > +++ b/libstdc+

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-01 Thread Andrew MacLeod via Gcc-patches
On 12/1/21 09:48, Martin Liška wrote: On 12/1/21 15:34, Richard Biener wrote: On Wed, Dec 1, 2021 at 3:25 PM Martin Liška wrote: On 12/1/21 15:19, Richard Biener wrote: which is compute the range of 'lhs' on edge_true into predicate->true_range, assign that same range to ->false_range and t

Re: [committed] libstdc++: Optimize ref-count updates in COW std::string

2021-12-01 Thread Florian Weimer via Gcc-patches
* Jonathan Wakely via Libstdc: > diff --git a/libstdc++-v3/include/bits/cow_string.h > b/libstdc++-v3/include/bits/cow_string.h > index ced395b80b8..4fae1d02981 100644 > --- a/libstdc++-v3/include/bits/cow_string.h > +++ b/libstdc++-v3/include/bits/cow_string.h > @@ -105,7 +105,7 @@ _GLIBCXX_BEGI

Re: [PATCH] rs6000: Mirror fix for PR102347 into the new builtins support

2021-12-01 Thread Bill Schmidt via Gcc-patches
On 12/1/21 11:21 AM, Segher Boessenkool wrote: > Hi! > > On Wed, Dec 01, 2021 at 09:29:42AM -0600, Bill Schmidt wrote: >> Recently Kewen fixed a problem in the old builtins support where >> rs6000_builtin_decl prematurely indicated that a target builtin is >> unavailable. This also needs to be don

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-12-01 Thread Peter Bergner via Gcc-patches
On 12/1/21 3:01 AM, Richard Biener wrote: > Given all this I suggest to exempt OPAQUE_TYPE from is_var_need_auto_init > instead of fixing up things at expansion time. The following fixes the ICE. The bootstrap/regtesting is still running though. Peter diff --git a/gcc/gimplify.c b/gcc/gimplify

Re: [PATCH] ipa-sra: Check also ECF_LOOPING_CONST_OR_PURE when evaluating calls

2021-12-01 Thread Martin Jambor
On Tue, Nov 30 2021, Richard Biener wrote: > On Tue, Nov 30, 2021 at 3:24 PM Martin Jambor wrote: >> >> Hi, >> >> in PR 103267 Honza found out that IPA-SRA does not look at >> ECF_LOOPING_CONST_OR_PURE when evaluating if a call can have side >> effects. Fixed with this patch. The testcase infini

Re: [PATCH][wwwdocs] Update section on enormous source files in htdocs/projects/beginner.html

2021-12-01 Thread Eric Gallager via Gcc-patches
On Wed, Dec 1, 2021 at 10:54 AM Gerald Pfeifer wrote: > > Hi Eric, > > On Wed, 24 Nov 2021, Eric Gallager wrote: > > This next patch does more than just removing old stuff: it adds an > > extra sentence to describe a shell command used to generate a list, so > > to verify that I've got the shell c

[PATCH] c++: Fix bogus error with __integer_pack [PR94490]

2021-12-01 Thread Marek Polacek via Gcc-patches
Here we issue a bogus: error: '(0 ? fake_tuple_size_v : fake_tuple_size_v)' is not a constant expression because cxx_constant_value in expand_integer_pack gets *(0 ? VIEW_CONVERT_EXPR(fake_tuple_size_v) : VIEW_CONVERT_EXPR(fake_tuple_size_v)) which is a REFERENCE_REF_P and we evaluate its oper

Re: [PATCH] rs6000: Mirror fix for PR102347 into the new builtins support

2021-12-01 Thread Segher Boessenkool
Hi! On Wed, Dec 01, 2021 at 09:29:42AM -0600, Bill Schmidt wrote: > Recently Kewen fixed a problem in the old builtins support where > rs6000_builtin_decl prematurely indicated that a target builtin is > unavailable. This also needs to be done for the new builtins support, but in > this case we h

Re: [PATCH] c++: ICE with auto(0) in requires-expression [PR103408]

2021-12-01 Thread Patrick Palka via Gcc-patches
On Wed, Dec 1, 2021 at 10:26 AM Marek Polacek via Gcc-patches wrote: > > Here we ICE on > > int f() requires (auto(0)); > > in do_auto_deduction when handling the auto: we're in a non-templated > requires-expression which are parsed under processing_template_decl == 1 > and empty current_templat

Re: [PATCH] path solver: Minimize exported ranges to subsequent blocks.

2021-12-01 Thread Jeff Law via Gcc-patches
On 12/1/2021 9:18 AM, Aldy Hernandez via Gcc-patches wrote: I'm going to hold off pushing this until I hear from the global maintainers and/or release managers. This patch fixes a pathological performance case, but it may also be handled by Andrew's fixes in this area. It's up to y'all to de

[PATCH, PING] rs6000: Builtins test changes for test_fpscr_[d]rn_builtin_error.c

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi!  I'd like to ping this patch. Thanks! Bill On 11/18/21 10:36 AM, Bill Schmidt wrote: > Hi! This is the last patch broken out of the previous test suite patch > for the new builtins support. > > One advantage of the new builtins support is uniform error messages for > arguments with restricte

[PATCH, PING] rs6000: Builtins test changes for pragma_misc9.c

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi!  I'd like to ping this patch. Thanks! Bill On 11/18/21 10:18 AM, Bill Schmidt wrote: > Hi! This patch is broken out from the test suite patch for the new > builtins support. This one is just a minor adjustment for the error > message wording. > > Tested on powerpc64le-linux-gnu and powerpc6

[PATCH, PING] rs6000: Builtins test changes for pr80315-*.c, pr88100.c

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi!  I'd like to ping this patch. Thanks! Bill On 11/18/21 10:15 AM, Bill Schmidt wrote: > Hi! This patch is broken out from the test case patch for the new > builtins support. > > One advantage of the new builtins support is uniform error messages for > arguments with restricted values. Previo

Patch ping related to OpenMP

2021-12-01 Thread Tobias Burnus
Patch ping - lightly sorted by priority, simplicity and dependency: * [PATCH, v5, OpenMP 5.0] Improve OpenMP target support for C++ [PR92120 v5] https://gcc.gnu.org/pipermail/gcc-patches/2021-November/584602.html * [PATCH, v2, OpenMP 5.0] Remove array section base-pointer mapping semantics, a

[PATCH, PING] rs6000: Builtins test changes for compare-bytes tests

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi!  I'd like to ping this patch. Thanks! Bill On 11/18/21 7:47 AM, Bill Schmidt wrote: > Hi! This patch is broken out from the patch with test suite changes for the > new builtins support. > > With the old builtins support, cmpb-2.c produces: > warning: implicit declaration of function '__bui

[PATCH, PING] rs6000: Builtins test changes for BFP scalar tests

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi! I'd like to ping this patch. Segher had objected to the change in diagnostics, but I hope we've solved that now with the better informational message [1]. Thanks! Bill [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585250.html On 11/17/21 2:58 PM, Bill Schmidt wrote: > Hi! T

Re: [PATCH v2] rs6000: Fix a handful of 32-bit built-in function problems

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi! I'd like to ping this patch. By the way, the diagnostics are improved [1] since I sent it, so that we now inform the user that the overloaded function is implemented by the instantiated function. Thanks! Bill [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585250.html On 11/1

Re: [PATCH] path solver: Minimize exported ranges to subsequent blocks.

2021-12-01 Thread Aldy Hernandez via Gcc-patches
I'm going to hold off pushing this until I hear from the global maintainers and/or release managers. This patch fixes a pathological performance case, but it may also be handled by Andrew's fixes in this area. It's up to y'all to decide if it's something we want in this release. An alternative w

Re: [PATCH] path solver: Use only one ssa_global_cache.

2021-12-01 Thread Aldy Hernandez via Gcc-patches
No one has said anything in 48 hours. By the power vested in me, I declare it approved. Pushed. On Mon, Nov 29, 2021 at 5:21 PM Aldy Hernandez wrote: > > We're using a temporary range cache while computing ranges for PHIs to > make sure the real cache doesn't get set until all PHIs are computed

Re: [PATCH, PR90030] Fortran OpenMP/OpenACC array mapping alignment fix

2021-12-01 Thread Jakub Jelinek via Gcc-patches
On Thu, Nov 04, 2021 at 04:23:43PM +0800, Chung-Lin Tang wrote: > 2021-11-04 Chung-Lin Tang > Thomas Schwinge > > PR fortran/90030 > > gcc/fortran/ChangeLog: > > * trans-openmp.c (gfc_omp_finish_clause): Remove fold_convert to pointer > to char_type_node, add gcc_

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-12-01 Thread Peter Bergner via Gcc-patches
On 12/1/21 9:06 AM, Qing Zhao wrote: >> On Dec 1, 2021, at 3:01 AM, Richard Biener >> wrote: >> Given all this I suggest to exempt OPAQUE_TYPE from is_var_need_auto_init >> instead of fixing up things at expansion time. > > Agreed. > > So, Peter, will you update the routine “is_var_need_auto_i

Re: [PATCH] Allow loop crossing paths in back threader copier.

2021-12-01 Thread Aldy Hernandez via Gcc-patches
On Wed, Dec 1, 2021 at 2:36 PM Richard Biener wrote: > > On Tue, Nov 30, 2021 at 4:48 PM Aldy Hernandez via Gcc-patches > wrote: > > > > We are currently restricting loop crossing paths in the generic copier > > used by the back threader, but we should be able to handle them after > > loop_done h

Re: [PATCH][wwwdocs] Update section on enormous source files in htdocs/projects/beginner.html

2021-12-01 Thread Gerald Pfeifer
Hi Eric, On Wed, 24 Nov 2021, Eric Gallager wrote: > This next patch does more than just removing old stuff: it adds an > extra sentence to describe a shell command used to generate a list, so > to verify that I've got the shell command right, I'm asking for a > review. -There are several other f

Re: [PATCH] dwarf: Multi-register CFI address support.

2021-12-01 Thread Jakub Jelinek via Gcc-patches
On Thu, Nov 11, 2021 at 06:12:50PM +, Hafiz Abid Qadeer wrote: > * dwarf2cfi.c (dw_stack_pointer_regnum): Change type to struct cfa_reg. > (dw_frame_pointer_regnum): Likewise. > (new_cfi_row): Use set_by_dwreg. > (get_cfa_from_loc_descr): Use set_by_dwreg. Support regis

[PATCH] rs6000: Mirror fix for PR102347 into the new builtins support

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi! Recently Kewen fixed a problem in the old builtins support where rs6000_builtin_decl prematurely indicated that a target builtin is unavailable. This also needs to be done for the new builtins support, but in this case we have to ensure the error message is still produced from the overload su

[PATCH] c++: Fix for decltype(auto) and parenthesized expr [PR103403]

2021-12-01 Thread Marek Polacek via Gcc-patches
In r11-4758, I tried to fix this problem: int &&i = 0; decltype(auto) j = i; // should behave like int &&j = i; error wherein do_auto_deduction was getting confused with a REFERENCE_REF_P and it didn't realize its operand was a name, not an expression, and deduced the wrong type. Unfortunate

[PATCH] c++: ICE with unnamed tparm and concept [PR103408]

2021-12-01 Thread Marek Polacek via Gcc-patches
Here we crash when issuing the "constraint C has type T, not bool" error, because pp_cxx_parameter_mapping wasn't prepared to see an anonymous template parameter. With this patch we print error: constraint 'auto() [with = 0]' has type '', not 'bool' The "" is what this patch adds. Bootstrappe

[PATCH] c++: ICE with auto(0) in requires-expression [PR103408]

2021-12-01 Thread Marek Polacek via Gcc-patches
Here we ICE on int f() requires (auto(0)); in do_auto_deduction when handling the auto: we're in a non-templated requires-expression which are parsed under processing_template_decl == 1 and empty current_template_parms, so 'current_template_args ()' will crash. This code is invalid as per "C++

[PATCH] c++: Handle auto(x) in parameter-declaration-clause [PR103401]

2021-12-01 Thread Marek Polacek via Gcc-patches
In C++23, auto(x) is valid, so decltype(auto(x)) should also be valid, so void f(decltype(auto(0))); should be just as void f(int); but currently, everytime we see 'auto' in a parameter-declaration-clause, we try to synthesize_implicit_template_parm for it, creating a new template parameter

Patch ping

2021-12-01 Thread Jakub Jelinek via Gcc-patches
Hi! I'd like to ping following patches: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583289.html c++, dyninit: Optimize C++ dynamic initialization by constants into DECL_INITIAL adjustment [PR102876] While Jason has added -fimplicit-constexpr which can fix up some cases, it sti

PING [PATCH][wwwdocs] Update section on enormous source files in htdocs/projects/beginner.html

2021-12-01 Thread Eric Gallager via Gcc-patches
Hi, I'd like to ping this patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585294.html On Wed, Nov 24, 2021 at 2:11 AM Eric Gallager wrote: > > On Tue, Nov 23, 2021 at 6:27 PM Eric Gallager wrote: > > > > On Fri, Nov 19, 2021 at 8:14 AM Eric Gallager wrote: > > > > > > On Fri, Nov

[committed] libstdc++: Clear RB tree after moving elements [PR103501]

2021-12-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. If the allocator-extended move constructor move-constructs each element into the new container, the contents of the old container are left in moved-from states. We cannot know if those states preserve the container's ordering and uniqueness guarantees, so jus

[committed] libstdc++: Define std::__is_constant_evaluated() for internal use

2021-12-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. This adds std::__is_constant_evaluated() as a C++11 wrapper for __builtin_is_constant_evaluated, but just returning false if the built-in isn't supported by the compiler. This allows us to use it throughout the library without checking __has_builtin every tim

[committed] libstdc++: Optimize ref-count updates in COW std::string

2021-12-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. Most ref-count updates in the COW string are done via the functions in , which will use non-atomic ops when the program is known to be single-threaded. The _M_is_leaked() and _M_is_shared() functions use __atomic_load_n directly, because doesn't provide a lo

[committed] libstdc++: Avoid unwanted allocations in filesystem::path

2021-12-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. When using COW strings, accessing _M_pathname[0] and similar non-const accessors can cause the string to "leak", meaning it reallocates itself if it shares ownership with another string object. This causes test failures for --enable-fully-dynamic-string buil

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-12-01 Thread Qing Zhao via Gcc-patches
> On Dec 1, 2021, at 3:01 AM, Richard Biener wrote: > > On Tue, Nov 30, 2021 at 11:35 PM Peter Bergner wrote: >> >> On 11/30/21 2:44 PM, Qing Zhao via Gcc-patches wrote: >>> Sorry for the confusing… >>> My major question is: >>> >>> for a variable of type __vector_pair, could it be in a reg

Re: [PATCH] x86: Speed up target attribute handling by using a cache

2021-12-01 Thread Uros Bizjak via Gcc-patches
On Mon, Nov 22, 2021 at 10:36 AM Jakub Jelinek wrote: > > Hi! > > The target attribute handling is very expensive and for the common case > from x86intrin.h where many functions get implicitly the same target > attribute, we can speed up compilation a lot by caching it. > > The following patches b

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-01 Thread Martin Liška
On 12/1/21 15:34, Richard Biener wrote: On Wed, Dec 1, 2021 at 3:25 PM Martin Liška wrote: On 12/1/21 15:19, Richard Biener wrote: which is compute the range of 'lhs' on edge_true into predicate->true_range, assign that same range to ->false_range and then invert it to get the range on the fa

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-01 Thread Richard Biener via Gcc-patches
On Wed, Dec 1, 2021 at 3:25 PM Martin Liška wrote: > > On 12/1/21 15:19, Richard Biener wrote: > > which is compute the range of 'lhs' on edge_true into predicate->true_range, > > assign that same range to ->false_range and then invert it to get the > > range on the false_edge. What I am saying i

[PATCH v4 1/6] tree-object-size: Use trees and support negative offsets

2021-12-01 Thread Siddhesh Poyarekar
Transform tree-object-size to operate on tree objects instead of host wide integers. This makes it easier to extend to dynamic expressions for object sizes. The compute_builtin_object_size interface also now returns a tree expression instead of HOST_WIDE_INT, so callers have been adjusted to acco

[PATCH v4 5/6] tree-object-size: Handle GIMPLE_CALL

2021-12-01 Thread Siddhesh Poyarekar
Handle non-constant expressions in GIMPLE_CALL arguments. Also handle alloca. gcc/ChangeLog: * tree-object-size.c (alloc_object_size): Make and return non-constant size expression. (call_object_size): Return expression or unknown based on whether dynamic object si

[PATCH v4 6/6] tree-object-size: Dynamic sizes for ADDR_EXPR

2021-12-01 Thread Siddhesh Poyarekar
Allow returning dynamic expressions from ADDR_EXPR for __builtin_dynamic_object_size and also allow offsets to be dynamic. gcc/ChangeLog: * tree-object-size.c (size_valid_p): New function. (size_for_offset): Remove OFFSET constness assertion. (addr_object_size): Build dyna

[PATCH v4 3/6] tree-object-size: Support dynamic sizes in conditions

2021-12-01 Thread Siddhesh Poyarekar
Handle GIMPLE_PHI and conditionals specially for dynamic objects, returning PHI/conditional expressions instead of just a MIN/MAX estimate. This makes the returned object size variable for loops and conditionals, so tests need to be adjusted to look for precise size in some cases. builtin-dynamic-

[PATCH v4 2/6] __builtin_dynamic_object_size: Recognize builtin

2021-12-01 Thread Siddhesh Poyarekar
Recognize the __builtin_dynamic_object_size builtin and add paths in the object size path to deal with it, but treat it like __builtin_object_size for now. Also add tests to provide the same testing coverage for the new builtin name. gcc/ChangeLog: * builtins.def (BUILT_IN_DYNAMIC_OBJECT

[PATCH v4 0/6] __builtin_dynamic_object_size

2021-12-01 Thread Siddhesh Poyarekar
This patchset implements the __builtin_dynamic_object_size builtin for gcc. The primary motivation to have this builtin in gcc is to enable _FORTIFY_SOURCE=3 support with gcc, thus allowing greater fortification in use cases where the potential performance tradeoff is acceptable. Semantics: -

[PATCH v4 4/6] tree-object-size: Handle function parameters

2021-12-01 Thread Siddhesh Poyarekar
Handle hints provided by __attribute__ ((access (...))) to compute dynamic sizes for objects. gcc/ChangeLog: * tree-object-size.c: Include tree-dfa.h. (parm_object_size): New function. (collect_object_sizes_for): Call it. gcc/testsuite/ChangeLog: * gcc.dg/builtin

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-01 Thread Martin Liška
On 12/1/21 15:19, Richard Biener wrote: which is compute the range of 'lhs' on edge_true into predicate->true_range, assign that same range to ->false_range and then invert it to get the range on the false_edge. What I am saying is that for better precision you should do ranger->range_on_

Re: [PATCH] fix spelling of -linker-output-auto-nolto-rel

2021-12-01 Thread Richard Biener via Gcc-patches
On Wed, Dec 1, 2021 at 3:18 PM Rasmus Villemoes wrote: > > On 01/12/2021 14.17, Richard Biener wrote: > > On Wed, Dec 1, 2021 at 12:08 PM Rasmus Villemoes > > wrote: > >> > >> The transposition nolto -> notlo is confusing and it makes the long > >> name even harder to read than it already is - I

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-01 Thread Richard Biener via Gcc-patches
On Wed, Dec 1, 2021 at 3:10 PM Martin Liška wrote: > > On 11/30/21 12:17, Richard Biener wrote: > > On Mon, Nov 29, 2021 at 1:45 PM Martin Liška wrote: > >> > >> On 11/26/21 09:12, Richard Biener wrote: > >>> On Wed, Nov 24, 2021 at 3:32 PM Martin Liška wrote: > > On 11/24/21 15:14, Ma

Re: [PATCH] fix spelling of -linker-output-auto-nolto-rel

2021-12-01 Thread Rasmus Villemoes via Gcc-patches
On 01/12/2021 14.17, Richard Biener wrote: > On Wed, Dec 1, 2021 at 12:08 PM Rasmus Villemoes > wrote: >> >> The transposition nolto -> notlo is confusing and it makes the long >> name even harder to read than it already is - I kept reading it as >> "not lo" until I realized it was a simply typo.

Re: [PING, PATCH] darwin, d: Support outfile substitution for liphobos

2021-12-01 Thread Richard Biener via Gcc-patches
On Tue, Nov 30, 2021 at 6:04 PM Iain Buclaw via Gcc-patches wrote: > > Ping. > > Are the common gcc parts OK (also for backporting)? Yes, OK for backporting as well after a short burn in period. Richard, > Iain. > > Excerpts from Iain Buclaw's message of November 26, 2021 1:51 pm: > > Excerpts

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-01 Thread Martin Liška
On 11/30/21 12:17, Richard Biener wrote: On Mon, Nov 29, 2021 at 1:45 PM Martin Liška wrote: On 11/26/21 09:12, Richard Biener wrote: On Wed, Nov 24, 2021 at 3:32 PM Martin Liška wrote: On 11/24/21 15:14, Martin Liška wrote: It likely miscompiles gcc.dg/loop-unswitch-5.c, working on that.

[committed] testsuite: Fix typo in comment in aapcs64 test

2021-12-01 Thread Alex Coplan via Gcc-patches
Committed as obvious. Thanks, Alex gcc/testsuite/ChangeLog: * gcc.target/aarch64/aapcs64/macro-def.h (PTR): Fix typo in comment. diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/macro-def.h b/gcc/testsuite/gcc.target/aarch64/aapcs64/macro-def.h index 72a47067631..e681de607

Re: [PATCH] configure, d: Add support for bootstrapping the D front-end

2021-12-01 Thread Thomas Schwinge
Hi! On 2021-10-29T17:37:44-0400, Eric Gallager via Gcc-patches wrote: > On Thu, Oct 28, 2021 at 2:38 PM Jeff Law via Gcc-patches > wrote: >> On 10/9/2021 7:32 AM, Iain Buclaw via Gcc-patches wrote: >> > The implementation of the D front-end in GCC is based on the original >> > C++ version of th

Re: [PATCH] Allow loop crossing paths in back threader copier.

2021-12-01 Thread Richard Biener via Gcc-patches
On Tue, Nov 30, 2021 at 4:48 PM Aldy Hernandez via Gcc-patches wrote: > > We are currently restricting loop crossing paths in the generic copier > used by the back threader, but we should be able to handle them after > loop_done has completed. But this isn't a cost thing but a correctness (as in,

Re: [PATCH] vect: Tighten check for SLP memory groups [PR103517]

2021-12-01 Thread Richard Biener via Gcc-patches
On Wed, Dec 1, 2021 at 2:25 PM Richard Sandiford wrote: > > Richard Biener via Gcc-patches writes: > > On Wed, Dec 1, 2021 at 11:56 AM Richard Sandiford via Gcc-patches > > wrote: > >> > >> When checking for compatible stmts, vect_build_slp_tree_1 did: > >> > >>&& !(STMT_VINFO_GR

Re: [PATCH] vect: Tighten check for SLP memory groups [PR103517]

2021-12-01 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Wed, Dec 1, 2021 at 11:56 AM Richard Sandiford via Gcc-patches > wrote: >> >> When checking for compatible stmts, vect_build_slp_tree_1 did: >> >>&& !(STMT_VINFO_GROUPED_ACCESS (stmt_info) >> && (first_stmt_code == AR

Re: [PATCH] fix spelling of -linker-output-auto-nolto-rel

2021-12-01 Thread Richard Biener via Gcc-patches
On Wed, Dec 1, 2021 at 12:08 PM Rasmus Villemoes wrote: > > The transposition nolto -> notlo is confusing and it makes the long > name even harder to read than it already is - I kept reading it as > "not lo" until I realized it was a simply typo. > > Fixes: 5269b24605b1 (Silence warning in LTO mo

Re: [PATCH] vect: Tighten check for SLP memory groups [PR103517]

2021-12-01 Thread Richard Biener via Gcc-patches
On Wed, Dec 1, 2021 at 11:56 AM Richard Sandiford via Gcc-patches wrote: > > When checking for compatible stmts, vect_build_slp_tree_1 did: > >&& !(STMT_VINFO_GROUPED_ACCESS (stmt_info) > && (first_stmt_code == ARRAY_REF > || first_stmt_c

Re: [PATCH RFA (fold/symtab)] c++: constexpr, fold, weak redecl, fp/0 [PR103310]

2021-12-01 Thread Marek Polacek via Gcc-patches
On Tue, Nov 30, 2021 at 09:09:41PM -0500, Jason Merrill via Gcc-patches wrote: > For PR61825, honza changed tree_single_nonzero_warnv_p to prevent a later > declaration from marking a function as weak after we've determined that it > wasn't weak before. But we shouldn't do that for speculative fol

[PATCH] fix spelling of -linker-output-auto-nolto-rel

2021-12-01 Thread Rasmus Villemoes
The transposition nolto -> notlo is confusing and it makes the long name even harder to read than it already is - I kept reading it as "not lo" until I realized it was a simply typo. Fixes: 5269b24605b1 (Silence warning in LTO mode on VxWorks) lto-plugin/ * lto-plugin.c: Fix -linker-outpu

[committed] d: Update documentation of new D language options.

2021-12-01 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds documentation for the following new D options: - New switch that controls what code is generated on a contract failure (throw or abort). - New switch that controls mangling of D types in `extern(C++)` code, as well as setting the compile-time value of

[PATCH] vect: Tighten check for SLP memory groups [PR103517]

2021-12-01 Thread Richard Sandiford via Gcc-patches
When checking for compatible stmts, vect_build_slp_tree_1 did: && !(STMT_VINFO_GROUPED_ACCESS (stmt_info) && (first_stmt_code == ARRAY_REF || first_stmt_code == BIT_FIELD_REF || first_stmt_code == INDIRECT_REF

Re: [PATCH] Fix alignment of stack slots for overaligned types [PR103500]

2021-12-01 Thread Alex Coplan via Gcc-patches
On 30/11/2021 19:38, Florian Weimer wrote: > * Alex Coplan via Gcc-patches: > > > Bootstrapped and regtested on aarch64-linux-gnu, x86_64-linux-gnu, and > > arm-linux-gnueabihf: no regressions. > > > > I'd appreciate any feedback. Is it OK for trunk? > > Does this need an ABI warning? That's a g

[Ada] Fix incorrect fixed-point computation in expression function

2021-12-01 Thread Pierre-Marie de Rodat via Gcc-patches
This fixes a couple of issues pertaining to (ordinary) fixed-point types declared with a Small aspect whose value is not equal to the default one. The processing of this aspect is delayed until the freeze point of the type, which means that the Small_Value of the entity for the type does not have

[Ada] Tune whitespace of the bounded lists Aggregate aspect

2021-12-01 Thread Pierre-Marie de Rodat via Gcc-patches
Whitespace cleanup only. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-cbdlli.ads (List): Remove extra space in Aggregate aspect.diff --git a/gcc/ada/libgnat/a-cbdlli.ads b/gcc/ada/libgnat/a-cbdlli.ads --- a/gcc/ada/libgnat/a-cbdlli.ads +++ b/gcc/ada/libg

[Ada] Allow formal functions to have a default in the form of an expression function

2021-12-01 Thread Pierre-Marie de Rodat via Gcc-patches
As a language extension, the declaration of a generic formal function is allowed to have a default given by an expression in parentheses, where the expression is of the function's result type and can refer to formal parameters of the function (in direct analogy with expression functions). For exam

[Ada] Do not return freeze nodes for start of early call regions

2021-12-01 Thread Pierre-Marie de Rodat via Gcc-patches
This makes sure that the Early Call Region Processor in Sem_Elab does not return a region starting with a construct that is not suitable for being included into it, for example a freeze node. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_elab.adb (Previous_Suitable_Con

  1   2   >