Re: libgo patch committed: Fix Makefile bug setting LD_LIBRARY_PATH

2017-11-22 Thread Bernhard Reutner-Fischer
On 21 November 2017 20:53:50 CET, Eric Botcazou wrote: >> This patch by Than McIntosh fixes a small bug in the libgo Makefile >> recipe that constructs the directory from which to pick up >> libgcc_s.so; the gccgo invocation with -print-libgcc-file-name was >> missing the

Re: libgo patch committed: Fix Makefile bug setting LD_LIBRARY_PATH

2017-11-22 Thread Bernhard Reutner-Fischer
On 22 November 2017 at 09:07, Eric Botcazou wrote: >> grep -q was even required by SUSv2 from 1997 so Solaris should really >> support it. What version if Solaris is that and what version of grep? > > /usr/bin/grep on Solaris 10 (/usr/xpg4/bin/grep does support it). Why

Re: [RFTesting] New POINTER_DIFF_EXPR

2017-11-22 Thread Marc Glisse
On Wed, 22 Nov 2017, Marc Glisse wrote: On Wed, 22 Nov 2017, Christophe Lyon wrote: Since you committed this patch (r255021), my cross-builds of GCC for aarch64-linux-gnu fail while building glibc: /tmp/6857183_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/bin/aarch64-none-linux-gnu-gcc

[PATCH][1/2] Alternate fix for PR81403

2017-11-22 Thread Richard Biener
I had the need to analyze the PR81403 failure again and figured the real cause and prepared a patch for this (the original fix still keeps some issues latent I think). This is cleanups that make it easier to debug PRE issues. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

PR82547: Undetected overflow for UNSIGNED wide_ints

2017-11-22 Thread Richard Sandiford
wi::add_large and wi::sub_large weren't setting the overflow bit correctly for unsigned operations if the result needed fewer HWIs than the precision. Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. OK to install? Richard 2017-11-21 Richard Sandiford

Re: [PATCH] Fix mult expansion ICE (PR middle-end/82875)

2017-11-22 Thread Richard Sandiford
Really sorry for missing this PR -- don't know that happened :-( Jakub Jelinek writes: > On these two testcases, we end up expanding MULT_EXPR where both arguments > end up being VOIDmode. For smul_optab that isn't a problem, we have > the mode next to it, but in some cases we

Re: [PATCH] Avoid UNSPEC_VOLATILE or volatile ASM_OPERANDS in debug insns (PR debug/83084)

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 10:42:13AM +0100, Richard Biener wrote: > On Wed, 22 Nov 2017, Jakub Jelinek wrote: > > > Hi! > > > > Seems at least the scheduler treats UNSPEC_VOLATILE and perhaps volatile asm > > in DEBUG_INSNs as having side-effects and schedules differently depending on > > that.

Re: [PATCH] PR libstdc++/48101 improve errors for invalid container specializations

2017-11-22 Thread Rainer Orth
Hi Jonathan, > This uses static_assert to improve the errors when attempting to > instantiate invalid specializations of containers, e.g. set, > or unordered_set (which mixes up the > order of the hasher and equality predicate arguments). > > This means instead of more than

RE: [patch] remove cilk-plus

2017-11-22 Thread Koval, Julia
Hi, > So it's not important, but the patch doesn't have the removal of the > cilk+ testsuite or runtime. BUt again, it's not a big deal, I can guess > what that part of the patch looks like. I used Jakub's suggestion in https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01348.html and didn't add

[PATCH, libgfortran, committed] PR 83070, fix -Wsign-compare warning

2017-11-22 Thread Janne Blomqvist
Hi, committed the following patch as r255045, pre-approved in the PR: 2017-11-22 Janne Blomqvist PR libfortran/83070 * intrinsics/eoshift0.c (eoshift0): Fix -Wsign-compare warning by making a_ex and r_ex index_type instead of size_t. ---

Re: [patch] remove cilk-plus

2017-11-22 Thread Rainer Orth
Hi Julia, >> So it's not important, but the patch doesn't have the removal of the >> cilk+ testsuite or runtime. BUt again, it's not a big deal, I can guess >> what that part of the patch looks like. > > I used Jakub's suggestion in > https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01348.html and

Fix calculation of ptr_mode for MODE_PARTIAL_INT Pmode

2017-11-22 Thread Richard Sandiford
This patch fixes a regression caused by r251469, where I'd incorrectly converted a call to mode_for_size that sometimes needs MODE_PARTIAL_INTs. Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. Also spot-checked on msp430-elf. OK to install? Richard 2017-11-22 Richard

Re: [PATCH] Avoid UNSPEC_VOLATILE or volatile ASM_OPERANDS in debug insns (PR debug/83084)

2017-11-22 Thread Richard Biener
On Wed, 22 Nov 2017, Jakub Jelinek wrote: > On Wed, Nov 22, 2017 at 10:42:13AM +0100, Richard Biener wrote: > > On Wed, 22 Nov 2017, Jakub Jelinek wrote: > > > > > Hi! > > > > > > Seems at least the scheduler treats UNSPEC_VOLATILE and perhaps volatile > > > asm > > > in DEBUG_INSNs as having

