Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Markus Trippelsdorf
On 2016.12.15 at 19:27 -0700, Martin Sebor wrote: > On 12/14/2016 09:19 PM, Jeff Law wrote: > > On 12/14/2016 03:56 PM, Martin Sebor wrote: > > > The -Wnonnull warning improvement (PR c/17308 - nonnull attribute > > > not as useful as it could be) causes a couple of false positives > > > in a power

Re: [PATCH] Fix optimized out volatile MEM_REF (PR, tree-optimization/78810)

2016-12-16 Thread Richard Biener
On Thu, Dec 15, 2016 at 11:56 AM, Martin Liška wrote: > The patch adds TREE_THIS_VOLATILE check that was removed in r239778. > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? I see nothing wrong with a volatile access to a non-volatile auto-va

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 09:13:33AM +0100, Markus Trippelsdorf wrote: > It does for me with an allmodconf. At -O2 I get three warnings, and at > -O3 I get two additional warnings. Now these additional ones happen way > too deep into the pipeline to be reliable. (For a reduced testcase see: > https:/

Re: Fix concept checks usage

2016-12-16 Thread Jonathan Wakely
On 15/12/16 21:45 +0100, François Dumont wrote: Hi Here is a fix in the usage of a concept check. There are also many testsuite failures when using concept checks but this one forbids the library from being built. I know that concept checks are not really maintained so maybe the fix is to sim

gcc-patches@gcc.gnu.org

2016-12-16 Thread Jonathan Wakely
On 15/12/16 22:33 +0200, Ville Voutilainen wrote: @@ -499,9 +501,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static_assert(any::__is_valid_cast<_ValueType>(), "Template argument must be a reference or CopyConstructible type"); - auto __p = any_cast>(&__any); + using _Up

[PATCH] Fix assertions along default switch labels (PR tree-optimization/78819)

2016-12-16 Thread Marek Polacek
Starting with r238761, we register assertions for default switch labels; these assertions correspond to the anti-range of each case label. It means that we can optimize this better: switch (i) { case 1: case 2: case 3: ... break; default: // i is ~[1, 3] if (i ==

[PATCH] Do not sanitize in lower_omp_target context (PR, sanitizer/78815).

2016-12-16 Thread Martin Liška
Currently, use-after-scope relies on fact that entry point of gimplify_decl_expr is gimplify_function_tree. Fixed by checking if asan_poisoned_variables is non-null. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From 6acf276399b574ced23

Re: [PATCH][AArch64] Split X-reg UBFX into W-reg LSR when possible

2016-12-16 Thread Kyrill Tkachov
On 15/12/16 11:53, James Greenhalgh wrote: On Thu, Dec 08, 2016 at 09:35:08AM +, Kyrill Tkachov wrote: Hi all, In this patch we split X-register UBFX instructions that extract up to the edge of a W-register into a W-register LSR instruction. So for the example in the testcase instead of: U

Re: [PATCH][AArch64] Split X-reg UBFIZ into W-reg LSL when possible

2016-12-16 Thread Kyrill Tkachov
On 15/12/16 11:56, James Greenhalgh wrote: On Thu, Dec 08, 2016 at 09:35:09AM +, Kyrill Tkachov wrote: Hi all, Similar to the previous patch this transforms X-reg UBFIZ instructions into W-reg LSL instructions when the UBFIZ operands add up to 32, so we can take advantage of the implicit z

[PATCH] c++/78765

2016-12-16 Thread Nathan Sidwell
Jason, this patch fixes an ICE that happens after error recovery of a constexpr object that has a bad initializer. your patch introduced this regression: * tree.c (obvalue_p): Rename from lvalue_p. (lvalue_p): Define for c-common. * call.c, cp-tree.h, cvt.c, init.c: Adjust.

Re: [Patch] Undermine the jump threading cost model to fix PR77445.

2016-12-16 Thread Richard Biener
On Thu, Dec 15, 2016 at 12:33 PM, James Greenhalgh wrote: > > Hi, > > As mentioned in PR77445, the improvements to the jump threading cost model > this year have caused substantial regressions in the amount of jump threading > we do and the performance of workloads which rely on that threading. >

Re: [PATCH] PR59170 make pretty printers check for singular iterators

2016-12-16 Thread Jonathan Wakely
On 16/12/16 08:51 +0100, Jan Kratochvil wrote: On Fri, 16 Dec 2016 02:07:07 +0100, Jonathan Wakely wrote: On 15/12/16 22:19 +0100, Jan Kratochvil wrote: > Just with the GDB 'compile' project (libcc1) which is planned to be used for > all GDB expressions evalation the Xmethods will no longer work

Re: [PATCH] Add AVX512 k-mask intrinsics

2016-12-16 Thread Uros Bizjak
On Thu, Dec 15, 2016 at 7:55 PM, Andrew Senkevich wrote: > 2016-12-15 19:51 GMT+03:00 Uros Bizjak : >> On Thu, Dec 15, 2016 at 2:31 PM, Andrew Senkevich >> wrote: >>> 2016-12-14 22:55 GMT+03:00 Uros Bizjak : On Wed, Dec 14, 2016 at 8:04 PM, Andrew Senkevich wrote: > here is th

Re: Fix compilation errors with libstdc++v3 for AVR target and allow --enable-libstdcxx

2016-12-16 Thread Jonathan Wakely
On 15/12/16 21:41 -0300, Felipe Magno de Almeida wrote: Good point. Do you want me to update the patch with __men or go your way with the wrapper? I think my wrapper's too ugly :-) So please follow the same approach as for tm_mon (pass __mem to the function, the copy it to tm_mon if there was

Re: [PATCH] Optimiza aggregate a = b = c = {} (PR c/78408, take 2)

2016-12-16 Thread Richard Biener
On Thu, 15 Dec 2016, Jakub Jelinek wrote: > On Wed, Dec 14, 2016 at 01:27:56PM +0100, Richard Biener wrote: > > Ah, ok. But then the size of the memset shouldn't be compared > > against the get_ref_base_and_extend size from src2 but to the > > size of the access of SRC/DEST (clearly looking at th

[PATCH] Remove unused libgfortran functions

2016-12-16 Thread Janne Blomqvist
Now that the libgfortran ABI major version has been bumped, we can remove functions for which the frontend nowadays generates inline code. This removes the malloc, free, exponent, fraction, nearest, rrspacing, spacing, set_exponent and transpose intrinsics. Also the unused store_exe_path function

Re: [PATCH] Fix assertions along default switch labels (PR tree-optimization/78819)

2016-12-16 Thread Richard Biener
On Fri, Dec 16, 2016 at 12:49 PM, Marek Polacek wrote: > Starting with r238761, we register assertions for default switch labels; > these assertions correspond to the anti-range of each case label. It > means that we can optimize this better: > > switch (i) { > case 1: case 2: case 3: >

Re: [PATCH] Fill bitregion_{start,end} in store_constructor (PR, tree-optimization/78428).

2016-12-16 Thread Richard Biener
On Thu, Dec 15, 2016 at 12:00 PM, Martin Liška wrote: > On 12/13/2016 03:35 PM, Richard Biener wrote: >> OK from my POV. >> >> Thanks, >> Richard. > > Hi. > > I prepared backport (and tested) for GCC 5 and 6 branches, > may I install the patch after 6.3 will be released? Ok for early next year.

Re: [PATCH] PR59170 make pretty printers check for singular iterators

2016-12-16 Thread Jan Kratochvil
On Fri, 16 Dec 2016 13:33:52 +0100, Jonathan Wakely wrote: > We don't do auto-deref for std::shared_ptr or std::unique_ptr, even > though we know the object they point to definitely is live and safe to > access, and that's because those types have pointer semantics not > reference semantics. This

Re: [PATCH] Optimiza aggregate a = b = c = {} (PR c/78408, take 2)

2016-12-16 Thread Richard Biener
On Fri, 16 Dec 2016, Jakub Jelinek wrote: > On Fri, Dec 16, 2016 at 01:50:54PM +0100, Richard Biener wrote: > > > +static void > > > +optimize_memcpy (gimple_stmt_iterator *gsip, tree dest, tree src, tree > > > len) > > > +{ > > > + gimple *stmt = gsi_stmt (*gsip); > > > + if (gimple_has_volati

Re: Fix for libstdc++-v3's error_constants.h for MinGW-W64

2016-12-16 Thread Jonathan Wakely
On 10/10/16 01:20 +0300, niXman wrote: Hi, Please apply to gcc-5-branch, gcc-6-branch and trunk. I don't think this is suitable for the branches, but could be applied to trunk (as the patch was posted during stage 1, but I missed it). Does this require a particular version of MinGW-w64? Does

RE: [PATCH 2/2] [ARC] Remove old prof patterns.

2016-12-16 Thread Claudiu Zissulescu
Committed. Thank you for ur review, Claudiu > -Original Message- > From: Andrew Burgess [mailto:andrew.burg...@embecosm.com] > Sent: Wednesday, December 14, 2016 1:14 PM > To: Claudiu Zissulescu > Cc: gcc-patches@gcc.gnu.org; francois.bed...@synopsys.com > Subject: Re: [PATCH 2/2] [ARC] R

RE: [PATCH 1/2] [ARC] Generating code for profiling.

2016-12-16 Thread Claudiu Zissulescu
Committed with the suggested mods. Thank you for your review, Claudiu > -Original Message- > From: Andrew Burgess [mailto:andrew.burg...@embecosm.com] > Sent: Wednesday, December 14, 2016 1:13 PM > To: Claudiu Zissulescu > Cc: gcc-patches@gcc.gnu.org; francois.bed...@synopsys.com > Subje

Re: [PATCH] PR59170 make pretty printers check for singular iterators

2016-12-16 Thread Jonathan Wakely
On 16/12/16 14:06 +0100, Jan Kratochvil wrote: On Fri, 16 Dec 2016 13:33:52 +0100, Jonathan Wakely wrote: We don't do auto-deref for std::shared_ptr or std::unique_ptr, even though we know the object they point to definitely is live and safe to access, and that's because those types have pointer

RE: [PATCH 3/4] [ARC] Refurbish mul64 support.

2016-12-16 Thread Claudiu Zissulescu
Committed with the suggested mods. Thank you for ur review, Claudiu > -Original Message- > From: Andrew Burgess [mailto:andrew.burg...@embecosm.com] > Sent: Wednesday, December 14, 2016 2:01 PM > To: Claudiu Zissulescu > Cc: gcc-patches@gcc.gnu.org; francois.bed...@synopsys.com > Subject:

Re: [PATCH] [Match & Simplify] Optimize some minmax patterns

2016-12-16 Thread Richard Biener
On Thu, Dec 15, 2016 at 12:01 PM, Hurugalawadi, Naveen wrote: > Hi, > > Please find attached the patch that optimizes some patterns > in maxmin on same variabes with constants. > > Bootstrapped and Regression tested on x86_64 & aarch64-thunder-linux. > > Please review the patch and let us know if

Re: Problem with pseudo-reg syntax in RTL frontend

2016-12-16 Thread Bernd Schmidt
On 12/14/2016 05:57 PM, David Malcolm wrote: Any preferences? (or other syntax ideas?). My preference is one of the currently-unused sigils e.g. "@3", or to wrap them in braces "{3}". Either might work, I'd vaguely prefer <3> over {3} but they're equivalent really. Maybe using "@" is simplest

Re: Fix for libstdc++-v3's error_constants.h for MinGW-W64

2016-12-16 Thread niXman
Jonathan Wakely 2016-12-16 16:04: I don't think this is suitable for the branches, but could be applied to trunk (as the patch was posted during stage 1, but I missed it). Ok. Does this require a particular version of MinGW-w64? Yes, at the moment MinGW-W64 trunk is required. (MinGW-W64-v6)

Re: [PATCH] PR59170 make pretty printers check for singular iterators

2016-12-16 Thread Jan Kratochvil
On Fri, 16 Dec 2016 14:17:32 +0100, Jonathan Wakely wrote: > On 16/12/16 14:06 +0100, Jan Kratochvil wrote: > > (gdb) p bb.c.d > > $4 = (D &) @0x601028: {e = 0x601060 } > > Wat? > > bb.c.d is not a valid expression. > > B::c is a pointer, it should be bb.c->d > > Is it GDB policy to mak

Re: [PATCH 0/4] Improve DSE implementation

2016-12-16 Thread Richard Biener
On Fri, Dec 16, 2016 at 2:54 AM, Jeff Law wrote: > This is a 4 part patchkit to address various deficiencies in our DSE > implementation. > > BZ33562 was the inspiration for this work. 33562 is a low priority > regression that's been around for a long time. Patch #1 addresses 33562, > "aggregate

Re: [PATCH] Fix assertions along default switch labels (PR tree-optimization/78819)

2016-12-16 Thread Marek Polacek
On Fri, Dec 16, 2016 at 02:00:56PM +0100, Richard Biener wrote: > On Fri, Dec 16, 2016 at 12:49 PM, Marek Polacek wrote: > > --- gcc/tree-vrp.c > > +++ gcc/tree-vrp.c > > @@ -6051,10 +6051,17 @@ find_switch_asserts (basic_block bb, gswitch *last) > >/* Now register along the default label asse

Re: RFC: Make iterator printers fail more gracefully

2016-12-16 Thread Jonathan Wakely
On 15/12/16 18:29 +, Jonathan Wakely wrote: On 15/12/16 13:11 -0500, David Malcolm wrote: BTW, is it always a ValueError exception? (I'm a little wary of naked "except:" in Python, as it can catch *anything*, including syntax errors in the try/except-guarded code). Good point. As far as I

Re: [PATCH] Fix assertions along default switch labels (PR tree-optimization/78819)

2016-12-16 Thread Bernd Schmidt
On 12/16/2016 12:49 PM, Marek Polacek wrote: But as this testcase shows, this breaks when the default label shares a label with another case. On this testcase, when we reach the switch, we know that argc is either 1, 2, or 3. So by the time we reach vrp2, the IR will have been optimized to

Re: [PATCH] Optimiza aggregate a = b = c = {} (PR c/78408, take 2)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 01:50:54PM +0100, Richard Biener wrote: > > +static void > > +optimize_memcpy (gimple_stmt_iterator *gsip, tree dest, tree src, tree len) > > +{ > > + gimple *stmt = gsi_stmt (*gsip); > > + if (gimple_has_volatile_ops (stmt) > > + || TREE_THIS_VOLATILE (dest) > > +

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Richard Biener
On Fri, Dec 16, 2016 at 2:54 AM, Jeff Law wrote: > > This is the first of the 4 part patchkit to address deficiencies in our DSE > implementation. > > > This patch addresses the P2 regression 33562 which has been a low priority > regression since gcc-4.3. To summarize, DSE no longer has the abili

Re: [PATCH] Fix assertions along default switch labels (PR tree-optimization/78819)

2016-12-16 Thread Richard Biener
On Fri, Dec 16, 2016 at 2:03 PM, Bernd Schmidt wrote: > On 12/16/2016 12:49 PM, Marek Polacek wrote: > >> But as this testcase shows, this breaks when the default label shares a >> label >> with another case. On this testcase, when we reach the switch, we know >> that >> argc is either 1, 2, or 3

Re: [PATCH] Optimiza aggregate a = b = c = {} (PR c/78408, take 2)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 02:16:40PM +0100, Richard Biener wrote: > > Is memset and = {} equivalent even for aggregates with paddings? > > When lowering memset to = {} you should use > > MEM (&decl, off-of-original-alias-type) = {}-of-type-char[]; > > similar for lowering of memcpy (I think what

Re: [PATCH] Remove unused libgfortran functions

2016-12-16 Thread FX
A few questions: 1. Regarding gfortran.map, shouldn’t we just flatten out all the symbols from GFORTRAN_1.0 to GFORTRAN_1.7 into a single new GFORTRAN_2.0 group (while removing the ones we are getting rid of)? 2. While we are breaking the ABI, shouldn’t we reorder the array argument to the

Re: [PATCH] Optimiza aggregate a = b = c = {} (PR c/78408, take 2)

2016-12-16 Thread Richard Biener
On Fri, 16 Dec 2016, Jakub Jelinek wrote: > On Fri, Dec 16, 2016 at 02:16:40PM +0100, Richard Biener wrote: > > > Is memset and = {} equivalent even for aggregates with paddings? > > > > When lowering memset to = {} you should use > > > > MEM (&decl, off-of-original-alias-type) = {}-of-type-cha

[PATCH v3] add -fprolog-pad=N,M option

2016-12-16 Thread Torsten Duwe
On Tue, Dec 06, 2016 at 05:02:36PM +0300, Maxim Kuvyrkov wrote: > > On Oct 5, 2016, at 12:45 AM, Maxim Kuvyrkov > > wrote: > > > > Ideally, I want to improve support for -fprolog-pad=N and > > __attribute__((prolog_pad(N))) to provide functionality to also output pad > > before the function la

Re: [PATCH] Fix assertions along default switch labels (PR tree-optimization/78819)

2016-12-16 Thread Marek Polacek
On Fri, Dec 16, 2016 at 02:58:59PM +0100, Richard Biener wrote: > On Fri, Dec 16, 2016 at 2:03 PM, Bernd Schmidt wrote: > > On 12/16/2016 12:49 PM, Marek Polacek wrote: > > > >> But as this testcase shows, this breaks when the default label shares a > >> label > >> with another case. On this test

[PR tree-optimization/71691] Fix unswitching in presence of maybe-undef SSA_NAMEs (take 2)

2016-12-16 Thread Aldy Hernandez
Hi folks. This is a follow-up on Jeff and Richi's interaction on the aforementioned PR here: https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01397.html I decided to explore the idea of analyzing may-undefness on-demand, which actually looks rather cheap. BTW, I don't understand why w

Re: [PATCH][ARM] PR target/78694: Avoid invalid RTL sharing in minipool code

2016-12-16 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2016-12/msg00849.html Thanks, Kyrill On 09/12/16 14:03, Kyrill Tkachov wrote: Hi all, In this ICE GCC reports invalid RTL sharing in the pattern: (insn 955 954 956 (unspec_volatile [ (const:SI (unspec:SI [ (symbol_ref

Re: Problem with pseudo-reg syntax in RTL frontend

2016-12-16 Thread David Malcolm
On Fri, 2016-12-16 at 14:28 +0100, Bernd Schmidt wrote: > On 12/14/2016 05:57 PM, David Malcolm wrote: > > Any preferences? (or other syntax ideas?). My preference is one of > > the > > currently-unused sigils e.g. "@3", or to wrap them in braces "{3}". > > Either might work, I'd vaguely prefer <

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jeff Law
On 12/16/2016 12:29 AM, Trevor Saunders wrote: On Thu, Dec 15, 2016 at 06:54:43PM -0700, Jeff Law wrote: unsigned cnt = 0; + bitmap live_bytes = NULL; + bitmap orig_live_bytes = NULL; *use_stmt = NULL; + /* REF is a memory write. Go ahead and get its base, size, extent + informat

Re: [PATCH] PR 78534 Change character length from int to size_t

2016-12-16 Thread Andre Vehreschild
Hi Janne, hi all, as promised please find attached the change from int32 to size_t for the caf-libraries. Because the caf-libraries do not require special notions indicated by negative values I went for using size_t there. I assume this will be easier to keep in sync for all caf-libraries, because

Re: [PATCH] Emit DECL_EXPR so that type of what pstr.N points to is gimplified (PR fortran/78757)

2016-12-16 Thread Andre Vehreschild
Hi Jakub, the patch looks ok to me. I am wondering whether we should setup a routine or a macro for doing such a DECL_EXPR like Fortran needs it. In your case the TYPE_DECL is marked artificial and ignored in other cases not. Would that be need also at the six other locations gfortran uses a type

Re: [PATCH] PR 78534 Change character length from int to size_t

2016-12-16 Thread Dominique d'Humières
Hi Janne, I have applied your two patches and found that I had to skip the patches for resolve.c and match.c due to the errors ../../p_work/gcc/fortran/resolve.c: In function 'void resolve_select_type(gfc_code*, gfc_namespace*)': ../../p_work/gcc/fortran/resolve.c:8731:58: error: format '%lld'

Re: [PATCH] Emit DECL_EXPR so that type of what pstr.N points to is gimplified (PR fortran/78757)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 04:49:12PM +0100, Andre Vehreschild wrote: > the patch looks ok to me. I am wondering whether we should setup a routine > or a macro for doing such a DECL_EXPR like Fortran needs it. In your case the > TYPE_DECL is marked artificial and ignored in other cases not. Would that

Re: [PATCH] Emit DECL_EXPR so that type of what pstr.N points to is gimplified (PR fortran/78757)

2016-12-16 Thread Andre Vehreschild
Hi Jakub, I don't have enough knowledge on this part of gcc. So please don't take my comment as an "ok for trunk". I don't have that privilege. Furthermore did Dominique just now raise the question in IRC whether the testcase is valid: foo is declared to return a pointer to a char(len=70) but poi

Re: [PATCH][AArch64] Split X-reg UBFIZ into W-reg LSL when possible

2016-12-16 Thread James Greenhalgh
On Fri, Dec 16, 2016 at 12:21:55PM +, Kyrill Tkachov wrote: > > On 15/12/16 11:56, James Greenhalgh wrote: > >On Thu, Dec 08, 2016 at 09:35:09AM +, Kyrill Tkachov wrote: > >>Hi all, > >> > >>Similar to the previous patch this transforms X-reg UBFIZ instructions into > >>W-reg LSL instructi

Re: [PATCH][AArch64] Split X-reg UBFX into W-reg LSR when possible

2016-12-16 Thread James Greenhalgh
On Fri, Dec 16, 2016 at 12:21:52PM +, Kyrill Tkachov wrote: > > On 15/12/16 11:53, James Greenhalgh wrote: > >On Thu, Dec 08, 2016 at 09:35:08AM +, Kyrill Tkachov wrote: > >>Hi all, > >> > >>In this patch we split X-register UBFX instructions that extract up to the > >>edge of a W-register

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Martin Sebor
On 12/16/2016 01:13 AM, Markus Trippelsdorf wrote: On 2016.12.15 at 19:27 -0700, Martin Sebor wrote: On 12/14/2016 09:19 PM, Jeff Law wrote: On 12/14/2016 03:56 PM, Martin Sebor wrote: The -Wnonnull warning improvement (PR c/17308 - nonnull attribute not as useful as it could be) causes a coup

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 09:36:25AM -0700, Martin Sebor wrote: > > It does for me with an allmodconf. At -O2 I get three warnings, and at > > -O3 I get two additional warnings. Now these additional ones happen way > > too deep into the pipeline to be reliable. (For a reduced testcase see: > > https:

[PATCH] nvptx: do not assume that crtl->is_leaf is unset

2016-12-16 Thread Alexander Monakov
Hi, Until a recent change, crtl->is_leaf was initialized only during IRA startup. On NVPTX, register allocation is not done, so the backend asserts that this field is unset, and recomputes it unconditionally. Now this field can be optionally set via ira_setup_eliminable_regset for register-pressu

Re: [PATCH] nvptx: do not assume that crtl->is_leaf is unset

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 07:48:01PM +0300, Alexander Monakov wrote: > Until a recent change, crtl->is_leaf was initialized only during IRA startup. > On NVPTX, register allocation is not done, so the backend asserts that this > field is unset, and recomputes it unconditionally. > > Now this field c

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 11:08:00AM +0100, Jakub Jelinek wrote: > Here is an untested proof of concept for: > 1) keeping the warning in the FEs no matter what optimization level is on, >just making sure TREE_NO_WARNING is set on the CALL_EXPR if we've warned > 2) moving the rest of the warning s

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jeff Law
On 12/16/2016 06:57 AM, Richard Biener wrote: Apart from what Trevor says about using sbitmaps (try to avoid the initial zeroing please) and the missed freeing (you can use auto_[s]bitmap?) some comments below. In progress. We'll need a few routines for sbitmaps that don't currently exist, but

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Martin Sebor
On 12/16/2016 09:46 AM, Jakub Jelinek wrote: On Fri, Dec 16, 2016 at 09:36:25AM -0700, Martin Sebor wrote: It does for me with an allmodconf. At -O2 I get three warnings, and at -O3 I get two additional warnings. Now these additional ones happen way too deep into the pipeline to be reliable. (Fo

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 10:10:00AM -0700, Martin Sebor wrote: > > No. The first call to sm_read_sector just doesn't exit. So it is warning > > about dead code. > > If the code is dead then GCC should eliminate it. With it eliminated There is (especially with jump threading, but not limited to

Re: [PATCH] Remove unused libgfortran functions

2016-12-16 Thread Janne Blomqvist
On Fri, Dec 16, 2016 at 4:02 PM, FX wrote: > A few questions: > > 1. Regarding gfortran.map, shouldn’t we just flatten out all the symbols > from GFORTRAN_1.0 to GFORTRAN_1.7 into a single new GFORTRAN_2.0 group (while > removing the ones we are getting rid of)? Yes, I agree (in general, thou

[PATCH] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-16 Thread Jakub Jelinek
Hi! On Fri, Dec 16, 2016 at 04:53:07PM +0100, Martin Jambor wrote: > On Fri, Dec 16, 2016 at 02:31:48PM +0100, Jakub Jelinek wrote: > > Suggestions how to test that IPA-SRA and IPA-PTA aren't happening? > > Anything else we need to cover? > I would use some test from gcc/testsuite/gcc.dg/ipa/ipa-s

Re: [PATCH] libstdc++: Allow using without lock free atomic int

2016-12-16 Thread Jonathan Wakely
On 09/11/16 23:26 +0200, Pauli wrote: Compiling programs using std::future for old arm processors fails. The problem is caused by preprocessor check for atomic lock free int. Future can be changed to work correctly without lock free atomics with minor changes to exception_ptr implementation. Wi

Re: [PATCH] PR 78534 Change character length from int to size_t

2016-12-16 Thread Janne Blomqvist
On Fri, Dec 16, 2016 at 5:34 PM, Andre Vehreschild wrote: > Hi Janne, hi all, > > as promised please find attached the change from int32 to size_t for the > caf-libraries. Because the caf-libraries do not require special notions > indicated by negative values I went for using size_t there. I assum

Re: [PATCH 0/4] Improve DSE implementation

2016-12-16 Thread Jeff Law
On 12/16/2016 06:32 AM, Richard Biener wrote: On Fri, Dec 16, 2016 at 2:54 AM, Jeff Law wrote: This is a 4 part patchkit to address various deficiencies in our DSE implementation. BZ33562 was the inspiration for this work. 33562 is a low priority regression that's been around for a long time.

Re: [PATCH] PR 78534 Change character length from int to size_t

2016-12-16 Thread Janne Blomqvist
On Fri, Dec 16, 2016 at 5:50 PM, Dominique d'Humières wrote: > Hi Janne, > > I have applied your two patches and found that I had to skip the patches for > resolve.c and match.c due to the errors > > ../../p_work/gcc/fortran/resolve.c: In function 'void > resolve_select_type(gfc_code*, gfc_names

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Martin Sebor
On 12/16/2016 10:27 AM, Jakub Jelinek wrote: On Fri, Dec 16, 2016 at 10:10:00AM -0700, Martin Sebor wrote: No. The first call to sm_read_sector just doesn't exit. So it is warning about dead code. If the code is dead then GCC should eliminate it. With it eliminated There is (especially wi

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 11:07:29AM -0700, Martin Sebor wrote: > If your implementation diagnoses the common cases exercised by the > tests I wrote I have no objection to it (not that objecting would > do me any good). Your tests all pass with the patch I've posted, we can surely add further ones i

Re: [PATCH] PR 78534 Change character length from int to size_t

2016-12-16 Thread Dominique d'Humières
> Le 16 déc. 2016 à 19:06, Janne Blomqvist a écrit : > > On Fri, Dec 16, 2016 at 5:50 PM, Dominique d'Humières > wrote: >> Hi Janne, >> >> I have applied your two patches and found that I had to skip the patches for >> resolve.c and match.c due to the errors >> >> ../../p_work/gcc/fortran/re

[PATCH] Add assertion to _Rb_tree::erase to check for end iterators

2016-12-16 Thread Jonathan Wakely
This adds assertions to catch assoc.erase(assoc.end()) when _GLIBCXX_ASSERTIONS is defined. Without the assertion it usually leads to a double free, which leads to termination for some mallocs anyway. Because the erase(first, last) form called erase(first++) in a loop I've changed that to bypass

New French PO file for 'gcc' (version 6.2.0)

2016-12-16 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-6.2.0.fr.po', has just

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Markus Trippelsdorf
On 2016.12.16 at 11:07 -0700, Martin Sebor wrote: > On 12/16/2016 10:27 AM, Jakub Jelinek wrote: > > On Fri, Dec 16, 2016 at 10:10:00AM -0700, Martin Sebor wrote: > > > > No. The first call to sm_read_sector just doesn't exit. So it is > > > > warning > > > > about dead code. > > > > > > If the

Re: [PATCH] nvptx: do not assume that crtl->is_leaf is unset

2016-12-16 Thread Jeff Law
On 12/16/2016 09:48 AM, Alexander Monakov wrote: Hi, Until a recent change, crtl->is_leaf was initialized only during IRA startup. On NVPTX, register allocation is not done, so the backend asserts that this field is unset, and recomputes it unconditionally. Now this field can be optionally set

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Joseph Myers
On Thu, 15 Dec 2016, Jeff Law wrote: > This version attacks the problem by improving DSE to track stores to memory at > a byte level. That allows us to determine if a series of stores completely > covers an earlier store (thus making the earlier store dead). Question: suppose you have an assignm

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 07:29:13PM +0100, Markus Trippelsdorf wrote: > So, to be fair a gave Jakub's patch a try and it has exactly the same > issues for the Linux kernel: sometimes the warning only triggers with > -O3, e.g.: > > % cat sm_ftl.i > int a; > void mtd_read_oob(int); > void sm_read_se

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 06:35:58PM +, Joseph Myers wrote: > On Thu, 15 Dec 2016, Jeff Law wrote: > > > This version attacks the problem by improving DSE to track stores to memory > > at > > a byte level. That allows us to determine if a series of stores completely > > covers an earlier store

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jeff Law
On 12/16/2016 11:35 AM, Joseph Myers wrote: On Thu, 15 Dec 2016, Jeff Law wrote: This version attacks the problem by improving DSE to track stores to memory at a byte level. That allows us to determine if a series of stores completely covers an earlier store (thus making the earlier store dead

Re: [PATCH] Remove unused libgfortran functions

2016-12-16 Thread Steve Kargl
On Fri, Dec 16, 2016 at 07:46:01PM +0200, Janne Blomqvist wrote: > On Fri, Dec 16, 2016 at 4:02 PM, FX wrote: > > A few questions: > > > > 1. Regarding gfortran.map, shouldn’t we just flatten out all the symbols > > from GFORTRAN_1.0 to GFORTRAN_1.7 into a single new GFORTRAN_2.0 group > > (wh

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jeff Law
On 12/16/2016 11:43 AM, Jakub Jelinek wrote: On Fri, Dec 16, 2016 at 06:35:58PM +, Joseph Myers wrote: On Thu, 15 Dec 2016, Jeff Law wrote: This version attacks the problem by improving DSE to track stores to memory at a byte level. That allows us to determine if a series of stores comple

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Joseph Myers
On Fri, 16 Dec 2016, Jakub Jelinek wrote: > On Fri, Dec 16, 2016 at 06:35:58PM +, Joseph Myers wrote: > > On Thu, 15 Dec 2016, Jeff Law wrote: > > > > > This version attacks the problem by improving DSE to track stores to > > > memory at > > > a byte level. That allows us to determine if a

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jeff Law
On 12/16/2016 06:57 AM, Richard Biener wrote: On Fri, Dec 16, 2016 at 2:54 AM, Jeff Law wrote: + { + /* STMT might be partially dead and we may be able to reduce +how many memory locations it stores into. */ + if (live_bytes + && !bitmap_equal_p (l

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Joseph Myers
On Fri, 16 Dec 2016, Martin Sebor wrote: > I don't claim it can't be improved but it seems pretty good as > it is already. Among the 6 instances it's found in GCC three > look like real bugs. FWIW it's found at least one real bug in glibc

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 07:00:06PM +, Joseph Myers wrote: > On Fri, 16 Dec 2016, Martin Sebor wrote: > > > I don't claim it can't be improved but it seems pretty good as > > it is already. Among the 6 instances it's found in GCC three > > look like real bugs. > > FWIW it's found at least one

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jeff Law
On 12/16/2016 06:57 AM, Richard Biener wrote: On Fri, Dec 16, 2016 at 2:54 AM, Jeff Law wrote: + /* REF is a memory write. Go ahead and get its base, size, extent + information and encode the bytes written into LIVE_BYTES. We can + handle any case where we have a known base and maxim

Re: [PATCH] Emit DECL_EXPR so that type of what pstr.N points to is gimplified (PR fortran/78757)

2016-12-16 Thread Janne Blomqvist
On Wed, Dec 14, 2016 at 11:55 PM, Jakub Jelinek wrote: > Hi! > > The gimplifier (because of Ada :( ) doesn't recurse to POINTER_TYPE's > type when gimplifying types, so we need a DECL_EXPR to gimplify such > types if they are VLAs. The following patch is an attempt to do that. > > Bootstrapped/re

Re: [PATCH] Emit DECL_EXPR so that type of what pstr.N points to is gimplified (PR fortran/78757)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 09:31:37PM +0200, Janne Blomqvist wrote: > On Wed, Dec 14, 2016 at 11:55 PM, Jakub Jelinek wrote: > > Hi! > > > > The gimplifier (because of Ada :( ) doesn't recurse to POINTER_TYPE's > > type when gimplifying types, so we need a DECL_EXPR to gimplify such > > types if they

[PATCH 2/2] Changes to patch 8a to use <3> syntax

2016-12-16 Thread David Malcolm
For reference, here are the changes to patch 8a to update it to the new syntax. I'm assuming that this (and the changes to the various dumpfiles in patches 8b-8d) count as "obvious". gcc/ChangeLog: * read-rtl-function.c (lookup_reg_by_dump_name): Rework to expect regno wrapped in

[PATCH 1/2] print-rtl.c: use '<' and '>' rather than % for pseudos in compact mode

2016-12-16 Thread David Malcolm
On Fri, 2016-12-16 at 10:32 -0500, David Malcolm wrote: > On Fri, 2016-12-16 at 14:28 +0100, Bernd Schmidt wrote: > > On 12/14/2016 05:57 PM, David Malcolm wrote: > > > Any preferences? (or other syntax ideas?). My preference is one > > > of > > > the > > > currently-unused sigils e.g. "@3", or to

Re: [patch,fortran] PR78622 [F03] Incorrect parsing of quotes in the char-literal-constant of the DT data descriptor

2016-12-16 Thread Janne Blomqvist
On Fri, Dec 16, 2016 at 4:16 AM, Jerry DeLisle wrote: > Hi all, > > The attached patch regression tested on x86-64-linux. > > This adds a static function to allocate and extract the DT format string > that may contain doubled quotes. > > OK for trunk, test case also attched. Ok, thanks. > > Jerr

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Jeff Law
On 12/16/2016 12:08 PM, Jakub Jelinek wrote: On Fri, Dec 16, 2016 at 07:00:06PM +, Joseph Myers wrote: On Fri, 16 Dec 2016, Martin Sebor wrote: I don't claim it can't be improved but it seems pretty good as it is already. Among the 6 instances it's found in GCC three look like real bugs.

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Jeff Law
On 12/16/2016 12:08 PM, Jakub Jelinek wrote: On Fri, Dec 16, 2016 at 07:00:06PM +, Joseph Myers wrote: On Fri, 16 Dec 2016, Martin Sebor wrote: I don't claim it can't be improved but it seems pretty good as it is already. Among the 6 instances it's found in GCC three look like real bugs.

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Jeff Law
On 12/16/2016 11:40 AM, Jakub Jelinek wrote: On Fri, Dec 16, 2016 at 07:29:13PM +0100, Markus Trippelsdorf wrote: So, to be fair a gave Jakub's patch a try and it has exactly the same issues for the Linux kernel: sometimes the warning only triggers with -O3, e.g.: % cat sm_ftl.i int a; void mt

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 01:01:13PM -0700, Jeff Law wrote: > > Thanks. Reduced to something like: > > int > > foo (const char *name) > > { > > if (name) > > return 6; > > return __builtin_strlen (name); > > } > > This is warned about both with Martin's late warning and my after ccp2 > > war

Re: Fix for libstdc++-v3's error_constants.h for MinGW-W64

2016-12-16 Thread Jonathan Wakely
On 16/12/16 16:28 +0300, niXman wrote: Jonathan Wakely 2016-12-16 16:04: I don't think this is suitable for the branches, but could be applied to trunk (as the patch was posted during stage 1, but I missed it). Ok. Does this require a particular version of MinGW-w64? Yes, at the moment MinG

[PATCH] varasm: Propagate litpool decl alignment to generated RTX.

2016-12-16 Thread Andreas Krebbel
When pushing a value into the literal pool the resulting decl might get a higher alignment than the original expression depending on how a target defines CONSTANT_ALIGNMENT. Generating an RTX for the constant pool access we currently use the alignment from the original expression. Changed with th

[PATCH] Fix -fcompare-debug sanopt bug (PR sanitizer/78832)

2016-12-16 Thread Jakub Jelinek
Hi! The following testcase fails with -fcompare-debug, because we have a bb containing 2 ASAN_MARK (POISON, ...) calls immediately after each other, followed with -g only by debug stmts till end of basic block. sanitize_asan_mark_poison walks stmts in a bb backwards and assumes (incorrectly) that

Go patch committed: pass function to all backend methods that create statements

2016-12-16 Thread Ian Lance Taylor
This patch by Than McIntosh to the Go frontend changes the backend interface to pass the function to all the methods that create statements. Having the function available simplifies things if a temporary variable has to be created during the construction of a statement. This also includes a chang

Re: [LRA] Fix ICE for paradoxical subregs on strict-alignment platforms

2016-12-16 Thread Vladimir N Makarov
On 12/13/2016 05:05 PM, Eric Botcazou wrote: Hi, the Ada runtime library doesn't build on SPARC 32-bit with LRA because of an ICE on a couple of files: eric@polaris:~/build/gcc/sparc-sun-solaris2.10> gcc/gnat1 -I gcc/ada/rts - quiet -dumpbase g-debpoo.adb -auxbase g-debpoo -O2 -gnatpg -fPIC -

Re: [PATCH] builtin expansion of strncmp for rs6000

2016-12-16 Thread Segher Boessenkool
Hi Aaron, On Thu, Dec 15, 2016 at 10:31:05AM -0600, Aaron Sawdey wrote: > This patch adds a cmpstrnsi pattern for rs6000 target to provide > builtin expansion of strncmp(). Perf tests on a power8 system show that > it is 3-10x faster than the glibc strncmp on RHEL7 for lengths under 64 > bytes. >

[PATCH v2,rs6000] PR78056: Finish fixing build failure on Power7

2016-12-16 Thread Kelvin Nilsen
This patch adds warning messages and test cases to an initial patch already submitted and committed to the trunk on October 26, 2016. The earlier patch disables initialization of built-in functions which depend on assembler capabilities that are not supported by the associated tool chain. The or

  1   2   >