Re: Make tree-ssa-strlen.c handle partial unterminated strings

2017-05-07 Thread Richard Sandiford
Jakub Jelinek writes: > On Fri, May 05, 2017 at 01:01:08PM +0100, Richard Sandiford wrote: >> tree-ssa-strlen.c looks for cases in which a string is built up using >> operations like: >> >> memcpy (a, "foo", 4); >> memcpy (a + 3, "bar", 4); >> int x = strlen (a); >> >> As a side-effe

[PATCH, RFC] warn about raw pointers that can be unique_ptr

2017-05-07 Thread tbsaunde+gcc
From: Trevor Saunders Hi, This is a start at warning about various resource allocation issues that can be improved. Currently it only warns about functions that call malloc and then always pass the resulting pointer to free(). It should be pretty simple to extend this to new/delete and new[]/d

[patch, fortran] Create temporary variables for matmul

2017-05-07 Thread Thomas Koenig
Hello world, the attached patch goes one step further in matmul inlinding. It converts statements like r = dot_product(matmul(a2,v1),v2) into tmp = matmul(a2,v1) r = dot_product(tmp,v2) to enable inlining of matmul (but only if inlining is active, of course). In order to detect multip

New Swedish PO file for 'gcc' (version 7.1.0)

2017-05-07 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Swedish team of translators. The file is available at: http://translationproject.org/latest/gcc/sv.po (This file, 'gcc-7.1.0.sv.po', has just

Re: [PATCH 2/n] [PR tree-optimization/78496] Simplify ASSERT_EXPRs to facilitate jump threading

2017-05-07 Thread Jeff Law
On 05/06/2017 05:56 PM, Andrew Pinski wrote: On Sat, May 6, 2017 at 4:55 PM, Andrew Pinski wrote: On Sat, May 6, 2017 at 8:03 AM, Jeff Law wrote: This is the 2nd of 3-5 patches to address pr78496. Jump threading will examine ASSERT_EXPRs as it walks the IL and record information from those A

Re: [PATCH, RFC] warn about raw pointers that can be unique_ptr

2017-05-07 Thread Marc Glisse
On Sun, 7 May 2017, tbsaunde+...@tbsaunde.org wrote: This is a start at warning about various resource allocation issues that can be improved. Currently it only warns about functions that call malloc and then always pass the resulting pointer to free(). It should be pretty simple to extend thi

Re: [PATCH] PR80280: Fix quoting of candidate functions

2017-05-07 Thread Martin Sebor
On 05/06/2017 02:41 PM, Volker Reichelt wrote: Hi, the following patch fixes some wrong quoting that was introduced by Martin's patch for PR translation/80280, see https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=247607 Consider the following testcase: struct A {}; bool b = !A(); On tr

[patch] FreeBSD arm: make _Unwind_G/SetIP available as function.

2017-05-07 Thread Andreas Tobler
Hi all, On FreeBSD we make use of the functions _Unwind_GetIP, _Unwind_GetIPInfo and _Unwind_SetIP outside of GCC. All other FreeBSD targets have these functions available except arm. Now since the GCC port for arm*-*-freebsd* is used more often (not only by me ;), I was pointed out that the

[patch] FreeBSD arm libgcc config.host

2017-05-07 Thread Andreas Tobler
Hi all, I'm going to commit the below patch to all active branches. (8,7,6,5) It makes arm*-*-freebsd* use the generic FreeBSD t-slibgcc-elf-ver definition. This makes all FreeBSD targets 'consistent' in this area. If not ok, please speak up soon. TIA, Andreas 2017-05-07 Andreas Tobler

Re: [PATCH] PR80280: Fix quoting of candidate functions

2017-05-07 Thread Volker Reichelt
OK, committed as obvious (r247728). Regards, Volker On 7 May, Martin Sebor wrote: > On 05/06/2017 02:41 PM, Volker Reichelt wrote: >> Hi, >> >> the following patch fixes some wrong quoting that was introduced by >> Martin's patch for PR translation/80280, see >> https://gcc.gnu.org/viewcvs/gcc?v

Re: {PATCH] New C++ warning -Wcatch-value

2017-05-07 Thread Volker Reichelt
On 2 May, Martin Sebor wrote: > On 05/01/2017 02:38 AM, Volker Reichelt wrote: >> Hi, >> >> catching exceptions by value is a bad thing, as it may cause slicing, i.e. >> a) a superfluous copy >> b) which is only partial. >> See also >> https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCo

Re: [PATCH/AARCH64] Improve/correct ThunderX 1 cost model for Arith_shift

2017-05-07 Thread Andrew Pinski
On Fri, Dec 30, 2016 at 10:05 PM, Andrew Pinski wrote: > Hi, > Currently for the following function: > int f(int a, int b) > { > return a + (b <<7); > } > > GCC produces: > add w0, w0, w1, lsl 7 > But for ThunderX 1, it is better if the instruction was split allowing > better scheduling to

Re: [PATCH, RFC] warn about raw pointers that can be unique_ptr

