libgo patch committed: emulate Flock on AIX

2017-12-15 Thread Ian Lance Taylor
This patch by Tony Reix adds an emulation of the Flock call to libgo's syscall package on AIX. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/go/gofrontend/MERGE (revision 255666) +++

libgo patch committed: use hostname -s on AIX

2017-12-15 Thread Ian Lance Taylor
This patch by Tony Reix changes the libgo tests for the os package on AIX to use hostname -s, not plain hostname. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ===

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Richard Sandiford
Jeff Law writes: > On 11/17/2017 08:58 AM, 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

Re: Backports to 7.3

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 11:23:21PM +0100, Jakub Jelinek wrote: > Hi! > > I've backported today following 23 patches after bootstrapping/regtesting > them on x86_64-linux and i686-linux. And 2 more: Jakub 2017-12-16 Jakub Jelinek Backported from mainline

Re: [PATCH][i386] Fix PR83358 - increase divide/mod latencies a bit

2017-12-15 Thread Jeff Law
On 12/12/2017 01:28 AM, Markus Trippelsdorf wrote: > As the testcase shows, trunk currently generates horrible code for > divisions used in tight loops. This happens because the algorithm > expanding div/mod doesn't take parallelism into account and this makes > the cost model unrealistic. > Fix

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Richard Sandiford
Jeff Law writes: > On 12/14/2017 12:26 PM, Richard Sandiford wrote: How does it relate to what LRA can do? AFAIK LRA doesn't try to find any global optimal solution and previous hardreg assignments may work against it? >> >> Yeah, both of those are problems. But

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

2017-12-15 Thread Richard Biener
On Thu, 14 Dec 2017, Jakub Jelinek wrote: > 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

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

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 09:34:44AM +0100, Richard Biener wrote: > Ugh... the issue is that this difference might have many other > -fcompare-debug issues, like when folding things? Why is it a > STATEMENT_LIST rather than a COMPOUND_EXPR? I believe most of other foldings don't use

Re: [PATCH] Fix PR83418

2017-12-15 Thread Richard Biener
On Thu, 14 Dec 2017, Richard Biener wrote: > 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. > >> >

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

2017-12-15 Thread Richard Biener
On Thu, 14 Dec 2017, Jakub Jelinek wrote: > 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

Re: [SFN] Bootstrap broken

2017-12-15 Thread Jakub Jelinek
Hi! I'll try to read it in more details later today, but one thing I've noticed: On Thu, Dec 14, 2017 at 11:51:29PM -0200, Alexandre Oliva wrote: > @@ -5380,7 +5410,6 @@ verify_gimple_in_cfg (struct function *fn, bool > verify_nothrow) > err |= err2; > } > > - bool

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

2017-12-15 Thread Richard Biener
On Thu, Dec 14, 2017 at 5:01 PM, Martin Sebor wrote: > 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

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

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 09:38:52AM +0100, Richard Biener wrote: > On Thu, 14 Dec 2017, Jakub Jelinek wrote: > > > 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

Re: [05/nn] Add VEC_DUPLICATE_{CST,EXPR} and associated optab

2017-12-15 Thread Richard Biener
On Fri, Dec 15, 2017 at 1:29 AM, Richard Sandiford wrote: > This patch just adds VEC_DUPLICATE_EXPR, since the VEC_DUPLICATE_CST > isn't needed with the new VECTOR_CST layout. It's really just the > original patch with bits removed, but just in case: > > Tested on

[Ada] Fix incorrect assignment to array with Component_Size clause

2017-12-15 Thread Pierre-Marie de Rodat
This change fixes a wrong translation of the assignment of an aggregate made up of a single Others choice to an array whose nominal size of the component type is the storage unit and which is subject to a Component_Size clause that effectively bumps this size. The compiler was generating a call

[Ada] Missing error on illegal initialization item

2017-12-15 Thread Pierre-Marie de Rodat
This patch modifies the analysis of pragma Initializes to detect an illegal null initialization item. -- Source -- -- remote.ads package Remote is Y : Integer := 0; end Remote; -- pack.ads with Remote; package Pack with SPARK_Mode, Initializes =>

Re: [05/nn] Add VEC_DUPLICATE_{CST,EXPR} and associated optab

