Re: [PATCH] c++: Fix ICE with unexpanded parameter pack [PR99844]

2021-04-07 Thread Jason Merrill via Gcc-patches
On 4/7/21 5:58 PM, Marek Polacek wrote: In explicit17.C, we weren't detecting an unexpanded parameter pack in explicit(bool), so we crashed on a TEMPLATE_PARM_INDEX in constexpr. I noticed the same is true for noexcept(), but only since my patch to implement delayed parsing of noexcept. Previou

fix a couple of typos (PR 99883)

2021-04-07 Thread Martin Sebor via Gcc-patches
The attached patch fixes a couple of typos. Not sure they qualify as regressions but it seems like a trivial fix worth making even now. I'll go ahead and commit it as obvious if no-one objects. Martin PR middle-end/99883 - A couple of minor misspellings gcc/c-family/ChangeLog: * c.opt (Wmism

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-04-07 Thread Kees Cook via Gcc-patches
On Wed, Mar 24, 2021 at 04:21:49PM -0500, Qing Zhao wrote: > This is the 2nd version of the patch for the new security feature for GCC. > > Could you please take a look at it and let me know any comments and issues. This behaves perfectly as far as I'm able to test in the Linux kernel! Thank you!

[PATCH] c++: Fix ICE with unexpanded parameter pack [PR99844]

2021-04-07 Thread Marek Polacek via Gcc-patches
In explicit17.C, we weren't detecting an unexpanded parameter pack in explicit(bool), so we crashed on a TEMPLATE_PARM_INDEX in constexpr. I noticed the same is true for noexcept(), but only since my patch to implement delayed parsing of noexcept. Previously, we would detect the unexpanded pack i

[pushed] c++: friend with redundant qualification [PR41723]

2021-04-07 Thread Jason Merrill via Gcc-patches
Different code paths were correctly choosing to look up D directly, since C is the current instantiation, but here we decided to try to make it a typename type, leading to confusion. Fixed by using dependent_scope_p as we do elsewhere. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/Change

[pushed] c++: base template friend [PR52625]

2021-04-07 Thread Jason Merrill via Gcc-patches
Here we were mistakenly treating the injected-class-name as a partial specialization. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: PR c++/52625 * pt.c (maybe_process_partial_specialization): Check DECL_SELF_REFERENCE_P. gcc/testsuite/ChangeLog:

[PATCH] c++: constrained CTAD for nested class template [PR97679]

2021-04-07 Thread Patrick Palka via Gcc-patches
In the testcase below, we're crashing during constraint checking of the implicitly generated deduction guides for the nested class template A::B because we never substitute the outer template arguments (for A) into the constraint, neither ahead of time nor as part of satisfaction. Ideally we'd lik

[PATCH v10] Practical improvement to libgcc complex divide

2021-04-07 Thread Patrick McGehearty via Gcc-patches
Changes in this version from Version 9: Replaced all uses of alloca with XALLOCAVEC in c_cpp_builtins() in c-cppbuiltin.c Did not replace alloca elsewhere in the same file. Fixed type of name_len. Fixed prototypes for abort & exit in new test programs. Fixed spelling errors and omitted words in c

[pushed] c++: using overloaded with local decl [PR92918]

2021-04-07 Thread Jason Merrill via Gcc-patches
The problem here was that the lookup for 'impl' when parsing the template only found the using-declaration, not the member function declaration. This happened because when trying to add the member function declaration, push_class_level_binding_1 saw that the current binding was a USING_DECL and th

Re: [PATCH] testsuite: Fix many UNRESOLVEDs for gcc.dg/vect

2021-04-07 Thread Richard Biener via Gcc-patches
On April 7, 2021 7:37:36 PM GMT+02:00, Richard Sandiford via Gcc-patches wrote: >It turns out that, on targets that use testglue, many gcc.dg/vect >scan-assembler tests became UNRESOLVED after the change to the dump >file naming scheme. > >The problem is that, when creating an executable, we norm

Re: RFC: Sphinx for GCC documentation

2021-04-07 Thread Joseph Myers
On Wed, 7 Apr 2021, Michael Matz wrote: > Random snippet for what I mean: the .texi contains: > > "The @code{access} attribute specifies that a function to whose > by-reference arguments the attribute applies accesses the referenced > object according to @var{access-mode}. The @var{access-mode

[PATCH] testsuite: Fix many UNRESOLVEDs for gcc.dg/vect

2021-04-07 Thread Richard Sandiford via Gcc-patches
It turns out that, on targets that use testglue, many gcc.dg/vect scan-assembler tests became UNRESOLVED after the change to the dump file naming scheme. The problem is that, when creating an executable, we normally name the dump file after both the executable and the source file name. However, as

[PATCH] tree-optimization/99912 - remove unnecessary CLOBBERs after DSE

