Re: [PATCH] Optimize certain end of loop conditions into min/max operation

2015-09-17 Thread Michael Collison
On 07/31/2015 11:27 AM, Jeff Law wrote: On 07/31/2015 12:18 PM, Michael Collison wrote: Hi Jeff, Yes I will create a test case. I'm not quite sure what to check for even in the machine dependent test case. It's quite possible for the instructions that are generated to change over time. I think

Re: [c++-delayed-folding] cp_fold_r

2015-09-17 Thread Kai Tietz
Hi Jason, Sounds like an interesting idea. Do have already a specific approach in mind? My idea might be just hard to model, as we aren't sure we walked before the complete chain. Due cp_fold is caching, we won't try to fold an expression a second time, but we don't cover all EXPRs in cp_fold,

RE: [patch] libstdc++/65142 Check read() result in std::random_device.

2015-09-17 Thread Moore, Catherine
> -Original Message- > From: Jonathan Wakely [mailto:jwak...@redhat.com] > Sent: Thursday, September 17, 2015 6:54 PM > To: Moore, Catherine; fdum...@gcc.gnu.org > Cc: Gerald Pfeifer; libstd...@gcc.gnu.org; gcc-patches@gcc.gnu.org > Subject: Re: [patch] libstdc++/65142 Check read() result

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-17 Thread Ville Voutilainen
On 18 September 2015 at 01:23, Ville Voutilainen wrote: > Ok. Tested on Linux-PPC64. This patch doesn't handle attributes yet, it looks > to > me as if gcc doesn't support namespace attributes in the location that > the standard > grammar puts them into. I had to adjust a couple of Ahem, oops,

Re: [patch] libstdc++/65142 Check read() result in std::random_device.

2015-09-17 Thread Jonathan Wakely
On 17/09/15 22:32 +, Moore, Catherine wrote: -Original Message- From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- ow...@gcc.gnu.org] On Behalf Of Jonathan Wakely Sent: Thursday, September 17, 2015 5:28 PM To: Gerald Pfeifer Cc: libstd...@gcc.gnu.org; gcc-patches@gcc.gnu.org

Re: [PATCH] Convert SPARC to LRA

2015-09-17 Thread David Miller
From: Eric Botcazou Date: Thu, 17 Sep 2015 23:13:21 +0200 > Did you keep the 64-bit promotion in PROMOTE_MODE or...? Yes I had to, the compiler aborts() if I make it use SImode on 64-bit. I'll take a closer look soon.

RE: [patch] libstdc++/65142 Check read() result in std::random_device.

