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 flags, which meant that f

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 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 (c_fully_fold_internal): Handle POINTER_DIFF_EXPR. > * c-

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: 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 would we want to use /usr/

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 fet

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 li

[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 (pass_if_conversion::execute): If anything

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 of its abstract or

[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. --- trunk/libgfortran/intrinsics/e

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 h

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: >>> >>> /tmp/6857183_6.tmpdir/aci

[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. Richard

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 that spot width is alw

[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 the

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 d

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, since for a loop such as: > > #

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 10:11

[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 ju

[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 m

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: [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 > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/201

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 gcc/test

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 gcc/ PR

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: [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 conversio

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 neve

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 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 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 want to use {u,s}m

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 > Subject: RE: [patch] remove cilk-plus > > Changes for these files(except sourcebuild one, wil

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 240

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. Wh

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 somewhe

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: [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 s

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 Botcaz

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, hash> (which mixes up the > order of the hasher and equality predicate arguments). > > This means instead of more than 100 lines of con

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: [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 >> http://www.open-std

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 l

[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 gene

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 revie

[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 lev

[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. Whil

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, hash> (which mixes up the order of the hasher and equality predicate arguments). This means i

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 return

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. >> >>> This unconditionally pessimizes code even if there is no valid

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, hash> (which mixes up the order of the hasher

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 system

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 much complication. >>

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 tr

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? gcc

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 >> TARGET_HARD_REGNO_CALL

[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 --git a/libgfortran/int

[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 simplify_consta

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 changes

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 cmse_nonsecure_call_clea

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 index

[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 macro.

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] 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 bootstrap/regtest? >

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 introduce >> > some rtx_wi

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 operands > >> > 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, cmse

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 powerpc64le-linux-gnu. > Also spot-c

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, x86_64-linux-gnu and powerpc64le-linux-gnu

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 and powerpc64le-linux-gnu. > OK

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 so that the support for in-order reductions can

[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 &pa

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 be allowed by >> h

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 pr81136.c. > > Sorry for the breakage. >

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, but I must have got my sums wrong on pr81136.c.

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 fla

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 supposed to leave tests unchanged for the default

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 is

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: >>> > r254589 was supposed to leave tests unchanged for the default setting >>>

[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 check_lo

[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) { ret

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 mention that in the changelog. >>> >>> Correct, my bad for missing that. >>>

[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 2

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: [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. W

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 specializations of con

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 -mfloa

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 gomp_thread > > > struct. It is initialized i

[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: [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 of

Re: [PATCH] Fix up -Wreturn-type (PR c++/83045)

2017-11-22 Thread Christophe Lyon
Hi, On 21 November 2017 at 18:23, Jeff Law wrote: > On 11/21/2017 06:52 AM, Jakub Jelinek wrote: >> Hi! >> >> The C++ FE now emits __builtin_unreachable () with BUILTINS_LOCATION >> on spots that return from functions/methods returning non-void without >> proper return. This breaks the -Wreturn

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 th

Re: [PATCH] Use __BYTE_ORDER__ predefined macro instead of runtime check

2017-11-22 Thread Jerry DeLisle
On 11/22/2017 04:34 AM, Janne Blomqvist wrote: > 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? > Looks good, thanks for patch! Jerry

[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/ * vr-values.c (simpli

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 INTEGE

Re: [SH][committed] Cleanup div and mul patterns

2017-11-22 Thread Tom de Vries
On 05/03/2016 08:50 AM, Oleg Endo wrote: Hi, The attached patch cleans up the SH div and mul patterns a bit. Almost no changes in CSiBE, except for a few minor improvements. Tested on sh-elf with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb, -m2a/-mb,-m4/-ml,-m4/-mb,-m4a/

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. M

refine default dwarf settings on VxWorks

2017-11-22 Thread Olivier Hainque
Hello, The Vxworks ports have specific default settings controlling the dwarf output to accomodate the possible use of old non-gdb debuggers provided with the VxWorks environment. Those settings are hardcoded today, even though different versions of VxWorks come with different constraints. This

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

2017-11-22 Thread Jeff Law
On 11/22/2017 04:31 AM, Alan Hayward wrote: > >> 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 c

Simplify ptr - 0

2017-11-22 Thread Marc Glisse
Hello, I hadn't implemented this simplification because I think it is invalid code, but apparently people do write it, so we might as well handle it sensibly. This also happens to work around PR 83104 (already fixed). bootstrap+regtest on powerpc64le-unknown-linux-gnu. 2017-11-22 Marc Gliss

Re: Simplify ptr - 0

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 06:34:08PM +0100, Marc Glisse wrote: > Hello, > > I hadn't implemented this simplification because I think it is invalid code, > but apparently people do write it, so we might as well handle it sensibly. > This also happens to work around PR 83104 (already fixed). > > boot

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

2017-11-22 Thread Richard Sandiford
One of the effects of: https://gcc.gnu.org/ml/gcc-patches/2017-10/msg02066.html is that we now emit: (set (hard-frame-pointer) (stack-pointer)) instead of the previous non-canonical: (set (hard-frame-pointer) (plus (stack-pointer) (const_int 0))) However, recent changes to aarch64_ex

  1   2   >