2021-04-07 Thread Richard Biener
The PR shows that the default walking limit of DSE (256) can be insufficient for C++ code with large abstraction simply due to the fact of hundreds of unused aggregates that are just CLOBBERed. The remove_unused_locals phase has special code to deal with those but it is just invoked in very few pla

[PATCH] tree-optimization/99956 - improve loop interchange

2021-04-07 Thread Richard Biener
When we apply store motion and DSE manually to the bwaves kernel in gfortran.dg/pr81303.f loop interchange no longer happens because the perfect nest considered covers outer loops we cannot analyze strides for. The following compensates for this by shrinking the nest in this analysis which was alr

[PATCH] c++: Don't substitute into constraints on lambdas [PR99874]

2021-04-07 Thread Patrick Palka via Gcc-patches
We currently substitute through a lambda's constraints whenever we regenerate it via tsubst_lambda_expr. This is the wrong approach because it can lead to hard errors due to constraints being evaluated out of order (as in the testcase concepts-lambda17.C below), and because it doesn't mesh well wi

[committed] libstdc++: Fix filesystem::path construction from COW string [PR 99805]

2021-04-07 Thread Jonathan Wakely via Gcc-patches
Calling the non-const data() member on a COW string makes it "leaked", possibly resulting in reallocating the string to ensure a unique owner. The path::_M_split_cmpts() member parses its _M_pathname string using string_view objects and then calls _M_pathname.data() to find the offset of each stri

Re: RFC: Sphinx for GCC documentation

2021-04-07 Thread Michael Matz
Hello, On Wed, 7 Apr 2021, Martin Liška wrote: > > I like the output quite a bit, especially that things like option > > references are automagically linked to their documentation.  I spent > > just a bit of time looking through the HTML and PDF above and found > > a few minor issues.  I suspect

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-04-07 Thread Qing Zhao via Gcc-patches
Ping > On Mar 24, 2021, at 4:21 PM, Qing Zhao via Gcc-patches > wrote: > > Hi, > > This is the 2nd version of the patch for the new security feature for GCC. > > Could you please take a look at it and let me know any comments and issues. > > Thanks. > > Qing > > **compared to Version

Re: RFC: Sphinx for GCC documentation

2021-04-07 Thread Martin Liška
On 4/2/21 5:40 PM, Martin Sebor wrote: > On 4/1/21 7:30 AM, Martin Liška wrote: >> Hey. >> >> I've returned to the David's project and I'm willing to finish his >> transition effort. >> I believe using Sphinx documentation can rapidly improve readability, both >> HTML and PDF version, >> of vario

Re: RFC: Sphinx for GCC documentation

2021-04-07 Thread Martin Liška
On 4/1/21 4:31 PM, David Malcolm wrote: > I think some further tweaking of the conversion script is needed first; Sure, I've got a collection of patches and I'm planning to make pull requests. > I'd rather iron out the script rather than play whack-a-mole manually. > I enjoy proofreading conversi

Re: [PATCH] Improve rtx insn vec output

2021-04-07 Thread Richard Biener via Gcc-patches
On Wed, Apr 7, 2021 at 11:17 AM Xionghu Luo wrote: > > > On 2021/4/7 14:57, Richard Biener wrote: > > On Wed, Apr 7, 2021 at 7:42 AM Xionghu Luo wrote: > >> > >> print_rtl will dump the rtx_insn from current until LAST. But it is only > >> useful to see the particular insn that called by print_r

Aarch64 patch ping^2

2021-04-07 Thread Jakub Jelinek via Gcc-patches
On Mon, Mar 29, 2021 at 11:16:55AM +0200, Jakub Jelinek wrote: > > Looks good to me. Richard E knows this code better than I do though, > > so I think he should have the final say. He's currently on holiday > > but will be back next week. > > I'd like to ping this patch. Ping. > > > 2021-03-18

Re: vect: Don't split store groups if we have IFN_STORE_LANES [PR99873]

2021-04-07 Thread Richard Biener via Gcc-patches
On Wed, Apr 7, 2021 at 11:10 AM Richard Sandiford wrote: > > Richard Biener via Gcc-patches writes: > > On Tue, Apr 6, 2021 at 12:03 PM Richard Sandiford via Gcc-patches > > wrote: > >> > >> As noted in the PR, we were no longer using ST3 for the testcase and > >> instead stored each lane indivi

Re: [PATCH] varasm: Fix up constpool alias handling [PR99872]

2021-04-07 Thread Richard Biener
On Wed, 7 Apr 2021, Jakub Jelinek wrote: > Hi! > > Last year, I have added in r11-2944-g0106300f6c3f7bae5eb1c46dbd45aa07c94e1b15 > (aka PR54201 fix) code to find bitwise duplicates in constant pool and output > them as aliases instead of duplicating the data. > > Unfortunately this broke mingw32

[PATCH v2] arm: Various MVE vec_duplicate fixes [PR99647]