2017-12-15 Thread Richard Sandiford
Richard Biener writes: > On Fri, Dec 15, 2017 at 1:29 AM, Richard Sandiford > wrote: >> This patch just adds VEC_DUPLICATE_EXPR, since the VEC_DUPLICATE_CST >> isn't needed with the new VECTOR_CST layout. It's really just the >> original

[PATCH] Fix PR77291

2017-12-15 Thread Richard Biener
This adjusts array_at_struct_end_p to more properly adhere to its documentation - if an underlying object constraints the size of the trailing array we still have to return true in case there's room for at least one excess element compared to what the array domain specifies. Bootstrap & regtest

Re: [PATCH PR81740]Enforce dependence check for outer loop vectorization

2017-12-15 Thread Richard Biener
On Fri, Dec 15, 2017 at 1:35 PM, Bin.Cheng wrote: > On Fri, Dec 15, 2017 at 12:09 PM, Bin.Cheng wrote: >> On Fri, Dec 15, 2017 at 11:55 AM, Richard Biener >> wrote: >>> On Fri, Dec 15, 2017 at 12:30 PM, Bin Cheng

[PATCH] Fix PR81877

2017-12-15 Thread Richard Biener
The following removes safelen handling from LIM - it is not really useful information to it and it was used to derive incorrect conclusions about dependences. Bootstrapped and tested on x86_64-unknown-linux-gnu. I'll commit this on Monday to leave some time for comments (but many are already in

Re: [05/nn] Add VEC_DUPLICATE_{CST,EXPR} and associated optab

2017-12-15 Thread Richard Biener
On Fri, Dec 15, 2017 at 1:52 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Fri, Dec 15, 2017 at 1:29 AM, Richard Sandiford >> wrote: >>> This patch just adds VEC_DUPLICATE_EXPR, since the

[Ada] Spurious error and missing warning on static predicate

2017-12-15 Thread Pierre-Marie de Rodat
This patch handles properly a static predicate on a scalar type that is trivially true. Previous to this patch the compiler rejected the predicate on the incorrect grounds that it was not a static expression. Compiling bad_days.ads must yield: bad_days.ads:4:34: warning: predicate is

[Ada] Concurrent types in pragma Initializes

2017-12-15 Thread Pierre-Marie de Rodat
Concurrent types and single concurrent types can now appear in the input list of pragma Initializes as long as the type encloses the pragma. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ 2017-12-15 Hristian Kirtchev * sem_prag.adb

[Ada] Spurious 'W' ALI line due to implicit with clause

2017-12-15 Thread Pierre-Marie de Rodat
This patch "fixes" an issue where an implicit with clause generated to emulate an implicit Elaborate[_All] pragma appears on a 'W' line in the ALI file. As a result, the 'W' line may introduce a spurious build dependency in GPRbuild. -- Source -- -- func.ads function

[Ada] Spurious error on equality operator on incomplete type

2017-12-15 Thread Pierre-Marie de Rodat
This patch fixes a spurious error on a declaration for an equality operator whose operands have an incomplete type, when the same declarative oart includes another such equality operator on another incomplete type which is used as an actual in an earlier instantiation. Tested on

[Ada] Spurious alias error on access to array indexed by non-standard enum

2017-12-15 Thread Pierre-Marie de Rodat
This patch prevents the propagation of spurious errors about the prefix of access being non-aliased when getting the access to an array indexed by an enumeration with a custom representation. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ 2017-12-15 Justin Squirek

[PR 81616] Deferring FMA transformations in tight loops

