Re: [PATCH, rs6000] Fix PR83332 (missing vcond patterns)

2017-12-12 Thread Richard Biener
On Mon, Dec 11, 2017 at 10:55 PM, Bill Schmidt wrote: > Hi, > > A new test case introduced for PR81303 failed on powerpc64 (BE, LE). This > turns out to be due to a missing standard pattern (vcondv2div2df). This > and a couple of other patterns are easy to support with existing logic > by just a

Re: [PATCH][Middle-end]79538 missing -Wformat-overflow with %s and non-member array arguments

2017-12-12 Thread Richard Biener
On Mon, Dec 4, 2017 at 4:34 PM, Qing Zhao wrote: > Hi, > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79538 > > missing -Wformat-overflow with %s and non-member array arguments > > -Wformat-overflow uses the routine "get_range_strlen" to deci

Re: [PATCH] avoid alignment error for attribute warn_if_not_aligned

2017-12-12 Thread Richard Biener
On Tue, Dec 12, 2017 at 1:57 AM, Martin Sebor wrote: > My enhancement to improve the detection of attribute collisions > introduced a regression of sorts in the g++.dg/pr53037-4.C test > on ia64. > > https://gcc.gnu.org/ml/gcc-testresults/2017-12/msg00672.html > > The regression hasn't been notice

Re: [PR81165] discount killed stmts when sizing blocks for threading

2017-12-12 Thread Richard Biener
On Tue, Dec 12, 2017 at 6:17 AM, Alexandre Oliva wrote: > On Dec 11, 2017, Jeff Law wrote: > >>> + gcc_assert (path->length () == 0 || path->last ()->e == e); >>> + if (path->length () == 0) >>> +return estimate_threading_killed_stmts (e->dest); >>> + >>> + int total = 0; >>> + int i = 0;

[PATCH][i386] Fix PR83358 - increase divide/mod latencies a bit

2017-12-12 Thread Markus Trippelsdorf
As the testcase shows, trunk currently generates horrible code for divisions used in tight loops. This happens because the algorithm expanding div/mod doesn't take parallelism into account and this makes the cost model unrealistic. Fix the issue by increasing the estimated latencies a bit. Tested

Re: [PATCH][RFA][P1 PR tree-optimization/83298] Avoid over-optimistic result range for COND_EXPR

2017-12-12 Thread Richard Biener
On Mon, Dec 11, 2017 at 8:34 PM, Jeff Law wrote: > On 12/08/2017 04:17 AM, Richard Biener wrote: >> >> I'm not convinced that when you look forward past the dominance frontier >> and do VRP analysis on stmts without analyzing all intermediate >> stmts on the path (or at least push all defs on that

[PATCH,AIX] Nil check size threshold control for AIX

2017-12-12 Thread REIX, Tony
Description: * This patch tells the Go frontend to insert explicit guards (check for nil -> panic) for AIX since relying on a fault does not work on AIX for page 0. Tests: * AIX: Build: SUCCESS - build made by means of gmake. ChangeLog: * go-lang.c (go_langhook_init): Handle AIX case for

RE: [PATCH][i386,AVX] Enable VBMI2 support [5/7]

