Re: [PATCH][Middle-end]79538 missing -Wformat-overflow with %s and non-member array arguments

2017-12-14 Thread Richard Biener
On Wed, 13 Dec 2017, Qing Zhao wrote: > Hi, > > I updated gimple-fold.c as you suggested, bootstrapped and re-tested on both > x86 and aarch64. no any issue. > > > diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c > index 353a46e..eb6a87a 100644 > --- a/gcc/gimple-fold.c > +++ b/gcc/gimpl

[AARCH64] Neon vld1_*_x3, vst1_*_x2 and vst1_*_x3 intrinsics

2017-12-14 Thread Sameera Deshpande
Hi! Please find attached the patch implementing vld1_*_x3, vst1_*_x2 and vst1_*_x3 intrinsics as defined by Neon document. Ok for trunk? - Thanks and regards, Sameera D. gcc/Changelog: 2017-11-14 Sameera Deshpande * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.

[PATCH] Fix PR83418

2017-12-14 Thread Richard Biener
IVOPTs (at least) leaves unfolded stmts in the IL and VRP overzealously asserts they cannot happen. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2017-12-14 Richard Biener PR tree-optimization/83418 * vr-values.c (vr_values::extract_range_for_var_from_c

[PATCH][C] Fix PR83415

2017-12-14 Thread Richard Biener
The C FE fails to handle VIEW_CONVERT_EXPR properly when folding it in a lvalue context. Fixed as follows. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Will commit as obvious. Thanks, Richard. 2017-12-14 Richard Biener PR c/83415 c/ * c-fold.c (c_full

[PATCH] Fix gimple-ssa-sprintf.c ICE (PR tree-optimization/83198, take 2)

2017-12-14 Thread Jakub Jelinek
On Wed, Dec 13, 2017 at 03:55:13PM -0700, Martin Sebor wrote: > For the second part, can you please also add a compile-time test > to verify that the result isn't constrained to the same range as > with a real argument? Checking that the abort below isn't > eliminated would do it for %f: > > vo

Re: [PATCH] Fix Bug 83237 - Values returned by std::poisson_distribution are not distributed correctly

2017-12-14 Thread mpezz
If Luc's explicit green light will not arrive before it is decision time, Paolo's point 2- below is doable. Il 13.12.2017 12:51 Jonathan Wakely ha scritto: > On 12/12/17 21:37 +0100, Paolo Carlini wrote: > >> Hi, On 12/12/2017 19:42, Michele Pezzutti wrote: >> >>> Hi. Yes, I looked at the t

[PATCH] Fix PR83326

2017-12-14 Thread Richard Biener
After the previous fix of mine to no longer peel loops during cunrolli to avoid littering an outer loop with tons of loop exit tests and thus disabling vectorization there's a reported slowdown in the exchange benchmark. This is because we no longer fully unroll a loop with appearant constant ite

Re: [PATCH] Fix gimple-ssa-sprintf.c ICE (PR tree-optimization/83198)

2017-12-14 Thread Richard Biener
On Wed, 13 Dec 2017, Jakub Jelinek wrote: > Hi! > > This patch fixes 2 issues in format_floating. One is that when determining > precision, we should consider solely the type *printf* will read the > argument as (i.e. double unless L or ll modifier is used, in which case > long double), not the

Re: [PATCH] Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396#c28 on ia64 (PR bootstrap/83396, take 2)

2017-12-14 Thread Richard Biener
On Wed, 13 Dec 2017, Jakub Jelinek wrote: > On Wed, Dec 13, 2017 at 03:25:07PM +0100, Jakub Jelinek wrote: > > I think there are 2 issues. One is that the ia64 backend emits > > the group barrier insns before BB_HEAD label, so it isn't part of a bb, > > but has BLOCK_FOR_INSN of the following blo

Re: [PATCH] Fix gimple-ssa-sprintf.c ICE (PR tree-optimization/83198, take 2)

2017-12-14 Thread Richard Biener
On Thu, 14 Dec 2017, Jakub Jelinek wrote: > On Wed, Dec 13, 2017 at 03:55:13PM -0700, Martin Sebor wrote: > > For the second part, can you please also add a compile-time test > > to verify that the result isn't constrained to the same range as > > with a real argument? Checking that the abort bel

Re: [07/13] Make vec_perm_indices use new vector encoding

2017-12-14 Thread Richard Biener
On Tue, Dec 12, 2017 at 4:46 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Sun, Dec 10, 2017 at 12:20 AM, Richard Sandiford >> wrote: >>> This patch changes vec_perm_indices from a plain vec<> to a class >>> that stores a canonicalised permutation, using the same encoding >>> as fo

Re: [PATCH PR81228][AARCH64] Fix ICE by adding LTGT in vec_cmp

2017-12-14 Thread Sudakshina Das
Hi On 13/12/17 16:56, James Greenhalgh wrote: On Wed, Dec 13, 2017 at 04:45:33PM +, Sudi Das wrote: On 13/12/17 16:42, Sudakshina Das wrote: Hi This patch is a follow up to the existing discussions on https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01904.html Bin had earlier submitted a pat

Re: [PATCH] set range for strlen(array) to avoid spurious -Wstringop-overflow (PR 83373 , PR 78450)

2017-12-14 Thread Richard Biener
On Wed, Dec 13, 2017 at 4:47 AM, Martin Sebor wrote: > On 12/12/2017 05:35 PM, Jeff Law wrote: >> >> On 12/12/2017 01:15 PM, Martin Sebor wrote: >>> >>> Bug 83373 - False positive reported by -Wstringop-overflow, is >>> another example of warning triggered by a missed optimization >>> opportunity,

Re: [PATCH v2] vrp_prop: Use dom_walker for -Warray-bounds (PR tree-optimization/83312)

2017-12-14 Thread Richard Biener
On Wed, Dec 13, 2017 at 10:30 PM, David Malcolm wrote: > On Wed, 2017-12-13 at 10:47 -0700, Jeff Law wrote: >> On 12/13/2017 09:24 AM, Richard Biener wrote: >> > > >> > > Alternately we could to the dom_walker ctor that an initial state >> > > of >> > > EDGE_EXECUTABLE is already set. >> > >> > I'

Re: [PATCH][GCC][ARM] Fix fragile arm fpu attribute tests.

2017-12-14 Thread Tamar Christina
The 12/13/2017 08:49, Christophe Lyon wrote: > On 12 December 2017 at 18:29, Tamar Christina wrote: > > Hi All, > > > > The previous test made use of arm_neon.h which made the whole test > > rather fragile and only applicable to some of the arm targets. > > > > So instead I make use of different f

Re: Support for aliasing with variable strides

2017-12-14 Thread Richard Biener
On Fri, Nov 17, 2017 at 11:17 PM, Richard Sandiford wrote: > This patch adds runtime alias checks for loops with variable strides, > so that we can vectorise them even without a restrict qualifier. > There are several parts to doing this: > > 1) For accesses like: > > x[i * n] += 1; > >we

Re: [SFN] Bootstrap broken

2017-12-14 Thread Alexandre Oliva
Jakub, I summed up to you yesterday on IRC what I expand below; this is just for the public record. On Dec 13, 2017, Jakub Jelinek wrote: > Furthermore, I must say I don't understand why > can_move_early_debug_stmts should care whether there are any labels in > dest bb or not. An earlier attemp

Re: [C++ Patch PING] [C++ Patch] PR 82235 (Copy ctor is not found for copying array of an object when it's marked explicit)

2017-12-14 Thread Paolo Carlini
Hi Jason, On 13/12/2017 23:27, Jason Merrill wrote: These two don't match: +   When initializing a temporary to be bound to the first +   parameter of a constructor where the parameter is of type +/* Return true if current_function_decl is a constructor +   and its first argument is a refer

Re: [SFN] Bootstrap broken

2017-12-14 Thread Alexandre Oliva
On Dec 13, 2017, Jakub Jelinek wrote: > In particular, this testcase is using selective scheduling, therefore > we turn off -fvar-tracking-assignments, but the debug stmt markers are > emitted anyway. *nod*, that much was intended (though I could be convinced to change it ;-) > -fvar-tracking i

Re: Add an "early rematerialisation" pass

2017-12-14 Thread Richard Biener
On Fri, Nov 17, 2017 at 4:58 PM, Richard Sandiford wrote: > This patch looks for pseudo registers that are live across a call > and for which no call-preserved hard registers exist. It then > recomputes the pseudos as necessary to ensure that they are no > longer live across a call. The comment

Re: [PATCH] PR libstdc++/59568 fix error handling for std::complex stream extraction

2017-12-14 Thread Jonathan Wakely
On 13/12/17 18:42 +, Jonathan Wakely wrote: The bug here is that we called putback even if the initial __is >> __ch extraction failed and set eofbit, and putback clears the eofbit. I found a number of other problems though, such as not even trying to call putback after failing to find the ','

[Ada] Fix discrepancy in annotated vs computed sizes

2017-12-14 Thread Eric Botcazou
This fixes the discrepancy present in annotated vs computed sizes for objects either directly subject to an alignment clause or of a type itself subject to an alignment clause. In the former case, the annotated size can be wrong whereas the computed size can be wrong in the latter case. Tested

Re: [PATCH] PR libstdc++/59568 fix error handling for std::complex stream extraction

2017-12-14 Thread Jonathan Wakely
On 14/12/17 11:28 +, Jonathan Wakely wrote: On 13/12/17 18:42 +, Jonathan Wakely wrote: The bug here is that we called putback even if the initial __is >> __ch extraction failed and set eofbit, and putback clears the eofbit. I found a number of other problems though, such as not even try

Re: [SFN+LVU+IEPM v4 1/9] [SFN] adjust RTL insn-walking API

2017-12-14 Thread Alexandre Oliva
On Dec 12, 2017, Alexandre Oliva wrote: > On Dec 7, 2017, Jeff Law wrote: >> On 11/09/2017 07:34 PM, Alexandre Oliva wrote: >>> (prev_nonnote_insn_bb, next_nonnote_insn_bb): Remove. > Thanks, FTR, here it is, as installed: On Aug 31, 2017, Alexandre Oliva wrote: > (prev_nonnote_insn_bb

Re: [SFN+LVU+IEPM v4 1/9] [SFN] adjust RTL insn-walking API

2017-12-14 Thread Jakub Jelinek
On Thu, Dec 14, 2017 at 09:55:30AM -0200, Alexandre Oliva wrote: > for gcc/ChangeLog > > PR bootstrap/83396 > * config/arc/arc.c (hwloop_optimize): Skip debug insns. > * config/sh/sh-protos.h (sh_find_set_of_reg): Adjust. > * config/sh/sh.c: Skip debug insns besides notes.

RE: [compare-debug] use call loc for nop_endbr

2017-12-14 Thread Tsimbalist, Igor V
> -Original Message- > From: Alexandre Oliva [mailto:aol...@redhat.com] > Sent: Wednesday, December 13, 2017 8:34 AM > To: gcc-patches@gcc.gnu.org > Cc: Tsimbalist, Igor V > Subject: [compare-debug] use call loc for nop_endbr > > We skip debug insns and notes after a call that needs a nop

Re: [PATCH GCC]More conservative interchanging small loops with const initialized simple reduction

2017-12-14 Thread Richard Biener
On Tue, Dec 12, 2017 at 1:42 PM, Bin.Cheng wrote: > On Fri, Dec 8, 2017 at 2:40 PM, Richard Biener > wrote: >> On Fri, Dec 8, 2017 at 1:43 PM, Bin.Cheng wrote: >>> On Fri, Dec 8, 2017 at 12:17 PM, Richard Biener >>> wrote: On Fri, Dec 8, 2017 at 12:46 PM, Bin Cheng wrote: > Hi, >

[testsuite] Require effective target weak_undefined for visibility-22.c

2017-12-14 Thread Tom de Vries
Hi, this patch introduces an effective target weak_undefined, and uses it in test-case visibility-22.c. I've tested this on trunk for x86_64, and the test still runs and passes. I've tested this on an internal branch for the gcn target, where it makes the test unsupported (instead of timing

Re: [testsuite] Require effective target weak_undefined for visibility-22.c

2017-12-14 Thread Jakub Jelinek
On Thu, Dec 14, 2017 at 02:40:12PM +0100, Tom de Vries wrote: > --- a/gcc/testsuite/gcc.dg/visibility-22.c > +++ b/gcc/testsuite/gcc.dg/visibility-22.c > @@ -1,6 +1,7 @@ > /* PR target/32219 */ > /* { dg-do run } */ > /* { dg-require-visibility "" } */ > +/* { dg-require-effective-target weak_un

Re: [testsuite] Require effective target weak_undefined for visibility-22.c

2017-12-14 Thread Tom de Vries
On 12/14/2017 02:47 PM, Jakub Jelinek wrote: On Thu, Dec 14, 2017 at 02:40:12PM +0100, Tom de Vries wrote: --- a/gcc/testsuite/gcc.dg/visibility-22.c +++ b/gcc/testsuite/gcc.dg/visibility-22.c @@ -1,6 +1,7 @@ /* PR target/32219 */ /* { dg-do run } */ /* { dg-require-visibility "" } */ +/*

Re: [testsuite] Require effective target weak_undefined for visibility-22.c

2017-12-14 Thread Jakub Jelinek
On Thu, Dec 14, 2017 at 03:09:02PM +0100, Tom de Vries wrote: > On 12/14/2017 02:47 PM, Jakub Jelinek wrote: > > On Thu, Dec 14, 2017 at 02:40:12PM +0100, Tom de Vries wrote: > > > --- a/gcc/testsuite/gcc.dg/visibility-22.c > > > +++ b/gcc/testsuite/gcc.dg/visibility-22.c > > > @@ -1,6 +1,7 @@ > >

Re: [testsuite] Require effective target weak_undefined for visibility-22.c

2017-12-14 Thread Rainer Orth
Hi Tom, > this patch introduces an effective target weak_undefined, and uses it in > test-case visibility-22.c. > > I've tested this on trunk for x86_64, and the test still runs and passes. > > I've tested this on an internal branch for the gcn target, where it makes > the test unsupported (instea

Re: [testsuite] Require effective target weak_undefined for visibility-22.c

2017-12-14 Thread Rainer Orth
Hi Jakub, > On Thu, Dec 14, 2017 at 03:09:02PM +0100, Tom de Vries wrote: >> On 12/14/2017 02:47 PM, Jakub Jelinek wrote: >> > On Thu, Dec 14, 2017 at 02:40:12PM +0100, Tom de Vries wrote: >> > > --- a/gcc/testsuite/gcc.dg/visibility-22.c >> > > +++ b/gcc/testsuite/gcc.dg/visibility-22.c >> > > @@

Re: [SFN] Bootstrap broken

2017-12-14 Thread Andreas Schwab
This fixes the m68k ICE. Andreas. PR bootstrap/83396 * reload1.c (emit_input_reload_insns): Skip debug markers. --- gcc/reload1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/reload1.c b/gcc/reload1.c index fe1ec0d011..baedc43b75 100644 --- a/gcc/r

Re: [SFN] Bootstrap broken

2017-12-14 Thread Jakub Jelinek
On Thu, Dec 14, 2017 at 03:41:24PM +0100, Andreas Schwab wrote: > This fixes the m68k ICE. > > Andreas. > > PR bootstrap/83396 > * reload1.c (emit_input_reload_insns): Skip debug markers. This is ok for trunk, thanks. > --- a/gcc/reload1.c > +++ b/gcc/reload1.c > @@ -7345,12 +7345,1

[PATCH] Fix PR67842

2017-12-14 Thread Richard Biener
The PR says just remove the #if 0 code. Done below, committed as obvious. Richard. 2017-12-14 Richard Biener PR tree-optimization/67842 * sese.h (bb_in_region): Remove #if 0'ed code. Index: gcc/sese.h === --- g

[PATCH] Testcase for fixed PR65258

2017-12-14 Thread Richard Biener
Committed. Richard. 2017-12-14 Richard Biener PR tree-optimization/65258 * gcc.dg/Warray-bounds-23.c: New testcase. Index: gcc/testsuite/gcc.dg/Warray-bounds-23.c === --- gcc/testsuite/gcc.dg/Warray-bounds-23.c

Re: [testsuite] Require effective target weak_undefined for visibility-22.c

2017-12-14 Thread Tom de Vries
On 12/14/2017 03:18 PM, Rainer Orth wrote: Hi Jakub, On Thu, Dec 14, 2017 at 03:09:02PM +0100, Tom de Vries wrote: On 12/14/2017 02:47 PM, Jakub Jelinek wrote: On Thu, Dec 14, 2017 at 02:40:12PM +0100, Tom de Vries wrote: --- a/gcc/testsuite/gcc.dg/visibility-22.c +++ b/gcc/testsuite/gcc.dg/

[PATCH] Testcase for PR66974

2017-12-14 Thread Richard Biener
Committed. 2017-12-14 Richard Biener PR tree-optimization/66974 * gcc.dg/Warray-bounds-24.c: New testcase. Index: gcc/testsuite/gcc.dg/Warray-bounds-24.c === --- gcc/testsuite/gcc.dg/Warray-bounds-24.c (nonex

[committed] Testcase for PR lto/81406

2017-12-14 Thread Jakub Jelinek
Hi! This got fixed by r251220. Testcase tested on x86_64-linux, trunk as well as r251218 (where it FAILs), committed to trunk as obvious. 2017-12-14 Jakub Jelinek PR lto/81406 * gcc.dg/lto/pr81406_0.c: New test. --- gcc/testsuite/gcc.dg/lto/pr81406_0.c.jj 2017-12-14 16:2

Re: [PATCH] Fix PR83418

2017-12-14 Thread Jeff Law
On 12/14/2017 01:54 AM, Richard Biener wrote: > > IVOPTs (at least) leaves unfolded stmts in the IL and VRP overzealously > asserts they cannot happen. > > Bootstrap and regtest running on x86_64-unknown-linux-gnu. > > Richard. > > 2017-12-14 Richard Biener > > PR tree-optimization/83

[PATCH][arm] Add -mverbose-cost-dump and de-verbosify cost dumps

2017-12-14 Thread Kyrill Tkachov
Hi all, This patch adds an -mverbose-cost-dump option, similar to the one in aarch64. It makes the RTX cost dump print the RTX we're costing in the backend, as well as its cost. This can be distracting in other cost-related RTL dumps like combine's. So now we don't dump the backend informatio

Re: Add an "early rematerialisation" pass

2017-12-14 Thread Jeff Law
On 12/14/2017 04:09 AM, Richard Biener wrote: > On Fri, Nov 17, 2017 at 4:58 PM, Richard Sandiford > wrote: >> This patch looks for pseudo registers that are live across a call >> and for which no call-preserved hard registers exist. It then >> recomputes the pseudos as necessary to ensure that t

Re: [PATCH] set range for strlen(array) to avoid spurious -Wstringop-overflow (PR 83373 , PR 78450)

2017-12-14 Thread Martin Sebor
On 12/14/2017 03:43 AM, Richard Biener wrote: On Wed, Dec 13, 2017 at 4:47 AM, Martin Sebor wrote: On 12/12/2017 05:35 PM, Jeff Law wrote: On 12/12/2017 01:15 PM, Martin Sebor wrote: Bug 83373 - False positive reported by -Wstringop-overflow, is another example of warning triggered by a mis

[PATCH][ARM][gcc-7] Fix regression on soft float targets for armv8_2-fp16-move-2.c

2017-12-14 Thread Sudakshina Das
Hi This patch is a follow up on my previous patch with r255536 that was a back-port for fixing a wrong code generation (https://gcc.gnu.org/ml/gcc-patches/2017-11/msg02209.html). As pointed out by Christophe Lyon (https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00718.html) the test case started

Re: [PATCH] set range for strlen(array) to avoid spurious -Wstringop-overflow (PR 83373 , PR 78450)

2017-12-14 Thread Jeff Law
On 12/12/2017 08:47 PM, Martin Sebor wrote: >> >> struct fu { >>   char x1[10]; >>   char x2[10]; >>   int avoid_trailing_array; >> } >> >> Where objects stored in x1 are not null terminated.  Are we in the realm >> of undefined behavior at that point (I hope so)? > > Yes, this is undefined.  Poin

Re: [PATCH] set range for strlen(array) to avoid spurious -Wstringop-overflow (PR 83373 , PR 78450)

2017-12-14 Thread Jakub Jelinek
On Thu, Dec 14, 2017 at 09:13:21AM -0700, Jeff Law wrote: > > Although I would prefer not to, I suppose if letting strlen cross > > the boundaries of subobjects was considered an important use to > > accommodate in limited cases the optimization could be disabled > > for member arrays declared with

Re: [AARCH64] Neon vld1_*_x3, vst1_*_x2 and vst1_*_x3 intrinsics

2017-12-14 Thread Christophe Lyon
2017-12-14 9:29 GMT+01:00 Sameera Deshpande : > Hi! > > Please find attached the patch implementing vld1_*_x3, vst1_*_x2 and > vst1_*_x3 intrinsics as defined by Neon document. > > Ok for trunk? > > - Thanks and regards, > Sameera D. > > gcc/Changelog: > > 2017-11-14 Sameera Deshpande > > >

Re: [RFC] Add means to split dump file into several files -- Use in lra

2017-12-14 Thread Vladimir Makarov
On 12/07/2017 09:53 AM, Tom de Vries wrote: Hi, I'm currently debugging a problem in lra, and got a bit lost in the 20k+ lines dump file. I observed that: - the lra dump file is one of the biggest ones - lra itself consists of a looping of sub-passes. So, I've: - written a dump infrastruct

Re: patch to fix PR82353

2017-12-14 Thread Vladimir Makarov
On 12/13/2017 07:34 AM, Tom de Vries wrote: On 10/16/2017 10:38 PM, Vladimir Makarov wrote: This is another version of the patch to fix     https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82353 The patch was successfully bootstrapped on x86-64 with Go and Ada. Committed as rev. 253796. Hi Vl

[Ada] Fix misalignment in record with aliased field and rep clause

2017-12-14 Thread Eric Botcazou
This is a regression present on all actives branches: the compiler doesn't correctly align a field in a record type if there is a partial representation clause on this record type that does not cover the field, but covers another field which is aliased (or contains an aliased subcomponent) and w

Re: [PATCH][arm] Add -mverbose-cost-dump and de-verbosify cost dumps

2017-12-14 Thread Sandra Loosemore
On 12/14/2017 08:53 AM, Kyrill Tkachov wrote: Hi all, This patch adds an -mverbose-cost-dump option, similar to the one in aarch64. It makes the RTX cost dump print the RTX we're costing in the backend, as well as its cost. This can be distracting in other cost-related RTL dumps like combine'

[Ada] Fix compilation time explosion due to recursive inlining

2017-12-14 Thread Eric Botcazou
This clears DECL_DISREGARD_INLINE_LIMITS on recursive expression functions. Tested on x86_64-suse-linux, applied on the mainline. 2017-12-14 Eric Botcazou * gcc-interface/trans.c (Call_to): Set DECL_DISREGARD_INLINE_LIMITS to 0 on the callee if the call is recursive. -- Eri

Re: [PATCH] Fix PR83418

2017-12-14 Thread Richard Biener
On December 14, 2017 4:43:42 PM GMT+01:00, Jeff Law wrote: >On 12/14/2017 01:54 AM, Richard Biener wrote: >> >> IVOPTs (at least) leaves unfolded stmts in the IL and VRP >overzealously >> asserts they cannot happen. >> >> Bootstrap and regtest running on x86_64-unknown-linux-gnu. >> >> Richard.

[Ada] Minor tweak to default_pass_by_ref

2017-12-14 Thread Eric Botcazou
Tested on x86_64-suse-linux, applied on the mainline. 2017-12-14 Eric Botcazou * gcc-interface/misc.c (default_pass_by_ref): Minor tweak. -- Eric BotcazouIndex: gcc-interface/misc.c === --- gcc-interface/misc.c (revisio

[committed] v3: vrp_prop: Use dom_walker for -Warray-bounds (PR tree-optimization/83312)

2017-12-14 Thread David Malcolm
On Thu, 2017-12-14 at 11:53 +0100, Richard Biener wrote: > On Wed, Dec 13, 2017 at 10:30 PM, David Malcolm > wrote: > > On Wed, 2017-12-13 at 10:47 -0700, Jeff Law wrote: > > > On 12/13/2017 09:24 AM, Richard Biener wrote: > > > > > > > > > > Alternately we could to the dom_walker ctor that an in

[PATCH] PR libstdc++/83427 detect weak result type from noexcept functions

2017-12-14 Thread Jonathan Wakely
Richard Smith pointed out that our "weak result type" implementation (used by std::reference_wrapper and std::bind) doesn't work for noexcept functions. The simple fix is to adjust every partial specialization to include noexcept deduction (which I'll do for gcc-7-branch), but I took the opportun

Re: [PATCH] PR libstdc++/83427 detect weak result type from noexcept functions

2017-12-14 Thread Jonathan Wakely
On 14/12/17 17:29 +, Jonathan Wakely wrote: Richard Smith pointed out that our "weak result type" implementation (used by std::reference_wrapper and std::bind) doesn't work for noexcept functions. The simple fix is to adjust every partial specialization to include noexcept deduction (which I

Re: [PATCH][ARM][gcc-7] Fix regression on soft float targets for armv8_2-fp16-move-2.c

2017-12-14 Thread Christophe Lyon
On 14 December 2017 at 17:05, Sudakshina Das wrote: > Hi > > This patch is a follow up on my previous patch with r255536 that was a > back-port for fixing a wrong code generation > (https://gcc.gnu.org/ml/gcc-patches/2017-11/msg02209.html). > As pointed out by Christophe Lyon > (https://gcc.gnu.or

Re: [Patch][Aarch64] Fix aarch64 libatomic build with older binutils

2017-12-14 Thread James Greenhalgh
On Thu, Dec 07, 2017 at 11:56:55PM +, Steve Ellcey wrote: > James, > > Here is a patch that will turn off the use of IFUNC and the LSE > instructions in libatomic if the compiler/assembler toolchain do not > understand the '-march=armv8-a+lse' option (changed from > -march=armv8.1-a).  Rather

Re: [PATCH][arm] Add -mverbose-cost-dump and de-verbosify cost dumps

2017-12-14 Thread Kyrill Tkachov
Hi Sandra, On 14/12/17 17:09, Sandra Loosemore wrote: On 12/14/2017 08:53 AM, Kyrill Tkachov wrote: Hi all, This patch adds an -mverbose-cost-dump option, similar to the one in aarch64. It makes the RTX cost dump print the RTX we're costing in the backend, as well as its cost. This can be d

Re: [SFN] Bootstrap broken

2017-12-14 Thread Alexandre Oliva
On Dec 13, 2017, Alexandre Oliva wrote: > On Dec 12, 2017, David Edelsohn wrote: >> Rainer, >> PR83396 opened. you can add Solaris to the list of targets. > Andreas, > Here's a fix for the ia64 regression you mentioned in that PR. And here's a patch that fixes the two other ia64 build failur

Re: [SFN] Bootstrap broken

2017-12-14 Thread Jakub Jelinek
On Thu, Dec 14, 2017 at 04:08:45PM -0200, Alexandre Oliva wrote: > On Dec 13, 2017, Alexandre Oliva wrote: > > > On Dec 12, 2017, David Edelsohn wrote: > >> Rainer, > >> PR83396 opened. you can add Solaris to the list of targets. > > > Andreas, > > > Here's a fix for the ia64 regression you m

Re: [PATCH][ARM][gcc-7] Fix regression on soft float targets for armv8_2-fp16-move-2.c

2017-12-14 Thread Sudakshina Das
Hi On 14/12/17 17:37, Christophe Lyon wrote: On 14 December 2017 at 17:05, Sudakshina Das wrote: Hi This patch is a follow up on my previous patch with r255536 that was a back-port for fixing a wrong code generation (https://gcc.gnu.org/ml/gcc-patches/2017-11/msg02209.html). As pointed out by

Re: [PATCH][arm] Add -mverbose-cost-dump and de-verbosify cost dumps

2017-12-14 Thread Sandra Loosemore
On 12/14/2017 10:56 AM, Kyrill Tkachov wrote: 2017-12-14  Kyrylo Tkachov      * doc/invoke.texi (GCC Developer options): Add Target-specific     developer options subsection.  Populate it with AArch64 and ARM     options. > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 0d56

Re: [SFN+LVU+IEPM v4 1/9] [SFN] adjust RTL insn-walking API

2017-12-14 Thread Alexandre Oliva
On Dec 14, 2017, Jakub Jelinek wrote: > On Thu, Dec 14, 2017 at 09:55:30AM -0200, Alexandre Oliva wrote: >> for gcc/ChangeLog > Please fix up formatting. Otherwise LGTM. Thanks, here's what I ended up installing (formatting fixes were slightly different from what you suggested, but to the sam

Re: [PATCH][ARM][gcc-7] Fix regression on soft float targets for armv8_2-fp16-move-2.c

2017-12-14 Thread Kyrill Tkachov
On 14/12/17 18:17, Sudi Das wrote: Hi On 14/12/17 17:37, Christophe Lyon wrote: > On 14 December 2017 at 17:05, Sudakshina Das wrote: >> Hi >> >> This patch is a follow up on my previous patch with r255536 that was a >> back-port for fixing a wrong code generation >> (https://gcc.gnu.org/ml/gc

Re: [PATCHv3] Add a warning for invalid function casts

2017-12-14 Thread Bernd Edlinger
On 12/07/17 21:48, Bernd Edlinger wrote: > On 12/06/17 23:35, Jason Merrill wrote: >> On Fri, Dec 1, 2017 at 7:42 AM, Bernd Edlinger >> wrote: >>> this version of the patch improves the heuristic check to take the >>> target hook into account, to handle cases correctly when both or only >>> one pa

Re: [compare-debug] use call loc for nop_endbr

2017-12-14 Thread Alexandre Oliva
On Dec 14, 2017, "Tsimbalist, Igor V" wrote: >> Regstrapping with -fcompare-debug on stage3 host and target builds on >> x86_64- and i686-linux-gnu; ok to install? > Ok from me. Thanks, I went ahead and installed it. > Am I correct the error you had was related to improper location information

Re: [PR59319] output friends in debug info

2017-12-14 Thread Jason Merrill
On 12/07/2017 04:04 PM, Alexandre Oliva wrote: On Apr 7, 2017, Alexandre Oliva wrote: On Mar 21, 2017, Alexandre Oliva wrote: On Jan 27, 2017, Alexandre Oliva wrote: On Oct 19, 2016, Alexandre Oliva wrote: On Sep 23, 2016, Alexandre Oliva wrote: On Aug 30, 2016, Alexandre Oliva wrote

Re: [PATCH][arm] Add -mverbose-cost-dump and de-verbosify cost dumps

2017-12-14 Thread Kyrill Tkachov
On 14/12/17 18:23, Sandra Loosemore wrote: On 12/14/2017 10:56 AM, Kyrill Tkachov wrote: 2017-12-14 Kyrylo Tkachov * doc/invoke.texi (GCC Developer options): Add Target-specific developer options subsection. Populate it with AArch64 and ARM options. > diff --git a/gcc/doc

Re: [PATCHv3] Add a warning for invalid function casts

2017-12-14 Thread Jason Merrill
On Thu, Dec 7, 2017 at 3:48 PM, Bernd Edlinger wrote: > On 12/06/17 23:35, Jason Merrill wrote: >> On Fri, Dec 1, 2017 at 7:42 AM, Bernd Edlinger >> wrote: >>> this version of the patch improves the heuristic check to take the >>> target hook into account, to handle cases correctly when both or o

Re: [PATCH] set range for strlen(array) to avoid spurious -Wstringop-overflow (PR 83373 , PR 78450)

2017-12-14 Thread Martin Sebor
On 12/14/2017 09:18 AM, Jakub Jelinek wrote: On Thu, Dec 14, 2017 at 09:13:21AM -0700, Jeff Law wrote: Although I would prefer not to, I suppose if letting strlen cross the boundaries of subobjects was considered an important use to accommodate in limited cases the optimization could be disabled

Re: [PATCH] set range for strlen(array) to avoid spurious -Wstringop-overflow (PR 83373 , PR 78450)

2017-12-14 Thread Jakub Jelinek
On Thu, Dec 14, 2017 at 11:51:26AM -0700, Martin Sebor wrote: > > Well, it would be nice to get sanitizers diagnose this at runtime. If we > > know the array length at compile time, simply compare after the strlen > > call the result and fail if it returns something above it. Or replace > > the s

Re: [PATCH] set range for strlen(array) to avoid spurious -Wstringop-overflow (PR 83373 , PR 78450)

2017-12-14 Thread Jeff Law
On 12/14/2017 11:55 AM, Jakub Jelinek wrote: > On Thu, Dec 14, 2017 at 11:51:26AM -0700, Martin Sebor wrote: >>> Well, it would be nice to get sanitizers diagnose this at runtime. If we >>> know the array length at compile time, simply compare after the strlen >>> call the result and fail if it re

[PATCH] Slight cost adjustment in SLSR

2017-12-14 Thread Bill Schmidt
Hi, While looking at PR83253, I noticed that the cost model for MULT_EXPR replacement can be improved. Right now we use mult_by_coeff_cost to determine the value of the possible replacement, but we use mul_cost to determine the savings from removing the original expression. This overcounts the s

Re: [PATCH][arm] Add -mverbose-cost-dump and de-verbosify cost dumps

2017-12-14 Thread Kyrill Tkachov
On 14/12/17 18:48, Kyrill Tkachov wrote: On 14/12/17 18:23, Sandra Loosemore wrote: > On 12/14/2017 10:56 AM, Kyrill Tkachov wrote: >> >> 2017-12-14 Kyrylo Tkachov >> >> * doc/invoke.texi (GCC Developer options): Add Target-specific >> developer options subsection. Populate it with

Re: [PATCH][Middle-end]79538 missing -Wformat-overflow with %s and non-member array arguments

2017-12-14 Thread Qing Zhao
> On Dec 14, 2017, at 2:05 AM, Richard Biener wrote: > > On Wed, 13 Dec 2017, Qing Zhao wrote: > >> Hi, >> >> I updated gimple-fold.c as you suggested, bootstrapped and re-tested on both >> x86 and aarch64. no any issue. >> >> >> diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c >> ind

Re: [PATCH] have -Wnonnull print inlining stack (PR 83369)

2017-12-14 Thread Jeff Law
On 12/11/2017 03:18 PM, Martin Sebor wrote: > On 12/11/2017 02:08 PM, David Malcolm wrote: >> On Mon, 2017-12-11 at 09:51 -0700, Martin Sebor wrote: >>> Bug 83369 - Missing diagnostics during inlining, notes that when >>> -Wnonnull is issued for an inlined call to a built-in function, >>> GCC doesn

Re: [PATCH 03/14] C++: add location_t wrapper nodes during parsing (minimal impl)

2017-12-14 Thread David Malcolm
On Mon, 2017-12-11 at 21:10 -0500, Jason Merrill wrote: > On 11/10/2017 04:45 PM, David Malcolm wrote: > > The initial version of the patch kit added location wrapper nodes > > around constants and uses-of-declarations, along with some other > > places in the parser (typeid, alignof, sizeof, offset

Re: Add an "early rematerialisation" pass

2017-12-14 Thread Richard Sandiford
Jeff Law writes: > On 12/14/2017 04:09 AM, Richard Biener wrote: >> On Fri, Nov 17, 2017 at 4:58 PM, Richard Sandiford >> wrote: >>> This patch looks for pseudo registers that are live across a call >>> and for which no call-preserved hard registers exist. It then >>> recomputes the pseudos as n

Re: [PATCH] have -Wnonnull print inlining stack (PR 83369)

2017-12-14 Thread Jeff Law
On 12/11/2017 06:16 PM, David Malcolm wrote: > On Mon, 2017-12-11 at 15:18 -0700, Martin Sebor wrote: >> On 12/11/2017 02:08 PM, David Malcolm wrote: >>> On Mon, 2017-12-11 at 09:51 -0700, Martin Sebor wrote: Bug 83369 - Missing diagnostics during inlining, notes that when -Wnonnull is is

[PR C++/59930] template friend classes & default args

2017-12-14 Thread Nathan Sidwell
PR 59930 concerns some problems with templated friend classes (of templates). In rying to clean up our handling, I discovered we were accepting default args of such things. This is ill formed [temp.param]/12 'A default template-argument shall not be specified in a friend class template decla

Re: [PATCH] have -Wnonnull print inlining stack (PR 83369)

2017-12-14 Thread Jeff Law
On 12/11/2017 09:51 AM, Martin Sebor wrote: > Bug 83369 - Missing diagnostics during inlining, notes that when > -Wnonnull is issued for an inlined call to a built-in function, > GCC doesn't print the inlining stack, making it hard to debug > where the problem comes from. > > When the -Wnonnull wa

Re: Add an "early rematerialisation" pass

2017-12-14 Thread Richard Biener
On December 14, 2017 8:26:49 PM GMT+01:00, Richard Sandiford wrote: >Jeff Law writes: >> On 12/14/2017 04:09 AM, Richard Biener wrote: >>> On Fri, Nov 17, 2017 at 4:58 PM, Richard Sandiford >>> wrote: This patch looks for pseudo registers that are live across a call and for which no c

Re: [PATCH] Slight cost adjustment in SLSR

2017-12-14 Thread Richard Biener
On December 14, 2017 8:12:36 PM GMT+01:00, Bill Schmidt wrote: >Hi, > >While looking at PR83253, I noticed that the cost model for MULT_EXPR >replacement can be improved. Right now we use mult_by_coeff_cost to >determine the value of the possible replacement, but we use mul_cost >to determine th

Re: [PATCH][Middle-end]79538 missing -Wformat-overflow with %s and non-member array arguments

2017-12-14 Thread Jeff Law
On 12/14/2017 12:22 PM, Qing Zhao wrote: > >> On Dec 14, 2017, at 2:05 AM, Richard Biener > > wrote: >> >> On Wed, 13 Dec 2017, Qing Zhao wrote: >> >>> Hi, >>> >>> I updated gimple-fold.c as you suggested, bootstrapped and re-tested >>> on both x86 and aarch64. no any iss

[PATCH][Middle-end]2nd patch of PR78809 and PR83026

2017-12-14 Thread Qing Zhao
Hi, I am not sure whether it’s proper to send this patch during this late stage. however, since the patch itself is quite straightforward, I decided to send it now. = 2nd Patch for PR78009 Patch for PR83026 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78809

Re: [PATCH][Middle-end]79538 missing -Wformat-overflow with %s and non-member array arguments

2017-12-14 Thread Qing Zhao
> On Dec 14, 2017, at 1:36 PM, Jeff Law wrote: > > On 12/14/2017 12:22 PM, Qing Zhao wrote: >> >>> On Dec 14, 2017, at 2:05 AM, Richard Biener >> > wrote: >>> >>> On Wed, 13 Dec 2017, Qing Zhao wrote: >>> Hi, I updated gimple-fold.c as you suggested,

[PATCH] Fix -fcompare-debug due to DEBUG_BEGIN_STMTs (PR debug/83419)

2017-12-14 Thread Jakub Jelinek
Hi! The following testcase FAILs -fcompare-debug, because one COND_EXPR branch from the FE during gimplifications is just > which doesn't have TREE_SIDE_EFFECTS, but for -gstatement-frontiers it is a STATEMENT_LIST which contains # DEBUG BEGIN_STMT and that >. Neither # DEBUG BEGIN_STMT nor that

[PATCH] Fix (-A) - B -> (-B) - A optimization in fold_binary_loc (PR tree-optimization/83269)

2017-12-14 Thread Jakub Jelinek
Hi! As the following testcase shows, the (-A) - B -> (-B) - A optimization can't be done the way it is if the negation of A is performed in type with wrapping behavior while the subtraction is done in signed type (with the same precision), as if A is (unsigned) INT_MIN, then (int) -(unsigned) INT_

[committed] Small formatting fix

2017-12-14 Thread Jakub Jelinek
Hi! While looking into PR83422 I've noticed this formatting glitch, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2017-12-14 Jakub Jelinek * var-tracking.c (variable_tracking_main_1): Formatting fix. --- gcc/var-tracking.c.jj 2017-12-14 1

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-14 Thread Jeff Law
On 11/21/2017 10:45 AM, Aaron Sawdey wrote: > On Tue, 2017-11-21 at 10:06 -0700, Jeff Law wrote: >> On 11/20/2017 06:41 AM, Aaron Sawdey wrote: >>> On Sun, 2017-11-19 at 16:44 -0700, Jeff Law wrote: On 11/15/2017 08:40 AM, Aaron Sawdey wrote: > So, the story of this very small patch starts

Re: [wwwdocs] mention AVR additions

2017-12-14 Thread Gerald Pfeifer
Hi Johann, On Wed, 13 Dec 2017, Georg-Johann Lay wrote: This adds AVR improvements to v8 Release Notes. that's quite impressive a set of improvements! Index: changes.html === The new devices are filed under https://gcc.g

[PATCH] PR libstdc++/68519 use native duration to avoid rounding errors

2017-12-14 Thread Jonathan Wakely
The result of system_clock::now() + duration(1) is a duration with the same value as now(), due to the limited precision of float. This patch converts the duration to system_clock::duration before doing the sum, so that we don't lose precision. PR libstdc++/68519 * include/std/co

Re: [PATCH][Middle-end]2nd patch of PR78809 and PR83026

2017-12-14 Thread Jakub Jelinek
On Thu, Dec 14, 2017 at 01:45:21PM -0600, Qing Zhao wrote: > 2017-12-11 Qing Zhao mailto:qing.z...@oracle.com>> No " " in ChangeLog entries please. > --- a/gcc/tree-ssa-strlen.c > +++ b/gcc/tree-ssa-strlen.c > @@ -2541,6 +2541,198 @@ handle_builtin_memcmp (gimple_st

Re: [PATCH][GCC][ARM] Fix fragile arm fpu attribute tests.

2017-12-14 Thread Christophe Lyon
On 14 December 2017 at 11:56, Tamar Christina wrote: > The 12/13/2017 08:49, Christophe Lyon wrote: >> On 12 December 2017 at 18:29, Tamar Christina >> wrote: >> > Hi All, >> > >> > The previous test made use of arm_neon.h which made the whole test >> > rather fragile and only applicable to some

[PATCH] PR libstdc++/83279 handle sendfile not copying entire file

2017-12-14 Thread Jonathan Wakely
I failed to notice that the man page for sendfile(3) says it won't copy more than 2GiB. This refactors the code to first try sendfile (because it's fast if it works) and if that fails, or stops before the end of the file, then use filebufs to copy what's left over. I'm not adding a test because c

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-14 Thread Aaron Sawdey
On Thu, 2017-12-14 at 13:43 -0700, Jeff Law wrote: > On 11/21/2017 10:45 AM, Aaron Sawdey wrote: > > On Tue, 2017-11-21 at 10:06 -0700, Jeff Law wrote: > > > On 11/20/2017 06:41 AM, Aaron Sawdey wrote: > > > > On Sun, 2017-11-19 at 16:44 -0700, Jeff Law wrote: > > > > > On 11/15/2017 08:40 AM, Aaro

Re: [PATCH] have -Wnonnull print inlining stack (PR 83369)

2017-12-14 Thread Martin Sebor
On 12/14/2017 12:24 PM, Jeff Law wrote: On 12/11/2017 03:18 PM, Martin Sebor wrote: On 12/11/2017 02:08 PM, David Malcolm wrote: On Mon, 2017-12-11 at 09:51 -0700, Martin Sebor wrote: Bug 83369 - Missing diagnostics during inlining, notes that when -Wnonnull is issued for an inlined call to a

  1   2   >