2017-12-15 Thread Martin Jambor
Hello, the patch below prevents creation if fused-multiply-and-add instructions in the widening_mul gimple pass on the Zen-based AMD CPUs and as a result fixes regressions of native znver1 tuning when compared to generic tuning in: - the matrix.c testcase of PR 81616 (straightforward matrix

[Ada] Added warning on membership tests

2017-12-15 Thread Pierre-Marie de Rodat
RM 4.5.3 (28) specifies that (except for records and limited types) a membership operation uses the predefined equality, regardless of whether user-defined equality for the type is available. This can be confusing and deserves a new warning. Compiling code.adb must yield: code.adb:19:42:

[PATCH] Swap affects_type_identity and handler fields in attribute_spec

2017-12-15 Thread Jakub Jelinek
Hi! As I said earlier, I'd like to take the opportunity that Martin has added new field into attribute_spec and all out of tree FEs and backends need adjustment anyway to swap the affects_type_identity and handler fields. Previously we had: const char *, 2x int, 3x bool, 1x fnptr, 1x bool, 1x

Re: [14/nn] Add helpers for shift count modes

2017-12-15 Thread Richard Biener
On Fri, Dec 15, 2017 at 1:48 AM, Richard Sandiford wrote: > Richard Biener writes: >> On Mon, Nov 20, 2017 at 10:02 PM, Richard Sandiford >> wrote: >>> Richard Biener writes:

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-15 Thread Segher Boessenkool
On Thu, Dec 14, 2017 at 01:43:35PM -0700, Jeff Law wrote: > On 11/21/2017 10:45 AM, Aaron Sawdey wrote: > > There is no existing loop structure. This starts with a memcmp() call > > and then goes down through the builtin expansion mechanism, which is > > ultimately expanding the pattern cmpmemsi

[PATCH] RL78 pragma address

2017-12-15 Thread Sebastian Perta
Hello The following patch adds a new pragma, "pragma address" for RL78. The patch updates extend.texi and add a test case to the regression as well. For the test case I checked than test is getting picked up in gcc.log unfortunately for the .texi part I don't know where to look/what to do to

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

2017-12-15 Thread Sudakshina Das
Hi On 14/12/17 18:26, Kyrill Tkachov wrote: 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

[PATCH] Avoid excessive function type casts with splay-trees

2017-12-15 Thread Bernd Edlinger
Hi, when working on the -Wcast-function-type patch I noticed some rather ugly and non-portable function type casts that are necessary to accomplish some actually very simple tasks. Often functions taking pointer arguments are called with a different signature taking uintptr_t arguments, which is

Re: [PATCH] Fix PR83388

2017-12-15 Thread Richard Biener
On Fri, 15 Dec 2017, Jakub Jelinek wrote: > On Fri, Dec 15, 2017 at 11:08:43AM +0100, Richard Biener wrote: > > --- gcc/internal-fn.def (revision 255678) > > +++ gcc/internal-fn.def (working copy) > > @@ -254,6 +254,9 @@ DEF_INTERNAL_FN (LAUNDER, ECF_LEAF | ECF > > /* Divmod function.

[PATCH, PR83327] Fix liveness analysis in lra for spilled-into hard regs

2017-12-15 Thread Tom de Vries
[ was: Re: patch to fix PR82353 ] On 12/14/2017 06:01 PM, Vladimir Makarov wrote: 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

[PATCH PR81647][AARCH64] Fix handling of Unordered Comparisons in aarch64-simd.md

2017-12-15 Thread Sudakshina Das
Hi This patch fixes the inconsistent behavior observed at -O3 for the unordered comparisons. According to the online docs (https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gccint/Unary-and-Binary-Expressions.html), all of the following should not raise an FP exception: - UNGE_EXPR - UNGT_EXPR -

Re: [PATCH PR81740]Enforce dependence check for outer loop vectorization

2017-12-15 Thread Bin.Cheng
On Fri, Dec 15, 2017 at 12:09 PM, Bin.Cheng wrote: > On Fri, Dec 15, 2017 at 11:55 AM, Richard Biener > wrote: >> On Fri, Dec 15, 2017 at 12:30 PM, Bin Cheng wrote: >>> Hi, >>> As explained in the PR, given below test case:

[patch] More robust fix for PR target/66488

2017-12-15 Thread Eric Botcazou
Hi, this PR was about the blow-up of the garbage collector on x86_64-w64-mingw32 when more than 3 GB are allocated. The fix was to set HOST_BITS_PER_PTR to the appropriate value (64) in config/i386/xm-mingw32.h. This means that the same issue can happen on other P64 hosts so the attached

[PATCH] Fix PR83388

2017-12-15 Thread Richard Biener
The following fixes removal of sanitizer IFN calls during LTO streaming in when not linking with -fsanitize= to not interfer with IPA reference nodes that might be attached to those stmts. The easiest idea I could come up with that would also work with IPA passes refering to those refs is to

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

2017-12-15 Thread Wilco Dijkstra
Hi Qing, Just looking at a very high level, I have a few comments: 1. Constant folding str(n)cmp - folding is done separately in fold-const-call.c and gimple-fold.c. There is already code for folding strcmp and strncmp, so we shouldn't need to add new foldings. Or do you have an example

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

2017-12-15 Thread Richard Biener
On Fri, 15 Dec 2017, Jakub Jelinek wrote: > On Fri, Dec 15, 2017 at 09:38:52AM +0100, Richard Biener wrote: > > On Thu, 14 Dec 2017, Jakub Jelinek wrote: > > > > > Hi! > > > > > > As the following testcase shows, the (-A) - B -> (-B) - A optimization > > > can't > > > be done the way it is if

Re: [PATCH] Fix PR83388

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 11:08:43AM +0100, Richard Biener wrote: > --- gcc/internal-fn.def (revision 255678) > +++ gcc/internal-fn.def (working copy) > @@ -254,6 +254,9 @@ DEF_INTERNAL_FN (LAUNDER, ECF_LEAF | ECF > /* Divmod function. */ > DEF_INTERNAL_FN (DIVMOD, ECF_CONST |

[Ada] Fix inconsistent usage of Machine in s-fatgen.adb

2017-12-15 Thread Pierre-Marie de Rodat
System.Fat_Gen is a generic unit implementing support routines for floating- point attributes, for example the 'Machine attribute. These routines make themselves use of the 'Machine attribute, some of them by calling the Machine support routine directly, some others by using the attribute.

Re: [patch] More robust fix for PR target/66488

2017-12-15 Thread Richard Biener
On Fri, Dec 15, 2017 at 10:38 AM, Eric Botcazou wrote: > Hi, > > this PR was about the blow-up of the garbage collector on x86_64-w64-mingw32 > when more than 3 GB are allocated. The fix was to set HOST_BITS_PER_PTR to > the appropriate value (64) in

Re: [PATCH] Avoid excessive function type casts with splay-trees

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 10:44:54AM +, Bernd Edlinger wrote: > when working on the -Wcast-function-type patch I noticed some rather > ugly and non-portable function type casts that are necessary to accomplish > some actually very simple tasks. > > Often functions taking pointer arguments are

[Ada] Spurious warning on default initialized object

2017-12-15 Thread Pierre-Marie de Rodat
This patch updates the implications that pragma Default_Initial_Condition has on full default initialization of objects and types. According to the SPARK RM, the pragma may appear without an expression 7.3.3 The aspect_definition may be omitted; this is semantically equivalent to

[Ada] Optimizing allocators for arrays with non-static upper bound

2017-12-15 Thread Pierre-Marie de Rodat
This patch extends the optimization of allocators for arrays of non-controlled components, when the qualified expression for the aggregate has an unconstrained type and the upper bound of the aggregte is non-static. In this case it is safe to build the array in the allocated object, instead of

Re: [PATCH PR81740]Enforce dependence check for outer loop vectorization

2017-12-15 Thread Richard Biener
On Fri, Dec 15, 2017 at 12:30 PM, Bin Cheng wrote: > Hi, > As explained in the PR, given below test case: > int a[8][10] = { [2][5] = 4 }, c; > > int > main () > { > short b; > int i, d; > for (b = 4; b >= 0; b--) > for (c = 0; c <= 6; c++) > a[c + 1][b + 2] =

Re: [PATCH PR81740]Enforce dependence check for outer loop vectorization

2017-12-15 Thread Bin.Cheng
On Fri, Dec 15, 2017 at 11:55 AM, Richard Biener wrote: > On Fri, Dec 15, 2017 at 12:30 PM, Bin Cheng wrote: >> Hi, >> As explained in the PR, given below test case: >> int a[8][10] = { [2][5] = 4 }, c; >> >> int >> main () >> { >> short b; >>

Patch ping^2

2017-12-15 Thread Jakub Jelinek
Hi! I'd like to ping a bunch of patches: http://gcc.gnu.org/ml/gcc-patches/2017-11/msg02521.html PR c++/83205 - diagnose invalid std::tuple_size::value for structured

[Ada] Ignore external calls from instances for elaboration

2017-12-15 Thread Pierre-Marie de Rodat
This patch restores the functionality of debug switch -gnatdL to the behavior prior to revision 255412. The existing behavior has been associated with switch -gnatd_i. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ 2017-12-15 Hristian Kirtchev *

[Ada] Completing expression function need not trigger loading of package body

2017-12-15 Thread Pierre-Marie de Rodat
This patch prevents expression functions which complete previous declarations in a package spec from loading the body of the package spec on the basis that the expression function body is needed for inlining. This in turn prevents the generation of spurious dependencies on units in ALI files.

[Ada] Compiler crash with -gnatd.1 (force unnesting of subprograms)

2017-12-15 Thread Pierre-Marie de Rodat
This patch fixes a crash in the compiler when enabling unnesting of subprograms on a generic unit. The following must compile quietly: gcc -c -gnatg -gnatd.1 a-btgbso.adb Tested on x86_64-pc-linux-gnu, committed on trunk 2017-12-15 Ed Schonberg * exp_unst.adb

Re: [PATCH] Further improvements for the (T)(P+A)-(T)(P+B) folding (PR sanitizer/81281)

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 10:28:52AM +0100, Richard Biener wrote: > > --- gcc/match.pd.jj 2017-12-07 14:00:51.083048186 +0100 > > +++ gcc/match.pd2017-12-07 15:17:49.132784931 +0100 > > @@ -1784,8 +1784,8 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) > > > >/* (T)(P + A) - (T)P -> (T) A */ > >

[PATCH PR81740]Enforce dependence check for outer loop vectorization

2017-12-15 Thread Bin Cheng
Hi, As explained in the PR, given below test case: int a[8][10] = { [2][5] = 4 }, c; int main () { short b; int i, d; for (b = 4; b >= 0; b--) for (c = 0; c <= 6; c++) a[c + 1][b + 2] = a[c][b + 1]; for (i = 0; i < 8; i++) for (d = 0; d < 10; d++) if (a[i][d] != (i ==

Re: [06/nn] Add VEC_SERIES_{CST,EXPR} and associated optab

2017-12-15 Thread Richard Biener
On Fri, Dec 15, 2017 at 1:34 AM, Richard Sandiford wrote: > Similarly to the update 05 patch, this patch just adds VEC_SERIES_EXPR, > since the VEC_SERIES_CST isn't needed with the new VECTOR_CST layout. > build_vec_series now uses the new VECTOR_CST layout, but

Re: [001/nnn] poly_int: add poly-int.h

2017-12-15 Thread Richard Biener
On Fri, Dec 15, 2017 at 4:40 AM, Martin Sebor wrote: > On 12/07/2017 03:48 PM, Jeff Law wrote: >> >> On 12/07/2017 03:38 PM, Richard Sandiford wrote: >> So I think that's the final ack on this series. >>> >>> >>> Thanks to both of you, really appreciate it! >> >> Sorry it

Re: [PATCH] Use tail calls to memcpy/memset even for structure assignments (PR target/41455, PR target/82935)

2017-12-15 Thread Richard Biener
On Wed, 6 Dec 2017, Jakub Jelinek wrote: > Hi! > > Aggregate assignments and clears aren't in GIMPLE represented as calls, > and while often they expand inline, sometimes we emit libcalls for them. > This patch allows us to tail call those libcalls if there is nothing > after them. The patch

Re: [PATCH] Use tail calls to memcpy/memset even for structure assignments (PR target/41455, PR target/82935)

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 10:30:32AM +0100, Richard Biener wrote: > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > Hum, it doesn't look pretty ;) Can we defer this to stage1 given > it's a long-standing issue and we have quite big changes going in still? Ok, deferred.

[Ada] Reject certain constants as constituents

2017-12-15 Thread Pierre-Marie de Rodat
This patch updates the analysis of pragma Refined_State to reject constants which are used as refinement constituents and are either * Part of the visible state of a package * Part of the hidden state of a package, and lack indicator Part_Of. -- Source -- --

Re: [PATCH] Further improvements for the (T)(P+A)-(T)(P+B) folding (PR sanitizer/81281)

2017-12-15 Thread Richard Biener
On Thu, 7 Dec 2017, Jakub Jelinek wrote: > Hi! > > When committing the previous PR81281 patch, I've removed all the @@0 cases > on plus:c, used @0 instead, to make sure we don't regress. > > This patch readds those where possible. For the cases where there is > just P and A, it was mostly a

[Ada] Crash on subprogram instantiation in nested package

2017-12-15 Thread Pierre-Marie de Rodat
This patch fixes a crash on a subpogram instance that appears within a package that declares the actual type for the instance, when the corresponding type is a private or incomplete formal type. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada 2017-12-15 Ed Schonberg

Re: [PATCH] Further improvements for the (T)(P+A)-(T)(P+B) folding (PR sanitizer/81281)

2017-12-15 Thread Richard Biener
On Fri, 15 Dec 2017, Jakub Jelinek wrote: > On Fri, Dec 15, 2017 at 10:28:52AM +0100, Richard Biener wrote: > > > --- gcc/match.pd.jj 2017-12-07 14:00:51.083048186 +0100 > > > +++ gcc/match.pd 2017-12-07 15:17:49.132784931 +0100 > > > @@ -1784,8 +1784,8 @@ DEFINE_INT_AND_FLOAT_ROUND_FN

[Ada] Verify Part_Of indicator in non-SPARK code

2017-12-15 Thread Pierre-Marie de Rodat
This patch modifies the analysis of Part_Of indicators to verify their associated rules even when the indicator appears in non-SPARK code. This prevents possible tamperings of Part_Of constituents of single concurrent types outside of SPARK code. -- Source -- --

[Ada] Crash on expression function and discriminant-dependent component

2017-12-15 Thread Pierre-Marie de Rodat
This patch fixes a crash on an expression function that is a completion, when the return expression includes a reference to a discriminant-dependent component. An expression function that is a completion freezes all types referenced in the expression, but some itypes are excluded because they are

Re: [001/nnn] poly_int: add poly-int.h

2017-12-15 Thread Jeff Law
On 12/15/2017 02:08 AM, Richard Biener wrote: > On Fri, Dec 15, 2017 at 4:40 AM, Martin Sebor wrote: >> On 12/07/2017 03:48 PM, Jeff Law wrote: >>> >>> On 12/07/2017 03:38 PM, Richard Sandiford wrote: >>> > So I think that's the final ack on this series.

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

2017-12-15 Thread Martin Sebor
On 12/15/2017 01:48 AM, Richard Biener wrote: On Thu, Dec 14, 2017 at 5:01 PM, Martin Sebor wrote: 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

Re: [PATCH] Fix PR83418

2017-12-15 Thread Richard Biener
On December 15, 2017 5:27:14 PM GMT+01:00, Jeff Law wrote: >On 12/15/2017 01:10 AM, Richard Biener wrote: >> On Thu, 14 Dec 2017, Richard Biener wrote: >> >>> On December 14, 2017 4:43:42 PM GMT+01:00, Jeff Law >wrote: On 12/14/2017 01:54 AM, Richard

Re: [committed][PR tree-optimization/83410] Avoid some jump threads when parallelizing loops

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 09:19:14AM -0700, Jeff Law wrote: > + /* Loop parallelization can be confused by the result of > + threading through the loop exit test back into the loop. > + However, theading those jumps seems to help other codes. > + > + I have been

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

2017-12-15 Thread Jason Merrill
On Thu, Dec 14, 2017 at 2:25 PM, David Malcolm wrote: > 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

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

2017-12-15 Thread Qing Zhao
Hi, Jakub, thanks a lot for your detailed review. > On Dec 14, 2017, at 2:45 PM, Jakub Jelinek wrote: > > On Thu, Dec 14, 2017 at 01:45:21PM -0600, Qing Zhao wrote: >> 2017-12-11 Qing Zhao > > > No "

Re: [PATCH] Fix PR83418

2017-12-15 Thread Jeff Law
On 12/15/2017 01:10 AM, Richard Biener wrote: > On Thu, 14 Dec 2017, Richard Biener wrote: > >> 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 >>>

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

2017-12-15 Thread David Malcolm
On Fri, 2017-12-15 at 10:01 -0500, Jason Merrill wrote: > On Thu, Dec 14, 2017 at 2:25 PM, David Malcolm > wrote: > > 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

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

2017-12-15 Thread Nathan Sidwell
On 12/14/2017 02:31 PM, Nathan Sidwell wrote: 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

Re: [PATCH] Swap affects_type_identity and handler fields in attribute_spec

2017-12-15 Thread Jason Merrill
On Fri, Dec 15, 2017 at 9:18 AM, Jakub Jelinek wrote: > Hi! > > As I said earlier, I'd like to take the opportunity that Martin has added > new field into attribute_spec and all out of tree FEs and backends need > adjustment anyway to swap the affects_type_identity and handler

Re: [002/nnn] poly_int: IN_TARGET_CODE

2017-12-15 Thread Jeff Law
On 12/14/2017 06:08 PM, Richard Sandiford wrote: > Jeff Law writes: >> On 10/23/2017 10:58 AM, Richard Sandiford wrote: >>> This patch makes each target-specific TU define an IN_TARGET_CODE macro, >>> which is used to decide whether poly_int<1, C> should convert to C. >>> >>> >>>

[committed][PR tree-optimization/83410] Avoid some jump threads when parallelizing loops

2017-12-15 Thread Jeff Law
I hate this patch. The fundamental problem we have is that there are times when we very much want to thread jumps and yet there are other times when we do not. To date we have been able to largely select between those two by looking at the shape of the CFG and the jump thread to see how

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

2017-12-15 Thread H.J. Lu
On Fri, Dec 15, 2017 at 7:17 AM, Tsimbalist, Igor V wrote: >> -Original Message- >> From: Alexandre Oliva [mailto:aol...@redhat.com] >> Sent: Thursday, December 14, 2017 7:37 PM >> To: Tsimbalist, Igor V >> Cc:

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

2017-12-15 Thread Richard Biener
On December 15, 2017 4:58:14 PM GMT+01:00, Martin Sebor wrote: >On 12/15/2017 01:48 AM, Richard Biener wrote: >> On Thu, Dec 14, 2017 at 5:01 PM, Martin Sebor >wrote: >>> On 12/14/2017 03:43 AM, Richard Biener wrote: On Wed, Dec 13, 2017 at 4:47 AM,

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Jeff Law
On 11/17/2017 08:58 AM, 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 at the

Re: [14/nn] Add helpers for shift count modes

2017-12-15 Thread Richard Sandiford
Richard Biener writes: > On Fri, Dec 15, 2017 at 1:48 AM, Richard Sandiford > wrote: >> Richard Biener writes: >>> On Mon, Nov 20, 2017 at 10:02 PM, Richard Sandiford >>> wrote:

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

2017-12-15 Thread Tsimbalist, Igor V
> -Original Message- > From: Alexandre Oliva [mailto:aol...@redhat.com] > Sent: Thursday, December 14, 2017 7:37 PM > To: Tsimbalist, Igor V > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [compare-debug] use call loc for nop_endbr > > On Dec 14, 2017,

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

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 10:08:03AM -0600, Qing Zhao wrote: > a little confused here: > > in the current code: > . the first case is: result = strcmp() != 0 > . the second case is:if (strcmp() != 0) > > so, the missing case you mentioned above is: > > result = if

[committed] Add one further testcase for PR80631

2017-12-15 Thread Jakub Jelinek
Hi! When backporting the PR80631 fix to 7.x, I've noticed there is no runtime FAIL in any of the tests, only the scan-tree-dump test failures. So, I've committed following test that FAILs on x86_64-linux without the patch and succeeds with it. 2017-12-15 Jakub Jelinek

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

2017-12-15 Thread Qing Zhao
> On Dec 15, 2017, at 10:42 AM, Jakub Jelinek wrote: > > On Fri, Dec 15, 2017 at 10:08:03AM -0600, Qing Zhao wrote: >> a little confused here: >> >> in the current code: >> . the first case is: result = strcmp() != 0 >> . the second case is:if (strcmp()

Re: [committed][PR tree-optimization/83410] Avoid some jump threads when parallelizing loops

2017-12-15 Thread Jeff Law
On 12/15/2017 09:45 AM, Jakub Jelinek wrote: > On Fri, Dec 15, 2017 at 09:19:14AM -0700, Jeff Law wrote: >> + /* Loop parallelization can be confused by the result of >> + threading through the loop exit test back into the loop. >> + However, theading those jumps seems to help

Re: [PR81165] discount killed stmts when sizing blocks for threading

2017-12-15 Thread Jeff Law
On 12/11/2017 10:17 PM, Alexandre Oliva wrote: > On Dec 11, 2017, Jeff Law wrote: > > I've updated it according to richi's and your feedbacks. Regstrapped on > {x86_64,i686}-linux-gnu. Ok to install? > > > We limit the amount of copying for jump threading based on counting >

Re: [committed][PR tree-optimization/83410] Avoid some jump threads when parallelizing loops

2017-12-15 Thread Richard Biener
On December 15, 2017 5:19:14 PM GMT+01:00, Jeff Law wrote: >I hate this patch. > >The fundamental problem we have is that there are times when we very >much want to thread jumps and yet there are other times when we do not. > >To date we have been able to largely select between

Re: [PATCH PR81740]Enforce dependence check for outer loop vectorization

2017-12-15 Thread Bin.Cheng
On Fri, Dec 15, 2017 at 1:19 PM, Richard Biener wrote: > On Fri, Dec 15, 2017 at 1:35 PM, Bin.Cheng wrote: >> On Fri, Dec 15, 2017 at 12:09 PM, Bin.Cheng wrote: >>> On Fri, Dec 15, 2017 at 11:55 AM, Richard Biener >>>

Re: [PATCH] Avoid excessive function type casts with splay-trees

2017-12-15 Thread Bernd Edlinger
On 12/15/17 11:51, Jakub Jelinek wrote: > On Fri, Dec 15, 2017 at 10:44:54AM +, Bernd Edlinger wrote: >> when working on the -Wcast-function-type patch I noticed some rather >> ugly and non-portable function type casts that are necessary to accomplish >> some actually very simple tasks. >> >>

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Richard Biener
On December 15, 2017 8:10:33 PM GMT+01:00, Jeff Law wrote: >On 12/14/2017 12:32 PM, Richard Biener wrote: >> >> On x86_64 all xmm registers are caller saved for example. That means >all FP regs and all vectors. (yeah, stupid ABI decision) >But that's precisely what I would

Re: [C++ PATCH] Fix ICE on invalid std::tuple_size<...>::value (PR c++/83205)

2017-12-15 Thread Jason Merrill
On 11/29/2017 08:19 PM, Martin Sebor wrote: On 11/29/2017 03:32 PM, Jakub Jelinek wrote: +  if (!tree_fits_uhwi_p (tsize)) +    { +  error_at (loc, "%u names provided while %qT decomposes into " When count is 1 as in the test below the error isn't grammatically correct ("1 names").  I

[PATCH] Fix PR83439

2017-12-15 Thread Richard Biener
Goofed up a backport to the GCC 7 branch. Bootstrap & regtest in progress. Richard. 2017-12-15 Richard Biener PR bootstrap/83439 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Adjust remaining gimple_set_modified to use the modified

Re: [C++ PATCH] Fix ICE on invalid std::tuple_size<...>::value (PR c++/83205)

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 08:09:20PM +0100, Jakub Jelinek wrote: > On Fri, Dec 15, 2017 at 02:01:36PM -0500, Jason Merrill wrote: > > On 11/29/2017 08:19 PM, Martin Sebor wrote: > > > On 11/29/2017 03:32 PM, Jakub Jelinek wrote: > > > > +  if (!tree_fits_uhwi_p (tsize)) > > > > +    { > > > > +  

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Jeff Law
On 12/14/2017 12:26 PM, Richard Sandiford wrote: >>> How does it relate to what LRA can do? AFAIK LRA doesn't try to find >>> any global optimal solution and previous hardreg assignments may work >>> against it? > > Yeah, both of those are problems. But the more important problem is > that it

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 08:14:38PM +0100, Richard Biener wrote: > On December 15, 2017 8:10:33 PM GMT+01:00, Jeff Law wrote: > >On 12/14/2017 12:32 PM, Richard Biener wrote: > >> > >> On x86_64 all xmm registers are caller saved for example. That means > >all FP regs and all

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

2017-12-15 Thread Jason Merrill
On Fri, Dec 15, 2017 at 11:35 AM, David Malcolm wrote: > On Fri, 2017-12-15 at 10:01 -0500, Jason Merrill wrote: >> On Thu, Dec 14, 2017 at 2:25 PM, David Malcolm >> wrote: >> > On Mon, 2017-12-11 at 21:10 -0500, Jason Merrill wrote: >> > > On 11/10/2017

Re: [C++ PATCH] Fix ICE with structured binding & to incomplete type (PR c++/83217)

2017-12-15 Thread Jason Merrill
OK.

Re: [C++ PATCH] Fix ICE on invalid std::tuple_size<...>::value (PR c++/83205)

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 02:01:36PM -0500, Jason Merrill wrote: > On 11/29/2017 08:19 PM, Martin Sebor wrote: > > On 11/29/2017 03:32 PM, Jakub Jelinek wrote: > > > +  if (!tree_fits_uhwi_p (tsize)) > > > +    { > > > +  error_at (loc, "%u names provided while %qT decomposes into " > > > >

  1   2   >