Re: [PING] Plugin support on Windows/MinGW

2017-11-22 Thread JonY
On 11/21/2017 07:03 AM, Boris Kolpackov wrote: > Hi, > > I would like to ping this patch: > > https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01040.html > > The changes are fairly conservative: they do not touch much of the > existing module implementation and plugin support on MinGW is disabled

Re: [PATCH] Fix result for conditional reductions matching at index 0

2017-11-22 Thread Richard Biener
On Tue, Nov 21, 2017 at 5:43 PM, Kilian Verhetsel wrote: > >> This is PR81179 I think, please mention that in the changelog. > > Correct, my bad for missing that. > >> This unconditionally pessimizes code even if there is no valid index >> zero, right? > > Almost,

Re: [PATCH] Avoid UNSPEC_VOLATILE or volatile ASM_OPERANDS in debug insns (PR debug/83084)

2017-11-22 Thread Richard Biener
On Wed, 22 Nov 2017, Jakub Jelinek wrote: > Hi! > > Seems at least the scheduler treats UNSPEC_VOLATILE and perhaps volatile asm > in DEBUG_INSNs as having side-effects and schedules differently depending on > that. While we could tweak the scheduler not to do that, these will be > actually

Re: [PATCH] Fix mult expansion ICE (PR middle-end/82875)

2017-11-22 Thread Richard Biener
On Wed, 22 Nov 2017, Jakub Jelinek wrote: > Hi! > > On these two testcases, we end up expanding MULT_EXPR where both arguments > end up being VOIDmode. For smul_optab that isn't a problem, we have > the mode next to it, but in some cases we want to use {u,s}mul_widen_optab > which is a

RE: [patch] remove cilk-plus

2017-11-22 Thread Koval, Julia
Added fix for gcc/doc/sourcebuild.texi > -Original Message- > From: Koval, Julia > Sent: Wednesday, November 22, 2017 10:15 AM > To: Rainer Orth > Cc: Jeff Law ; Jakub Jelinek ; GCC > Patches >

Re: [PATCH] Fix mult expansion ICE (PR middle-end/82875)

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 10:41:19AM +0100, Richard Biener wrote: > How much churn would it be to pass down a mode alongside the operands > in expand_binop? Can't find it right now but didn't we introduce > some rtx_with_mode pair-like stuff somewhen? We have rtx_mode_t for that. But there are

Re: libgo patch committed: Fix Makefile bug setting LD_LIBRARY_PATH

2017-11-22 Thread Eric Botcazou
> If we don't then i would say that's the bug to fix, not warp back in > time 20 years. Why let solaris hold hostage everybody else? Let's not start a flame war, please. Almost all other uses of grep in the libgo directory have >/dev/null instead of -q and nobody chokes on them. -- Eric

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Martin Jambor
On Tue, Nov 21 2017, Jeff Law wrote: > On 11/21/2017 04:14 AM, Dominik Inführ wrote: >> Hi, >> >> this patch tries to extend tree-ssa-dce.c to remove unnecessary >> new/delete-pairs (it already does that for malloc/free). Clang does it too >> and it seems to be allowed by >>

Re: [DWARF] mark partial fn versions and OMP frags as partial in dwarf2+ debug info

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 02:40:39AM -0200, Alexandre Oliva wrote: > On Nov 21, 2017, Jakub Jelinek wrote: > > > On Wed, Nov 15, 2017 at 05:05:36AM -0200, Alexandre Oliva wrote: > > >> This patch introduces a new DWARF attribute to indicate that a function > >> is a partial copy

Re: [PATCH] Fix i?86 bootstrap (PR rtl-optimization/82044)