2017-05-07 Thread Trevor Saunders
On Sun, May 07, 2017 at 07:32:48PM +0200, Marc Glisse wrote: > On Sun, 7 May 2017, tbsaunde+...@tbsaunde.org wrote: > > > This is a start at warning about various resource allocation issues that > > can be > > improved. Currently it only warns about functions that call malloc and then > > always

Re: {PATCH] New C++ warning -Wcatch-value

2017-05-07 Thread Martin Sebor
On 05/07/2017 02:03 PM, Volker Reichelt wrote: On 2 May, Martin Sebor wrote: On 05/01/2017 02:38 AM, Volker Reichelt wrote: Hi, catching exceptions by value is a bad thing, as it may cause slicing, i.e. a) a superfluous copy b) which is only partial. See also https://github.com/isocpp/CppCor

Re: [PATCH 2/n] [PR tree-optimization/78496] Simplify ASSERT_EXPRs to facilitate jump threading

2017-05-07 Thread Andrew Pinski
On Sun, May 7, 2017 at 8:06 AM, Jeff Law wrote: > On 05/06/2017 05:56 PM, Andrew Pinski wrote: >> >> On Sat, May 6, 2017 at 4:55 PM, Andrew Pinski wrote: >>> >>> On Sat, May 6, 2017 at 8:03 AM, Jeff Law wrote: This is the 2nd of 3-5 patches to address pr78496. Jump threading

Re: [PATCH 2/n] [PR tree-optimization/78496] Simplify ASSERT_EXPRs to facilitate jump threading

2017-05-07 Thread Jeff Law
On 05/07/2017 09:18 PM, Andrew Pinski wrote: On Sun, May 7, 2017 at 8:06 AM, Jeff Law wrote: On 05/06/2017 05:56 PM, Andrew Pinski wrote: On Sat, May 6, 2017 at 4:55 PM, Andrew Pinski wrote: On Sat, May 6, 2017 at 8:03 AM, Jeff Law wrote: This is the 2nd of 3-5 patches to address pr7849

Re: Record equivalences for spill registers

2017-05-07 Thread Jim Wilson
On 05/05/2017 12:23 AM, Richard Sandiford wrote: 2017-05-05 Richard Sandiford gcc/ * lra-constraints.c (lra_copy_reg_equiv): New function. (split_reg): Use it to copy equivalence information from the original register to the spill register. This patch breaks aarch64

Re: [PATCH] Pretty-printing of some unsupported expressions (PR c/35441)

2017-05-07 Thread Volker Reichelt
On 2 May, Joseph Myers wrote: > On Fri, 10 Mar 2017, Volker Reichelt wrote: > >> a) This part (with foo1 and foo2 from the testcase) is straightforward. > > That part is OK. > >> b) I chose the shift operators 'a << b' and 'a >> b' for the rotate >>expressions, which is not 100% correct. Wo

Re: Record equivalences for spill registers

2017-05-07 Thread Andrew Pinski
On Sun, May 7, 2017 at 10:26 PM, Andrew Pinski wrote: > On Sun, May 7, 2017 at 9:30 PM, Jim Wilson wrote: >> On 05/05/2017 12:23 AM, Richard Sandiford wrote: >>> >>> 2017-05-05 Richard Sandiford >>> >>> gcc/ >>> * lra-constraints.c (lra_copy_reg_equiv): New function. >>> (split

Re: Record equivalences for spill registers

2017-05-07 Thread Andrew Pinski
On Sun, May 7, 2017 at 9:30 PM, Jim Wilson wrote: > On 05/05/2017 12:23 AM, Richard Sandiford wrote: >> >> 2017-05-05 Richard Sandiford >> >> gcc/ >> * lra-constraints.c (lra_copy_reg_equiv): New function. >> (split_reg): Use it to copy equivalence information from the >>

Re: [PATCH] Don't assume __secure_getenv is available

2017-05-07 Thread Janne Blomqvist via gcc-patches
PING On Thu, Apr 27, 2017 at 9:55 PM, Janne Blomqvist wrote: > On Thu, Apr 27, 2017 at 9:50 PM, Janne Blomqvist > wrote: > [snip] > > And on top of that patch this simple typo fix: > > diff --git a/libgfortran/runtime/environ.c b/libgfortran/runtime/environ.c > index 969dcdf..f488e87 100644 > --

Re: Record equivalences for spill registers

2017-05-07 Thread Richard Sandiford via gcc-patches
Andrew Pinski writes: > On Sun, May 7, 2017 at 9:30 PM, Jim Wilson wrote: >> On 05/05/2017 12:23 AM, Richard Sandiford wrote: >>> >>> 2017-05-05 Richard Sandiford >>> >>> gcc/ >>> * lra-constraints.c (lra_copy_reg_equiv): New function. >>> (split_reg): Use it to copy equivalenc

Re: Record equivalences for spill registers

2017-05-07 Thread Andrew Pinski via gcc-patches
On Sun, May 7, 2017 at 11:37 PM, Richard Sandiford wrote: > Andrew Pinski writes: >> On Sun, May 7, 2017 at 9:30 PM, Jim Wilson wrote: >>> On 05/05/2017 12:23 AM, Richard Sandiford wrote: 2017-05-05 Richard Sandiford gcc/ * lra-constraints.c (lra_copy_reg_equi