Re: [PATCH] use zero as the lower bound for a signed-unsigned range (PR 79327)

2017-02-04 Thread Jakub Jelinek
On Fri, Feb 03, 2017 at 05:39:21PM +0100, Jakub Jelinek wrote: > Say in the http://gcc.gnu.org/ml/gcc-patches/2017-02/msg00234.html > patch, you would with my patch need just the tree_digits part, > and then the very last hunk in gimple-ssa-sprintf.c (with > likely_adjust && > removed). Because y

Re: [wwwdocs] Uncomment link to gcc-7/porting_to.html

2017-02-04 Thread Gerald Pfeifer
On Fri, 3 Feb 2017, David Malcolm wrote: > I took the liberty of committing this, under the "obvious" rule. Thanks! No liberty, no need to quote the "obvious" rule, just be my guest making changes like this (and beyond). :-) Gerald

Re: [PATCH][AArch64] Accept more addressing modes for PRFM

2017-02-04 Thread Maxim Kuvyrkov
> On Feb 3, 2017, at 8:12 PM, Kyrill Tkachov > wrote: > > Hi all, > > While evaluating Maxim's SW prefetch patches [1] I noticed that the aarch64 > prefetch pattern is > overly restrictive in its address operand. It only accepts simple register > addressing modes. > In fact, the PRFM instruct

[GIMPLE FE] Avoid ICE with __builtin_abs

2017-02-04 Thread Prathamesh Kulkarni
Hi, The following test-case ICE's with -fgimple: int __GIMPLE foo(int a) { int t1; t1_1 = __builtin_abs (a); return t1_1; } gimplefe-2.c:4:3: internal compiler error: in get_callee_fndecl, at tree.c:9500 t1_1 = __builtin_abs (a); ^~~~ 0xe96e8d get_callee_fndecl(tree_node const*) ../..

[PATCH, Fortran, pr79230, v1] [7 Regression] [OOP] Run time error: double free or corruption

2017-02-04 Thread Andre Vehreschild
Hi all, attached patch fixes a regression when a polymorphic pointer component was present. The results was a double free. The attached patch fixes this, by not caring about freeing pointer components as part of gfortran's memory management, i.e., the programmer has to take care about freeing/disa

Re: [PATCH GCC 6/9]Simplify control flow graph for vectorized loop

2017-02-04 Thread Jan Hubicka
> Hi, > This is the main patch improving control flow graph for vectorized loop. It > generally rewrites loop peeling stuff in vectorizer. As described in patch, > for a typical loop to be vectorized like: > >preheader: > LOOP: >header_bb: >loop_body >if (e

[PATCH, Fortran, pr78958, v1] Unallocated memory access after SOURCE-ALLOCATEing unlimited polymorphic object

2017-02-04 Thread Andre Vehreschild
Hi all, attached patch takes the _len-component of unlimited polymorphic objects into account, when source-ALLOCATEing an unlimited polymorphic object. The testcase for this gcc/testsuite/gfortran.dg/alloc_comp_class_5.f03 with valgrind/sanitizer. I therefore added no additional testcase. Bootstr

[PATCH, Fortran, pr79335, v1] [7 Regression] Conditional jump or move depends on uninitialised in value get_scalar_to_descriptor_type(tree_node*, symbol_attribute) (trans-expr.c:53)

2017-02-04 Thread Andre Vehreschild
Hi all, attached patch fixes the access of uninitialized data. Thanks Martin for analyzing this so far. The symbol_attributes on the stack was used without initializing it from the symbol's attributes. Bootstraps and regstests ok on x86_64-linux-gnu/f25. Ok for trunk? Regards, Andre --

Re: [PATCH] Fix __atomic to not implement atomic loads with CAS.

2017-02-04 Thread Dominique d'Humières
> This patch fixes the __atomic builtins to not implement supposedly > lock-free atomic loads based on just a compare-and-swap operation. > … Commit r245098 caused New failures: FAIL: libgomp.c/atomic-2.c (test for excess errors) FAIL: libgomp.c/atomic-4.c (test for excess errors) FAIL: libgomp.c

[RFA][PR tree-optimization/79095] [PATCH 1/4] Improve ranges for MINUS_EXPR and EXACT_DIV_EXPR

2017-02-04 Thread Jeff Law
This is the first of a 4 part series to address the issues around 79095. This patch addresses improvements in determining ranges of binary expressions in three ways. First if we are otherwise unable to find a range for the result of a MINUS_EXPR, if we know the arguments are not equal, then w

[RFA] [PR tree-optimization/79095][PATCH 2/4] Add infrastructure to detect overflow checks

2017-02-04 Thread Jeff Law
This is the second in the 4 part series to address 79095. This patch introduces a new function into tree-vrp.c to allow for the detection of overflow checks of the form A OP A + CST (for unsigned/wrapping A). This is implemented by first checking for A OP B, we then conditionally walk the A

[RFA][PR tree-optimization/79095][PATCH 4/4] Tests

2017-02-04 Thread Jeff Law
These are the tests. The tests in g++.dg start with a reduced test from Martin (pr79095-1.C) that includes a size check. With the size != 0 check this testcase should not issue any warnings as the path that turns into a __builtin_memset should get eliminated. pr79095-2.C is the same test,

[RFA] [PR tree-optimization/79095][PATCH 3/4] Improve ASSERT_EXPRs and simplification of overflow tests

2017-02-04 Thread Jeff Law
This is the actual optimization piece of the patchseries and uses the overflow test detection function in patch #2. First, when we detect an overflow test, we register additional ASSERT_EXPRs for the given name. So instead of an ASSERT_EXPR for an expression like A < B, we get an assert lik

New French PO file for 'gcc' (version 7.1-b20170101)

2017-02-04 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 French team of translators. The file is available at: http://translationproject.org/latest/gcc/fr.po (This file, 'gcc-7.1-b20170101.fr.po', h

Re: [PATCH, Fortran, pr79230, v1] [7 Regression] [OOP] Run time error: double free or corruption

2017-02-04 Thread Paul Richard Thomas
Hi Andre, This looks fine to me - OK for trunk. Thanks Paul On 4 February 2017 at 11:59, Andre Vehreschild wrote: > Hi all, > > attached patch fixes a regression when a polymorphic pointer component was > present. The results was a double free. The attached patch fixes this, by not > caring ab

Re: [PATCH, Fortran, pr78958, v1] Unallocated memory access after SOURCE-ALLOCATEing unlimited polymorphic object

2017-02-04 Thread Paul Richard Thomas
Hi Andre, This looks to be OK for trunk. Thanks for the patch. Paul On 4 February 2017 at 13:11, Andre Vehreschild wrote: > Hi all, > > attached patch takes the _len-component of unlimited polymorphic objects into > account, when source-ALLOCATEing an unlimited polymorphic object. The testcase

Re: [PATCH, Fortran, pr79335, v1] [7 Regression] Conditional jump or move depends on uninitialised in value get_scalar_to_descriptor_type(tree_node*, symbol_attribute) (trans-expr.c:53)

2017-02-04 Thread Paul Richard Thomas
Hi Andre, This is getting to be a bit monotonous :-) OK for trunk. Thanks for the three patches. Paul PS Are you in a position to have a stab at PR79344? This would go a long way to sorting out Juergen's test suite. Also, this must be the third time that I have been involved in breaking iso_var