2021-04-07 Thread Alex Coplan via Gcc-patches
Hi, Here is a v2 of my previous attempt: https://gcc.gnu.org/pipermail/gcc-patches/2021-April/567724.html to fix this PR. --- This patch fixes various issues with vec_duplicate in the MVE patterns. Currently there are two patterns named *mve_mov. The second of these is really a vector duplicate

[PATCH][GCC12] tree-optimization/99912 - schedule DSE before SRA

2021-04-07 Thread Richard Biener
For the testcase in the PR the main SRA pass is unable to do some important scalarizations because dead stores of addresses make the candiate variables disqualified. The following patch adds another DSE pass before SRA forming a DCE/DSE pair and moves the DSE pass that is currently closely after S

[PATCH] tree-optimization/99954 - fix loop distribution memcpy classification

2021-04-07 Thread Richard Biener
This fixes bogus classification of a copy as memcpy. We cannot use plain dependence analysis to decide between memcpy and memmove when it computes no dependence. Instead we have to try harder later which the patch does for the gcc.dg/tree-ssa/ldist-24.c testcase by resorting to tree-affine to com

[PATCH] testsuite/99955 - fix may_alias declaration of vector

2021-04-07 Thread Richard Biener
This fixes the order of the type attributes to preserve may_alias for the vector type. Pushed. 2021-04-07 Richard Biener PR testsuite/99955 * gcc.c-torture/execute/pr92618.c: Move may_alias attributes last. --- gcc/testsuite/gcc.c-torture/execute/pr92618.c | 4 ++-- 1

RE: [PATCH] arm: Don't try and vmov labels [PR99647]

2021-04-07 Thread Kyrylo Tkachov via Gcc-patches
Hi Alex, > -Original Message- > From: Alex Coplan > Sent: 07 April 2021 09:56 > To: gcc-patches@gcc.gnu.org > Cc: ni...@redhat.com; Richard Earnshaw ; > Ramana Radhakrishnan ; Kyrylo > Tkachov > Subject: [PATCH] arm: Don't try and vmov labels [PR99647] > > Hi all, > > When investigatin

Re: [PATCH] arm: Don't try and vmov labels [PR99647]

2021-04-07 Thread Richard Sandiford via Gcc-patches
Alex Coplan via Gcc-patches writes: > Hi all, > > When investigating this PR, I was initially confused as to why we were > matching a vec_duplicate on the RHS of *mve_mov (since > general_operand does not match vec_duplicates). It turns out that there > are two patterns in mve.md named *mve_mov an

Re: [PATCH] Improve rtx insn vec output

2021-04-07 Thread Xionghu Luo via Gcc-patches
On 2021/4/7 14:57, Richard Biener wrote: On Wed, Apr 7, 2021 at 7:42 AM Xionghu Luo wrote: print_rtl will dump the rtx_insn from current until LAST. But it is only useful to see the particular insn that called by print_rtx_insn_vec, Let's call print_rtl_single to display that insn in the gc

Re: vect: Don't split store groups if we have IFN_STORE_LANES [PR99873]

2021-04-07 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Tue, Apr 6, 2021 at 12:03 PM Richard Sandiford via Gcc-patches > wrote: >> >> As noted in the PR, we were no longer using ST3 for the testcase and >> instead stored each lane individually. This is because we'd split >> the store group during SLP and co

[PATCH] arm: Don't try and vmov labels [PR99647]

2021-04-07 Thread Alex Coplan via Gcc-patches
Hi all, When investigating this PR, I was initially confused as to why we were matching a vec_duplicate on the RHS of *mve_mov (since general_operand does not match vec_duplicates). It turns out that there are two patterns in mve.md named *mve_mov and the second one matches vec_duplicates. I've re

[PATCH] tree-optimization/99947 - avoid v.safe_push (v[0])

2021-04-07 Thread Richard Biener
This avoids (again) the C++ pitfall of pushing a reference to sth being reallocated. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-04-07 Richard Biener PR tree-optimization/99947 * tree-vect-loop.c (vectorizable_induction): Pre-allocate steps vector

[PATCH] Add debug_vn_reference_ops helper

2021-04-07 Thread Richard Biener
This factors out a helper to dump VN reference operands, sth that proves useful in debugging VN issues. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-04-07 Richard Biener * tree-ssa-sccvn.h (print_vn_reference_ops): Declare. * tree-ssa-pre.c (print_pre_expr

[PATCH] varasm: Fix up constpool alias handling [PR99872]

2021-04-07 Thread Jakub Jelinek via Gcc-patches
Hi! Last year, I have added in r11-2944-g0106300f6c3f7bae5eb1c46dbd45aa07c94e1b15 (aka PR54201 fix) code to find bitwise duplicates in constant pool and output them as aliases instead of duplicating the data. Unfortunately this broke mingw32 -m32. On most targets, ASM_GENERATE_INTERNAL_LABEL with