Re: [PATCH] store-merging: Fix coalesce_immediate_stores [PR93820]

2020-02-26 Thread Richard Biener
On Wed, 26 Feb 2020, Jakub Jelinek wrote: > Hi! > > The following testcase is miscompiled in 8+. > The problem is that check_no_overlap has a special case for INTEGER_CST > marked stores (i.e. stores of constants), if both all currenly merged stores > and the one under consideration for merging w

Re: [RFC] Run store-merging pass once more before pass fre/pre

2020-02-26 Thread luoxhu
On 2020/2/18 17:57, Richard Biener wrote: > On Tue, 18 Feb 2020, Xionghu Luo wrote: > >> Store-merging pass should run twice, the reason is pass fre/pre will do >> some kind of optimizations to instructions by: >>1. Converting the load from address to load from function arguments >>(store_

Re: GLIBC libmvec status

2020-02-26 Thread Jakub Jelinek
On Tue, Feb 25, 2020 at 07:43:09PM -0600, Bill Schmidt wrote: > The reason that homogeneous aggregates matter (at least somewhat) is that > the ABI ^H^H^H^HAPI requires establishing a calling convention and a name- > mangling formula that includes the length of parameters and return values. > Since

Re: [PATCH] store-merging: Fix coalesce_immediate_stores [PR93820]

2020-02-26 Thread Jakub Jelinek
On Wed, Feb 26, 2020 at 09:09:11AM +0100, Richard Biener wrote: > > Note, as I said in the PR, for GCC11 we could consider performing some kind > > of cheap DSE during the store merging (perhaps guarded with flag_tree_dse). > > And another thing to consider is only consider as problematic non-merge

Re: [RFC] Run store-merging pass once more before pass fre/pre

2020-02-26 Thread Richard Biener
On Wed, 26 Feb 2020, luoxhu wrote: > On 2020/2/18 17:57, Richard Biener wrote: > > On Tue, 18 Feb 2020, Xionghu Luo wrote: > > > >> Store-merging pass should run twice, the reason is pass fre/pre will do > >> some kind of optimizations to instructions by: > >>1. Converting the load from addre

Re: [RFC] Run store-merging pass once more before pass fre/pre

2020-02-26 Thread Jakub Jelinek
On Wed, Feb 26, 2020 at 04:09:16PM +0800, luoxhu wrote: > Thanks Richard, not sure about my understanding and please correct if any. > > I tried Jukub's latest patch of "sccvn: Handle bitfields in push_partial_def". > Got to know fre pass checks the load instruction's vuse chain and do the > cons

Re: [RFC] Run store-merging pass once more before pass fre/pre

2020-02-26 Thread Richard Biener
On Wed, 26 Feb 2020, Richard Biener wrote: > On Wed, 26 Feb 2020, luoxhu wrote: > > > On 2020/2/18 17:57, Richard Biener wrote: > > > On Tue, 18 Feb 2020, Xionghu Luo wrote: > > > > > >> Store-merging pass should run twice, the reason is pass fre/pre will do > > >> some kind of optimizations to

Re: [RFC] Run store-merging pass once more before pass fre/pre

2020-02-26 Thread Andrew Pinski
On Wed, Feb 26, 2020 at 12:30 AM Richard Biener wrote: > > On Wed, 26 Feb 2020, luoxhu wrote: > > > On 2020/2/18 17:57, Richard Biener wrote: > > > On Tue, 18 Feb 2020, Xionghu Luo wrote: > > > > > >> Store-merging pass should run twice, the reason is pass fre/pre will do > > >> some kind of optim

[committed] testsuite: Add a -O2 -fgimple testcase next to the -O2 -fno-tree-dse one [PR93820]

2020-02-26 Thread Jakub Jelinek
Hi! Based on IRC discussions, I've added another test with __GIMPLE next to the one with -fno-tree-dse. 2020-02-26 Jakub Jelinek PR tree-optimization/93820 * gcc.dg/pr93820-2.c: New test. --- gcc/testsuite/gcc.dg/pr93820-2.c.jj 2020-02-26 10:50:18.796137652 +0100 +++ gcc/test

[PATCH] gimple-fold: Verify builtin prototype before folding [PR93927]

2020-02-26 Thread Jakub Jelinek
Hi! The following patch does the same check the tree-ssa-strlen.c pass does to punt on broken builtin redeclarations. I agree the ultimate fix is change the C FE, but don't feel I know that part of the FE good enough to know all the consequences and so it might be too risky for stage4. Bootstrapp

Re: [PATCH] gimple-fold: Verify builtin prototype before folding [PR93927]

2020-02-26 Thread Richard Biener
On Wed, 26 Feb 2020, Jakub Jelinek wrote: > Hi! > > The following patch does the same check the tree-ssa-strlen.c pass does > to punt on broken builtin redeclarations. > I agree the ultimate fix is change the C FE, but don't feel I know that part > of the FE good enough to know all the consequenc

middle-end: Fix wrong code caused by disagreemed between FRE and access path oracle [PR 92152]

2020-02-26 Thread Jan Hubicka
Hi, This patch solves problem caused by the disagreement between FRE and access path orracle. FRE is checking stores for equivalence based on their address, value and base+ref alias sets. Because ref alias set is not always the alias set of innermost type, but it may be one of refs in the access

Re: middle-end: Fix wrong code caused by disagreemed between FRE and access path oracle [PR 92152]

2020-02-26 Thread Richard Biener
On Wed, 26 Feb 2020, Jan Hubicka wrote: > Hi, > This patch solves problem caused by the disagreement between FRE and access > path orracle. > > FRE is checking stores for equivalence based on their address, value and > base+ref alias sets. Because ref alias set is not always the alias set of > i

[PATCH] optabs: Don't use scalar conversions for vectors [PR93843]

2020-02-26 Thread Richard Sandiford
In this PR we had a conversion between two integer vectors that both had scalar integer modes. We then tried to implement the conversion using the scalar optab for those modes, instead of doing the conversion elementwise. I wondered about letting through scalar modes for single-element vectors, b

[committed] analyzer: improvements to logging/dumping

2020-02-26 Thread David Malcolm
This patch adds various information to -fdump-analyzer and -fdump-analyzer-stderr to make it easier to track down problems with state explosions in the exploded_graph. It logs the number of unprocessed nodes in the worklist, for the case where the upper limit on exploded nodes is reached. It prin

Re: [PATCH] optabs: Don't use scalar conversions for vectors [PR93843]

2020-02-26 Thread Richard Biener
On Wed, Feb 26, 2020 at 12:43 PM Richard Sandiford wrote: > > In this PR we had a conversion between two integer vectors that > both had scalar integer modes. We then tried to implement the > conversion using the scalar optab for those modes, instead of > doing the conversion elementwise. > > I w

Re: middle-end: Fix wrong code caused by disagreemed between FRE and access path oracle [PR 92152]

2020-02-26 Thread Jan Hubicka
> > Bootstrapped/regtested x86_64-linux, OK? > > OK and thanks for the elaborate write-up and comments in the code ;) Unforutnately our discussion on IRC let me construct another wrong code testcase based on mixing up base alias sets union U { long long i; long f; }; struct a {union U u;}; struc