2015-09-17 Thread Moore, Catherine
> -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Jonathan Wakely > Sent: Thursday, September 17, 2015 5:28 PM > To: Gerald Pfeifer > Cc: libstd...@gcc.gnu.org; gcc-patches@gcc.gnu.org > Subject: Re: [patch] libstdc++/65142 C

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-17 Thread Ville Voutilainen
On 17 September 2015 at 23:11, Jason Merrill wrote: > On 09/16/2015 07:55 AM, Ville Voutilainen wrote: >> >> This is the first stab, I haven't written the tests yet. Feedback would be >> most welcome; should I put this code into a separate function? Is the >> minor >> code duplication with the reg

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Jonathan Wakely
On 17/09/15 21:25 +0200, Andreas Schwab wrote: Jonathan Wakely writes: + p = "/dev/stdin"; + if (exists(p)) +{ + auto p2 = canonical(p); + if (is_symlink(p)) +VERIFY( p != p2 ); + else +VERIFY( p == p2 ); + VERIFY( canonical(p2) == p2 ); This fails i

Re: [patch] libstdc++/65142 Check read() result in std::random_device.

2015-09-17 Thread Jonathan Wakely
On 17/09/15 22:21 +0200, Gerald Pfeifer wrote: On Thu, 17 Sep 2015, Jonathan Wakely wrote: Any comments on this version? Committed to trunk. Unfortunately this broke bootstrap on FreeBSD 10.1. /scratch/tmp/gerald/gcc-HEAD/libstdc++-v3/src/c++11/random.cc: In member function 'std::random_dev

Re: [RFC][PATCH] Preferred rename register in regrename pass

2015-09-17 Thread Eric Botcazou
> I'll let Bernd comment on the patch itself. But I would say that if > you're setting up cases where we can tie the source/dest of an extension > together, then it's a good thing. It'll cause more of them to turn into > NOPs and it'll make the redundant extension elimination pass more > effectiv

Re: [PATCH] Convert SPARC to LRA

2015-09-17 Thread Eric Botcazou
> > You need to update https://gcc.gnu.org/backends.html > > Done. Nice work! Did you keep the 64-bit promotion in PROMOTE_MODE or...? -- Eric Botcazou

Fwd: vector lightweight debug mode

2015-09-17 Thread Christopher Jefferson
-- Forwarded message -- From: Christopher Jefferson Date: 17 September 2015 at 18:59 Subject: Re: vector lightweight debug mode To: Jonathan Wakely On 16 September 2015 at 21:29, Jonathan Wakely wrote: > On 16/09/15 21:37 +0200, François Dumont wrote: > @@ -1051,6 +1071,7

Re: [PATCH WIP] Use Levenshtein distance for various misspellings in C frontend v2

2015-09-17 Thread Manuel López-Ibáñez
On 17 September 2015 at 21:57, David Malcolm wrote: > In my mind it's more about saving the user from having to locate the > field they really meant within the corresponding structure declaration > (either by grep, or by some cross-referencing tool). I think it is more than that. After a long cod

Re: [patch] libstdc++/65142 Check read() result in std::random_device.

2015-09-17 Thread Gerald Pfeifer
On Thu, 17 Sep 2015, Jonathan Wakely wrote: >> Any comments on this version? > Committed to trunk. Unfortunately this broke bootstrap on FreeBSD 10.1. /scratch/tmp/gerald/gcc-HEAD/libstdc++-v3/src/c++11/random.cc: In member function 'std::random_device::result_type std::random_device::_M_getval(

Re: [PATCH] Convert SPARC to LRA

2015-09-17 Thread David Miller
From: Eric Botcazou Date: Sat, 12 Sep 2015 16:04:09 +0200 > You need to update https://gcc.gnu.org/backends.html Done.

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-17 Thread Jason Merrill
On 09/16/2015 07:55 AM, Ville Voutilainen wrote: This is the first stab, I haven't written the tests yet. Feedback would be most welcome; should I put this code into a separate function? Is the minor code duplication with the regular namespace definition ok? I think I'd prefer to keep it in the

Re: C++ PATCH to implement fold-expressions

2015-09-17 Thread Jason Merrill
On 09/17/2015 02:04 PM, Jason Merrill wrote: Back in January Andrew mostly implemented C++1z fold-expressions (https://isocpp.org/files/papers/n4295.html), but the patch broke bootstrap. I've fixed it up now and am committing it to the trunk. Andrew: The main change I made was to drop tentative

Re: [PATCH 07/22] Implement token range tracking within libcpp and C/C++ FEs

2015-09-17 Thread David Malcolm
On Thu, 2015-09-17 at 13:14 -0600, Jeff Law wrote: > On 09/17/2015 10:49 AM, David Malcolm wrote: > > > FWIW, I have a (very messy) implementation of this working for the C > > frontend, which gives us source ranges on expressions without needing to > > add any new tree nodes, or add any fields to

Re: [PATCH WIP] Use Levenshtein distance for various misspellings in C frontend v2

2015-09-17 Thread David Malcolm
On Thu, 2015-09-17 at 13:31 -0600, Jeff Law wrote: > On 09/16/2015 02:34 AM, Richard Biener wrote: > > > > Btw, this looks quite expensive - I'm sure we want to limit the effort > > here a bit. > A limiter is reasonable, though as it's been pointed out this only fires > during error processing, so

Re: C++ PATCH to implement fold-expressions

2015-09-17 Thread Andrew Sutton
Fantastic. I've wanted to get back to this, but since school started back up, I haven't had any time to look at it. Thanks! Andrew On Thu, Sep 17, 2015 at 2:04 PM, Jason Merrill wrote: > Back in January Andrew mostly implemented C++1z fold-expressions > (https://isocpp.org/files/papers/n4295.h

Re: [PATCH, PR 57195] Allow mode iterators inside angle brackets

2015-09-17 Thread Richard Sandiford
Michael Collison writes: > On 09/14/2015 02:34 AM, Richard Sandiford wrote: >> Michael Collison writes: >>> Here is a modified patch that takes your comments into account. Breaking >>> on depth == 0 with '>' does not work due to the code looking for whitespace. >> What goes wrong? Just to make s

Re: [PATCH WIP] Use Levenshtein distance for various misspellings in C frontend v2

2015-09-17 Thread Jeff Law
On 09/16/2015 02:34 AM, Richard Biener wrote: Btw, this looks quite expensive - I'm sure we want to limit the effort here a bit. A limiter is reasonable, though as it's been pointed out this only fires during error processing, so we probably have more leeway to take time and see if we can do b

Re: debug mode symbols cleanup

2015-09-17 Thread François Dumont
On 15/09/2015 23:57, Jonathan Wakely wrote: > On 14/09/15 20:26 +0200, François Dumont wrote: >> On 08/09/2015 22:47, François Dumont wrote: >>> On 07/09/2015 13:03, Jonathan Wakely wrote: On 05/09/15 22:53 +0200, François Dumont wrote: >I remember Paolo saying once that we were not gu

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Andreas Schwab
Jonathan Wakely writes: > + p = "/dev/stdin"; > + if (exists(p)) > +{ > + auto p2 = canonical(p); > + if (is_symlink(p)) > +VERIFY( p != p2 ); > + else > +VERIFY( p == p2 ); > + VERIFY( canonical(p2) == p2 ); This fails if stdin is a pipe, which doesn't

Re: [PATCH 07/22] Implement token range tracking within libcpp and C/C++ FEs

2015-09-17 Thread Jeff Law
On 09/15/2015 04:33 AM, Richard Biener wrote: On Tue, Sep 15, 2015 at 12:20 PM, Jakub Jelinek wrote: On Tue, Sep 15, 2015 at 12:14:22PM +0200, Richard Biener wrote: diff --git a/gcc/cp/parser.h b/gcc/cp/parser.h index 760467c..c7558a0 100644 --- a/gcc/cp/parser.h +++ b/gcc/cp/parser.h @@ -61,6

Re: [c++-delayed-folding] code review

2015-09-17 Thread Kai Tietz
Hello Jason, thanks for your review. I addressed most of your mentioned issues already today. To some of them I have further comments ... 2015-09-17 8:18 GMT+02:00 Jason Merrill : >> @@ -216,6 +216,7 @@ libgcov-driver-tool.o-warn = -Wno-error >> libgcov-merge-tool.o-warn = -Wno-error >> gimpl

Re: [PATCH 07/22] Implement token range tracking within libcpp and C/C++ FEs

2015-09-17 Thread Jeff Law
On 09/17/2015 10:49 AM, David Malcolm wrote: FWIW, I have a (very messy) implementation of this working for the C frontend, which gives us source ranges on expressions without needing to add any new tree nodes, or add any fields to existing tree structs. The approach I'm using: * ranges are st

Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack

2015-09-17 Thread Lynn A. Boger
Here is my updated patch, with the changes suggested by Ian for gcc/gospec.c and David for gcc/configure.ac. Bootstrap built and tested on ppc64le, ppc64 multilib. 2015-09-17Lynn Boger gcc/ PR target/66870 config/rs6000/sysv4.h: Define TARGET_CAN_SPLIT_STACK_64BIT

Re: [PATCH 07/22] Implement token range tracking within libcpp and C/C++ FEs

2015-09-17 Thread Jeff Law
On 09/15/2015 06:18 AM, Richard Biener wrote: Of course this boils down to "uses" of a VAR_DECL using the shared tree node. On GIMPLE some stmt kinds have separate locations for each operand (PHI nodes), on GENERIC we'd have to invent a no-op expr tree code to wrap such uses to be able to give

Re: [PATCH 07/22] Implement token range tracking within libcpp and C/C++ FEs

2015-09-17 Thread Jeff Law
On 09/15/2015 06:54 AM, Manuel López-Ibáñez wrote: On 15 September 2015 at 14:18, Richard Biener wrote: Of course this boils down to "uses" of a VAR_DECL using the shared tree node. On GIMPLE some stmt kinds have separate locations for each operand (PHI nodes), on GENERIC we'd have to invent a

[wwwdocs] PATCH for Re: Advertisement in the GCC mirrors list, again

2015-09-17 Thread Gerald Pfeifer
On Tue, 15 Sep 2015, niXman wrote: > mirrors.webhostinggeeks.com/gcc/ This is a little disappointing, though I am inclinded to consider it a genuine mistake/migration. Addressed like this. Gerald Index: mirrors.html === RCS file: /

Re: [PATCH, rs6000] Add expansions for min/max vector reductions

2015-09-17 Thread Segher Boessenkool
On Thu, Sep 17, 2015 at 09:18:42AM -0500, Bill Schmidt wrote: > On Thu, 2015-09-17 at 09:39 +0200, Richard Biener wrote: > > So just to clarify - you need to reduce the vector with max to a scalar > > but want the (same) result in all vector elements? > > Yes. Alan Hayward's cond-reduction patch

Re: [AArch64][PATCH 5/5] Use atomic load-operate instructions for update-fetch patterns.

2015-09-17 Thread Andrew Pinski
On Thu, Sep 17, 2015 at 9:54 AM, Matthew Wahab wrote: > Hello, > > ARMv8.1 adds atomic swap and atomic load-operate instructions with > optional memory ordering specifiers. This patch uses the ARMv8.1 > load-operate instructions to implement the atomic__fetch patterns. > > The approach is to use t

Re: [PATCH] Fix PR64078

2015-09-17 Thread Marek Polacek
On Thu, Sep 17, 2015 at 08:06:48PM +0200, Bernd Edlinger wrote: > Hi, > > On Thu, 17 Sep 2015 10:39:04, Jeff Law wrote: > > > > On 09/17/2015 09:00 AM, Marek Polacek wrote: > >> On Wed, Sep 09, 2015 at 07:48:15PM +0200, Bernd Edlinger wrote: > >>> Hi, > >>> > >>> On Wed, 9 Sep 2015 09:31:33, Jeff

RE: [PATCH] Fix PR64078

2015-09-17 Thread Bernd Edlinger
Hi, On Thu, 17 Sep 2015 10:39:04, Jeff Law wrote: > > On 09/17/2015 09:00 AM, Marek Polacek wrote: >> On Wed, Sep 09, 2015 at 07:48:15PM +0200, Bernd Edlinger wrote: >>> Hi, >>> >>> On Wed, 9 Sep 2015 09:31:33, Jeff Law wrote: You could probably make the function static or change its visibili

C++ PATCH to implement fold-expressions

2015-09-17 Thread Jason Merrill
Back in January Andrew mostly implemented C++1z fold-expressions (https://isocpp.org/files/papers/n4295.html), but the patch broke bootstrap. I've fixed it up now and am committing it to the trunk. Andrew: The main change I made was to drop tentative parsing in favor of scanning the tokens ah

[ARM] Add ARMv8.1 command line options.

2015-09-17 Thread Matthew Wahab
Hello, ARMv8.1 is a set of architectural extensions to ARMv8. Support has been enabled in binutils for ARMv8.1 for the architechure, using the name "armv8.1-a". This patch adds support to gcc for specifying an ARMv8.1 architecture using options "-march=armv8.1-a" and "-march=armv8.1-a+crc". It a

Re: [RFC] Try vector as a new representation for vector masks

2015-09-17 Thread Richard Henderson
On 09/15/2015 06:52 AM, Ilya Enkovich wrote: > I made a step forward forcing vector comparisons have a mask (vec) > result and disabling bool patterns in case vector comparison is supported by > target. Several issues were met. > > - c/c++ front-ends generate vector comparison with integer vec

Re: [patch match.pd c c++]: Ignore results of 'shorten_compare' and move missing patterns in match.pd

2015-09-17 Thread Jeff Law
On 09/17/2015 03:12 AM, Richard Biener wrote: I wonder if we'd do better to first add new match.pd patterns, one at a time, with tests, and evaluating them along the way by looking at the dumps or .s files across many systems. Then when we think we've got the right set, then look at what happens

Re: [PATCH 2/5] completely_scalarize arrays as well as records.

2015-09-17 Thread Alan Lawrence
On 15/09/15 08:43, Richard Biener wrote: > > Sorry for chiming in so late... Not at all, TYVM for your help! > TREE_CONSTANT isn't the correct thing to test. You should use > TREE_CODE () == INTEGER_CST instead. Done (in some cases, via tree_fits_shwi_p). > Also you need to handle > NULL_TREE

Re: [RFC][PATCH] Preferred rename register in regrename pass

2015-09-17 Thread Jeff Law
On 09/17/2015 08:38 AM, Robert Suchanek wrote: Hi, We came across a situation for MIPS64 where moves for sign-extension were not converted into a nop because of IRA spilled some of the allocnos and assigned different hard register for the output operand in the move. LRA is not fixing this up as

Re: [PATCH] Target hook for disabling the delay slot filler.

2015-09-17 Thread Jeff Law
On 09/17/2015 03:52 AM, Simon Dardis wrote: The profitability of using an ordinary branch over a delay slot branch depends on how the delay slot is filled. If a delay slot can be filled from an instruction preceding the branch or instructions proceeding that must be executed on both sides then it

[AArch64][PATCH 5/5] Use atomic load-operate instructions for update-fetch patterns.

2015-09-17 Thread Matthew Wahab
Hello, ARMv8.1 adds atomic swap and atomic load-operate instructions with optional memory ordering specifiers. This patch uses the ARMv8.1 load-operate instructions to implement the atomic__fetch patterns. The approach is to use the atomic load-operate instruction to atomically load the data and

Re: [PATCH 07/22] Implement token range tracking within libcpp and C/C++ FEs

2015-09-17 Thread David Malcolm
On Wed, 2015-09-16 at 16:21 -0400, David Malcolm wrote: > On Tue, 2015-09-15 at 12:48 +0200, Jakub Jelinek wrote: > > On Tue, Sep 15, 2015 at 12:33:58PM +0200, Richard Biener wrote: > > > On Tue, Sep 15, 2015 at 12:20 PM, Jakub Jelinek wrote: > > > > On Tue, Sep 15, 2015 at 12:14:22PM +0200, Richa

[AArch64][PATCH 4/5] Use atomic load-operate instructions for fetch-update patterns.

2015-09-17 Thread Matthew Wahab
Hello, ARMv8.1 adds atomic swap and atomic load-operate instructions with optional memory ordering specifiers. This patch uses the ARMv8.1 atomic load-operate instructions to implement the atomic_fetch_ patterns. This patch also updates the implementation of the atomic_ patterns, which are treate

[AArch64][PATCH 3/5] Add atomic load-operate instructions.

2015-09-17 Thread Matthew Wahab
Hello, ARMv8.1 adds atomic swap and atomic load-operate instructions with optional memory ordering specifiers. This patch adds the ARMv8.1 atomic load-operate instructions. Tested the series for aarch64-none-linux-gnu with native bootstrap and make check. Also tested for aarch64-none-elf with cr

[AArch64][PATCH 2/5] Add BIC instruction.

2015-09-17 Thread Matthew Wahab
Hello, ARMv8.1 adds atomic swap and atomic load-operate instructions with optional memory ordering specifiers. This patch adds an expander to generate a BIC instruction that can be explicitly called when implementing the atomic__fetch pattern to calculate the value to be returned by the operation

Re: [PATCH] Fix PR64078

2015-09-17 Thread Jeff Law
On 09/17/2015 09:00 AM, Marek Polacek wrote: On Wed, Sep 09, 2015 at 07:48:15PM +0200, Bernd Edlinger wrote: Hi, On Wed, 9 Sep 2015 09:31:33, Jeff Law wrote: You could probably make the function static or change its visibility via a function attribute (there's a visibility attribute which can

[AArch64][PATCH 1/5] Use atomic instructions for swap and fetch-update operations.

2015-09-17 Thread Matthew Wahab
Hello, ARMv8.1 adds atomic swap and atomic load-operate instructions with optional memory ordering specifiers. This patch series adds the instructions to GCC, making them available with -march=armv8.1-a or -march=armv8+lse, and uses them to implement the __sync and __atomic builtins. The ARMv8.1

Re: [C/C++ PATCH] RFC: Implement -Wduplicated-cond (PR c/64249)

2015-09-17 Thread Martin Sebor
The patch currently issues a false positive for the test case below. I suspect the chain might need to be cleared after each condition that involves a side-effect. int foo (int a) { if (a) return 1; else if (++a) return 2; else if (a) return 3; return 0; } But the last branch

Re: [C/C++ PATCH] RFC: Implement -Wduplicated-cond (PR c/64249)

2015-09-17 Thread Jeff Law
On 09/17/2015 10:05 AM, Marek Polacek wrote: The patch doesn't diagnose some more involved cases like the one below: if (i < 0) return 1; else if (!(i > 0 || i == 0)) return 2; even though it does diagnose some other such cases, including: if (i < 0) return 1; else if (!(i >= 0)) retur

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/67465: Handle pairs of complex+simple blocks and empty blocks more gracefully

2015-09-17 Thread Kyrill Tkachov
Hi Rainer, On 17/09/15 12:33, Rainer Orth wrote: Hi Kyrill, On 11/09/15 09:51, Rainer Orth wrote: Kyrill Tkachov writes: On 10/09/15 12:43, Rainer Orth wrote: Hi Kyrill, Rainer, could you please check that this patch still fixes the SPARC regressions? unfortunately, it breaks sparc-sun

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-17 Thread Mark Wielaard
On Thu, 2015-09-17 at 18:12 +0200, Bernd Schmidt wrote: > On 09/17/2015 02:01 PM, Gerald Pfeifer wrote: > > On Sun, 13 Sep 2015, Mark Wielaard wrote: > >> Slightly adjusted patch attached. Now it is explicit that the warning is > >> enabled by -Wunused-variable for C, but not C++. There are testcas

Re: [PATCH, rs6000] Add expansions for min/max vector reductions

2015-09-17 Thread Bill Schmidt
On Thu, 2015-09-17 at 09:18 -0500, Bill Schmidt wrote: > On Thu, 2015-09-17 at 09:39 +0200, Richard Biener wrote: > > On Wed, 16 Sep 2015, Alan Lawrence wrote: > > > > > On 16/09/15 17:10, Bill Schmidt wrote: > > > > > > > > On Wed, 2015-09-16 at 16:29 +0100, Alan Lawrence wrote: > > > > > On 16/

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-17 Thread Bernd Schmidt
On 09/17/2015 02:01 PM, Gerald Pfeifer wrote: On Sun, 13 Sep 2015, Mark Wielaard wrote: Slightly adjusted patch attached. Now it is explicit that the warning is enabled by -Wunused-variable for C, but not C++. There are testcases for both C and C++ to check the defaults. And the hardcoded overri

Re: [C/C++ PATCH] RFC: Implement -Wduplicated-cond (PR c/64249)

2015-09-17 Thread Marek Polacek
On Wed, Sep 16, 2015 at 02:59:12PM -0600, Martin Sebor wrote: > On 09/16/2015 09:59 AM, Marek Polacek wrote: > >This patch implements a new warning, -Wduplicated-cond. It warns for > >code such as > > > > if (x) > > // ... > > else if (x) > > // ... > > As usual, I like this improveme

[Ada] Language-defined checks and side effects in gigi

2015-09-17 Thread Eric Botcazou
As diagnosed by Richard B., emit_check wrongly resets the TREE_SIDE_EFFECTS flag on the COND_EXPR built for language-defined checks in Ada, leading to the omission of required checks in peculiar cases. Tested on x86_64-suse-linux, applied on the mainline. 2015-09-17 Eric Botcazou *

Re: [Aarch64] Use vector wide add for mixed-mode adds

2015-09-17 Thread James Greenhalgh
On Mon, Sep 07, 2015 at 06:54:30AM +0100, Michael Collison wrote: > This patch is designed to address code that was not being vectorized due > to missing widening patterns in the aarch64 backend. Code such as: > > int t6(int len, void * dummy, short * __restrict x) > { >len = len & ~31; >i

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Martin Sebor
On 09/17/2015 05:16 AM, Jonathan Wakely wrote: On 16/09/15 17:42 -0600, Martin Sebor wrote: I see now the first exists test will detect symlink loops in the original path. But I'm not convinced there isn't a corner case that's subject to a TOCTOU race condition between the first exists test and

Amend documentation of DF LIVE problem

2015-09-17 Thread Eric Botcazou
As discussed in the audit trail of PR rtl-optimization/66790, the doc of the DF_LIVE problem is confusing/wrong so the attached patch amends it. Approved by Kenneth and applied on all active branches. 2015-09-17 Eric Botcazou PR rtl-optimization/66790 * df-problems.c (LIVE):

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Jonathan Wakely
On 16/09/15 23:50 +0100, Jonathan Wakely wrote: On 16/09/15 19:58 +0100, Jonathan Wakely wrote: commit ef25038796485298ff8f040bc79e0d9a371171fa Author: Jonathan Wakely Date: Wed Sep 16 18:07:32 2015 +0100 Implement filesystem::canonical() without realpath PR libstdc++/67173

Re: [patch] libstdc++/65913 Handle alignment in __atomic_is_lock_free

2015-09-17 Thread Richard Henderson
On 09/17/2015 07:04 AM, Jonathan Wakely wrote: > Handle alignment in __atomic_is_lock_free > > gcc: > > 2015-09-17 Richard Henderson > > PR libstdc++/65913 > * builtins.c (fold_builtin_atomic_always_lock_free): Handle fake > pointers that encode the a

Re: [patch] libstdc++/65142 Check read() result in std::random_device.

2015-09-17 Thread Jonathan Wakely
On 15/09/15 12:47 +0100, Jonathan Wakely wrote: On 11/09/15 14:44 +0100, Jonathan Wakely wrote: We should not silently ignore a failure to read from the random device. Tested powerpc64le-linux, committed to trunk. I'm going to commit this to the gcc-5 branch too. commit 2d2f7012dc3744dafef

Re: [PATCH] Fix PR64078

2015-09-17 Thread Marek Polacek
On Wed, Sep 09, 2015 at 07:48:15PM +0200, Bernd Edlinger wrote: > Hi, > > On Wed, 9 Sep 2015 09:31:33, Jeff Law wrote: > > You could probably make the function static or change its visibility via > > a function attribute (there's a visibility attribute which can take the > > values default, hidden

[patch] Remove redundant conditional expressions in

2015-09-17 Thread Jonathan Wakely
This is silly and makes it harder to read: return _M_value != 0 ? true : false; Tested powerpc64le-linux, committed to trunk. commit ca8d1e0e92810ac72b337247c10af1de1de465d4 Author: Jonathan Wakely Date: Thu Sep 17 15:07:24 2015 +0100 Remove redundant conditional expressions in

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-17 Thread Ian Lance Taylor
On Thu, Sep 17, 2015 at 7:08 AM, David Edelsohn wrote: > On Wed, Sep 9, 2015 at 12:12 AM, Ian Lance Taylor wrote: >> Mike Stump writes: >> >>> Not a big issue, but slightly better if (O_CLOEXEC>>32) != 0 is also >>> true. See, if AIX should ever define this to a sensible value, the >>> above wo

Re: [RFC] Masking vectorized loops with bound not aligned to VF.

2015-09-17 Thread Ilya Enkovich
2015-09-16 15:30 GMT+03:00 Richard Biener : > On Mon, 14 Sep 2015, Kirill Yukhin wrote: > >> Hello, >> I'd like to initiate discussion on vectorization of loops which >> boundaries are not aligned to VF. Main target for this optimization >> right now is x86's AVX-512, which features per-element emb

Re: [C++] Coding rule enforcement

2015-09-17 Thread Ville Voutilainen
>>>+ else if (warn_multiple_inheritance) >>>+warning (OPT_Wmultiple_inheritance, >>>+ "%qT defined with multiple direct bases", ref); >>You don't need to guard the warning with a check of the warning flag; warning >>will only give the warning if the option is enabled. >the spelling

[patch] Only do shrink_to_fit() when exceptions enabled

2015-09-17 Thread Jonathan Wakely
When exceptions are disabled a failed allocation while trying to shrink_to_fit() will abort the program. Since shrink_to_fit() is a non-binding request we should just ignore it rather than risk taking down the whole process. Tested powerpc64le-linux, committed to trunk. commit 13cf19282acf42a52

[RFC][PATCH] Preferred rename register in regrename pass

2015-09-17 Thread Robert Suchanek
Hi, We came across a situation for MIPS64 where moves for sign-extension were not converted into a nop because of IRA spilled some of the allocnos and assigned different hard register for the output operand in the move. LRA is not fixing this up as most likely the move was not introduced by the LR

Re: [C++] Coding rule enforcement

2015-09-17 Thread Nathan Sidwell
On 09/16/15 10:23, Jason Merrill wrote: On 09/16/2015 08:02 AM, Nathan Sidwell wrote: + else if (warn_multiple_inheritance) +warning (OPT_Wmultiple_inheritance, + "%qT defined with multiple direct bases", ref); You don't need to guard the warning with a check of the warning fl

Re: Openacc launch API

2015-09-17 Thread Nathan Sidwell
Updated patch addressing your points. Some further comments though ... + while (GOMP_LAUNCH_PACK (GOMP_LAUNCH_END, 0, 0) + != (tag = va_arg (ap, unsigned))) That's a somewhat non-idiomatic way to write this, with the constant first and not obviously a constant. I'd initialize a variable

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Jonathan Wakely
On 17/09/15 12:16 +0100, Jonathan Wakely wrote: On 16/09/15 17:42 -0600, Martin Sebor wrote: I see now the first exists test will detect symlink loops in the original path. But I'm not convinced there isn't a corner case that's subject to a TOCTOU race condition between the first exists test and

Re: Split up optabs.[hc]

2015-09-17 Thread Richard Sandiford
Bernd Schmidt writes: > On 09/14/2015 07:54 PM, Richard Sandiford wrote: >> This patch splits optabs up as follows: >> >>- optabs-query.[hc]: IL-independent functions for querying what a target >>can do natively. >>- optabs-tree.[hc]: tree and gimple query functions (an extension o

Re: [PATCH] start of rewrite of unordered_{set,map}

2015-09-17 Thread Jonathan Wakely
Oops, I meant to reply to the lists, not just Geoff ... On 16/09/15 18:35 +0100, Jonathan Wakely wrote: On 16/09/15 10:08 -0700, Geoff Pike wrote: Also, to clarify, I am primarily seeking high-level comments; I am new here and don't want to waste anybody's time. Hi Geoff, This looks very in

Re: [PATCH, rs6000] Add expansions for min/max vector reductions

2015-09-17 Thread Bill Schmidt
On Thu, 2015-09-17 at 09:39 +0200, Richard Biener wrote: > On Wed, 16 Sep 2015, Alan Lawrence wrote: > > > On 16/09/15 17:10, Bill Schmidt wrote: > > > > > > On Wed, 2015-09-16 at 16:29 +0100, Alan Lawrence wrote: > > > > On 16/09/15 15:28, Bill Schmidt wrote: > > > > > 2015-09-16 Bill Schmidt

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-17 Thread David Edelsohn
On Wed, Sep 9, 2015 at 12:12 AM, Ian Lance Taylor wrote: > Mike Stump writes: > >> Not a big issue, but slightly better if (O_CLOEXEC>>32) != 0 is also >> true. See, if AIX should ever define this to a sensible value, the >> above would disappear the feature. However, if they did, then this >>

[patch] libstdc++/65913 Handle alignment in __atomic_is_lock_free

2015-09-17 Thread Jonathan Wakely
This fixes a 5/6 regression that causes atomic::is_lock_free() to require libatomic even on targets where the compiler knows the answer. The new test only runs on x86_64-linux and powerpc*-linux. It isn't actually OS-dependent but as long as it runs somewhere we should pick up regressions so thos

Go compiler patch: issue receive type errors earlier

2015-09-17 Thread Ian Lance Taylor
This patch by Chris Manghane changes the Go frontend to issue type errors earlier for a receive operation. This fixes https://golang.org/issue/12323 . Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ===

Re: dejagnu version update?

2015-09-17 Thread Richard Earnshaw
On 16/09/15 17:36, Jeff Law wrote: > On 09/16/2015 10:25 AM, Ramana Radhakrishnan wrote: >> >> >> On 16/09/15 17:14, Mike Stump wrote: >>> On Sep 16, 2015, at 12:29 AM, Andreas Schwab >>> wrote: Mike Stump writes: > The software presently works with 1.4.4 and there aren’t any >

Re: [Patch, fortran] PR40054 and PR63921 - Implement pointer function assignment - redux

2015-09-17 Thread Mikael Morin
Le 06/09/2015 18:40, Paul Richard Thomas a écrit : It helps to attach the patch :-) Paul On 6 September 2015 at 13:42, Paul Richard Thomas wrote: Dear All, The attached patch more or less implements the assignment of expressions to the result of a pointer function. To wit: my_ptr_fcn (arg1,

[C++ Patch/RFC] PR 67576 ("[4.9/5/6 Regression] expression of typeid( expression ) is evaluated twice")

2015-09-17 Thread Paolo Carlini
Hi, submitter noticed that the fix for c++/25466: https://gcc.gnu.org/ml/gcc-patches/2013-04/msg00553.html caused a double evaluation of the typeid, at least in some cases. I had a quick look and wondered if it could make sense to just use the new code when we are outside the straightforw

Re: Openacc launch API

2015-09-17 Thread Nathan Sidwell
On 09/17/15 05:36, Bernd Schmidt wrote: Fail how? Jakub has requested that it works but falls back to unaccelerated execution, can you confirm this is what you expect to happen with this patch? Yes, that is the failure mode. - if (num_waits) + va_start (ap, kinds); + /* TODO: This will ne

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-17 Thread Gerald Pfeifer
On Sun, 13 Sep 2015, Mark Wielaard wrote: > Slightly adjusted patch attached. Now it is explicit that the warning is > enabled by -Wunused-variable for C, but not C++. There are testcases for > both C and C++ to check the defaults. And the hardcoded override is > removed for C++, so the user could

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/67465: Handle pairs of complex+simple blocks and empty blocks more gracefully

2015-09-17 Thread Rainer Orth
Hi Kyrill, > On 11/09/15 09:51, Rainer Orth wrote: >> Kyrill Tkachov writes: >> >>> On 10/09/15 12:43, Rainer Orth wrote: Hi Kyrill, > Rainer, could you please check that this patch still fixes the SPARC > regressions? unfortunately, it breaks sparc-sun-solaris2.10 bootstra

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Jonathan Wakely
On 17/09/15 12:16 +0100, Jonathan Wakely wrote: So if we use a counter, what's a sane maximum? Is MAXSYMLINKS in the value the kernel uses? 20 seems quite low, I was thinking of a much higher number. Until very recently Linux seemed to hardcode it to 40: https://github.com/torvalds/linux/blob/

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Jonathan Wakely
On 16/09/15 17:42 -0600, Martin Sebor wrote: I see now the first exists test will detect symlink loops in the original path. But I'm not convinced there isn't a corner case that's subject to a TOCTOU race condition between the first exists test and the while loop during which a symlink loop can b

Re: [PATCH] Target hook for disabling the delay slot filler.

2015-09-17 Thread Bernd Schmidt
On 09/17/2015 11:52 AM, Simon Dardis wrote: The profitability of using an ordinary branch over a delay slot branch depends on how the delay slot is filled. If a delay slot can be filled from an instruction preceding the branch or instructions proceeding that must be executed on both sides then it

[PATCH] Improve genmatch errors

2015-09-17 Thread Richard Biener
For a misplaced :s like (simplify (plus (minus@1:s @1 @2) (minus @2 @0)) (plus @1 @0)) we were giving test.pd:2:16 error: not implemented: predicate on leaf operand (plus (minus@1:s @1 @2) (minus @2 @0)) ^ which is at least confusing. The following patch improves this to te

RE: [PATCH] Target hook for disabling the delay slot filler.

2015-09-17 Thread Simon Dardis
The profitability of using an ordinary branch over a delay slot branch depends on how the delay slot is filled. If a delay slot can be filled from an instruction preceding the branch or instructions proceeding that must be executed on both sides then it is profitable to use a delay slot branch. F

Re: [PATCH v2][GCC] Algorithmic optimization in match and simplify

2015-09-17 Thread Richard Biener
On Thu, Sep 3, 2015 at 1:11 PM, Andre Vieira wrote: > On 01/09/15 15:01, Richard Biener wrote: >> >> On Tue, Sep 1, 2015 at 3:40 PM, Andre Vieira >> wrote: >>> >>> Hi Marc, >>> >>> On 28/08/15 19:07, Marc Glisse wrote: (not a review, I haven't even read the whole patch) O

Re: Openacc launch API

2015-09-17 Thread Bernd Schmidt
Since Jakub appears to be busy, I'll give my 2 cents. On 08/25/2015 03:29 PM, Nathan Sidwell wrote: I did rename the GOACC_parallel entry point to GOACC_parallel_keyed and provide a forwarding function. However, as the mkoffload data is incompatible, this is probably overkill. I've had to incr

Re: [patch match.pd c c++]: Ignore results of 'shorten_compare' and move missing patterns in match.pd

2015-09-17 Thread Kai Tietz
2015-09-17 11:12 GMT+02:00 Richard Biener : > On Wed, Sep 16, 2015 at 9:51 PM, Jeff Law wrote: >> On 09/15/2015 03:42 AM, Kai Tietz wrote: > > 2015-09-08 Kai Tietz > > * gcc.dg/tree-ssa/vrp23.c: Adjust testcase to reflect that > pattern is matching now already wi

Re: [PATCH] Fix default_binds_local_p_2 for extern protected data

2015-09-17 Thread Szabolcs Nagy
ping 2. this patch is needed for working visibility ("protected") attribute for extern data on targets using default_binds_local_p_2. https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01871.html On 10/08/15 12:04, Szabolcs Nagy wrote: ping. On 22/07/15 18:01, Szabolcs Nagy wrote: The commit http

Re: [patch match.pd c c++]: Ignore results of 'shorten_compare' and move missing patterns in match.pd

2015-09-17 Thread Richard Biener
On Wed, Sep 16, 2015 at 9:51 PM, Jeff Law wrote: > On 09/15/2015 03:42 AM, Kai Tietz wrote: 2015-09-08 Kai Tietz * gcc.dg/tree-ssa/vrp23.c: Adjust testcase to reflect that pattern is matching now already within forward-propagation pass. * gcc.dg/t

Re: [PATCH, ARM]: Fix static interworking call

2015-09-17 Thread Kyrill Tkachov
On 17/09/15 09:46, Christian Bruel wrote: As obvious, bad operand number. OK for trunk ? Christian p1.patch 2015-09-18 Christian Bruel * config/arm/arm.md (*call_value_symbol): Fix operand for interworking. 2015-09-18 Christian Bruel * gcc.target/arm/attr_thumb-static2

****ping****: [Patch, fortran] PR40054 and PR63921 - Implement pointer function assignment - redux

2015-09-17 Thread Paul Richard Thomas
Could somebody review this please? Thanks Paul -- Forwarded message -- From: Paul Richard Thomas Date: 6 September 2015 at 18:40 Subject: Re: [Patch, fortran] PR40054 and PR63921 - Implement pointer function assignment - redux To: Dominique Dhumieres , "fort...@gcc.gnu.org" , g

Re: [PATCH WIP] Use Levenshtein distance for various misspellings in C frontend v2

2015-09-17 Thread Richard Biener
On Wed, Sep 16, 2015 at 5:45 PM, Manuel López-Ibáñez wrote: > On 16 September 2015 at 15:33, Richard Biener > wrote: >> On Wed, Sep 16, 2015 at 3:22 PM, Michael Matz wrote: if we suggest 'foo' instead of foz then we'll get a more confusing followup error if we actually use it. >>> >>>

Re: [PATCH] Convert SPARC to LRA

2015-09-17 Thread David Miller
From: David Miller Date: Mon, 14 Sep 2015 11:30:29 -0700 (PDT) > There are some other issues I'm having troubles resolving for 64-bit > native bootstraps as well, and I am probably going to revert the LRA > sparc changes unless I can resolve them by the end of today. So I was actually able to re

  1   2   >