2017-12-12 Thread Koval, Julia
Looks good. How to put it there(sorry, noob question)? Thanks, Julia > -Original Message- > From: Gerald Pfeifer [mailto:ger...@pfeifer.com] > Sent: Saturday, December 09, 2017 2:49 PM > To: Koval, Julia > Cc: Kirill Yukhin ; GCC Patches patc...@gcc.gnu.org> > Subject: RE: [PATCH][i386,

RE: [x86][patch] Fix clwb for skylake

2017-12-12 Thread Koval, Julia
Sorry, gcc/ * config/i386/i386.c (PTA_SKYLAKE_AVX512): Add PTA_CLWB. (PTA_CANNONLAKE): Remove PTA_CLWB. Thanks, Julia > -Original Message- > From: Uros Bizjak [mailto:ubiz...@gmail.com] > Sent: Monday, December 11, 2017 9:47 AM > To: Koval, Julia > Cc: GCC Patches ; Kiri

[PATCH][PR ada/65696] ASAN reports global-buffer-overrun for local tagged types

2017-12-12 Thread Yuta Tomino
Hello. This PR is fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65696 . The cause is that the implicit generated code for making non-static DT is copying the number Max_Predef_Prims of the predefined primitives from the parent type, but the real number is smaller than. AddressSanitizer can find

Re: [SFN+LVU+IEPM v4 6/9] [SFN] Introduce -gstatement-frontiers option, enable debug markers

2017-12-12 Thread Christophe Lyon
Hi, On 12 December 2017 at 03:42, Alexandre Oliva wrote: > On Dec 7, 2017, Jeff Law wrote: > >> On 11/09/2017 07:34 PM, Alexandre Oliva wrote: >>> Introduce a command line option to enable statement frontiers, enabled >>> by default in optimized builds with DWARF2+ debug information. >> OK onc

Re: [PATCH] Handle LOOP_DIST_ALIAS ifns in move_sese_region_to_fn (PR tree-optimization/83359)

2017-12-12 Thread Richard Biener
On Mon, 11 Dec 2017, Jakub Jelinek wrote: > Hi! > > Unlike LOOP_VECTORIZED ifns, LOOP_DIST_ALIAS is added by the ldist pass > and needs to be maintained until the vectorizer, and parloops in between > that. Earlier I've added code to update or drop orig_loop_num during > move_sese_region_to_fn,

[committed] Add testcases for 2 fixed PRs (PR rtl-optimization/8336[34])

2017-12-12 Thread Jakub Jelinek
Hi! These 2 PRs were fixed with r255506, I've tested these testcases on x86_64-linux {-m32,-m64} with current trunk as well as trunk before that change (where it FAILed) and committed to trunk as obvious. 2017-12-12 Jakub Jelinek PR rtl-optimization/83363 PR rtl-optimization/8

Re: [PATCH][ARM][gcc-7] Fix wrong code by arm_final_prescan with fp16 move instructions

2017-12-12 Thread Christophe Lyon
Hi, On 11 December 2017 at 18:12, Sudakshina Das wrote: > On 30/11/17 16:01, Sudakshina Das wrote: >> >> Hi >> >> This patch is the fix for gcc-7 for the same issue as mentioned in: >> https://gcc.gnu.org/ml/gcc-patches/2017-11/msg02209.html >> >> >> For the following test case: >> __fp16 >> te

Re: [PATCH][AArch64] Specify fp16 support for Cortex-A55 and Cortex-A75

2017-12-12 Thread James Greenhalgh
On Mon, Dec 11, 2017 at 01:44:23PM +, Kyrill Tkachov wrote: > Hi all, > > The Cortex-A55 and Cortex-A75 processors support the fp16 extension. > We already specify them as such in the arm port. > This patch makes aarch64 consistent on this front. > > Bootstrapped and tested on aarch64-none-li

Re: [PATCH][ARM][gcc-7] Fix wrong code by arm_final_prescan with fp16 move instructions

2017-12-12 Thread Sudakshina Das
Hi Christophe On 12/12/17 09:59, Christophe Lyon wrote: Hi, On 11 December 2017 at 18:12, Sudakshina Das wrote: On 30/11/17 16:01, Sudakshina Das wrote: Hi This patch is the fix for gcc-7 for the same issue as mentioned in: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg02209.html For t

RE: [PATCH][i386,AVX] Enable VBMI2 support [5/7]

2017-12-12 Thread Gerald Pfeifer
On Tue, 12 Dec 2017, Koval, Julia wrote: > Looks good. How to put it there(sorry, noob question)? Does https://gcc.gnu.org/about.html help? If not, let me know and I'll work with you (and update those docs on the way). Of course, even if things work for you, any suggestions on how to improve th

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

2017-12-12 Thread Alan Hayward
Ping. > On 30 Nov 2017, at 11:03, Alan Hayward wrote: > > >> On 27 Nov 2017, at 17:29, Jeff Law wrote: >> >> On 11/23/2017 04:11 AM, Alan Hayward wrote: >>> On 22 Nov 2017, at 17:33, Jeff Law wrote: On 11/22/2017 04:31 AM, Alan Hayward wrote: > >> On 21 Nov 2017, at

[PATCH] Fix PR83385

2017-12-12 Thread Richard Biener
Boostrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-12-12 Richard Biener PR tree-optimization/83385 * graphite-scop-detection.c (get_order, order): Remove. (bb_to_rpo): New global. (cmp_pbbs): Adjust. (build_scops): Sort pbbs in

Re: [AArch64] Fix ICEs in aarch64_print_operand_internal (PR target/83335)

2017-12-12 Thread Richard Sandiford
Jakub Jelinek writes: > On Tue, Dec 12, 2017 at 06:21:37AM +, Richard Sandiford wrote: >> Jakub Jelinek writes: >> > Hi! >> > >> > On Fri, Dec 08, 2017 at 08:10:08PM +0100, Christophe Lyon wrote: >> >> >> Can you check? >> >> > >> >> > I think that's a separate preexisting problem. Could you

Re: [PATCH GCC]More conservative interchanging small loops with const initialized simple reduction

2017-12-12 Thread Bin.Cheng
On Fri, Dec 8, 2017 at 2:40 PM, Richard Biener wrote: > On Fri, Dec 8, 2017 at 1:43 PM, Bin.Cheng wrote: >> On Fri, Dec 8, 2017 at 12:17 PM, Richard Biener >> wrote: >>> On Fri, Dec 8, 2017 at 12:46 PM, Bin Cheng wrote: Hi, This simple patch makes interchange even more conservative fo

[testsuite] Fix g++.old-deja/g++.pt/const2.C on Solaris

2017-12-12 Thread Rainer Orth
Between 20171112 (r254663) and 20171113 (r254700) a testcase regressed on Solaris (32 and 64-bit, sparc and x86): +FAIL: g++.old-deja/g++.pt/const2.C -std=c++11 (test for excess errors) +FAIL: g++.old-deja/g++.pt/const2.C -std=c++14 (test for excess errors) +FAIL: g++.old-deja/g++.pt/const2.C -

[SFN] Bootstrap broken

2017-12-12 Thread David Edelsohn
Something in this series broke bootstrap on AIX, probably Power in general. - David /nasfarm/edelsohn/src/src/gcc/gimple-pretty-print.c: In function 'void pp_gimple_stmt_1(pretty_printer*, gimple*, int, dump_flags_t)': /nasfarm/edelsohn/src/src/gcc/gimple-pretty-print.c:2645:1: error: invalid rtl

Re: [PATCH, rs6000] Fix PR83332 (missing vcond patterns)

2017-12-12 Thread Bill Schmidt
> On Dec 12, 2017, at 2:02 AM, Richard Biener > wrote: > > On Mon, Dec 11, 2017 at 10:55 PM, Bill Schmidt > wrote: >> Hi, >> >> A new test case introduced for PR81303 failed on powerpc64 (BE, LE). This >> turns out to be due to a missing standard pattern (vcondv2div2df). This >> and a coupl

Re: [PATCH, rs6000] Fix PR83332 (missing vcond patterns)

2017-12-12 Thread Richard Biener
On Tue, Dec 12, 2017 at 2:46 PM, Bill Schmidt wrote: > >> On Dec 12, 2017, at 2:02 AM, Richard Biener >> wrote: >> >> On Mon, Dec 11, 2017 at 10:55 PM, Bill Schmidt >> wrote: >>> Hi, >>> >>> A new test case introduced for PR81303 failed on powerpc64 (BE, LE). This >>> turns out to be due to a

Re: [PATCH v7 4/4] Add gdb for or1k build

2017-12-12 Thread Stafford Horne
Hello, I brought this up on the #gcc chat room. I was asked to check with Jakub and Richi. This is a small patch to configure/configure.ac to enable gdb to build for the or1k target. I am working on upstreaming the gdb port and have everything OKed and all copyrights in place for the binutils/g

Re: [PATCH v7 4/4] Add gdb for or1k build

2017-12-12 Thread Richard Biener
On Tue, 12 Dec 2017, Stafford Horne wrote: > Hello, > > I brought this up on the #gcc chat room. I was asked to check with Jakub and > Richi. > > This is a small patch to configure/configure.ac to enable gdb to build for the > or1k target. I am working on upstreaming the gdb port and have ever

Re: [00/13] Make VEC_PERM_EXPR work for variable-length vectors

2017-12-12 Thread Richard Biener
On Sun, Dec 10, 2017 at 12:06 AM, Richard Sandiford wrote: > This series is a replacement for: > https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00747.html > based on the feedback that using VEC_PERM_EXPR would be better. > > The changes are: > > (1) Remove the restriction that the selector elements

Re: [02/13] Pass vec_perm_indices by reference

2017-12-12 Thread Richard Biener
On Sun, Dec 10, 2017 at 12:09 AM, Richard Sandiford wrote: > This patch makes functions take vec_perm_indices by reference rather > than value, since a later patch will turn vec_perm_indices into a class > that would be more expensive to copy. Ok. > > 2017-12-06 Richard Sandiford > > gcc/ >

Re: [03/13] Split can_vec_perm_p into can_vec_perm_{var,const}_p

2017-12-12 Thread Richard Biener
On Sun, Dec 10, 2017 at 12:10 AM, Richard Sandiford wrote: > This patch splits can_vec_perm_p into two functions: can_vec_perm_var_p > for testing permute operations with variable selection vectors, and > can_vec_perm_const_p for testing permute operations with specific > constant selection vector

Re: [PATCH v7 4/4] Add gdb for or1k build

2017-12-12 Thread Stafford Horne
On Tue, Dec 12, 2017 at 03:05:41PM +0100, Richard Biener wrote: > On Tue, 12 Dec 2017, Stafford Horne wrote: > > > Hello, > > > > I brought this up on the #gcc chat room. I was asked to check with Jakub > > and > > Richi. > > > > This is a small patch to configure/configure.ac to enable gdb to

Re: [04/13] Refactor expand_vec_perm

2017-12-12 Thread Richard Biener
On Sun, Dec 10, 2017 at 12:13 AM, Richard Sandiford wrote: > This patch splits the variable handling out of expand_vec_perm into > a subroutine, so that the next patch can use a different interface > for expanding constant permutes. expand_vec_perm now does all the > CONST_VECTOR handling directl

Re: [05/13] Remove vec_perm_const optab

2017-12-12 Thread Richard Biener
On Sun, Dec 10, 2017 at 12:16 AM, Richard Sandiford wrote: > One of the changes needed for variable-length VEC_PERM_EXPRs -- and for > long fixed-length VEC_PERM_EXPRs -- is the ability to use constant > selectors that wouldn't fit in the vectors being permuted. E.g. a > permute on two V256QIs ca

Re: [06/13] Check whether a vector of QIs can store all indices

2017-12-12 Thread Richard Biener
On Sun, Dec 10, 2017 at 12:18 AM, Richard Sandiford wrote: > The patch to remove the vec_perm_const optab checked whether replacing > a constant permute with a variable permute is safe, or whether it might > truncate the indices. This patch adds a corresponding check for whether > variable permut

Re: [00/13] Make VEC_PERM_EXPR work for variable-length vectors

2017-12-12 Thread Richard Sandiford
Richard Biener writes: > On Sun, Dec 10, 2017 at 12:06 AM, Richard Sandiford > wrote: >> This series is a replacement for: >> https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00747.html >> based on the feedback that using VEC_PERM_EXPR would be better. >> >> The changes are: >> >> (1) Remove the res

Re: [07/13] Make vec_perm_indices use new vector encoding

2017-12-12 Thread Richard Biener
On Sun, Dec 10, 2017 at 12:20 AM, Richard Sandiford wrote: > This patch changes vec_perm_indices from a plain vec<> to a class > that stores a canonicalised permutation, using the same encoding > as for VECTOR_CSTs. This means that vec_perm_indices now carries > information about the number of ve

Re: [00/13] Make VEC_PERM_EXPR work for variable-length vectors

2017-12-12 Thread Richard Biener
On Tue, Dec 12, 2017 at 4:32 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Sun, Dec 10, 2017 at 12:06 AM, Richard Sandiford >> wrote: >>> This series is a replacement for: >>> https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00747.html >>> based on the feedback that using VEC_PERM_EXP

Re: [07/13] Make vec_perm_indices use new vector encoding

2017-12-12 Thread Richard Sandiford
Richard Biener writes: > On Sun, Dec 10, 2017 at 12:20 AM, Richard Sandiford > wrote: >> This patch changes vec_perm_indices from a plain vec<> to a class >> that stores a canonicalised permutation, using the same encoding >> as for VECTOR_CSTs. This means that vec_perm_indices now carries >> in

Re: [00/13] Make VEC_PERM_EXPR work for variable-length vectors

2017-12-12 Thread Richard Sandiford
Richard Biener writes: > On Tue, Dec 12, 2017 at 4:32 PM, Richard Sandiford > wrote: >> Richard Biener writes: >>> On Sun, Dec 10, 2017 at 12:06 AM, Richard Sandiford >>> wrote: This series is a replacement for: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00747.html based on th

Re: [PATCH, rs6000] generate loop code for memcmp inline expansion

2017-12-12 Thread Segher Boessenkool
Hi! On Mon, Dec 11, 2017 at 09:49:45AM -0600, Aaron Sawdey wrote: > This patch builds on two previously posted patches: > > https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01216.html > https://gcc.gnu.org/ml/gcc-patches/2017-11/msg02599.html > > The previous patches allow the use of bdnzt. > > Th

Re: [PATCH][Middle-end]79538 missing -Wformat-overflow with %s and non-member array arguments

2017-12-12 Thread Qing Zhao
Hi, Richard, thanks a lot for your review. > >>{ >> /* __copy is always the same for characters. >> Check to see if copy function already exists. */ >> - sprintf (name, "__copy_character_%d", ts->kind); >> + na

Re: [PR81165] discount killed stmts when sizing blocks for threading

2017-12-12 Thread Jeff Law
On 12/11/2017 10:08 PM, Alexandre Oliva wrote: > >> I wonder if for the handling of a larger threading path it wouldn't be >> useful to >> keep ssa_remaining_uses live and populated across processing of the threaded >> conditionals? OTOH it would probably require to track uses on the path vs. >>

Re: [PATCH][RFA][P1 PR tree-optimization/83298] Avoid over-optimistic result range for COND_EXPR

2017-12-12 Thread Jeff Law
On 12/12/2017 01:39 AM, Richard Biener wrote: > > LGTM. I notice (existing code) that we use set_vr_value from push_value_range > vs. update_value_range from the regular code. Also for some unrelated missed > optimization I'd like to be able to set and unwind SSA range info via the > stack > as

Re: [PATCH][Middle-end]79538 missing -Wformat-overflow with %s and non-member array arguments

2017-12-12 Thread Richard Biener
On December 12, 2017 5:13:19 PM GMT+01:00, Qing Zhao wrote: >Hi, Richard, > >thanks a lot for your review. > >> >>>{ >>> /* __copy is always the same for characters. >>> Check to see if copy function already exists. >*/ >>> -

Re: [PATCH] PR libgcc/83112, Fix warnings on libgcc float128-ifunc.c

2017-12-12 Thread Segher Boessenkool
On Mon, Dec 11, 2017 at 03:57:51PM -0500, Michael Meissner wrote: > > > +extern KCtype __divkc3 (KFtype, KFtype, KFtype, KFtype); > > > + > > > KCtype > > > __divkc3 (KFtype a, KFtype b, KFtype c, KFtype d) > > > { > > > > How does this warn? -Wmissing-declarations? Should this declaration be

RE: [PATCH][i386,AVX] Enable VBMI2 support [5/7]

2017-12-12 Thread Koval, Julia
Here is the patch to update these files with my contributions. Ok for trunk? Thanks, Julia > -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Gerald Pfeifer > Sent: Tuesday, December 12, 2017 11:34 AM > To: Koval, Julia > Cc:

Re: [PATCH, rs6000] Fix PR83332 (missing vcond patterns)

2017-12-12 Thread Segher Boessenkool
Hi! On Mon, Dec 11, 2017 at 03:55:20PM -0600, Bill Schmidt wrote: > A new test case introduced for PR81303 failed on powerpc64 (BE, LE). This > turns out to be due to a missing standard pattern (vcondv2div2df). This > and a couple of other patterns are easy to support with existing logic > by ju

Re: [PATCH][Middle-end]79538 missing -Wformat-overflow with %s and non-member array arguments

2017-12-12 Thread Martin Sebor
On 12/12/2017 09:13 AM, Qing Zhao wrote: Hi, Richard, thanks a lot for your review. { /* __copy is always the same for characters. Check to see if copy function already exists. */ - sprintf (name, "__copy_character_%d", ts-

Re: [PATCH][Middle-end]79538 missing -Wformat-overflow with %s and non-member array arguments

2017-12-12 Thread Qing Zhao
> On Dec 12, 2017, at 10:50 AM, Richard Biener wrote: >>> +return false; + val = fold_build2 (MINUS_EXPR, TREE_TYPE (val), val, + integer_one_node); >>> >>> val = wide_int_to_tree (TREE_TYPE (val), wi::minus (wi::to_wi

Re: [PATCH] PR libgcc/83112, Fix warnings on libgcc float128-ifunc.c

2017-12-12 Thread Andreas Schwab
On Dez 12 2017, Segher Boessenkool wrote: > On Mon, Dec 11, 2017 at 03:57:51PM -0500, Michael Meissner wrote: >> > > +extern KCtype __divkc3 (KFtype, KFtype, KFtype, KFtype); >> > > + >> > > KCtype >> > > __divkc3 (KFtype a, KFtype b, KFtype c, KFtype d) >> > > { >> > >> > How does this warn?

[PATCH][GCC][ARM] Fix fragile arm fpu attribute tests.

2017-12-12 Thread Tamar Christina
Hi All, The previous test made use of arm_neon.h which made the whole test rather fragile and only applicable to some of the arm targets. So instead I make use of different fpus now to test the generation of fmla instructions. The actual instruction itself is not tested as all we care about if th

Re: [PATCH,AIX] Nil check size threshold control for AIX

2017-12-12 Thread Ian Lance Taylor
On Tue, Dec 12, 2017 at 12:59 AM, REIX, Tony wrote: > Description: > * This patch tells the Go frontend to insert explicit guards (check for nil > -> panic) for AIX since relying on a fault does not work on AIX for page 0. > > Tests: > * AIX: Build: SUCCESS >- build made by means of gmake.

RE: [PATCH][GCC][ARM] Fix failing testcase pragma_fpu_attribute.c

2017-12-12 Thread Tamar Christina
Hi All, Please consider this patch abandoned. I have submitted a new version. Thanks, Tamar > -Original Message- > From: Christophe Lyon [mailto:christophe.l...@linaro.org] > Sent: Monday, December 11, 2017 12:11 > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Ramana Radhakris

[PATCH] PR libstdc++/83395 fix invocable traits for INVOKE

2017-12-12 Thread Jonathan Wakely
This restores the is_void check to __is_invocable_impl that I removed recently, because otherwise we don't handle cv void correctly (and restoring the is_void check seemed simpler than adding partial specializations for cv void). PR libstdc++/83395 * include/std/type_traits (__is_

Re: [PATCH][Middle-end]79538 missing -Wformat-overflow with %s and non-member array arguments

2017-12-12 Thread Qing Zhao
Hi, Martin, thanks for the suggestion, this might be a good enhancement for get_range_strlen for a future work. my understanding is, the current get_range_strlen does not use value range info yet, and also does not handle VLA. we can improve it from both aspects in a later work. Qing >> >

Re: [PATCH] Fix Bug 83237 - Values returned by std::poisson_distribution are not distributed correctly

2017-12-12 Thread Michele Pezzutti
Hi. Yes, I looked at the text before submitting the patch. I contacted Devroye and he confirmed that another reader had also pointed out this bug but not the solution. I sent him my proposed patch, he will look into it (no idea when though). I would state that "comparison function for x = 1

Re: [SFN] Bootstrap broken

2017-12-12 Thread Rainer Orth
Hi David, > Something in this series broke bootstrap on AIX, probably Power in general. I'm seeing the same in a sparc-sun-solaris2.11 bootstrap. Rainer > /nasfarm/edelsohn/src/src/gcc/gimple-pretty-print.c: In function 'void > pp_gimple_stmt_1(pretty_printer*, gimple*, int, dump_flags

Re: [PATCH] [GOLD] Add plugin API for processing plugin-added input files

2017-12-12 Thread Stephen Crane
Thank you so much. I just added documentation for the new hook to https://gcc.gnu.org/wiki/whopr/driver so that should finish off this feature. I'm happy to fix any bugs that might crop up related to this hook, of course. I don't follow the binutils list closely, so I apologize in advance if I mis

Re: [SFN] Bootstrap broken

2017-12-12 Thread David Edelsohn
Rainer, PR83396 opened. you can add Solaris to the list of targets. - David On Tue, Dec 12, 2017 at 1:49 PM, Rainer Orth wrote: > Hi David, > >> Something in this series broke bootstrap on AIX, probably Power in general. > > I'm seeing the same in a sparc-sun-solaris2.11 bootstrap. > >

[PATCH] Fix IPA flattening ICE (PR ipa/82801)

2017-12-12 Thread Jakub Jelinek
Hi! We ICE on the following testcase, because we first gather all cgraph nodes in an array and then we walk it backwards and flatten_function anything that has "flatten" attribute. But flatten_function can result in cgraph node removal and so we then try to dereference removed cgraph nodes. >Fro

[C++ PATCH] Avoid ICE due to the attribute exclusion additions (PR c++/83322)

2017-12-12 Thread Jakub Jelinek
Hi! This patch avoids ICEs when last_decl isn't a decl. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Though, I believe it would be better to do the attribute exclusions check in duplicate_decls instead if the attributes don't appear together already on a single decl, inst

[PR C++/15272] lookups with ambiguating dependent base

2017-12-12 Thread Nathan Sidwell
When we find a member fn in a non-dependent base during parsing a template, we shouldn't repeat the lookup during instantiation. This means we won't find an ambiguating other member fn in a now-instantiated base. Unfortunately we were doing that and rejecting valid programs. This patch fixes

[PATCH][rs6000][PR target/82190] fix mem size info in rtl generated by memcmp and strncmp/strcmp builtin expansion

2017-12-12 Thread Aaron Sawdey
In the code I put in gcc7 for expanding memcmp and strcmp/strncmp as builtins, I used set_mem_size to set the size of loads to only the bytes I was actually going to compare. However this is really incorrect and the test case for 82190 was failing because alias analysis believed the bogus size and

Re: [PATCH][rs6000][PR target/82190] fix mem size info in rtl generated by memcmp and strncmp/strcmp builtin expansion

2017-12-12 Thread Jakub Jelinek
On Tue, Dec 12, 2017 at 01:40:41PM -0600, Aaron Sawdey wrote: > 2017-12-12 Aaron Sawdey > > PR target/82190 > * config/rs6000/rs6000-string.c (expand_block_move, > expand_strn_compare): fix set_mem_size() calls. That should be capitalized: Fix instead of fix > --- gcc/config

Re: [C++ PATCH] Avoid ICE due to the attribute exclusion additions (PR c++/83322)

2017-12-12 Thread Martin Sebor
On 12/12/2017 12:01 PM, Jakub Jelinek wrote: Hi! This patch avoids ICEs when last_decl isn't a decl. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Though, I believe it would be better to do the attribute exclusions check in duplicate_decls instead if the attributes don't

Re: [PATCH][rs6000][PR target/82190] fix mem size info in rtl generated by memcmp and strncmp/strcmp builtin expansion

2017-12-12 Thread Aaron Sawdey
On Tue, 2017-12-12 at 20:50 +0100, Jakub Jelinek wrote: > On Tue, Dec 12, 2017 at 01:40:41PM -0600, Aaron Sawdey wrote: > > 2017-12-12  Aaron Sawdey   > > > > PR target/82190 > > * config/rs6000/rs6000-string.c (expand_block_move, > > expand_strn_compare): fix set_mem_size() calls. >

Re: [C++ PATCH] Avoid ICE due to the attribute exclusion additions (PR c++/83322)

2017-12-12 Thread Jakub Jelinek
On Tue, Dec 12, 2017 at 12:55:29PM -0700, Martin Sebor wrote: > On 12/12/2017 12:01 PM, Jakub Jelinek wrote: > > Hi! > > > > This patch avoids ICEs when last_decl isn't a decl. > > > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > > > Though, I believe it would be bett

Re: [PATCH] Fix IPA flattening ICE (PR ipa/82801)

2017-12-12 Thread Andi Kleen
Jakub Jelinek writes: > Hi! > > We ICE on the following testcase, because we first gather all cgraph nodes > in an array and then we walk it backwards and flatten_function anything > that has "flatten" attribute. But flatten_function can result in cgraph > node removal and so we then try to dere

Re: [PATCH][rs6000][PR target/82190] fix mem size info in rtl generated by memcmp and strncmp/strcmp builtin expansion

2017-12-12 Thread Segher Boessenkool
On Tue, Dec 12, 2017 at 02:01:16PM -0600, Aaron Sawdey wrote: > > > 2017-12-12  Aaron Sawdey   > > > > > > PR target/82190 > > > * config/rs6000/rs6000-string.c (expand_block_move, > > > expand_strn_compare): fix set_mem_size() calls. > > > > That should be capitalized: Fix instead of fix >

[PATCH] set range for strlen(array) to avoid spurious -Wstringop-overflow (PR 83373 , PR 78450)

2017-12-12 Thread Martin Sebor
Bug 83373 - False positive reported by -Wstringop-overflow, is another example of warning triggered by a missed optimization opportunity, this time in the strlen pass. The optimization is discussed in pr78450 - strlen(s) return value can be assumed to be less than the size of s. The gist of it i

[C++ Patch PING] [C++ Patch] PR 82235 (Copy ctor is not found for copying array of an object when it's marked explicit)

2017-12-12 Thread Paolo Carlini
Hi, On 15/11/2017 00:54, Mukesh Kapoor wrote: Hi, This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82235 For the following test case struct Foo {     Foo() {}     explicit Foo(const Foo& aOther) {} }; struct Bar {     Foo m[1]; }; void test() {     Bar a;     Bar b = a; } the com

Re: [PATCH] Fix IPA flattening ICE (PR ipa/82801)

2017-12-12 Thread Jakub Jelinek
On Tue, Dec 12, 2017 at 12:11:05PM -0800, Andi Kleen wrote: > Jakub Jelinek writes: > > > Hi! > > > > We ICE on the following testcase, because we first gather all cgraph nodes > > in an array and then we walk it backwards and flatten_function anything > > that has "flatten" attribute. But flatt

Re: [PATCH] Fix Bug 83237 - Values returned by std::poisson_distribution are not distributed correctly

2017-12-12 Thread Paolo Carlini
Hi, On 12/12/2017 19:42, Michele Pezzutti wrote: Hi. Yes, I looked at the text before submitting the patch. I contacted Devroye and he confirmed that another reader had also pointed out this bug but not the solution. I sent him my proposed patch, he will look into it (no idea when though).

[PATCH] vrp_prop: Use dom_walker for -Warray-bounds (PR tree-optimization/83312)

2017-12-12 Thread David Malcolm
PR tree-optimization/83312 reports a false positive from -Warray-bounds. The root cause is that VRP both: (a) updates a GIMPLE_COND to be always false, and (b) updates an ARRAY_REF in the now-unreachable other path to use an ASSERT_EXPR with a negative index: def_stmt j_6 = ASSERT_EXPR

Re: [PATCH] PR libgcc/83112, Fix warnings on libgcc float128-ifunc.c

2017-12-12 Thread Michael Meissner
On Tue, Dec 12, 2017 at 11:04:55AM -0600, Segher Boessenkool wrote: > On Mon, Dec 11, 2017 at 03:57:51PM -0500, Michael Meissner wrote: > > > > +extern KCtype __divkc3 (KFtype, KFtype, KFtype, KFtype); > > > > + > > > > KCtype > > > > __divkc3 (KFtype a, KFtype b, KFtype c, KFtype d) > > > > { >

Re: [x86][patch] Fix clwb for skylake

2017-12-12 Thread Uros Bizjak
On Tue, Dec 12, 2017 at 10:08 AM, Koval, Julia wrote: > Sorry, > > gcc/ > * config/i386/i386.c (PTA_SKYLAKE_AVX512): Add PTA_CLWB. > (PTA_CANNONLAKE): Remove PTA_CLWB. Approved and committed to mainline SVN. Thanks, Uros.

Re: C++ PATCH for c++/82115, ICE with variable initialized to own address

2017-12-12 Thread Jason Merrill
On Wed, Dec 6, 2017 at 4:40 PM, Jason Merrill wrote: > In this testcase, we consider the initializer of b to decide if it's > value-dependent, but the initializer mentions b, so we were recursing > infinitely. But if we're interested in the address, we don't care > about the value; we already han

RE: [PATCH][i386,AVX] Enable VBMI2 support [5/7]

2017-12-12 Thread Gerald Pfeifer
On Tue, 12 Dec 2017, Koval, Julia wrote: > Here is the patch to update these files with my contributions. Ok for > trunk? Nice, thank you. The only change I'd suggest is -march=icelake to mark up the two options. (No need to ask for any further approvals.) Gerald

Re: [PATCH][Middle-end]79538 missing -Wformat-overflow with %s and non-member array arguments

2017-12-12 Thread Martin Sebor
On 12/12/2017 10:56 AM, Qing Zhao wrote: Hi, Martin, thanks for the suggestion, this might be a good enhancement for get_range_strlen for a future work. my understanding is, the current get_range_strlen does not use value range info yet, and also does not handle VLA. we can improve it from bot

Re: [PATCH] set range for strlen(array) to avoid spurious -Wstringop-overflow (PR 83373 , PR 78450)

2017-12-12 Thread Jeff Law
On 12/12/2017 01:15 PM, Martin Sebor wrote: > Bug 83373 - False positive reported by -Wstringop-overflow, is > another example of warning triggered by a missed optimization > opportunity, this time in the strlen pass.  The optimization > is discussed in pr78450 - strlen(s) return value can be assum

[PATCH] diagnose attribute conflicts on conversion operators (PR 83394)

2017-12-12 Thread Martin Sebor
In bug 83394 - always_inline vs. noinline no longer diagnosed, Jakub provided a test case where the recent enhancement to detect nonsensical attribute combinations fails to detect a pair of mutually exclusive attributes on separate declarations of a conversion member operator (see bug 83322 for th

Re: [patch, libgfortran] Memory issues related to PR78549

2017-12-12 Thread Jerry DeLisle
Ping: If no objection, I will commit to trunk on Wednesday evening. On 12/10/2017 07:55 PM, Jerry DeLisle wrote: > Hi all, > > While doing addition testing for the subject mentioned PR I discovered > numerous > un-freed memory allocations. I reported the problem in comment 30 of the PR. > > The

Re: [PATCH] set range for strlen(array) to avoid spurious -Wstringop-overflow (PR 83373 , PR 78450)

2017-12-12 Thread Martin Sebor
On 12/12/2017 05:35 PM, Jeff Law wrote: On 12/12/2017 01:15 PM, Martin Sebor wrote: Bug 83373 - False positive reported by -Wstringop-overflow, is another example of warning triggered by a missed optimization opportunity, this time in the strlen pass. The optimization is discussed in pr78450 -

Re: [SFN+LVU+IEPM v4 6/9] [SFN] Introduce -gstatement-frontiers option, enable debug markers

2017-12-12 Thread Alexandre Oliva
On Dec 12, 2017, Christophe Lyon wrote: > Since this was checked in, I've noticed GCC/libatomic build failures > on ARM targets when configuring > --with-mode thumb (--with-mode arm is OK). Could you possibly provide me with preprocessed source that exercises the error, so that I could duplicate

[PATCH RISC-V] Use C version of multi3 for RVE support.

2017-12-12 Thread Jim Wilson
This replaces the assembly language version of multi3/muldi3 with a C version, as the assembly version does not work on RVE targets. The C code is using the same basic algorithm as the assembly code. The RVE spec is not finalized yet, so we haven't added the RVE option support yet, but this is on

Re: [patch, libgfortran] Memory issues related to PR78549

2017-12-12 Thread Thomas Koenig
Hi Jerry, Ping: If no objection, I will commit to trunk on Wednesday evening. OK for trunk (even before that :-) Thanks for the patch! Regards Thomas

Re: [SFN] Bootstrap broken

2017-12-12 Thread Alexandre Oliva
On Dec 12, 2017, David Edelsohn wrote: > Something in this series broke bootstrap on AIX, probably Power in general. And probably a number of other platforms as well. Here's a patch that seems to have fixed lots of problems. Without it, we might move debug (bind) stmts from a forwarder block a

Re: [SFN] Bootstrap broken

2017-12-12 Thread Alexandre Oliva
On Dec 12, 2017, Rainer Orth wrote: > Hi David, >> Something in this series broke bootstrap on AIX, probably Power in general. > I'm seeing the same in a sparc-sun-solaris2.11 bootstrap. The AIX patch, that I've just emailed out in this thread, should fix that as well. As for the regression yo

Re: [PATCH] set range for strlen(array) to avoid spurious -Wstringop-overflow (PR 83373 , PR 78450)

2017-12-12 Thread Bernhard Reutner-Fischer
On 12 December 2017 21:15:25 CET, Martin Sebor wrote: > >Tested on x86_64-linux. I assume this test worked even before this patch. Thus: s/oveflow/overflow/ thanks,

Re: [SFN] Bootstrap broken

2017-12-12 Thread Alexandre Oliva
On Dec 12, 2017, David Edelsohn wrote: > Rainer, > PR83396 opened. you can add Solaris to the list of targets. Andreas, Here's a fix for the ia64 regression you mentioned in that PR. I don't include the 'int main(){return 0;}' testcase, because it would hardly be useful; any test would trigge

[compare-debug] use call loc for nop_endbr

2017-12-12 Thread Alexandre Oliva
We skip debug insns and notes after a call that needs a nop_endbr, but since a debug insn could be the last in a block, it may affect the loc in the emitted nop_endbr insn. Although this has no effect on codegen, it does mess with debug info a bit, and it causes -fcompare-debug to fail for e.g. li