Re: [PATCH] optabs: Don't use scalar conversions for vectors [PR93843]

2020-02-26 Thread Jakub Jelinek
On Wed, Feb 26, 2020 at 11:43:10AM +, Richard Sandiford wrote: > In this PR we had a conversion between two integer vectors that > both had scalar integer modes. We then tried to implement the > conversion using the scalar optab for those modes, instead of > doing the conversion elementwise. >

Re: GLIBC libmvec status

2020-02-26 Thread Tulio Magno Quites Machado Filho
Jakub Jelinek writes: > Can you please explain how do you want to pass the > void sincos (double, double *, double *); > arguments? I must say it isn't entirely clear from the document. > You talk there about double[2], but sincos certainly doesn't have such an > argument. The plan [1] is to re

[PATCH] libstdc++: Fix use of inaccessible private member in split_view (PR93936)

2020-02-26 Thread Patrick Palka
We are calling _OuterIter::__current from _InnerIter::operator==, but the former is private within this non-member friend. Fix this by calling _OuterIter::operator== instead, which does the right thing here. libstdc++-v3/ChangeLog: PR libstdc++/93936 * include/std/ranges (split_v

[PATCH] coroutines: Amend parameter handling to match n4849.

2020-02-26 Thread Iain Sandoe
This is the second in the series to bring the GCC implementation into line with the current standard. @JunMa I believe that this should solve the problems you were looking at in “[PATCH Coroutines] Fix issue with unused corutine function parameters” and supercedes that patch (since we needed

Re: GLIBC libmvec status

2020-02-26 Thread Jakub Jelinek
On Wed, Feb 26, 2020 at 10:32:17AM -0300, Tulio Magno Quites Machado Filho wrote: > Jakub Jelinek writes: > > > Can you please explain how do you want to pass the > > void sincos (double, double *, double *); > > arguments? I must say it isn't entirely clear from the document. > > You talk ther

Re: GLIBC libmvec status

2020-02-26 Thread Richard Biener
On Wed, Feb 26, 2020 at 2:46 PM Jakub Jelinek wrote: > > On Wed, Feb 26, 2020 at 10:32:17AM -0300, Tulio Magno Quites Machado Filho > wrote: > > Jakub Jelinek writes: > > > > > Can you please explain how do you want to pass the > > > void sincos (double, double *, double *); > > > arguments? I

[PATCH] dump load permutations and refcount per SLP node

2020-02-26 Thread Richard Biener
This adjusts dumping as proved useful in debugging. Bootstrapped / tested on x86_64-unknown-linux-gnu, applied. Richard. 2020-02-26 Richard Biener * tree-vect-slp.c (vect_print_slp_tree): Also dump ref count and load permutation. --- gcc/tree-vect-slp.c | 13 ++--- 1

Re: GLIBC libmvec status

2020-02-26 Thread Bill Schmidt
On 2/26/20 2:18 AM, Jakub Jelinek wrote: On Tue, Feb 25, 2020 at 07:43:09PM -0600, Bill Schmidt wrote: The reason that homogeneous aggregates matter (at least somewhat) is that the ABI ^H^H^H^HAPI requires establishing a calling convention and a name- mangling formula that includes the length of

Re: [PATCH] coroutines: Amend parameter handling to match n4849.

2020-02-26 Thread Nathan Sidwell
On 2/26/20 8:43 AM, Iain Sandoe wrote: This is the second in the series to bring the GCC implementation into line with the current standard. 2020-02-26 Iain Sandoe * coroutines.cc (struct param_info): Keep track of params that are references, and cache the original type an

Re: [PATCH] libstdc++: Fix use of inaccessible private member in split_view (PR93936)

2020-02-26 Thread Jonathan Wakely
On 26/02/20 08:37 -0500, Patrick Palka wrote: We are calling _OuterIter::__current from _InnerIter::operator==, but the former is private within this non-member friend. Fix this by calling _OuterIter::operator== instead, which does the right thing here. libstdc++-v3/ChangeLog: PR libst

Re: [PATCH] libstdc++: P1645R1 constexpr for algorithms

2020-02-26 Thread Jonathan Wakely
On 25/02/20 15:36 -0500, Patrick Palka wrote: This adds constexpr to 11 algorithms defined in as per P1645R1. Tested on x86_64-pc-linux-gnu, OK to commit? libstdc++-v3/ChangeLog: P1645R1 constexpr for algorithms * include/bits/stl_numeric.h (iota, accumulate, inner_product,

Re: GLIBC libmvec status

2020-02-26 Thread Jakub Jelinek
On Wed, Feb 26, 2020 at 07:55:53AM -0600, Bill Schmidt wrote: > The hope is that we can create a vectorized version that returns values > in registers rather than the by-ref parameters, and add code to GCC to > copy things around correctly following the call. Ideally the signature of > the vectori

[PATCH 2/4] arc: Improve code gen for 64bit add/sub operations.

2020-02-26 Thread Claudiu Zissulescu
Early expand ADDDI3 and SUBDI3 for better code gen. gcc/ -xx-xx Claudiu Zissulescu * config/arc/arc.md (adddi3): Early expand the 64bit operation into 32bit ops. (subdi3): Likewise. (adddi3_i): Remove pattern. (subdi3_i): Likewise. --- gcc/config/ar

[PATCH 1/4] arc: Add length attribute to eh_return pattern.

2020-02-26 Thread Claudiu Zissulescu
Add length attribute to eh_return pattern. gcc/ -xx-xx Claudiu Zissulescu * config/arc/arc.md (eh_return): Add length info. --- gcc/config/arc/arc.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md index fb25aafb

[PATCH 4/4] arc: Update legitimate small data address.

2020-02-26 Thread Claudiu Zissulescu
All ARC's small data adressing is using address scaling feature of the load/store instructions (i.e., the address is made of a general pointer plus a shifted offset. The shift amount depends on the addressing mode). This patch is checking the offset of an address if it fits the scalled constraint.

[PATCH 3/4] arc: Use accl_operand predicate for fma instructions.

2020-02-26 Thread Claudiu Zissulescu
With the refurbish of ARC600' accumulator support, the mlo_operand doesn't reflect the proper low accumulator register for the newer ARCv2 accumulator register used by the fma instructions, replace it with accl_operand predicate. gcc/ -xx-xx Claudiu Zissulescu * config/arc/arc.md (

Re: patch to fix PR93564

2020-02-26 Thread Andrew Stubbs
On 23/02/2020 21:25, Vladimir Makarov wrote: The following patch is for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93564 The patch was successfully bootstrapped on x86-64 and benchmarked on SPEC2000. Since this patch I get an ICE with checking enabled, for amdgcn-amdhsa: during RTL pa

[committed] libstdc++: Add __maybe_const_t and __maybe_empty_t aliases

2020-02-26 Thread Jonathan Wakely
This introduces a couple of convenience alias templates to be used for some repeated patterns using std::conditional_t. * include/std/ranges (__detail::__maybe_empty_t): Define new helper alias. (__detail::__maybe_const_t): Likewise. (__adaptor::_RangeAdaptor): Use

[committed] libstdc++: Two simplifications for lexicographical_compare

2020-02-26 Thread Jonathan Wakely
* include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare variables in smaller scope and avoid calling ranges::distance when we know they are pointers. Remove statically-unreachable use of __builtin_unreachable(). * include/bits/stl_algobase.h (__l

Re: [PATCH] libstdc++: P1645R1 constexpr for algorithms

2020-02-26 Thread Patrick Palka
On Wed, 26 Feb 2020, Jonathan Wakely wrote: > On 25/02/20 15:36 -0500, Patrick Palka wrote: > > This adds constexpr to 11 algorithms defined in as per P1645R1. > > > > Tested on x86_64-pc-linux-gnu, OK to commit? > > > > libstdc++-v3/ChangeLog: > > > > P1645R1 constexpr for algorithms > >

Re: middle-end: Fix wrong code caused by disagreemed between FRE and access path oracle [PR 92152]

2020-02-26 Thread Jan Hubicka
Hi, this is and TBAA stat for building cc1 with -flto-partition=none. From: Alias oracle query stats: refs_may_alias_p: 46099243 disambiguations, 55677716 queries ref_maybe_used_by_call_p: 124351 disambiguations, 46883813 queries call_may_clobber_ref_p: 12673 disambiguations, 17133 queries

Re: [PATCH] Add c++2a binary_semaphore

2020-02-26 Thread Jonathan Wakely
On 24/02/20 21:53 -0500, Thomas Rodgers wrote: +bool +_S_futex_wait_until(int* __addr, int __val, + bool __has_timeout = false, + std::chrono::seconds __s = std::chrono::seconds::zero(), + std::chrono::nanoseconds __ns = s

Re: [PATCH] libstdc++: Memoize {drop,drop_while,filter,reverse}_view::begin

2020-02-26 Thread Patrick Palka
On Tue, 11 Feb 2020, Patrick Palka wrote: > This patch adds memoization for these four views so that their begin() has the > required constant time amortized complexity. > > In the general case we use std::optional to cache the result. When the > underlying range is a random_access_range then we

Re: GLIBC libmvec status

2020-02-26 Thread Segher Boessenkool
Hi! On Tue, Feb 25, 2020 at 07:43:09PM -0600, Bill Schmidt wrote: > On 2/25/20 12:45 PM, Segher Boessenkool wrote: > >I don't agree we should have a new ABI, and an API (which this *is* as > >far as I can tell) works fine on *any* ABI. Homogeneous aggregates has > >nothing to do with anything eit

Re: [PATCH] rs6000: Fix broken gcc.target/powerpc/fold-vec-st-*.c test cases [PR93913]

2020-02-26 Thread Peter Bergner
On 2/25/20 4:25 PM, Segher Boessenkool wrote: > Well, you now get an extra mask instruction (rldicr for example) as well, > right? While that mask usually isn't needed. I believe the mask is implicit by the pattern used by the vec_st() builtin, which normally gets mapped to the Altivec stvx insn,

Re: [PATCH] rs6000: Fix broken gcc.target/powerpc/fold-vec-st-*.c test cases [PR93913]

2020-02-26 Thread Peter Bergner
On 2/26/20 11:29 AM, Peter Bergner wrote: >> You want >> {\m(stvx|stxv)\M} As we discussed offline, the regex above double counts everything, so I went with {\m(?:stvx|stxv|stxvx)\M} which you pointed me to. Pushed to master. I'll push to the gcc-9 branch tomorrow after Bill's regression script

Re: [committed] libstdc++: Add __maybe_const_t and __maybe_empty_t aliases

2020-02-26 Thread Daniel Krügler
Am Mi., 26. Feb. 2020 um 16:20 Uhr schrieb Jonathan Wakely : > > This introduces a couple of convenience alias templates to be used for > some repeated patterns using std::conditional_t. I find it a bit confusing/inconsistent to define __maybe_const_t such that the bool argument says "is const", w

Re: [PATCH v2] debug/93751 Option to generate DIEs for external variables - ping

2020-02-26 Thread Alexey Neyman
Patch ping. On 2/19/20 3:30 PM, Alexey Neyman wrote: Hi all, Attached is a patch adjusted per discussion in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93751 - The manual is corrected to reflect that DIEs for external variables are not generated when using DWARF - A new option is introduce

Re: [PATCH v2] debug/93751 Option to generate DIEs for external variables - ping

2020-02-26 Thread Jason Merrill
On 2/26/20 2:02 PM, Alexey Neyman wrote: Patch ping. On 2/19/20 3:30 PM, Alexey Neyman wrote: Hi all, Attached is a patch adjusted per discussion in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93751 - The manual is corrected to reflect that DIEs for external variables are not generated wh

Re: [PATCH v2] debug/93751 Option to generate DIEs for external variables - ping

2020-02-26 Thread Alexander Monakov
On Wed, 26 Feb 2020, Jason Merrill wrote: > Don't we want to fix the DWARF behavior to match the documentation? +1 - I think Alexey correctly pointed out in the Bugzilla that debuginfo growth from this change would be minimal (usually the number of global variables is very small compared to numbe

Re: [PATCH v2] debug/93751 Option to generate DIEs for external variables - ping

2020-02-26 Thread Richard Biener
On February 26, 2020 8:26:06 PM GMT+01:00, Alexander Monakov wrote: >On Wed, 26 Feb 2020, Jason Merrill wrote: > >> Don't we want to fix the DWARF behavior to match the documentation? > >+1 - I think Alexey correctly pointed out in the Bugzilla that >debuginfo >growth from this change would be mi

libgo: update to final Go1.14 release

2020-02-26 Thread Ian Lance Taylor
This patch updates libgo to the final Go1.14 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 0f9e2b205ccb34be93aafa2669c6c9b5a8c557ec diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 7dcb9ecb4fd..a62c8292e0a 100644 --- a/gcc/go/go

[PATCH] c++: Fix ICE with invalid array bounds [PR93789]

2020-02-26 Thread Marek Polacek
r7-2111 introduced maybe_constant_value in cp_fully_fold. maybe_constant_value uses cxx_eval_outermost_constant_expr, which can clear TREE_CONSTANT: 6510 else if (non_constant_p && TREE_CONSTANT (r)) [...] 6529 TREE_CONSTANT (r) = false; In this test the array size is '(long int) "h"'. Th

Re: work-around system header namespace pollution

2020-02-26 Thread Jeff Law
On Tue, 2020-02-25 at 17:45 -0300, Alexandre Oliva wrote: > Including limits.h on vxworks pollutes the global namespace with SH > and many other platform names; work around it. > > Tested on the affected platform. Ok to install? > > > for gcc/testsuite/ChangeLog > > * gcc.target/aarch64

Re: define NO_DOT_IN_LABEL only in vxworks6

2020-02-26 Thread Jeff Law
On Tue, 2020-02-25 at 17:47 -0300, Alexandre Oliva wrote: > There was a mistake in forward-porting and contributing some > vxworks7r2 changes, that caused a conditional to be dropped around a > couple of preprocessor directives, needed only up to vxworks6, that > change the compiler's behavior WRT

Re: structurally compare type_arg_packs [93933]

2020-02-26 Thread Jason Merrill
On 2/25/20 4:09 PM, Nathan Sidwell wrote: We consider all TYPE_ARGUMENT_PACKS distinct types, leading to problems with redeclarations. This patch fixes things by: a) marking all such types for structural comparison b) teaching structural_comptypes how to compare them. 1) It appears that NONTY

Re: [PATCH] use pointer size rather than array size when storing the former (PR 93829)

2020-02-26 Thread Jeff Law
On Wed, 2020-02-19 at 17:26 -0700, Martin Sebor wrote: > The buffer overflow detection for multi-char stores uses the size > of a source array even when what's actually being accessed (read > and stored) is a pointer to the array. That leads to incorrect > warnings in some cases. > > The attached

GCC 8.4 Status Report (2020-02-26)

2020-02-26 Thread Jakub Jelinek
Status == The GCC 8 branch is now frozen for blocking regressions and documentation fixes only, all changes to the branch require a RM approval now. Quality Data Priority # Change from last report --- --- P10 -

[PATCH], PR target/93932, Do not use input_operand for variable vector extract insns on PowerPC

2020-02-26 Thread Michael Meissner
As part of improving the vector extract built-ins for the future processor, and also looking at optimizing all of the cases with vector extracts and sign, zero, float extension for GCC 11 (PR target/93230), I noticed that the code generated for some of the tests had regressed from the GCC 8 time fr

[PATCH] maintainer-scripts: Speed up git clone in gcc_release

2020-02-26 Thread Jakub Jelinek
Hi! When doing the 8.4-rc1, I've noticed (probably also because of the dying disk on sourceware) that git clone is extremely slow, and furthermore when all of us have some local snapshots, it is a waste of resources to download everything again. Especially for the -f runs when we'll need to wait

Re: [PATCH 01/10] i386: Properly encode vector registers in vector move

2020-02-26 Thread Jeff Law
On Sat, 2020-02-15 at 07:26 -0800, H.J. Lu wrote: > On x86, when AVX and AVX512 are enabled, vector move instructions can > be encoded with either 2-byte/3-byte VEX (AVX) or 4-byte EVEX (AVX512): > >0: c5 f9 6f d1 vmovdqa %xmm1,%xmm2 >4: 62 f1 fd 08 6f d1 vmovdqa64 %xmm1,

[PATCH] handle attribute format on functions without prototype (PR 93812)

2020-02-26 Thread Martin Sebor
GCC accepts attribute format even on functions without a prototype. However, when such a function is subsequently redeclared with a prototype the attribute validation runs into trouble. To avoid the ICE I considered a) dropping the attribute on functions declared without a prototype (like Clang d

Re: [PATCH] c++: Fix ICE with invalid array bounds [PR93789]

2020-02-26 Thread Jason Merrill
On 2/26/20 3:44 PM, Marek Polacek wrote: r7-2111 introduced maybe_constant_value in cp_fully_fold. maybe_constant_value uses cxx_eval_outermost_constant_expr, which can clear TREE_CONSTANT: 6510 else if (non_constant_p && TREE_CONSTANT (r)) [...] 6529 TREE_CONSTANT (r) = false; In this t

Re: [PATCH] use pointer size rather than array size when storing the former (PR 93829)

2020-02-26 Thread Martin Sebor
On 2/26/20 3:09 PM, Jeff Law wrote: On Wed, 2020-02-19 at 17:26 -0700, Martin Sebor wrote: The buffer overflow detection for multi-char stores uses the size of a source array even when what's actually being accessed (read and stored) is a pointer to the array. That leads to incorrect warnings i

Re: [committed] libstdc++: Add __maybe_const_t and __maybe_empty_t aliases

2020-02-26 Thread Jonathan Wakely
On Wed, 26 Feb 2020 at 18:31, Daniel Krügler wrote: > > Am Mi., 26. Feb. 2020 um 16:20 Uhr schrieb Jonathan Wakely > : > > > > This introduces a couple of convenience alias templates to be used for > > some repeated patterns using std::conditional_t. > > I find it a bit confusing/inconsistent to d

Re: [PATCH 01/10] i386: Properly encode vector registers in vector move

2020-02-26 Thread H.J. Lu
On Wed, Feb 26, 2020 at 2:42 PM Jeff Law wrote: > > On Sat, 2020-02-15 at 07:26 -0800, H.J. Lu wrote: > > On x86, when AVX and AVX512 are enabled, vector move instructions can > > be encoded with either 2-byte/3-byte VEX (AVX) or 4-byte EVEX (AVX512): > > > >0: c5 f9 6f d1 vmovdqa

Re: [PATCH 01/10] i386: Properly encode vector registers in vector move

2020-02-26 Thread Jeff Law
On Wed, 2020-02-26 at 16:02 -0800, H.J. Lu wrote: > On Wed, Feb 26, 2020 at 2:42 PM Jeff Law wrote: > > On Sat, 2020-02-15 at 07:26 -0800, H.J. Lu wrote: > > > On x86, when AVX and AVX512 are enabled, vector move instructions can > > > be encoded with either 2-byte/3-byte VEX (AVX) or 4-byte EVEX

Re: [PATCH] c++: Fix ICE with invalid array bounds [PR93789]

2020-02-26 Thread Martin Sebor
On 2/26/20 1:44 PM, Marek Polacek wrote: r7-2111 introduced maybe_constant_value in cp_fully_fold. maybe_constant_value uses cxx_eval_outermost_constant_expr, which can clear TREE_CONSTANT: 6510 else if (non_constant_p && TREE_CONSTANT (r)) [...] 6529 TREE_CONSTANT (r) = false; In this t

Re: [PATCH] maintainer-scripts: Speed up git clone in gcc_release

2020-02-26 Thread Joseph Myers
On Wed, 26 Feb 2020, Jakub Jelinek wrote: > Hi! > > When doing the 8.4-rc1, I've noticed (probably also because of the dying > disk on sourceware) that git clone is extremely slow, and furthermore when > all of us have some local snapshots, it is a waste of resources to download > everything agai

[committed] analyzer: fix ICE on unreachable calls [PR 93947]

2020-02-26 Thread David Malcolm
PR analyzer/93947 reports an ICE at -O1 when attempting to analyze a call that has been optimized away as unreachable. The root cause is a NULL dereference due to the fndecl having a NULL cgraph_node: the cgraph_node was created by pass_build_cgraph_edges::execute, but was later removed by symbol_

[committed] analyzer: fix ICE with -Wanalyzer-null-dereference [PR 93950]

2020-02-26 Thread David Malcolm
PR analyzer/93950 reports an ICE when pruning the path of a -Wanalyzer-null-dereference diagnostic. The root cause is a bug in the state-tracking code, in which the variable of interest is tracked from the callee to a "nullptr" param at the caller, whereupon we have an INTEGER_CST "variable", and

Re: [PATCH] coroutines: Amend parameter handling to match n4849.

2020-02-26 Thread JunMa
在 2020/2/26 下午9:43, Iain Sandoe 写道: This is the second in the series to bring the GCC implementation into line with the current standard. @JunMa I believe that this should solve the problems you were looking at in “[PATCH Coroutines] Fix issue with unused corutine function parameters” and

Re: [PATCH] c++: Fix ICE with invalid array bounds [PR93789]

2020-02-26 Thread Marek Polacek
On Wed, Feb 26, 2020 at 06:01:30PM -0700, Martin Sebor wrote: > On 2/26/20 1:44 PM, Marek Polacek wrote: > > r7-2111 introduced maybe_constant_value in cp_fully_fold. > > maybe_constant_value uses cxx_eval_outermost_constant_expr, which > > can clear TREE_CONSTANT: > > 6510 else if (non_constant_

Re: [PING PATCH coroutines v1] Build co_await/yield_expr with unknown_type in processing_template_decl phase

2020-02-26 Thread JunMa
在 2020/2/10 下午7:42, JunMa 写道: Ping~ Regards JunMa Kindly ping. Regards JunMa 在 2020/2/5 下午5:17, JunMa 写道: 在 2020/2/5 下午2:14, JunMa 写道: Hi This patch builds co_await/yield_expr with unknown_type when we can not know the promise type in processing_template_decl phase. it avoid to confuse compi

Re: [PING PATCH coroutines] Set side effects flag for BIND_EXPR which build in maybe_promote_captured_temps

2020-02-26 Thread JunMa
在 2020/2/11 上午10:50, JunMa 写道: Hi kindly ping~ Regards JunMa Hi As title. in maybe_promote_captured_temps, we promote captured temporaries and co_await_expr into a new BIND_EXPR. As the BIND_EXPR contains co_await_expr and maybe other function calls, the side effects flag should be set. Thi

Re: [PING PATCH coroutines] Do not strip cleanup_point when promote temporaries out of current stmt

2020-02-26 Thread JunMa
在 2020/2/11 上午10:14, JunMa 写道: Kindly ping Regards JunMa Hi In maybe_promote_captured_temps, the cleanup_point_stmt has been stripped when handle temporaries captured by reference. However, maybe there are non-reference temporaries in current stmt which cause ice in gimpilify pass. This patch f

Re: [PING PATCH coroutines] Handle component_ref in captures_temporary

2020-02-26 Thread JunMa
在 2020/2/12 下午3:23, JunMa 写道: Kindly ping Regards JunMa Hi In captures_temporary, the current implementation fails to handle component_ref. This causes ice with case co_await A while operator co_await is defined in base class of A. Also it is necessary to capture the object of base class as if i

Re: [PATCH v2] c++: Fix ICE with invalid array bounds [PR93789]

2020-02-26 Thread Marek Polacek
On Wed, Feb 26, 2020 at 05:54:03PM -0500, Jason Merrill wrote: > On 2/26/20 3:44 PM, Marek Polacek wrote: > > r7-2111 introduced maybe_constant_value in cp_fully_fold. > > maybe_constant_value uses cxx_eval_outermost_constant_expr, which > > can clear TREE_CONSTANT: > > 6510 else if (non_constant

Re: [PATCH v2] c++: Fix ICE with invalid array bounds [PR93789]

2020-02-26 Thread Jason Merrill
On 2/26/20 9:31 PM, Marek Polacek wrote: On Wed, Feb 26, 2020 at 05:54:03PM -0500, Jason Merrill wrote: On 2/26/20 3:44 PM, Marek Polacek wrote: r7-2111 introduced maybe_constant_value in cp_fully_fold. maybe_constant_value uses cxx_eval_outermost_constant_expr, which can clear TREE_CONSTANT: 6

Re: [PATCH v2] c++: Fix ICE with invalid array bounds [PR93789]

2020-02-26 Thread Marek Polacek
On Wed, Feb 26, 2020 at 09:41:14PM -0500, Jason Merrill wrote: > On 2/26/20 9:31 PM, Marek Polacek wrote: > > On Wed, Feb 26, 2020 at 05:54:03PM -0500, Jason Merrill wrote: > > > On 2/26/20 3:44 PM, Marek Polacek wrote: > > > > r7-2111 introduced maybe_constant_value in cp_fully_fold. > > > > maybe

[committed, docs] Document negative form of warning options enabled by default [PR90467]

2020-02-26 Thread Sandra Loosemore
I've checked in this patch to address PR90467, which complained "many warning options that are enabled by default are documented in the -Woption form, not -Wno-option". While I was in there I also found - the option summary lists, which are supposed to be (mostly) alphabetized, had gotten

Re: [mid-end] Add notes to dataflow insn info when re-emitting (PR92410)

2020-02-26 Thread Roman Zhuykov
Hi all! Does anybody considered backporting this? Given https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92410#c3 "Confirmed also with r247015 (GCC 7 branch point)." For example, we may apply it without an assertion in release branches. Roman 12.11.2019 12:11, Matthew Malcomson wrote: > In schedul