[PATCH] avoid overwriting minimum length of unknown strings (PR 79376)

2017-02-04 Thread Martin Sebor
There's a "thinko" in the get_range_strlen() function that computes the range of possible string lengths for a character pointer that may point to an array holding a string of unknown length and a string literal. The bug lets the function return the length of the string as the lower bound (and th

Re: [PATCH] Fix improper combiner optimization of mixed mode vector/scalar expressions (PR 79365)

2017-02-04 Thread Walter Lee
Thanks Segher.  I will address your comments and repost for GCC 8. > What is this for?  It isn't triggered by the testcase in the PR. It was triggered by our strcmp code, but I didn't have a simple test case for it.  I will try to generate one. Walter

Re: [PATCH, Fortran, pr79335, v1] [7 Regression] Conditional jump or move depends on uninitialised in value get_scalar_to_descriptor_type(tree_node*, symbol_attribute) (trans-expr.c:53)

2017-02-04 Thread Andre Vehreschild
Hi Paul, > PS Are you in a position to have a stab at PR79344? This would go a > long way to sorting out Juergen's test suite. Also, this must be the > third time that I have been involved in breaking iso_varying_string > and I think that others have too :-( We must start running the > testsuite o

Re: [PATCH] Fix __atomic to not implement atomic loads with CAS.

2017-02-04 Thread Jakub Jelinek
On Sat, Feb 04, 2017 at 03:28:42PM +0100, Dominique d'Humières wrote: > > This patch fixes the __atomic builtins to not implement supposedly > > lock-free atomic loads based on just a compare-and-swap operation. > > … > > Commit r245098 caused > > New failures: > FAIL: libgomp.c/atomic-2.c (test

[PATCH, Fortran, pr79344, v1] [7 Regression] segmentation faults and run-time errors

2017-02-04 Thread Andre Vehreschild
Hi all, attached patch fixes the issue of losing the data in the SOURCE= expression of an ALLOCATE() when the source-expression is just a simple variable. The issue was that internally a temporary variable was created, whose components were freed afterwards. Now the components are only freed on te

Re: [Patch][ARM,AArch64] more poly64 intrinsics and tests

2017-02-04 Thread James Greenhalgh
On Wed, Jan 11, 2017 at 11:13:07AM +0100, Christophe Lyon wrote: > Ping? > > James, I'm not sure whether your comment was a request for a new > version of my patch or just FYI? Sorry that this was unclear. I was looking for a new version of the patch covering this comment. Otherwise we just have