[patch] Fix PHI optimization issue with boolean types

2016-10-17 Thread Eric Botcazou
Hi, this is a regression present on the mainline and 6 branch: the compiler now generates wrong code for the attached testcase at -O because of an internal conflict about boolean types. The sequence is as follows. In .mergephi3: boolean _22; p__enum res; : if (_22 != 0) goto ;

Re: [PATCH] Clear BB_VISITED in bb-reorder

2016-10-17 Thread Andrew Pinski
On Mon, Oct 17, 2016 at 5:26 AM, Richard Biener wrote: > > $subject, applied as obvious. I think you should do the same for the vectorizer too. I noticed that when testing the patch for loop splitting. Thanks, Andrew > > Richard. > > 2016-10-17 Richard Biener > > * bb-reorder.c (reo

Re: Use FOR_ALL_BB_FN in a few more places (was: [PATCH] Clear BB_VISITED in bb-reorder)

2016-10-17 Thread Richard Biener
On October 17, 2016 6:09:02 PM GMT+02:00, Thomas Schwinge wrote: >Hi! > >On Mon, 17 Oct 2016 15:17:13 +0200, Richard Biener > wrote: >> On Mon, Oct 17, 2016 at 3:12 PM, Thomas Schwinge >> wrote: >> > On Mon, 17 Oct 2016 14:26:42 +0200 (CEST), Richard Biener > wrote: >> >> --- gcc/bb-reorder.c (

Re: RFC [1/3] divmod transform v2

2016-10-17 Thread Prathamesh Kulkarni
On 18 October 2016 at 02:46, Jeff Law wrote: > On 10/15/2016 11:59 PM, Prathamesh Kulkarni wrote: >> >> This patch is mostly the same as previous one, except it drops >> targeting __udivmoddi4() because it gave undefined reference link >> error for calling __udivmoddi4() on aarch64-linux-gnu. It a

Re: [PATCH] Fix PR77916

2016-10-17 Thread Markus Trippelsdorf
On 2016.10.18 at 05:13 +0200, Markus Trippelsdorf wrote: > On 2016.10.17 at 17:23 -0500, Bill Schmidt wrote: > > Hi, > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77916 identifies a situation > > where SLSR will ICE when exposed to a cast from integer to pointer. This > > is because we try

Re: [PATCH] Fix PR77916

2016-10-17 Thread Markus Trippelsdorf
On 2016.10.17 at 17:23 -0500, Bill Schmidt wrote: > Hi, > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77916 identifies a situation > where SLSR will ICE when exposed to a cast from integer to pointer. This > is because we try to convert a PLUS_EXPR with an addend of -1 * S into a > MINUS_EXPR

Re: [patch, gfortran] PR48298 DTIO, implement size=

2016-10-17 Thread Steve Kargl
On Mon, Oct 17, 2016 at 06:02:52PM -0700, Jerry DeLisle wrote: > Hi all, > > The attached patch enables the size= specifier in a READ statement to work > with > child DTIO procedures. This is accomplished by moving the size_used variable > from the dtp structure to the gfc_unit structure so tha

[PATCH] xtensa: add -mpreferred-stack-boundary option

2016-10-17 Thread Max Filippov
2016-05-24 Max Filippov gcc/ * config/xtensa/xtensa.opt (mpreferred-stack-boundary=): New option. * config/xtensa/xtensa.h (STACK_BOUNDARY): Redefine as 64 for windowed ABI/32 for call0 ABI. (PREFERRED_STACK_BOUNDARY): New definition. * config/xten

[patch, gfortran] PR48298 DTIO, implement size=

2016-10-17 Thread Jerry DeLisle
Hi all, The attached patch enables the size= specifier in a READ statement to work with child DTIO procedures. This is accomplished by moving the size_used variable from the dtp structure to the gfc_unit structure so that the accumulation of bytes during READ is carried across the procedures v

[PATCH] xtensa: don't use unwind-dw2-fde-dip with elf targets

2016-10-17 Thread Max Filippov
Define LIB2ADDEH_XTENSA_UNWIND_DW2_FDE to unwind-dw2-fde.c in xtensa/t-elf and to unwind-dw2-fde-dip.c in xtensa/t-linux and use LIB2ADDEH_XTENSA_UNWIND_DW2_FDE in LIB2ADDEH definition. 2016-10-17 Max Filippov libgcc/ * config/xtensa/t-elf (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New

Re: [PATCH] rs6000: Fix separate shrink-wrapping for TARGET_MULTIPLE

2016-10-17 Thread Iain Sandoe
Hi Segher, > On 17 Oct 2016, at 09:13, Segher Boessenkool > wrote: > > We cannot use {SAVE,REST}_MULTIPLE and separate shrink-wrapping together, > not without checking when actually emitting the prologue/epilogue that the > registers to save/restore are actually still one contiguous block up to

[PATCH] Remove leftover comment

2016-10-17 Thread Bill Schmidt
Whoops. Discovered I had inadvertently left in a comment that made no sense when fixing PR77916. This patch removes it. Committed as obvious. Thanks, Bill 2016-10-17 Bill Schmidt * gimple-ssa-strength-reduction.c (record_increment): Remove garbage comment. Index: gcc/gim

Re: [patch v2] Get rid of stack trampolines for nested functions (0/4)

2016-10-17 Thread Eric Botcazou
> On ia64 I get this regression: > > FAIL: gcc.dg/Wtrampolines.c (test for warnings, line 31) > > Since ia64 never uses trampolines this is probably ok and the test > should be adjusted. This actually revealed a problem: the same regression should have appeared on PowerPC64/Linux (ELFv1 ABI) b

[PATCH] Fix PR77916

2016-10-17 Thread Bill Schmidt
Hi, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77916 identifies a situation where SLSR will ICE when exposed to a cast from integer to pointer. This is because we try to convert a PLUS_EXPR with an addend of -1 * S into a MINUS_EXPR with a subtrahend of S, but the base operand is unexpectedly o

Re: [PATCH] fix outstanding -Wformat-length failures (pr77735 et al.)

2016-10-17 Thread Martin Sebor
On 10/17/2016 01:11 PM, Jeff Law wrote: On 10/02/2016 02:10 PM, Martin Sebor wrote: The attached patch fixes a number of outstanding test failures and ILP32-related bugs in the gimple-ssa-sprintf pattch pointed out in bug 77676 and 77735). The patch also fixes c_strlen to correctly handle wid

[PATCH] DWARF5 DW_FORM_implicit_const support

2016-10-17 Thread Jakub Jelinek
Hi! This patch starts using DW_FORM_implicit_const (new in DWARF5), though only for cases where the constants are the same among all DIEs with the same abbreviation (and only for abbrevs used only in the main compilation unit, because right now we don't give all DIEs abbreviations first before out

Re: [PATCH] PR77895: DWARF: Emit DW_AT_comp_dir in all cases, even if source is an absolute path

2016-10-17 Thread Mike Stump
On Oct 17, 2016, at 2:38 PM, Ximin Luo wrote: > > Mike Stump: >> On Oct 17, 2016, at 11:00 AM, Ximin Luo wrote: >>> Therefore, it is better to emit it in all circumstances, in case the reader >>> needs to know what the working >>> directory was at compile-time. >> >> I can't help but wonder if

[PATCH] DWARF5 DW_FORM_data16 support

2016-10-17 Thread Jakub Jelinek
Hi! DWARF5 has a new 128-bit constant class form, this patch uses it e.g. for __int128 values. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-10-17 Jakub Jelinek * dwarf2out.c (size_of_die, value_format, output_die): Use DW_FORM_data16 for 128-bit d

Re: [PATCH] PR77895: DWARF: Emit DW_AT_comp_dir in all cases, even if source is an absolute path

2016-10-17 Thread Ximin Luo
Mike Stump: > On Oct 17, 2016, at 11:00 AM, Ximin Luo wrote: >> Therefore, it is better to emit it in all circumstances, in case the reader >> needs to know what the working >> directory was at compile-time. > > I can't help but wonder if this would break ccache some? > Could you explain this

[PATCH] DWARF5 DW_TAG_call_site support

2016-10-17 Thread Jakub Jelinek
Hi! This is on top of the http://gcc.gnu.org/ml/gcc-patches/2016-10/msg01202.html patch. This is yet another GNU extension that got accepted into DWARF5, though in this case various attributes got renamed (other than just dropping GNU_ middle parts), or extra attributes have been added instead of

Re: [PATCH] PR77895: DWARF: Emit DW_AT_comp_dir in all cases, even if source is an absolute path

2016-10-17 Thread Mike Stump
On Oct 17, 2016, at 11:00 AM, Ximin Luo wrote: > Therefore, it is better to emit it in all circumstances, in case the reader > needs to know what the working > directory was at compile-time. I can't help but wonder if this would break ccache some?

Re: RFC [1/3] divmod transform v2

2016-10-17 Thread Jeff Law
On 10/15/2016 11:59 PM, Prathamesh Kulkarni wrote: This patch is mostly the same as previous one, except it drops targeting __udivmoddi4() because it gave undefined reference link error for calling __udivmoddi4() on aarch64-linux-gnu. It appears aarch64 has hardware insn for DImode div, so __udiv

Re: [PATCH] read-md.c: Move various state to within class rtx_reader (v3)

2016-10-17 Thread Richard Sandiford
David Malcolm writes: >> I assume you didn't turn the functions above into member functions >> because they aren't primitives. OTOH it might seem inconsistent >> to have things like traverse_enum_types as member functions but >> traverse_md_constants not. > > In the following I've converted trave

Re: [PATCH] (PR 65950) Improve predicate for exit(0);

2016-10-17 Thread Andrew Pinski
On Wed, Sep 21, 2016 at 1:53 AM, Richard Biener wrote: > On Wed, Sep 21, 2016 at 10:45 AM, Andrew Pinski wrote: >> On Wed, Sep 21, 2016 at 4:32 PM, Richard Biener >> wrote: >>> On Wed, Sep 21, 2016 at 9:13 AM, Andrew Pinski wrote: Hi, While looking through bug reports, I noticed som

[PATCH 7/7] make targetm.gen_ccmp{first,next} take rtx_insn **

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-17 Trevor Saunders * ccmp.c (expand_ccmp_expr_1): Adjust. (expand_ccmp_expr): Likewise. (expand_ccmp_next): Likewise. * config/aarch64/aarch64.c (aarch64_gen_ccmp_next): Likewise. (aarch64_gen_ccmp_first): L

[PATCH 5/7] remove cast in delete_insn_chain

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-17 Trevor Saunders * cfgrtl.c (delete_insn_chain): Change argument type to rtx_insn * and adjust for that. * cfgrtl.h (delete_insn_chain): Adjust prototype. --- gcc/cfgrtl.c | 8 +++- gcc/cfgrtl.h | 2 +- 2 files chang

[PATCH 3/7] use rtx_insn * more

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-17 Trevor Saunders * config/alpha/alpha.c (alpha_legitimize_address_1): Change variable types from rtx to rtx_insn *. (alpha_emit_xfloating_libcall): Likewise. * config/arc/arc.c (arc_emit_call_tls_get_addr): Likewi

[PATCH 1/7] make LABEL_REF_LABEL a rtx_insn *

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders While chainging LABEL_REF_LABEL it might as well become an inline function, so that its clearer what types are involved. Unfortunately because it is still possible to use XEXP and related macros on a LABEL_REF rtx you can still set the field to be a non insn rtx. The other

[PATCH 6/7] remove cast from prev_nonnote_insn_bb

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-17 Trevor Saunders * emit-rtl.c (prev_nonnote_insn_bb): Change argument type to rtx_insn *. * rtl.h (prev_nonnote_insn_bb): Adjust prototype. --- gcc/emit-rtl.c | 3 +-- gcc/rtl.h | 2 +- 2 files changed, 2 insertions

[PATCH 2/7] make tablejump_p return the label as a rtx_insn *

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-17 Trevor Saunders * cfgcleanup.c (merge_blocks_move_successor_nojumps): Adjust. (outgoing_edges_match): Likewise. (try_crossjump_to_edge): Likewise. * cfgrtl.c (try_redirect_by_replacing_jump): Likewise. (r

[PATCH 4/7] remove cast to rtx_insn * in remove_note

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-17 Trevor Saunders * config/rl78/rl78.c (gen-and_emit_move): Change argument type to rtx_insn *. (transcode_memory_rtx): Likewise. (move_to_acc): Likewise. (move_from_acc): Likewise. (move_acc_to_reg

[PATCH 0/7] more rtx-insn stuff

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders Hi, Rather late (travel and then busy day job interfiered), but this includes the promised conversion of LABEL_REF_LABEL and tablejump_p to use rtx_insn *. Followed by a bit more random conversion of things to use rtx_insn *. patches individually bootstrapped + regtested

Re: [Patch 3/11] Implement TARGET_C_EXCESS_PRECISION for s390

2016-10-17 Thread Andreas Krebbel1
> Here is a patch implementing what I think has been discussed in this thread. > > OK? Looks good to me. Uli, do you agree with that change for S/390 or would you rather see us fixing the float_t type definition in Glibc? -Andreas-

Re: [PATCH 1/2] Fix GCC split-stack variadic argument tests

2016-10-17 Thread Jeff Law
On 10/17/2016 01:12 PM, Adhemerval Zanella wrote: This test adds the expect va_end after va_start on split-stack tests. gcc/ChangeLog: * gcc/testsuite/gcc.dg/split-3.c (down): Call va_end after va_start. * gcc/testsuite/gcc.dg/split-6.c (down): Likewise. OK. Would probably fal

Re: [PATCH] Extend -Wint-in-bool-context to suspicious enum values (PR 77700)

2016-10-17 Thread Jeff Law
On 10/08/2016 04:50 PM, Trevor Saunders wrote: On Fri, Oct 07, 2016 at 03:18:07PM +, Bernd Edlinger wrote: Hi! This extends -Wint-in-bool-context to uses of enum values in boolean context, and fixes one place where accidentally an enum value was passed to a bool parameter. I excluded enum

Re: [PATCH][2/2] Enable SSA propagator "DCE" for VRP

2016-10-17 Thread Jeff Law
On 10/12/2016 01:08 AM, Richard Biener wrote: On Fri, 7 Oct 2016, Richard Biener wrote: This turns the switch (which also requires propagating into ASSERT_EXPRs, otherwise those will end up with released SSA names eventually). A [3/2] would be to let ASSERT_EXPRs be removed by the propagator

Re: [PATCH, C++] Warn on redefinition of builtin functions (PR c++/71973)

2016-10-17 Thread Bernd Edlinger
On 10/17/16 20:05, Joseph Myers wrote: > On Sun, 16 Oct 2016, Bernd Edlinger wrote: > >> Second, the declaration in the glibc header files simply look wrong, >> because the type of argv, and envp is "char *const *" while the >> builtin function wants "const char**", thus only the array of char* >>

[PATCH v3 2/2] aarch64: Add split-stack initial support

2016-10-17 Thread Adhemerval Zanella
From: Adhemerval Zanella Changes from previous version: * Add missing new function comments; * Using gen_rtx_fmt_ee instead of gen_rtx_IF_THEN_ELSE to create conditional jumps; * Some typos and withspace issues. -- This patch adds the split-stack support on aarch64 (PR #67877). As for o

[PATCH 1/2] Fix GCC split-stack variadic argument tests

2016-10-17 Thread Adhemerval Zanella
This test adds the expect va_end after va_start on split-stack tests. gcc/ChangeLog: * gcc/testsuite/gcc.dg/split-3.c (down): Call va_end after va_start. * gcc/testsuite/gcc.dg/split-6.c (down): Likewise. --- gcc/ChangeLog | 5 + gcc/testsuite/gcc.dg/split-3.

Re: PATCH to tidy up code in c-warn.c

2016-10-17 Thread Jeff Law
On 10/16/2016 04:53 AM, Marek Polacek wrote: Found when looking at something else. find_array_ref_with_const_idx_r would uselessly keep on looking for other array refs with constant indices, even though finding one is enough. So return when something is found, instead of just ignoring the subtr

Re: [PATCH] fix outstanding -Wformat-length failures (pr77735 et al.)

2016-10-17 Thread Jeff Law
On 10/02/2016 02:10 PM, Martin Sebor wrote: The attached patch fixes a number of outstanding test failures and ILP32-related bugs in the gimple-ssa-sprintf pattch pointed out in bug 77676 and 77735). The patch also fixes c_strlen to correctly handle wide strings (previously it accepted them but

Re: [PATCH] AIX symbol encoding

2016-10-17 Thread Segher Boessenkool
Hi David, On Mon, Oct 17, 2016 at 09:54:35AM -0400, David Edelsohn wrote: > This patch shifts earlier the point during compilation where the > rs6000 backend adds decoration to symbols: to encode_section_info. > - /* Currently C++ toc references to vtables can be emitted before it > - is dec

Re: [PATCH AArch64]Penalize vector cost for large loops with too many vect insns.

2016-10-17 Thread Bill Schmidt
> On Oct 17, 2016, at 12:26 PM, Bin.Cheng wrote: > > On Sat, Oct 15, 2016 at 3:07 AM, kugan > wrote: >> Hi Bin, >> >> On 15/10/16 00:15, Bin Cheng wrote: >>> >>> +/* Test for likely overcommitment of vector hardware resources. If a >>> + loop iteration is relatively large, and too large a

Re: [PATCH/AARCH64] Fix some testcases for AARCH64 ILP32

2016-10-17 Thread Andrew Pinski
On Mon, Oct 17, 2016 at 2:55 AM, Richard Earnshaw (lists) wrote: > On 16/10/16 22:39, Andrew Pinski wrote: >> Hi, >> These testcases use long for 64bit integer which means they will >> fail with -mabi=ilp32 on aarch64. This reduces the number of failures >> down for ILP32. >> >> OK? Bootstrappe

Re: [PATCH, C++] Warn on redefinition of builtin functions (PR c++/71973)

2016-10-17 Thread Joseph Myers
On Sun, 16 Oct 2016, Bernd Edlinger wrote: > Second, the declaration in the glibc header files simply look wrong, > because the type of argv, and envp is "char *const *" while the > builtin function wants "const char**", thus only the array of char* > itself is const, not the actual char stings th

Re: [patch] Fix ICE on ACATS test for Aarch64 at -O

2016-10-17 Thread Jeff Law
On 10/03/2016 09:45 AM, Eric Botcazou wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01781.html 2016-09-26 Eric Botcazou * expmed.c (expand_shift_1): Add MAY_FAIL parameter and do not assert that the result is non-zero if it is true. (maybe_expand_shift):

[PATCH] PR77895: DWARF: Emit DW_AT_comp_dir in all cases, even if source is an absolute path

2016-10-17 Thread Ximin Luo
(Please keep me on CC, I am not subscribed) In working on another patch for DW_AT_comp_dir behaviour, I tried to write a test for that other patch. This test did not work as expected - DW_AT_comp_dir was not even generated in the resulting output! But this had nothing to do with my patch so I dug

[Patch, fortran] PR61420 [5/6/7 Regression] [OOP] type-bound procedure returning a procedure pointer fails to compile

2016-10-17 Thread Paul Richard Thomas
Dear All, Committed as 'obvious' on trunk as revision 241274. I will commit to 5- and 6-branches at the end of the week. Cheers Paul 2016-10-17 Paul Thomas PR fortran/61420 PR fortran/78013 * resolve.c (resolve_variable): Obtain the typespec for a variable expression, when

Re: [PATCH] Make -Wint-in-bool-context warn on suspicious shift ops

2016-10-17 Thread Markus Trippelsdorf
On 2016.10.17 at 17:30 +, Bernd Edlinger wrote: > On 10/17/16 19:11, Markus Trippelsdorf wrote: > >>> I'm seeing this warning a lot in valid low level C code for unsigned > >>> integers. And I must say it look bogus in this context. Some examples: > > > > (All these examples are from qemu trunk

Patch ping

2016-10-17 Thread Jakub Jelinek
Hi! I'd like to ping the [C++ PATCH] Fix -Wimplicit-fallthrough in templates (PR c++/77886) patch: On Sat, Oct 08, 2016 at 08:13:50AM +0200, Jakub Jelinek wrote: > 2016-10-08 Jakub Jelinek > > PR c++/77886 > * pt.c (tsubst_expr) Copy over > FALLTHROUGH_LABEL_P flag to the n

Re: [PATCH] Make -Wint-in-bool-context warn on suspicious shift ops

2016-10-17 Thread Bernd Edlinger
On 10/17/16 19:11, Markus Trippelsdorf wrote: >>> I'm seeing this warning a lot in valid low level C code for unsigned >>> integers. And I must say it look bogus in this context. Some examples: > > (All these examples are from qemu trunk.) > >>> return ((a.high & 0x7fff) == 0x7fff) && (a.low<<1);

Re: [PATCH AArch64]Penalize vector cost for large loops with too many vect insns.

2016-10-17 Thread Bin.Cheng
On Sat, Oct 15, 2016 at 3:07 AM, kugan wrote: > Hi Bin, > > On 15/10/16 00:15, Bin Cheng wrote: >> >> +/* Test for likely overcommitment of vector hardware resources. If a >> + loop iteration is relatively large, and too large a percentage of >> + instructions in the loop are vectorized, the

Re: [PATCH] Make -Wint-in-bool-context warn on suspicious shift ops

2016-10-17 Thread Markus Trippelsdorf
On 2016.10.17 at 16:51 +, Bernd Edlinger wrote: > On 10/17/16 17:23, Markus Trippelsdorf wrote: > > On 2016.09.29 at 18:52 +, Bernd Edlinger wrote: > >> On 09/29/16 20:03, Jason Merrill wrote: > >>> On Wed, Sep 28, 2016 at 12:09 PM, Bernd Edlinger > >>> wrote: > On 09/28/16 16:41, Jas

Re: [PATCH 0/8] NVPTX offloading to NVPTX: backend patches

2016-10-17 Thread Alexander Monakov
On Mon, 17 Oct 2016, Bernd Schmidt wrote: > On 10/14/2016 06:39 PM, Alexander Monakov wrote: > > I'm resending the patch series with backend prerequisites for OpenMP > > offloading to the NVIDIA PTX ISA. The patches are rebased on trunk. > > What's the status of the branch? Is it expected to work

Re: [PATCH AArch64]Penalize vector cost for large loops with too many vect insns.

2016-10-17 Thread James Greenhalgh
On Sat, Oct 15, 2016 at 01:07:12PM +1100, kugan wrote: > Hi Bin, > > On 15/10/16 00:15, Bin Cheng wrote: > >+/* Test for likely overcommitment of vector hardware resources. If a > >+ loop iteration is relatively large, and too large a percentage of > >+ instructions in the loop are vectorized

Re: [Patch] Backport fix for PR 52085 to gcc-5-branch?

2016-10-17 Thread Senthil Kumar Selvaraj
Richard Biener writes: > On Mon, Oct 17, 2016 at 12:21 PM, Senthil Kumar Selvaraj > wrote: >> Hi, >> >> The fix for PR 52085 went into trunk when trunk was 6.0. I ran into the >> same issue on a gcc 5.x and found that the fix didn't get backported. >> >> Bootstrapped and reg tested below p

libgo patch committed: copy rdebug code from Go 1.7

2016-10-17 Thread Ian Lance Taylor
This patch to libgo copies the rdebug code from the Go 1.7 runtime to libgo. While we're at it, this updates the runtime/debug package, and starts running its testsuite by default. I'm not sure why runtime/debug was not previously updated to 1.7. Doing that led me to fix some minor aspects of ru

Re: [PATCH] Make -Wint-in-bool-context warn on suspicious shift ops

2016-10-17 Thread Bernd Edlinger
On 10/17/16 17:23, Markus Trippelsdorf wrote: > On 2016.09.29 at 18:52 +, Bernd Edlinger wrote: >> On 09/29/16 20:03, Jason Merrill wrote: >>> On Wed, Sep 28, 2016 at 12:09 PM, Bernd Edlinger >>> wrote: On 09/28/16 16:41, Jason Merrill wrote: > On Tue, Sep 27, 2016 at 11:10 AM, Bernd

Re: [PATCH] Reduce stack usage in sha512 (PR target/77308)

2016-10-17 Thread Kyrill Tkachov
On 30/09/16 14:34, Bernd Edlinger wrote: On 09/30/16 12:14, Bernd Edlinger wrote: Eric Botcazou wrote: A comment before the SETs and a testcase would be nice. IIRC we do have stack size testcases via using -fstack-usage. Or -Wstack-usage, which might be more appropriate here. Yes. good ide

[PING #2] [PATCH] fix outstanding -Wformat-length failures (pr77735 et al.)

2016-10-17 Thread Martin Sebor
I'm still looking for a review of the patch below: https://gcc.gnu.org/ml/gcc-patches/2016-10/msg00043.html The patch should clean up the remaining test suite failures on ILP32 targets and also fixes up some remaining issues in the gimple-ssa-sprintf pass that stand in the way of re-enabling

Re: [PATCH][AArch64] Use new target pass registration framework for FMA steering pass

2016-10-17 Thread James Greenhalgh
On Thu, Oct 13, 2016 at 06:14:16PM +0100, Kyrill Tkachov wrote: > Hi all, > > This patch moves the aarch64-specific FMA steering pass registration into the > new framework > that Jakub introduced. With this patch the RTL dump for the steering pass is > now numbered properly > so that it appears

[PATCH] read-md.c: Move various state to within class rtx_reader (v3)

2016-10-17 Thread David Malcolm
On Mon, 2016-10-17 at 12:37 +0100, Richard Sandiford wrote: > David Malcolm writes: > > @@ -2388,8 +2389,10 @@ gen_mnemonic_setattr (htab_t mnemonic_htab, > > rtx insn) > > static int > > mnemonic_htab_callback (void **slot, void *info ATTRIBUTE_UNUSED) > > { > > - obstack_grow (&string_obstac

Re: [PATCH] Fix computation of register limit for -fsched-pressure

2016-10-17 Thread Pat Haugen
On 10/17/2016 08:17 AM, Maxim Kuvyrkov wrote: >> The patch here, https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01872.html, >> attempted to scale down the register limit used by -fsched-pressure for the >> case where the block in question executes as frequently as the entry block >> to just the c

[PATCH][AArch64] Fix PR target/77822: Use tighter predicates for zero_extract patterns

2016-10-17 Thread Kyrill Tkachov
Hi all, For the attached testcase the code ends up trying to extract bits outside the range of the normal register widths. The aarch64 patterns for ubfz and tbnz end up accepting such operands and emitting invalid assembly such as 'ubfx x18,x2,192,32' The solution is to add proper predicates a

Use FOR_ALL_BB_FN in a few more places (was: [PATCH] Clear BB_VISITED in bb-reorder)

2016-10-17 Thread Thomas Schwinge
Hi! On Mon, 17 Oct 2016 15:17:13 +0200, Richard Biener wrote: > On Mon, Oct 17, 2016 at 3:12 PM, Thomas Schwinge > wrote: > > On Mon, 17 Oct 2016 14:26:42 +0200 (CEST), Richard Biener > > wrote: > >> --- gcc/bb-reorder.c (revision 241228) > >> +++ gcc/bb-reorder.c (working copy) > >> @@ -23

Re: [GCC-6][RFA 1/2]: Don't ignore target_header_dir when deciding inhibit_libc

2016-10-17 Thread Andre Vieira (lists)
On 09/09/16 15:32, Andre Vieira (lists) wrote: > On 27/05/16 15:51, Ulrich Weigand wrote: >> Andre Vieira (lists) wrote: >>> On 07/04/16 10:30, Andre Vieira (lists) wrote: On 17/03/16 16:33, Andre Vieira (lists) wrote: > On 23/10/15 12:31, Bernd Schmidt wrote: >> On 10/12/2015 11:58 AM

Re: [PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx types

2016-10-17 Thread Thomas Schwinge
Hi! Ping. On Thu, 29 Sep 2016 15:18:00 +0200, Thomas Schwinge wrote: > On Mon, 19 Sep 2016 13:25:01 +0200, Richard Biener > wrote: > > On Mon, Sep 19, 2016 at 1:19 PM, Thomas Schwinge > > wrote: > > > On Mon, 19 Sep 2016 10:18:35 +0200, Richard Biener > > > wrote: > > >> On Fri, Sep 16, 20

Re: Explicitly list all tree codes in gcc/tree-streamer.c:record_common_node

2016-10-17 Thread Thomas Schwinge
Hi! On Fri, 30 Sep 2016 09:47:56 +0200, Richard Biener wrote: > On Thu, Sep 29, 2016 at 4:48 PM, Thomas Schwinge > wrote: > > On Mon, 19 Sep 2016 13:25:01 +0200, Richard Biener > > wrote: > >> On Mon, Sep 19, 2016 at 1:19 PM, Thomas Schwinge > >> wrote: > >> > On Mon, 19 Sep 2016 10:18:35 +0

Re: [PATCH 0/8] NVPTX offloading to NVPTX: backend patches

2016-10-17 Thread Bernd Schmidt
On 10/14/2016 06:39 PM, Alexander Monakov wrote: I'm resending the patch series with backend prerequisites for OpenMP offloading to the NVIDIA PTX ISA. The patches are rebased on trunk. What's the status of the branch? Is it expected to work? I'm trying to compile the OpenMP version of these

Re: [PATCH, rs6000] pr65479 Add option to fix failing asan test cases.

2016-10-17 Thread Bill Seurer
On 10/14/2016 04:59 PM, Segher Boessenkool wrote: On Fri, Oct 14, 2016 at 02:37:42PM -0500, Bill Seurer wrote: [PATCH, rs6000] pr65479 Add option to fix failing asan test cases. This patch adds the -fasynchronous-unwind-tables option to several of the asan test cases. The option causes a full

Re: [PATCH] Make -Wint-in-bool-context warn on suspicious shift ops

2016-10-17 Thread Markus Trippelsdorf
On 2016.09.29 at 18:52 +, Bernd Edlinger wrote: > On 09/29/16 20:03, Jason Merrill wrote: > > On Wed, Sep 28, 2016 at 12:09 PM, Bernd Edlinger > > wrote: > >> On 09/28/16 16:41, Jason Merrill wrote: > >>> On Tue, Sep 27, 2016 at 11:10 AM, Bernd Edlinger > >>> wrote: > On 09/27/16 16:42,

Re: [PATCH] Add various DWARF5 constants to dwarf2.{h,def}

2016-10-17 Thread Jeff Law
On 10/14/2016 11:34 AM, Jakub Jelinek wrote: Hi! Now that DWARF5 public review draft has been released, I went through the document looking for double dagger marked constants and added them to dwarf2.{def,h}. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? It's just adding

[PATCH] PR77994 Convert std::sample size argument to suitable type

2016-10-17 Thread Jonathan Wakely
The __sample algorithms should work with the iterator's difference_type, not the user-supplied _Distance type. PR libstdc++/77994 * include/bits/stl_algo.h (sample): Convert size argument to iterator difference type. * include/experimental/algorithm (experimental::

Re: [PATCH] Don't peel extra copy of loop in unroller for loops with exit at end

2016-10-17 Thread Pat Haugen
On 10/14/2016 10:29 PM, Andrew Pinski wrote: >>> >> This patch bumps the iteration count by 1 for loops with the exit at the >>> >> end so that it represents the number of times the loop body is executed, >>> >> and therefore removes the need to always execute that first peeled copy. >>> >> With

[PATCH] AIX symbol encoding

2016-10-17 Thread David Edelsohn
This patch shifts earlier the point during compilation where the rs6000 backend adds decoration to symbols: to encode_section_info. AIX uses the XCOFF file format, which extends COFF in a few ways, including some increased granularity of sections through a mechanism called Storage Mapping Class --

[PING**2] [PATCH, ARM] Reduce stack usage in sha512 (PR target/77308)

2016-10-17 Thread Bernd Edlinger
Ping On 10/06/16 18:18, Bernd Edlinger wrote: > Hi, > > I'd like to ping for this patch: > https://gcc.gnu.org/ml/gcc-patches/2016-09/msg02362.html > > Thanks, > Bernd. > > > On 09/30/16 15:33, Bernd Edlinger wrote: >> On 09/30/16 12:14, Bernd Edlinger wrote: >>> Eric Botcazou wrote: > A c

Re: fix -fmax-errors & notes

2016-10-17 Thread Nathan Sidwell
On 10/14/16 12:17, David Malcolm wrote: How about splitting out the bail-out code into a separate function: diagnostic_handle_max_errors Having discovered how fortran buffers errors, I think this approach is necessary. I think I'm going to be in assignment-limbo for a little while though

[PATCH] Simplify conditions in EVRP, handle taken edge

2016-10-17 Thread Richard Biener
This refactors propagation vs. substitution and handles condition simplification properly as well as passing a known taken edge down to the DOM walker (avoiding useless work and properly handling PHIs). If we do all the work it's stupid to not fold away dead code... Bootstrap and regtest pending

Re: Clear basic block flags before using BB_VISITED for OpenACC loops processing

2016-10-17 Thread Thomas Schwinge
Hi! On Mon, 17 Oct 2016 14:08:44 +0200, Richard Biener wrote: > On Mon, Oct 17, 2016 at 1:47 PM, Thomas Schwinge > wrote: > > On Mon, 17 Oct 2016 13:22:17 +0200, Richard Biener > > wrote: > >> On Mon, Oct 17, 2016 at 11:38 AM, Thomas Schwinge > >> wrote: > >> > On Fri, 14 Oct 2016 13:06:59 +

[PATCH] PR77990 refactor unique_ptr to encapsulate tuple

2016-10-17 Thread Jonathan Wakely
We are incorrectly requiring unique_ptr deleters to be copyable here: explicit unique_ptr(pointer __p) noexcept : _M_t(__p, deleter_type()) { } We could just do: explicit unique_ptr(pointer __p) noexcept : _M_t() { std::get<0>(_M_t) = __p; } But having t

Re: [PATCH] Fix computation of register limit for -fsched-pressure

2016-10-17 Thread Maxim Kuvyrkov
> On Oct 7, 2016, at 6:08 PM, Pat Haugen wrote: > > The patch here, https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01872.html, > attempted to scale down the register limit used by -fsched-pressure for the > case where the block in question executes as frequently as the entry block to > just the

Re: [PATCH] Clear BB_VISITED in bb-reorder

2016-10-17 Thread Richard Biener
On Mon, Oct 17, 2016 at 3:12 PM, Thomas Schwinge wrote: > Hi! > > On Mon, 17 Oct 2016 14:26:42 +0200 (CEST), Richard Biener > wrote: >> --- gcc/bb-reorder.c (revision 241228) >> +++ gcc/bb-reorder.c (working copy) >> @@ -2355,7 +2355,10 @@ reorder_basic_blocks_simple (void) >> To start w

Re: [PATCH] Clear BB_VISITED in bb-reorder

2016-10-17 Thread Thomas Schwinge
Hi! On Mon, 17 Oct 2016 14:26:42 +0200 (CEST), Richard Biener wrote: > --- gcc/bb-reorder.c (revision 241228) > +++ gcc/bb-reorder.c (working copy) > @@ -2355,7 +2355,10 @@ reorder_basic_blocks_simple (void) > To start with, everything points to itself, nothing is assigned yet. */ > >

Re: [PATCH] Fix PR77937

2016-10-17 Thread Bill Schmidt
> On Oct 17, 2016, at 3:27 AM, Richard Biener > wrote: > > On Fri, Oct 14, 2016 at 3:51 PM, Bill Schmidt > wrote: >> Hi Richard, >> >>> On Oct 14, 2016, at 4:19 AM, Richard Biener >>> wrote: >>> >>> On Thu, Oct 13, 2016 at 5:38 PM, Bill Schmidt >>> wrote: The previous patch for

Re: [PATCH v2][AArch64] Fix symbol offset limit

2016-10-17 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 12 September 2016 15:50 To: Richard Earnshaw; GCC Patches Cc: nd Subject: Re: [PATCH v2][AArch64] Fix symbol offset limit   Wilco wrote:    > The original example is from GCC itself, the fixed_regs array is small but > due to > optimization we can end up wit

[PATCH] Fix PR77988

2016-10-17 Thread Richard Biener
Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2016-10-17 Richard Biener PR tree-optimization/77988 * tree-vrp.c (remove_range_assertions): Use replace_uses_by. * gcc.dg/torture/pr77988.c: New testcase. Index: gcc/testsuite/gcc.dg/torture/pr

Re: [PATCH][AArch64 - v3] Simplify eh_return implementation

2016-10-17 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 02 September 2016 12:31 To: Ramana Radhakrishnan; GCC Patches Cc: nd Subject: Re: [PATCH][AArch64 - v3] Simplify eh_return implementation   Ramana Radhakrishnan wrote: > Can you please file a PR for this and add some testcases ?  This sounds like > a serious

Re: [PATCH][AArch64] Align FP callee-saves

2016-10-17 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 08 September 2016 14:35 To: GCC Patches Cc: nd Subject: [PATCH][AArch64] Align FP callee-saves   If the number of integer callee-saves is odd, the FP callee-saves use 8-byte aligned LDP/STP.  Since 16-byte alignment may be faster on some CPUs, align the FP cal

Re: [PATCH][AArch64] Improve stack adjustment

2016-10-17 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 10 August 2016 17:20 To: Richard Earnshaw; GCC Patches Cc: nd Subject: Re: [PATCH][AArch64] Improve stack adjustment   Richard Earnshaw wrote: > I see you've added a default argument for your new parameter.  I think > doing that is fine, but I have two comments

[PATCH] Fix cond-expr handling in genmatch

2016-10-17 Thread Richard Biener
This fixes matching of toplevel (cond (lt @1 @2) ...) as reported by Bin to me privately. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2016-10-17 Richard Biener * genmatch.c (dt_operand::gen_gimple_expr): Use get_name to get at the operand to look

Re: [PATCH] rs6000: Fix shrink-wrap-separate for AIX

2016-10-17 Thread Segher Boessenkool
On Sun, Oct 16, 2016 at 08:37:30AM -0400, David Edelsohn wrote: > Maybe something like the following: > > * config/rs6000/rs6000.c (rs6000_savres_strategy) [AIX,ELFv2]: Inline > FPR save and restore if shrink-wrapping and not optimizing for size. > > Index: rs6000.c >

[PATCH] Clear BB_VISITED in bb-reorder

2016-10-17 Thread Richard Biener
$subject, applied as obvious. Richard. 2016-10-17 Richard Biener * bb-reorder.c (reorder_basic_blocks_simple): Clear BB_VISITED before using it. Index: gcc/bb-reorder.c === --- gcc/bb-reorder.c(revision 2412

[PATCH] PR77998 Remove std::thread::_Invoker::result_type

2016-10-17 Thread Jonathan Wakely
This typedef uses the type before it's complete, which Clang rejects. It's not necessary anyay, we can just use decltype directly where needed. The _Invoker type isn't user-facing and doesn't need a result_type. PR libstdc++/77998 * include/std/future (__future_base::_Deferred_sta

Re: Clear basic block flags before using BB_VISITED for OpenACC loops processing

2016-10-17 Thread Richard Biener
On Mon, Oct 17, 2016 at 1:47 PM, Thomas Schwinge wrote: > Hi! > > On Mon, 17 Oct 2016 13:22:17 +0200, Richard Biener > wrote: >> On Mon, Oct 17, 2016 at 11:38 AM, Thomas Schwinge >> wrote: >> > On Fri, 14 Oct 2016 13:06:59 +0200, Richard Biener >> > wrote: >> >> On Fri, Oct 14, 2016 at 1:00 P

[PATCH] PR77987 Fix unique_ptr::reset(U) for T != U

2016-10-17 Thread Jonathan Wakely
This is a very simple change, to allow conversions that are supposed to be valid according to DR 2118. The fix was slightly complicated by the tests being a bit of a mess. We had tests for this requirement, but they were in files which mixed positive tests and negative tests. I've split the tests

[PATCH] Implement P0084R2, Emplace return type, for C++17

2016-10-17 Thread Jonathan Wakely
In C++17 the emplace_front and emplace_back members return a reference. There isn't a very neat way to implement this, so it's just lots of conditional compilation. This isn't an ABI break, because these member functions are templates and so the return type is part of the mangled name. We can't a

Re: Compile-time improvement for if conversion.

2016-10-17 Thread Richard Biener
On Fri, Oct 14, 2016 at 2:07 PM, Yuri Rumyantsev wrote: > Richard, > > Here is updated patch with the changes proposed by you. > > Bootstrapping and regression testing did not show any new failures. > Is it OK for trunk? Ok with dropping the free_dominance_info_for_region variant without struct f

Re: Clear basic block flags before using BB_VISITED for OpenACC loops processing

2016-10-17 Thread Thomas Schwinge
Hi! On Mon, 17 Oct 2016 13:22:17 +0200, Richard Biener wrote: > On Mon, Oct 17, 2016 at 11:38 AM, Thomas Schwinge > wrote: > > On Fri, 14 Oct 2016 13:06:59 +0200, Richard Biener > > wrote: > >> On Fri, Oct 14, 2016 at 1:00 PM, Nathan Sidwell wrote: > >> > On 10/14/16 05:28, Richard Biener wr

Re: [RFC] Speed-up -fprofile-update=atomic

2016-10-17 Thread Martin Liška
On 10/13/2016 11:43 AM, Richard Biener wrote: > On Wed, Oct 12, 2016 at 3:52 PM, Martin Liška wrote: >> On 10/04/2016 11:45 AM, Richard Biener wrote: >>> On Thu, Sep 15, 2016 at 12:00 PM, Martin Liška wrote: On 09/07/2016 02:09 PM, Richard Biener wrote: > On Wed, Sep 7, 2016 at 1:37 PM,

Re: [PATCH] read-md.c: Move various state to within class rtx_reader

2016-10-17 Thread Richard Sandiford
David Malcolm writes: > @@ -2388,8 +2389,10 @@ gen_mnemonic_setattr (htab_t mnemonic_htab, rtx insn) > static int > mnemonic_htab_callback (void **slot, void *info ATTRIBUTE_UNUSED) > { > - obstack_grow (&string_obstack, (char*)*slot, strlen ((char*)*slot)); > - obstack_1grow (&string_obstack

  1   2   >