2017-11-22 Thread Richard Biener
On Wed, 22 Nov 2017, Jakub Jelinek wrote: > On Wed, Nov 22, 2017 at 12:27:20AM +0100, Jakub Jelinek wrote: > > The following patch fixes those two issues and adds similar overflow > > check to record_store too (in that spot width is always non-negative, so > > we don't need a special width == -1

[PATCH] Fix dwarf2out ICE on VEC_SERIES rtl (PR debug/83034)

2017-11-22 Thread Jakub Jelinek
Hi! On this testcase we get (vec_series (reg: ebp) (const_int 1)) in NOTE_INSN_CALL_ARG_LOCATION because the vector isn't live anywhere else. Right now we do not have a good story for providing values of optimized out vectors, so just punting on it like on other VEC_* codes is sufficient. For

PR83004: Accidental change to pr81136.c for VECTOR_BITS==128

2017-11-22 Thread Richard Sandiford
r254589 was supposed to leave tests unchanged for the default setting of VECTOR_BITS, but I must have got my sums wrong on pr81136.c. Sorry for the breakage. Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu, OK to install? Richard 2017-11-22 Richard Sandiford

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Richard Biener
On Tue, Nov 21, 2017 at 12:14 PM, Dominik Inführ wrote: > Hi, > > this patch tries to extend tree-ssa-dce.c to remove unnecessary > new/delete-pairs (it already does that for malloc/free). Clang does it too > and it seems to be allowed by >

[PATCH] Fix PR83089

2017-11-22 Thread Richard Biener
The following fixes if-conversion to free SCEV/niter estimates because it DCEs stmts. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-11-22 Richard Biener PR tree-optimization/83089 * tree-if-conv.c

Re: [RFTesting] New POINTER_DIFF_EXPR

2017-11-22 Thread Christophe Lyon
On 22 November 2017 at 09:29, Marc Glisse wrote: > On Wed, 22 Nov 2017, Marc Glisse wrote: > >> On Wed, 22 Nov 2017, Christophe Lyon wrote: >> >>> Since you committed this patch (r255021), my cross-builds of GCC for >>> aarch64-linux-gnu fail while building glibc: >>> >>>

RE: [patch] remove cilk-plus

2017-11-22 Thread Koval, Julia
Changes for these files(except sourcebuild one, will fix that) are included in patch I sent. I only removed from the patch deletion of the folders I mentioned. Julia > -Original Message- > From: Rainer Orth [mailto:r...@cebitec.uni-bielefeld.de] > Sent: Wednesday, November 22, 2017

[PATCH] Avoid UNSPEC_VOLATILE or volatile ASM_OPERANDS in debug insns (PR debug/83084)

2017-11-22 Thread Jakub Jelinek
Hi! Seems at least the scheduler treats UNSPEC_VOLATILE and perhaps volatile asm in DEBUG_INSNs as having side-effects and schedules differently depending on that. While we could tweak the scheduler not to do that, these will be actually never useful in DEBUG_INSNs anyway, we don't know what it

Re: [PATCH] Fix dwarf2out ICE on VEC_SERIES rtl (PR debug/83034)

2017-11-22 Thread Richard Biener
On Wed, 22 Nov 2017, Jakub Jelinek wrote: > Hi! > > On this testcase we get (vec_series (reg: ebp) (const_int 1)) > in NOTE_INSN_CALL_ARG_LOCATION because the vector isn't live anywhere else. > Right now we do not have a good story for providing values of optimized > out vectors, so just punting

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 10:30:29AM +0100, Richard Biener wrote: > --- a/gcc/tree-core.h > +++ b/gcc/tree-core.h > @@ -1787,7 +1787,9 @@ struct GTY(()) tree_function_decl { >unsigned has_debug_args_flag : 1; >unsigned tm_clone_flag : 1; >unsigned versioned_function : 1; > - /* No bits

Re: [RFTesting] New POINTER_DIFF_EXPR

2017-11-22 Thread Christophe Lyon
Hi Marc, On 20 November 2017 at 00:54, Marc Glisse wrote: > Hello, > > new version, regtested on powerpc64le-unknown-linux-gnu. The front-end parts > are up for review. > > 2017-10-28 Marc Glisse > > gcc/c/ > * c-fold.c

Re: [PATCH] Fix i?86 bootstrap (PR rtl-optimization/82044)

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 10:43:47AM +0100, Eric Botcazou wrote: > > Unfortunately this patch broke i686-linux bootstrap, during stage2 > > libgcc configure fails due to numerous ICEs. > > Note that the patch is on the 7 branch too. Richard has reverted it there. Jakub

Re: [PATCH] Fix i?86 bootstrap (PR rtl-optimization/82044)

2017-11-22 Thread Eric Botcazou
> Unfortunately this patch broke i686-linux bootstrap, during stage2 > libgcc configure fails due to numerous ICEs. Note that the patch is on the 7 branch too. -- Eric Botcazou

Re: [PATCH] Fix mult expansion ICE (PR middle-end/82875)

2017-11-22 Thread Richard Biener
On Wed, 22 Nov 2017, Jakub Jelinek wrote: > On Wed, Nov 22, 2017 at 10:41:19AM +0100, Richard Biener wrote: > > How much churn would it be to pass down a mode alongside the operands > > in expand_binop? Can't find it right now but didn't we introduce > > some rtx_with_mode pair-like stuff

Replace REDUC_*_EXPRs with internal functions.

2017-11-22 Thread Richard Sandiford
This patch replaces the REDUC_*_EXPR tree codes with internal functions. This is needed so that the support for in-order reductions can also use internal functions without too much complication. This came out of the review for: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01516.html Tested on

Re: libgo patch committed: Fix Makefile bug setting LD_LIBRARY_PATH

2017-11-22 Thread Eric Botcazou
> grep -q was even required by SUSv2 from 1997 so Solaris should really > support it. What version if Solaris is that and what version of grep? /usr/bin/grep on Solaris 10 (/usr/xpg4/bin/grep does support it). -- Eric Botcazou

Re: [RFTesting] New POINTER_DIFF_EXPR

2017-11-22 Thread Marc Glisse
On Wed, 22 Nov 2017, Christophe Lyon wrote: Since you committed this patch (r255021), my cross-builds of GCC for aarch64-linux-gnu fail while building glibc: /tmp/6857183_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/bin/aarch64-none-linux-gnu-gcc fetch-value.c -c -std=gnu99 -fgnu89-inline

Re: [PATCH] Fix i?86 bootstrap (PR rtl-optimization/82044)

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 9:54 AM, Richard Biener wrote: > On Wed, 22 Nov 2017, Jakub Jelinek wrote: > >> On Wed, Nov 22, 2017 at 12:27:20AM +0100, Jakub Jelinek wrote: >> > The following patch fixes those two issues and adds similar overflow >> > check to record_store too (in

[PATCH] Fix mult expansion ICE (PR middle-end/82875)

2017-11-22 Thread Jakub Jelinek
Hi! On these two testcases, we end up expanding MULT_EXPR where both arguments end up being VOIDmode. For smul_optab that isn't a problem, we have the mode next to it, but in some cases we want to use {u,s}mul_widen_optab which is a conversion optab which needs two modes expand_binop is called

[RFA][PATCH] Use SCEV conditionally within vr-values and evrp range analysis

2017-11-22 Thread Jeff Law
Clients of the evrp range analysis may not have initialized the SCEV infrastructure, and in fact my not want to (DOM for example). Yet inside both vr-values.c and gimple-ssa-evrp-analyze.c we have calls into SCEV (that will fault/abort if SCEV is not properly initialized). This patch allows

Re: [PATCH] handle non-constant offsets in -Wstringop-overflow (PR 77608)

2017-11-22 Thread Jeff Law
On 11/21/2017 12:07 PM, Martin Sebor wrote: > On 11/21/2017 09:55 AM, Jeff Law wrote: >> On 11/19/2017 04:28 PM, Martin Sebor wrote: >>> On 11/18/2017 12:53 AM, Jeff Law wrote: On 11/17/2017 12:36 PM, Martin Sebor wrote: > The attached patch enhances -Wstringop-overflow to detect more

Re: [RFA][PATCH] 8/n Pull evrp range analyzer into its own file

2017-11-22 Thread Jeff Law
On 11/22/2017 02:01 PM, Marc Glisse wrote: > On Sat, 18 Nov 2017, Jeff Law wrote: > >> * gimple-ssa-evrp-analyze.c: New file pulled from gimple-ssa-evrp.c. > > With the move to C++, wasn't there a policy to name new files *.cc > instead of *.c? I'd wondered about that myself. The only three

libgo patch committed: Pass -X option to ar on AIX

2017-11-22 Thread Ian Lance Taylor
This libgo patch by Tony Reix passes a -X option to ar on AIX, so that it does the right object file handling. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ===

Re: [PING 2][PATCH] enhance -Wrestrict to handle string built-ins (PR 78918)

2017-11-22 Thread Jeff Law
On 11/16/2017 02:29 PM, Martin Sebor wrote: > Ping. > > I've fixed the outstanding false positive exposed by the Linux > kernel.  The kernel builds with four instances of the warning, > all of them valid (perfect overlap in memcpy). > > I also built Glibc.  It shows one instance of the warning, 

[patch] Add support for #pragma GCC unroll v2

2017-11-22 Thread Eric Botcazou
Hi, this is a revised version of: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01452.html with the following changes: 1. integration of Bernhard's patch for the Fortran front-end, 2. Sandra's fix for the documentation, 3. minor tweaks to the C and C++ front-end, 4. change at the GIMPLE

Re: [PATCH] vrp_prop::check_array_ref fixes (PR tree-optimization/83044)

2017-11-22 Thread Richard Biener
On Wed, 22 Nov 2017, Jakub Jelinek wrote: > Hi! > > On the following testcase we ICE, because eltsize is 0 and when we > int_const_binop (TRUNC_DIV_EXPR, maxbound, size_int (0)), that of course > returns NULL. > The upper bound for zero sized elements is just not meaningful, if we use > any

Re: [PATCH] Handle VEC_SERIES with both constant args in simplify_binary_operation

2017-11-22 Thread Richard Sandiford
Jakub Jelinek writes: > Hi! > > I've noticed that if we construct a VEC_SERIES and later propagate > constants into both arguments (could happen e.g. in DEBUG_INSNs, or > during combine etc.) we don't simplify that. > > The following patch adds that, ok for trunk if it passes

Re: [PATCH 1/7]: SVE: Add CLOBBER_HIGH expression

2017-11-22 Thread Alan Hayward
> On 21 Nov 2017, at 03:13, Jeff Law wrote: >> >>> >>> You might also look at TARGET_HARD_REGNO_CALL_PART_CLOBBERED. I'd >>> totally forgotten about it. And in fact it seems to come pretty close >>> to what you need… >> >> Yes, some of the code is similar to the way >>

[PATCH] Handle VEC_SERIES with both constant args in simplify_binary_operation

2017-11-22 Thread Jakub Jelinek
Hi! I've noticed that if we construct a VEC_SERIES and later propagate constants into both arguments (could happen e.g. in DEBUG_INSNs, or during combine etc.) we don't simplify that. The following patch adds that, ok for trunk if it passes bootstrap/regtest? Or should it go into

Re: [PATCH, GCC/ARM] Use bitmap to control cmse_nonsecure_call register clearing

2017-11-22 Thread Kyrill Tkachov
Hi Thomas, On 15/11/17 17:08, Thomas Preudhomme wrote: Hi, As part of r253256, cmse_nonsecure_entry_clear_before_return has been rewritten to use auto_sbitmap instead of an integer bitfield to control which register needs to be cleared. This commit continue this work in

Re: [PATCH, GCC/ARM] Use bitmap to control cmse_nonsecure_call register clearing

2017-11-22 Thread Thomas Preudhomme
Thanks Kyrill. Committed the attached rebased patch (same patch but without the last hunk because a better fix was done in an earlier commit). Best regards, Thomas On 22/11/17 11:57, Kyrill Tkachov wrote: Hi Thomas, On 15/11/17 17:08, Thomas Preudhomme wrote: Hi, As part of r253256,

Re: [PATCH] Fix PR82991

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 11:41:24AM +0100, Richard Biener wrote: > > I am testing the following (old) patch to value number call lhs > according to the ERF_RETURNS_ARG annotation. This allows for > more expression simplification and also changes downstream > users of the argument to use the

Re: [PING] Plugin support on Windows/MinGW

2017-11-22 Thread Boris Kolpackov
JonY <10wa...@gmail.com> writes: > Is there a problem with using .so for internal libraries instead of > "dll"... I think not but I haven't tested it. The problem with using .so instead of .dll is that producing this non-standard extension may not be easy or possible depending on the build

Re: [PATCH][ARM] Fix test armv8_2-fp16-move-1.c

2017-11-22 Thread Sudi Das
Hi Kyrill and Christophe In case of soft fp testing, there are other assembly directives apart from the vmov one which are also failing. The directives probably make more sense in the hard fp context so instead of removing the vmov, I have added the -mfloat-abi=hard option. Is this ok for

Re: [PATCH][GCC][ARM] Dot Product NEON intrinsics [Patch (3/8)]

2017-11-22 Thread Kyrill Tkachov
Hi Tamar, On 06/11/17 16:53, Tamar Christina wrote: Hi All, This patch adds the NEON intrinsics for Dot product. Dot product is available from ARMv8.2-a and onwards. Regtested on arm-none-eabi, armeb-none-eabi, aarch64-none-elf and aarch64_be-none-elf with no issues found. Ok for trunk?

[PATCH] Make shift argument to eoshift0 be of type index_type

2017-11-22 Thread Janne Blomqvist
Regtested on x86_64-pc-linux-gnu, Ok for trunk? libgfortran/ChangeLog: 2017-11-22 Janne Blomqvist * intrinsics/eoshift0.c (eoshift0): Make shift an index_type. --- libgfortran/intrinsics/eoshift0.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

Re: [PATCH] Fix PR82991

2017-11-22 Thread Richard Biener
On Wed, 22 Nov 2017, Jakub Jelinek wrote: > On Wed, Nov 22, 2017 at 11:41:24AM +0100, Richard Biener wrote: > > > > I am testing the following (old) patch to value number call lhs > > according to the ERF_RETURNS_ARG annotation. This allows for > > more expression simplification and also

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Nathan Sidwell
On 11/21/2017 06:14 AM, Dominik Inführ wrote: Hi, this patch tries to extend tree-ssa-dce.c to remove unnecessary new/delete-pairs (it already does that for malloc/free). Clang does it too and it seems to be allowed by http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3664.html. I’ve

Re: [PATCH] PR libstdc++/48101 improve errors for invalid container specializations

2017-11-22 Thread Jonathan Wakely
On 22/11/17 11:23 +0100, Rainer Orth wrote: Hi Jonathan, This uses static_assert to improve the errors when attempting to instantiate invalid specializations of containers, e.g. set, or unordered_set (which mixes up the order of the hasher and equality predicate

Re: Replace REDUC_*_EXPRs with internal functions.

2017-11-22 Thread Richard Sandiford
Jakub Jelinek writes: > On Wed, Nov 22, 2017 at 10:09:08AM +, Richard Sandiford wrote: >> This patch replaces the REDUC_*_EXPR tree codes with internal functions. >> This is needed so that the support for in-order reductions can also use >> internal functions without too

Re: [PATCH] PR libstdc++/48101 improve errors for invalid container specializations

2017-11-22 Thread Jonathan Wakely
On 22/11/17 10:56 +, Jonathan Wakely wrote: On 22/11/17 11:23 +0100, Rainer Orth wrote: Hi Jonathan, This uses static_assert to improve the errors when attempting to instantiate invalid specializations of containers, e.g. set, or unordered_set (which mixes up the

[PATCH] Use __BYTE_ORDER__ predefined macro instead of runtime check

2017-11-22 Thread Janne Blomqvist
By using the __BYTE_ORDER__ predefined macro we don't need the determine_endianness function anymore. Regtested on x86_64-pc-linux-gnu, Ok for trunk? libgfortran/ChangeLog: 2017-11-22 Janne Blomqvist * io/inquire.c (inquire_via_unit): Use __BYTE_ORDER__ predefined

Re: [PATCH] Fix mult expansion ICE (PR middle-end/82875)

2017-11-22 Thread Richard Sandiford
Richard Biener writes: > On Wed, 22 Nov 2017, Jakub Jelinek wrote: > >> On Wed, Nov 22, 2017 at 10:41:19AM +0100, Richard Biener wrote: >> > How much churn would it be to pass down a mode alongside the operands >> > in expand_binop? Can't find it right now but didn't we

[PATCH] vrp_prop::check_array_ref fixes (PR tree-optimization/83044)

2017-11-22 Thread Jakub Jelinek
Hi! On the following testcase we ICE, because eltsize is 0 and when we int_const_binop (TRUNC_DIV_EXPR, maxbound, size_int (0)), that of course returns NULL. The upper bound for zero sized elements is just not meaningful, if we use any index we still won't reach maximum object size that way.

[PATCH] Fix PR82991

2017-11-22 Thread Richard Biener
I am testing the following (old) patch to value number call lhs according to the ERF_RETURNS_ARG annotation. This allows for more expression simplification and also changes downstream users of the argument to use the return value which should help register allocation and register lifetime in

Re: Replace REDUC_*_EXPRs with internal functions.

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 10:09:08AM +, Richard Sandiford wrote: > This patch replaces the REDUC_*_EXPR tree codes with internal functions. > This is needed so that the support for in-order reductions can also use > internal functions without too much complication. > > This came out of the

Re: [PATCH] Fix result for conditional reductions matching at index 0

2017-11-22 Thread Alan Hayward
> On 22 Nov 2017, at 09:14, Richard Biener wrote: > > On Tue, Nov 21, 2017 at 5:43 PM, Kilian Verhetsel > wrote: >> >>> This is PR81179 I think, please mention that in the changelog. >> >> Correct, my bad for missing that. >> >>>

Re: [PATCH] Fix mult expansion ICE (PR middle-end/82875)

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 01:03:06PM +, Richard Sandiford wrote: > Richard Biener writes: > > On Wed, 22 Nov 2017, Jakub Jelinek wrote: > > > >> On Wed, Nov 22, 2017 at 10:41:19AM +0100, Richard Biener wrote: > >> > How much churn would it be to pass down a mode alongside the

Re: [C++ PATCH] Fix qsort checking ICE on member_name_cmp (PR c++/82401)

2017-11-22 Thread Nathan Sidwell
On 11/22/2017 03:57 PM, Jakub Jelinek wrote: Hi! My reading of insert_late_enum_def_bindings etc. is that it intentionally appends stuff into the vector without checking if the trees are already present there (on the testcase below in particular CONST_DECLs for the e1 and e2 enumerators which

Re: PR83004: Accidental change to pr81136.c for VECTOR_BITS==128

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 02:17:59PM +, Richard Sandiford wrote: > Jakub Jelinek writes: > > On Wed, Nov 22, 2017 at 02:51:09PM +0100, Richard Biener wrote: > >> On Wed, Nov 22, 2017 at 10:30 AM, Richard Sandiford > >> wrote: > >> > r254589 was

[C++ Patch] PR 82293 ("[8 Regression] ICE in nonlambda_method_basetype at gcc/cp/lambda.c:886")

2017-11-22 Thread Paolo Carlini
Hi, this ICE on valid is triggered by the existing cpp0x/lambda/lambda-ice20.C when -Wshadow is requested. Today I confirmed that it can be reproduced only after r251433, the "Reimplement handling of lambdas in templates." patch: then, as part of tsubst_lambda_expr, do_pushdecl calls

Re: [PATCH] Fix result for conditional reductions matching at index 0

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 12:01 PM, Alan Hayward wrote: > >> On 22 Nov 2017, at 09:14, Richard Biener wrote: >> >> On Tue, Nov 21, 2017 at 5:43 PM, Kilian Verhetsel >> wrote: >>> This is PR81179 I think, please

Re: [PATCH][ARM] Fix test armv8_2-fp16-move-1.c

2017-11-22 Thread Kyrill Tkachov
On 22/11/17 11:25, Sudi Das wrote: Hi Kyrill and Christophe In case of soft fp testing, there are other assembly directives apart from the vmov one which are also failing. The directives probably make more sense in the hard fp context so instead of removing the vmov, I have added the

Re: Replace REDUC_*_EXPRs with internal functions.

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 12:15 PM, Richard Sandiford wrote: > Jakub Jelinek writes: >> On Wed, Nov 22, 2017 at 10:09:08AM +, Richard Sandiford wrote: >>> This patch replaces the REDUC_*_EXPR tree codes with internal functions. >>> This is needed

Re: PR83004: Accidental change to pr81136.c for VECTOR_BITS==128

2017-11-22 Thread Richard Sandiford
Jakub Jelinek writes: > On Wed, Nov 22, 2017 at 02:51:09PM +0100, Richard Biener wrote: >> On Wed, Nov 22, 2017 at 10:30 AM, Richard Sandiford >> wrote: >> > r254589 was supposed to leave tests unchanged for the default setting >> > of VECTOR_BITS,

[Patch AArch64] Fixup floating point division with -march=armv8-a+nosimd

2017-11-22 Thread Ramana Radhakrishnan
Hi, I received a private report from a customer that gcc was putting out calls to __divdf3 when compiling with +nosimd. When the reciprocal math support was added this was probably an oversight or a typo. The canonical examples is : double foo (double x, double y) {

[PATCH, i386] Fix behavior for –mprefer-vector-width= option

2017-11-22 Thread Shalnov, Sergey
Hi, This patch making –mprefer-vector-width= option inclusive. This means that if we use –mprefer-vector-width=128 it should switch TARGET_PREFER_AVX128=ON and TARGET_PREFER_AVX256=ON also. It is minor change to generate “xmm” with –mprefer-vector-width=128 on the platform with “zmm”. Sergey

Re: [PATCH][ARM] Fix test armv8_2-fp16-move-1.c

2017-11-22 Thread Sudakshina Das
On 22/11/17 15:21, Kyrill Tkachov wrote: On 22/11/17 11:25, Sudi Das wrote: Hi Kyrill and Christophe In case of soft fp testing, there are other assembly directives apart from the vmov one which are also failing. The directives probably make more sense in the hard fp context so instead

Re: PR82547: Undetected overflow for UNSIGNED wide_ints

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 10:33 AM, Richard Sandiford wrote: > wi::add_large and wi::sub_large weren't setting the overflow bit > correctly for unsigned operations if the result needed fewer HWIs > than the precision. > > Tested on aarch64-linux-gnu, x86_64-linux-gnu

Re: [PATCH, GCC/ARM] Factor out CMSE register clearing code

2017-11-22 Thread Kyrill Tkachov
Hi Thomas, On 15/11/17 17:12, Thomas Preudhomme wrote: Hi, Functions cmse_nonsecure_call_clear_caller_saved and cmse_nonsecure_entry_clear_before_return both contain very similar code to clear registers. What's worse, they differ slightly at times so if a bug is found in one careful thoughts

Re: [PATCH] Add fields to struct gomp_thread for debugging purposes

2017-11-22 Thread Kevin Buettner
On Sat, 4 Nov 2017 21:39:14 -0700 Kevin Buettner wrote: > On Tue, 31 Oct 2017 08:03:22 +0100 > Jakub Jelinek wrote: > > > On Mon, Oct 30, 2017 at 04:06:15PM -0700, Kevin Buettner wrote: > > > This patch adds a new member named "pthread_id" to the

Re: Fix calculation of ptr_mode for MODE_PARTIAL_INT Pmode

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 10:26 AM, Richard Sandiford wrote: > This patch fixes a regression caused by r251469, where I'd incorrectly > converted a call to mode_for_size that sometimes needs MODE_PARTIAL_INTs. > > Tested on aarch64-linux-gnu, x86_64-linux-gnu and

Re: PR83004: Accidental change to pr81136.c for VECTOR_BITS==128

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 10:30 AM, Richard Sandiford wrote: > r254589 was supposed to leave tests unchanged for the default setting > of VECTOR_BITS, but I must have got my sums wrong on pr81136.c. > Sorry for the breakage. > > Tested on aarch64-linux-gnu,

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 1:47 PM, Nathan Sidwell wrote: > On 11/21/2017 06:14 AM, Dominik Inführ wrote: >> >> Hi, >> >> this patch tries to extend tree-ssa-dce.c to remove unnecessary >> new/delete-pairs (it already does that for malloc/free). Clang does it too >> and it seems to

[PATCH, GCC/ARM] Remove useless variable in CMSE code

2017-11-22 Thread Thomas Preudhomme
Hi, Functions cmse_nonsecure_call_clear_caller_saved () and cmse_nonsecure_entry_clear_before_return () use a separate variable holding a pointer to padding_bits_to_clear array's first entry which is used when calling function compute_not_to_clear_mask (). This does not save space over using

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Nathan Sidwell
On 11/22/2017 08:59 AM, Richard Biener wrote: Anything else can be done as followup and need not be done as part of this patch. An enum for this would work I guess. I've added this to https://gcc.gnu.org/wiki/ImprovementProjects: Compress DECL flags tree-core defines a number of bit

Re: PR83004: Accidental change to pr81136.c for VECTOR_BITS==128

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 3:17 PM, Richard Sandiford wrote: > Jakub Jelinek writes: >> On Wed, Nov 22, 2017 at 02:51:09PM +0100, Richard Biener wrote: >>> On Wed, Nov 22, 2017 at 10:30 AM, Richard Sandiford >>> wrote:

Re: [PATCH, GCC/ARM] Factor out CMSE register clearing code

2017-11-22 Thread Thomas Preudhomme
On 22/11/17 14:45, Kyrill Tkachov wrote: Hi Thomas, On 15/11/17 17:12, Thomas Preudhomme wrote: Hi, Functions cmse_nonsecure_call_clear_caller_saved and cmse_nonsecure_entry_clear_before_return both contain very similar code to clear registers. What's worse, they differ slightly at times so

Re: PR83004: Accidental change to pr81136.c for VECTOR_BITS==128

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 02:51:09PM +0100, Richard Biener wrote: > On Wed, Nov 22, 2017 at 10:30 AM, Richard Sandiford > wrote: > > r254589 was supposed to leave tests unchanged for the default setting > > of VECTOR_BITS, but I must have got my sums wrong on

Re: [PATCH, GCC/ARM] Factor out CMSE register clearing code

2017-11-22 Thread Kyrill Tkachov
On 22/11/17 15:07, Thomas Preudhomme wrote: On 22/11/17 14:45, Kyrill Tkachov wrote: Hi Thomas, On 15/11/17 17:12, Thomas Preudhomme wrote: Hi, Functions cmse_nonsecure_call_clear_caller_saved and cmse_nonsecure_entry_clear_before_return both contain very similar code to clear registers.

Re: [PATCH] PR libstdc++/48101 improve errors for invalid container specializations

2017-11-22 Thread Ian Lance Taylor
On Wed, Nov 22, 2017 at 3:06 AM, Jonathan Wakely wrote: > On 22/11/17 10:56 +, Jonathan Wakely wrote: >> >> On 22/11/17 11:23 +0100, Rainer Orth wrote: >>> >>> Hi Jonathan, >>> This uses static_assert to improve the errors when attempting to instantiate invalid

[PATCH] C++: avoid most reserved words as misspelling suggestions (PR c++/81610 and PR c++/80567)

2017-11-22 Thread David Malcolm
lookup_name_fuzzy can offer some reserved words as suggestions for misspelled words, helping with "singed"/"signed" typos. PR c++/81610 and PR c++/80567 report problems where the C++ frontend suggested "if", "for" and "else" as corrections for misspelled variable names. The root cause is that in

Re: RFC/A: Stop cselib.c recording sets of the frame pointer

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 05:46:26PM +, Richard Sandiford wrote: > 2017-11-22 Richard Sandiford > > gcc/ > * cselib.c (expand_loc, cselib_expand_value_rtx_1): Change > justification for checking for the stack and hard frame pointers. > Check

Re: [PATCH] Fix result for conditional reductions matching at index 0

2017-11-22 Thread Kilian Verhetsel
Thank you both for your comments. I have added the check to ensure the index vector won't cause an overflow. I also added tests to the testsuite in order to check that the loop is vectorized for UINT_MAX - 1 iterations but not UINT_MAX iterations. I was not able to write code that triggers

RE: [patch] remove cilk-plus

2017-11-22 Thread Joseph Myers
This patch version does not appear to address my comment that you're leaving behind comments in c-parser.c relating to Cilk array notations while removing the subsequent code. (Or in one case actually reindenting the comment that is no longer relevant, rather than removing it.) -- Joseph S.

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Jeff Law
On 11/22/2017 03:31 AM, Martin Jambor wrote: > On Tue, Nov 21 2017, Jeff Law wrote: >> On 11/21/2017 04:14 AM, Dominik Inführ wrote: >>> Hi, >>> >>> this patch tries to extend tree-ssa-dce.c to remove unnecessary >>> new/delete-pairs (it already does that for malloc/free). Clang does it too >>>

Re: [patch] Add support for #pragma GCC unroll

2017-11-22 Thread Sandra Loosemore
On 11/21/2017 03:18 AM, Eric Botcazou wrote: First of all, the structuring in this section is screwed up. The discussion and examples for the previous item (#pragma ivdep) should be moved inside the @table so that you don't have to introduce another @table here, just insert another entry into

[committed] PR 83104: Avoid two_valued_val_range_p for pointers

2017-11-22 Thread Marc Glisse
Hello, with POINTER_DIFF_EXPR, checking if the result is integral does not imply that the arguments are as well, so this check needed a tweak. Bootstrap+regtest on gcc112, pre-approved by Richard. 2017-11-22 Marc Glisse PR tree-optimization/83104 gcc/

  1   2   >