Re: [PATCH] Fix ms-sysv generator with gcc-4.8 host-g++

2018-09-17 Thread Richard Biener
On Sun, 16 Sep 2018, Bernd Edlinger wrote: > Hi, > > > this prevents test failures when gcc-4.8 is used as host-g++ tool, since this > version does > understand -std=c++11 but not -fno-diagnostics-show-line-numbers and > -fdiagnostics-color=never. > With slightly newer gcc tools like gcc-5 eve

[patch] Fix PR tree-optimization/86990

2018-09-17 Thread Eric Botcazou
. 2018-09-17 Eric Botcazou * gcc.c-torture/execute/20180917-1.c: New test. -- Eric BotcazouIndex: gimple-ssa-store-merging.c === --- gimple-ssa-store-merging.c (revision 264342) +++ gimple-ssa-store-merging.c (working copy

Re: [PATCH 07/25] [pr82089] Don't sign-extend SFV 1 in BImode

2018-09-17 Thread Richard Sandiford
writes: > This is an update of the patch posted to PR82089 long ago. We ran into the > same bug on GCN, so we need this fixed as part of this series. > > 2018-09-05 Andrew Stubbs > Tom de Vries > > PR82089 > > gcc/ > * expmed.c (emit_cstore): Fix handling of res

Re: [PATCH 10/25] Convert BImode vectors.

2018-09-17 Thread Richard Sandiford
writes: > GCN uses V64BImode to represent vector masks in the middle-end, and DImode > bit-masks to represent them in the back-end. These must be converted at > expand > time and the most convenient way is to simply use a SUBREG. > > This works fine except that simplify_subreg needs to be able t

Re: [PATCH v3] combine: perform jump threading at the end

2018-09-17 Thread Ilya Leoshkevich
> Am 14.09.2018 um 23:35 schrieb Segher Boessenkool > : > > Hi! > > On Mon, Sep 10, 2018 at 12:59:19PM +0200, Ilya Leoshkevich wrote: >> Consider the following RTL: >> >> (code_label 11 10 26 4 2 (nil) [1 uses]) >> (note 26 11 12 4 [bb 4] NOTE_INSN_BASIC_BLOCK) >> (insn 12 26 15 4 (set (reg:SI

RE: [PATCH] [ARC]: core3 features are default for core4

2018-09-17 Thread Claudiu Zissulescu
Committed with the suggested mods. Thank you Andrew for your review, Claudiu From: Andrew Burgess [andrew.burg...@embecosm.com] Sent: Tuesday, September 11, 2018 5:23 PM To: Vineet Gupta Cc: claudiu.zissule...@synopsys.com; gcc-patches@gcc.gnu.org; linux-s

Re: [Patch, Fortran, OOP] PR 46313: OOP-ABI issue, ALLOCATE issue, CLASS renaming issue

2018-09-17 Thread Bernhard Reutner-Fischer
On Tue, 9 Nov 2010 at 11:41, Janus Weil wrote: > > >> Ok, so it seems to me that using two leading underscores is really the > >> best option, since it's safe against collisions with Fortran and C > >> user code, and also safe to use with -fdollar-ok. > >> > >> The attached patch adds double under

Re: [PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-17 Thread Richard Sandiford
writes: > This patch was part of the original patch we acquired from Honza and Martin. > > It simplifies vector elements that are inactive, according to the mask. > > 2018-09-05 Jan Hubicka > Martin Jambor > > * simplify-rtx.c (simplify_merge_mask): New function. > (simp

Re: [PATCH]: Allow TARGET_SCHED_ADJUST_PRIORITY hook to reduce priority

2018-09-17 Thread Andreas Schwab
PR rtl-optimization/85458 * sel-sched.c (sel_target_adjust_priority): Remove wrong assertion. diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index 824f1ec340..1be977d70b 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -3330,8 +3330,6 @@ sel_target_adjust_priority (exp

[rs6000] Do not generate sibling call to nested function

2018-09-17 Thread Eric Botcazou
Hi, more precisely, to a nested function that requires a static chain. The reason is that the sibling call epilogue may clobber the static chain register r11. Tested on PowerPC/Linux, OK for the mainline? 2018-09-17 Eric Botcazou * config/rs6000/rs6000.c (rs6000_function_ok_for_si

Re: [PATCH 14/25] Disable inefficient vectorization of elementwise loads/stores.

2018-09-17 Thread Richard Sandiford
writes: > If the autovectorizer tries to load a GCN 64-lane vector elementwise then it > blows away the register file and produces horrible code. Do all the registers really need to be live at once, or is it "just" bad scheduling? I'd have expected the initial rtl to load each element and then i

Re: VRP: convert pointers of known quantity better

2018-09-17 Thread Aldy Hernandez
On 09/14/2018 05:25 PM, Jeff Law wrote: On 9/14/18 4:31 AM, Aldy Hernandez wrote: Apparently, my work on VRP will never finish. There's an infinity of things that can be tweaked ;-). First, we shouldn't drop to null/non-null when we know what the actual pointer value is.  For example, [1, 3] wh

Re: [PATCH 15/25] Don't double-count early-clobber matches.

2018-09-17 Thread Richard Sandiford
writes: > Given a pattern with a number of operands: > > (match_operand 0 "" "=&v") > (match_operand 1 "" " v0") > (match_operand 2 "" " v0") > (match_operand 3 "" " v0") > > GCC will currently increment "reject" once, for operand 0, and then decrement > it once for each of the other operands, end

Re: [PATCH 16/25] Fix IRA ICE.

2018-09-17 Thread Richard Sandiford
writes: > The IRA pass makes an assumption that any pseudos created after the pass > begins > were created explicitly by the pass itself and therefore will have > corresponding entries in its other tables. > > The GCN back-end, however, often creates additional pseudos, in expand > patterns, to r

Re: [PATCH 22/25] Add dg-require-effective-target exceptions

2018-09-17 Thread Richard Sandiford
writes: > There are a number of tests that fail because they assume that exceptions are > available, but GCN does not support them, yet. > > This patch adds "dg-require-effective-target exceptions" in all the affected > tests. There's probably an automatic way to test for exceptions, but the > cu

Re: [PATCH 14/25] Disable inefficient vectorization of elementwise loads/stores.

2018-09-17 Thread Andrew Stubbs
On 17/09/18 10:14, Richard Sandiford wrote: writes: If the autovectorizer tries to load a GCN 64-lane vector elementwise then it blows away the register file and produces horrible code. Do all the registers really need to be live at once, or is it "just" bad scheduling? I'd have expected the

Re: VRP: allow unsigned truncating conversions that will fit

2018-09-17 Thread Aldy Hernandez
On 09/14/2018 08:33 AM, Michael Matz wrote: Hi, On Fri, 14 Sep 2018, Aldy Hernandez wrote: Is there a subtle reason why we're avoiding unsigned truncating conversions of the form: [X, +INF] If the X fits in the new type, why can't we just build [X, +INF] in the new type? But (ui

Re: bootstrap -O3 failure libgo on x64_86

2018-09-17 Thread graham stott via gcc-patches
Ian I've bootstrapped gcc 9 with gcc 8 again and I'm unable to recreate failure boostrapping with gcc 9 so ignore I'll report if happens again Graham Original message From: Ian Lance Taylor via gcc-patches Date: 15/09/2018 16:01 (GMT+00:00) To: graham stott Cc: gcc-patche

Re: [PATCH] PR86957

2018-09-17 Thread Martin Liška
On 9/16/18 12:58 AM, Indu Bhagat wrote: > Thanks for the reviews. I have incorporated them in this patch except the one > (changes in common.opt) below. > > In this patch, > > 1. -Wmissing-profile is a warning by default and is ON by default with >-fprofile-use > 2. Attached pr86957-missing

[Patch, fortran] PR64120 - [F03] Wrong handling of allocatable character string

2018-09-17 Thread Paul Richard Thomas
This patch is relatively trivial. This initialization of the string length was not being done. Bootstraps and regtests on FC28/x86_64. OK for trunk? Paul 2018-09-17 Paul Thomas PR fortran/64120 * trans-decl.c (gfc_get_symbol_decl): Flag allocatable, scalar characters with a vari

VRP: special case all pointer conversion code

2018-09-17 Thread Aldy Hernandez
It seems most of the remaining anti range code in extract_range_from_unary_expr for CONVERT_EXPR_P is actually dealing with non-nullness in practice. Anti-range handling is mostly handled by canonicalizing anti-ranges into its two set constituents (~[10,20] => [MIN,9] U [21,MAX]) and dealing

[PATCH] Fix out-of-bounds in gcov.c (PR gcov-profile/85871).

2018-09-17 Thread Martin Liška
Hi. One obvious patch where we access src->lines one element after the end. Survives gcov.exp tests, I'm going to install the patch. Martin gcc/ChangeLog: 2018-09-17 Martin Liska PR gcov-profile/85871 * gcov.c (output_intermediate_file): Fix out of bounds access. --

[PATCH] Fix PR87301

2018-09-17 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-09-17 Richard Biener PR tree-optimization/87301 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly clean EH info from leftover copy assignments. * gcc.dg/torture/

[PATCH] Middle-end changes for fixing S/390 conditional returns

2018-09-17 Thread Ilya Leoshkevich
Hi all, Could anyone please take a look at https://gcc.gnu.org/ml/gcc-patches/2018-09/msg00237.html ? Best regards, Ilya

Re: [Patch, fortran] PR64120 - [F03] Wrong handling of allocatable character string

2018-09-17 Thread Janne Blomqvist
On Mon, Sep 17, 2018 at 1:10 PM Paul Richard Thomas < paul.richard.tho...@gmail.com> wrote: > This patch is relatively trivial. This initialization of the string > length was not being done. > > Bootstraps and regtests on FC28/x86_64. OK for trunk? > Ok. -- Janne Blomqvist

Re: [PATCH 00/25] AMD GCN Port

2018-09-17 Thread Bernd Edlinger
writes: > Given a pattern with a number of operands: > > (match_operand 0 "" "=&v") > (match_operand 1 "" " v0") > (match_operand 2 "" " v0") > (match_operand 3 "" " v0") > > GCC will currently increment "reject" once, for operand 0, and then decrement > it once for each of the other operands, end

Re: [PATCH] PR86957

2018-09-17 Thread Jan Hubicka
> On 9/16/18 12:58 AM, Indu Bhagat wrote: > > Thanks for the reviews. I have incorporated them in this patch except the > > one > > (changes in common.opt) below. > > > > In this patch, > > > > 1. -Wmissing-profile is a warning by default and is ON by default with > >-fprofile-use > > 2. A

[ARM] Fix ICE during thunk generation with -mlong-calls

2018-09-17 Thread Eric Botcazou
Hi, this is a regression present on mainline, 8 and 7 branches. The new, RTL implementation of arm32_output_mi_thunk breaks during the libstdc++ build if you configure the compiler with -mlong-calls by default: 0xdb57eb gen_reg_rtx(machine_mode) /home/eric/svn/gcc/gcc/emit-rtl.c:1155 0

Re: [Patch, fortran] PR64120 - [F03] Wrong handling of allocatable character string

2018-09-17 Thread Paul Richard Thomas
Hi Janne, Thanks. Committed as revision 264365. Paul On 17 September 2018 at 11:34, Janne Blomqvist wrote: > On Mon, Sep 17, 2018 at 1:10 PM Paul Richard Thomas > wrote: >> >> This patch is relatively trivial. This initialization of the string >> length was not being done. >> >> Bootstraps an

[PATCH c++/pr87295] -fdebug-types-section ICE

2018-09-17 Thread Nathan Sidwell
Richard, this patch makes the ICE go away, but I really don't know if it's correct. When cloning the type die I copy die_id, so it is found during the (currently ICEing) hash lookup. In this particular testcase we clone the die twice. Once from break_out_comdat_types and once from copy_decl

Re: [PATCH] Introduce libgcov.so run-time library (PR gcov-profile/84107).

2018-09-17 Thread Martin Liška
On 9/12/18 4:48 PM, Richard Biener wrote: > On Wed, Sep 12, 2018 at 11:27 AM Martin Liška wrote: >> >> On 9/11/18 5:08 PM, Alexander Monakov wrote: >>> On Tue, 11 Sep 2018, Martin Liška wrote: I've discussed the topic with Alexander on the Cauldron and we hoped that the issue with unique

Re: [PATCH] Introduce libgcov.so run-time library (PR gcov-profile/84107).

2018-09-17 Thread Martin Liška
On 9/12/18 5:02 PM, Alexander Monakov wrote: > On Wed, 12 Sep 2018, Martin Liška wrote: >> I see, I'm attaching patch that does that. I can confirm your test-case works >> fine w/o -Wl,--dynamic-list-data. >> >> I'm wondering if it will work as well with dlopen/dlsym machinery? Or now >> the linker

Re: [PATCH 14/25] Disable inefficient vectorization of elementwise loads/stores.

2018-09-17 Thread Richard Sandiford
Andrew Stubbs writes: > On 17/09/18 10:14, Richard Sandiford wrote: >> writes: >>> If the autovectorizer tries to load a GCN 64-lane vector elementwise then it >>> blows away the register file and produces horrible code. >> >> Do all the registers really need to be live at once, or is it "just"

Re: [PATCH 14/25] Disable inefficient vectorization of elementwise loads/stores.

2018-09-17 Thread Andrew Stubbs
On 17/09/18 12:43, Richard Sandiford wrote: OK, sounds like the cost of vec_construct is too low then. But looking at the port, I see you have: /* Implement TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST. */ int gcn_vectorization_cost (enum vect_cost_for_stmt ARG_UNUSED (type_of_cost),

Re: [PATCH] Optimize sin(atan(x)), take 2

2018-09-17 Thread Giuliano Augusto Faulin Belinassi
Ping. On Mon, Sep 3, 2018 at 4:11 PM, Giuliano Augusto Faulin Belinassi wrote: > Fixed the issues pointed by the previous discussions. Closes PR86829. > > Adds substitution rules for sin(atan(x)) and cos(atan(x)), being > careful with overflow issues by constructing a assumed convergence > consta

[PATCH 1/2] [ARC] Check for odd-even register when emitting double mac ops.

2018-09-17 Thread Claudiu Zissulescu
Avoid generate dmac instructions when the register is not odd-even, use instead the equivalent mac instruction. gcc/ Claudiu Zissulescu * config/arc/arc.md (maddsidi4_split): Don't use dmac if the destination register is not odd-even. (umaddsidi4_split): Likewise

[PATCH 0/2] [ARC] Bug fix, improve size figures.

2018-09-17 Thread Claudiu Zissulescu
Hi Andrew, Please find two patches, one is fixing the dmac issue with non odd-even register pairs (test added). The second patch tries to improve the size figures by managing the long immediate field. Thanks, Claudiu Claudiu Zissulescu (2): [ARC] Check for odd-even register when emitting do

[PATCH 2/2] [ARC] Avoid specific constants to end in limm field.

2018-09-17 Thread Claudiu Zissulescu
The 3-operand instructions accepts to place an immediate into the second operand. However, this immediate will end up in the long immediate field. This patch avoids constants to end up in the limm field for particular instructions when compiling for size. gcc/ -xx-xx Claudiu Zissulescu

Re: [ARM] Fix ICE during thunk generation with -mlong-calls

2018-09-17 Thread Richard Earnshaw (lists)
On 17/09/18 12:19, Eric Botcazou wrote: > Hi, > > this is a regression present on mainline, 8 and 7 branches. The new, RTL > implementation of arm32_output_mi_thunk breaks during the libstdc++ build if > you configure the compiler with -mlong-calls by default: > > 0xdb57eb gen_reg_rtx(machine_

Re: [PATCH, rs6000, committed] Use correct ABI type in mmintrin.h and xmmintrin.h

2018-09-17 Thread Bill Schmidt
On 9/15/18 4:21 PM, Segher Boessenkool wrote: > On Sat, Sep 15, 2018 at 03:28:17PM -0500, Bill Schmidt wrote: >> Jinsong Ji reported that these header files are using the non-ABI type >> __int128_t rather than __int128. This patch from Jinsong corrects this. >> Bootstrapped and tested on powerpc64

[PATCH] Fix PR87328

2018-09-17 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-09-17 Richard Biener PR tree-optimization/87328 * tree-ssa-sccvn.c (process_bb): Remove assertion about not visiting unexecutable backedges when not iterating. (do_rpo_vn): Mark all e

Re: [PATCH]: Allow TARGET_SCHED_ADJUST_PRIORITY hook to reduce priority

2018-09-17 Thread John David Anglin
On 2018-09-17 5:08 AM, Andreas Schwab wrote: PR rtl-optimization/85458 * sel-sched.c (sel_target_adjust_priority): Remove wrong assertion. diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index 824f1ec340..1be977d70b 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -33

[PATCH] Fix PR63155

2018-09-17 Thread Richard Biener
The following fixes the memory use at -O0 from out-of-SSA coalescing (conflict computation in particular) with lots of abnormals (setjmp calls). After reviewing I found no reason to not use compute_optimized_partition_bases since we populate the coalesce lists and used_in_copy pieces correctly a

Re: [PATCH]: Allow TARGET_SCHED_ADJUST_PRIORITY hook to reduce priority

2018-09-17 Thread Andreas Schwab
On Sep 17 2018, John David Anglin wrote: > On 2018-09-17 5:08 AM, Andreas Schwab wrote: >> PR rtl-optimization/85458 >> * sel-sched.c (sel_target_adjust_priority): Remove wrong >> assertion. >> >> diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c >> index 824f1ec340..1be977d70b 100644

Re: [PATCH][Middle-end][Version 2]Add a new option to control inlining only on static functions

2018-09-17 Thread Qing Zhao
> On Sep 14, 2018, at 3:45 PM, Andrew Pinski wrote: > > On Fri, Sep 14, 2018 at 1:42 PM Andrew Pinski > wrote: >> >> On Fri, Sep 14, 2018 at 1:34 PM Qing Zhao wrote: >>> >>> Hi, >>> >>> this is the 2nd version of the patch to add a new first-class option >>> >>>

[RFA] Minor cleanup to VRP/EVRP handling of deferred edge/switch optimization

2018-09-17 Thread Jeff Law
This is a relatively minor cleanup that I should have caught last cycle, but somehow missed. We have two structures TO_REMOVE_EDGES and TO_UPDATE_SWITCH_STMTS which are used by the VRP/EVRP code to record edges to remove and switch statements that need updating. They are currently implemented as

Re: [committed] hppa: Fix canonicalize of method and void pointers in comparison operations

2018-09-17 Thread Jeff Law
On 9/14/18 5:44 PM, John David Anglin wrote: > The attached change fixes the canonicalization of method and void > pointers in comparisons against > another method or function pointer on 32-bit hppa targets.  As far as I > know, 32-bit hppa is the only > architecture that requires function pointer

[PATCH, i386]: Remove some x87 rounding patterns ...

2018-09-17 Thread Uros Bizjak
... and extend operands to XFmode instead. 2018-09-17 Uros Bizjak * config/i386/i386.md (truncxf2_i387_noop_unspec): Change operand 0 predicate to nonimmediate operand. (rint2_frndint): Remove insn pattern. (rint2): Change operand 1 predicate to general_operand. Extend oper

Re: [PATCH] Maybe fix PR87134

2018-09-17 Thread Iain Sandoe
Hi Rainer, > On 6 Sep 2018, at 21:21, Rainer Orth wrote: > >> I can confirm the same, repeatable, fail on i686-darwin10 (and it >> reproduces with -save-temps) >> (and the vNULL change does not fix it there either) - don’t have access to >> the machine now until >> later in the month tho. > >

Re: vector _M_start and 0 offset

2018-09-17 Thread Jonathan Wakely
On 15/09/18 14:27 +0200, Marc Glisse wrote: Hello, as explained in the PR, the implementation of vector is weirdly wasteful. Preserving the ABI prevents from changing much for now, but this small tweak can help the compiler remove quite a bit of dead code. I think most other direct uses of

Re: [committed] hppa: Fix canonicalize of method and void pointers in comparison operations

2018-09-17 Thread John David Anglin
On 2018-09-17 11:02 AM, Jeff Law wrote: On 9/14/18 5:44 PM, John David Anglin wrote: The attached change fixes the canonicalization of method and void pointers in comparisons against another method or function pointer on 32-bit hppa targets.  As far as I know, 32-bit hppa is the only architectur

Re: [PATCH v3] combine: perform jump threading at the end

2018-09-17 Thread Segher Boessenkool
On Mon, Sep 17, 2018 at 10:50:58AM +0200, Ilya Leoshkevich wrote: > > Am 14.09.2018 um 23:35 schrieb Segher Boessenkool > > : > > Could you please show generated code before and after this patch? > > I mean generated assembler code. What -S gives you. > > Before: > > foo4: > .LFB0: > .cfi

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-09-17 Thread Jeff Law
On 9/15/18 2:14 AM, Bernd Edlinger wrote: > On 9/14/18, Martin Sebor wrote: >> As I said above, this happens during the dom walk in the ccp >> pass: >> >> substitute_and_fold_dom_walker walker (CDI_DOMINATORS, this); >> walker.walk (ENTRY_BLOCK_PTR_FOR_FN (cfun)); >> >> The warning is issued du

Re: [PATCH] Cleanup strcpy/stpcpy no nul warning code

2018-09-17 Thread Jeff Law
On 9/16/18 1:58 PM, Bernd Edlinger wrote: > Hi, > > this is a cleanup of the recently added strlen/strcpy/stpcpy > no nul warning code. > > Most importantly it moves the SSA_NAME handling from > unterminated_array to string_constant, thereby fixing > another round of xfails in the strlen and stpc

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-09-17 Thread Richard Biener
On September 17, 2018 7:24:16 PM GMT+02:00, Jeff Law wrote: >On 9/15/18 2:14 AM, Bernd Edlinger wrote: >> On 9/14/18, Martin Sebor wrote: >>> As I said above, this happens during the dom walk in the ccp >>> pass: >>> >>> substitute_and_fold_dom_walker walker (CDI_DOMINATORS, this); >>> walker.

Re: [PATCH] Maybe fix PR87134

2018-09-17 Thread Rainer Orth
Hi Iain, > Hi Rainer, > >> On 6 Sep 2018, at 21:21, Rainer Orth wrote: >> > >>> I can confirm the same, repeatable, fail on i686-darwin10 (and it >>> reproduces with -save-temps) >>> (and the vNULL change does not fix it there either) - don’t have access to >>> the machine now until >>> later in

Re: [PATCH 22/25] Add dg-require-effective-target exceptions

2018-09-17 Thread Mike Stump
On Sep 5, 2018, at 4:52 AM, a...@codesourcery.com wrote: > There are a number of tests that fail because they assume that exceptions are > available, but GCN does not support them, yet. So, generally we don't goop up the testsuite with the day to day port stuff when it is being developed. If the

[C++ Patch PING] [C++ Patch] PR 85065 ("[concepts] ICE with invalid use of a concept")

2018-09-17 Thread Paolo Carlini
Hi again, On 9/3/18 10:59 PM, Paolo Carlini wrote: in this error-recovery ICE, upon the error make_constrained_auto assigns error_mark_node to PLACEHOLDER_TYPE_CONSTRAINTS (type) which then causes a crash later when hash_placeholder_constraint is called on it. I think we should cope with this

Re: vector _M_start and 0 offset

2018-09-17 Thread Marc Glisse
On Mon, 17 Sep 2018, Jonathan Wakely wrote: On 15/09/18 14:27 +0200, Marc Glisse wrote: Hello, as explained in the PR, the implementation of vector is weirdly wasteful. Preserving the ABI prevents from changing much for now, but this small tweak can help the compiler remove quite a bit of de

Re: [PATCH] Cleanup strcpy/stpcpy no nul warning code

2018-09-17 Thread Bernd Edlinger
On 09/17/18 19:33, Jeff Law wrote: > On 9/16/18 1:58 PM, Bernd Edlinger wrote: >> Hi, >> >> this is a cleanup of the recently added strlen/strcpy/stpcpy >> no nul warning code. >> >> Most importantly it moves the SSA_NAME handling from >> unterminated_array to string_constant, thereby fixing >> ano

Re: [PATCH] Cleanup strcpy/stpcpy no nul warning code

2018-09-17 Thread Jeff Law
On 9/17/18 12:20 PM, Bernd Edlinger wrote: > On 09/17/18 19:33, Jeff Law wrote: >> On 9/16/18 1:58 PM, Bernd Edlinger wrote: >>> Hi, >>> >>> this is a cleanup of the recently added strlen/strcpy/stpcpy >>> no nul warning code. >>> >>> Most importantly it moves the SSA_NAME handling from >>> untermi

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-09-17 Thread Bernd Edlinger
On 09/17/18 19:35, Richard Biener wrote: > On September 17, 2018 7:24:16 PM GMT+02:00, Jeff Law wrote: >> On 9/15/18 2:14 AM, Bernd Edlinger wrote: >>> On 9/14/18, Martin Sebor wrote: As I said above, this happens during the dom walk in the ccp pass: substitute_and_fold_dom_

Re: [PATCH] gcov: emit hotness colors to easily find hot code.

2018-09-17 Thread David Malcolm
On Wed, 2018-09-12 at 14:36 +0200, Martin Liška wrote: > Hi. > > This is follow-up of: > https://gcc.gnu.org/ml/gcc/2018-08/msg00162.html > > I'm suggesting to introduce using colors in order to indicate hotness > of lines. Legend is printed at the very beginning of the output file. > Example: ht

Re: vector _M_start and 0 offset

2018-09-17 Thread Jonathan Wakely
On 17/09/18 19:57 +0200, Marc Glisse wrote: On Mon, 17 Sep 2018, Jonathan Wakely wrote: On 15/09/18 14:27 +0200, Marc Glisse wrote: Hello, as explained in the PR, the implementation of vector is weirdly wasteful. Preserving the ABI prevents from changing much for now, but this small tweak c

Re: [PATCH 12/25] Make default_static_chain return NULL in non-static functions

2018-09-17 Thread Richard Sandiford
writes: > This patch allows default_static_chain to be called from the back-end without > it knowing if the function is static or not. Or, to put it another way, > without duplicating the check everywhere it's used. > > 2018-09-05 Tom de Vries > > gcc/ > * targhooks.c (default_stat

Re: vector _M_start and 0 offset

2018-09-17 Thread Ville Voutilainen
On Mon, 17 Sep 2018 at 21:50, Jonathan Wakely wrote: >"I used C++11 syntax because I find it nicer, and the compiler accepts > >it in C++98 mode with just a warning, suppressed in a standard > >header." > > Oh sorry, I just looked at the patch and replied without reading the > top bit. > > >Even

Re: vector _M_start and 0 offset

2018-09-17 Thread Jonathan Wakely
On 17/09/18 21:55 +0300, Ville Voutilainen wrote: On Mon, 17 Sep 2018 at 21:50, Jonathan Wakely wrote: >"I used C++11 syntax because I find it nicer, and the compiler accepts >it in C++98 mode with just a warning, suppressed in a standard >header." Oh sorry, I just looked at the patch and repl

Re: vector _M_start and 0 offset

2018-09-17 Thread Jonathan Wakely
On 17/09/18 20:10 +0100, Jonathan Wakely wrote: On 17/09/18 21:55 +0300, Ville Voutilainen wrote: On Mon, 17 Sep 2018 at 21:50, Jonathan Wakely wrote: "I used C++11 syntax because I find it nicer, and the compiler accepts it in C++98 mode with just a warning, suppressed in a standard header."

Re: [PATCH] Cleanup strcpy/stpcpy no nul warning code

2018-09-17 Thread Bernd Edlinger
On 09/17/18 20:32, Jeff Law wrote: > On 9/17/18 12:20 PM, Bernd Edlinger wrote: >> On 09/17/18 19:33, Jeff Law wrote: >>> On 9/16/18 1:58 PM, Bernd Edlinger wrote: Hi, this is a cleanup of the recently added strlen/strcpy/stpcpy no nul warning code. Most importantly it

Re: vector _M_start and 0 offset

2018-09-17 Thread Marc Glisse
On Mon, 17 Sep 2018, Jonathan Wakely wrote: Do other compilers besides gcc suppress the same way? No, clang doesn't: What version is that? I didn't test on this exact patch, but clang 6 and 7 print, for similar code: warning: generalized initializer lists are a C++11 extension [-Wc++1

Re: [Patch, Fortran, OOP] PR 46313: OOP-ABI issue, ALLOCATE issue, CLASS renaming issue

2018-09-17 Thread Janus Weil
Am Mo., 17. Sep. 2018 um 10:59 Uhr schrieb Bernhard Reutner-Fischer : > > On Tue, 9 Nov 2010 at 11:41, Janus Weil wrote: > > > > >> Ok, so it seems to me that using two leading underscores is really the > > >> best option, since it's safe against collisions with Fortran and C > > >> user code, and

Re: vector _M_start and 0 offset

2018-09-17 Thread Marc Glisse
On Mon, 17 Sep 2018, Marc Glisse wrote: On Mon, 17 Sep 2018, Jonathan Wakely wrote: Do other compilers besides gcc suppress the same way? No, clang doesn't: What version is that? I didn't test on this exact patch, but clang 6 and 7 print, for similar code: warning: generalized initializer

Re: [PATCH 13/25] Create TARGET_DISABLE_CURRENT_VECTOR_SIZE

2018-09-17 Thread Richard Sandiford
writes: > This feature probably ought to be reworked as a proper target hook, but I > would > like to know if this is the correct solution to the problem first. > > The problem is that GCN vectors have a fixed number of elements (64) and the > vector size varies with element size. E.g. V64QI is

Re: [PATCH]: Allow TARGET_SCHED_ADJUST_PRIORITY hook to reduce priority

2018-09-17 Thread Jeff Law
On 9/17/18 3:08 AM, Andreas Schwab wrote: > PR rtl-optimization/85458 > * sel-sched.c (sel_target_adjust_priority): Remove wrong > assertion. Under what conditions is the new priority negative? Without digging deep into the ia64 port that just seems wrong. jeff

Re: vector _M_start and 0 offset

2018-09-17 Thread Jonathan Wakely
On 17/09/18 21:18 +0200, Marc Glisse wrote: On Mon, 17 Sep 2018, Jonathan Wakely wrote: Do other compilers besides gcc suppress the same way? No, clang doesn't: What version is that? I didn't test on this exact patch, but clang 6 and 7 print, for similar code: warning: generalized initiali

Re: vector _M_start and 0 offset

2018-09-17 Thread Jonathan Wakely
On 17/09/18 21:24 +0200, Marc Glisse wrote: On Mon, 17 Sep 2018, Marc Glisse wrote: On Mon, 17 Sep 2018, Jonathan Wakely wrote: Do other compilers besides gcc suppress the same way? No, clang doesn't: What version is that? I didn't test on this exact patch, but clang 6 and 7 print, for si

Re: vector _M_start and 0 offset

2018-09-17 Thread Marc Glisse
On Mon, 17 Sep 2018, Jonathan Wakely wrote: On 17/09/18 21:24 +0200, Marc Glisse wrote: On Mon, 17 Sep 2018, Marc Glisse wrote: On Mon, 17 Sep 2018, Jonathan Wakely wrote: Do other compilers besides gcc suppress the same way? No, clang doesn't: What version is that? I didn't test on thi

[patch,nvptx] Add atomic_fetch* support for SImode arguments.

2018-09-17 Thread Cesar Philippidis
I've committed this patch extends the nvptx atomic_fetch_ pattern to accept SImode arguments regardless of the -misa argument supplied. Tom had pre-approved this patch awhile ago. As the test case demonstrates, it only works 32-bit pointers. While adding the new test case, I noticed that I named a

Re: [Patch, Fortran, OOP] PR 46313: OOP-ABI issue, ALLOCATE issue, CLASS renaming issue

2018-09-17 Thread Janus Weil
Am Mo., 17. Sep. 2018 um 21:21 Uhr schrieb Janus Weil : > > Instead, for the sake of gfortran, how about a macro like this? > > #define gfc_str_startswith(str, pref) \ > (strncmp ((str), (pref), strlen (pref)) == 0) > > (In fact I just noticed that something like this already exists in > trans-

[PATCH, i386]: Emit fldln2 earlier in ix86_emit_i387_log1p.

2018-09-17 Thread Uros Bizjak
Eliminate common subexpression in both branches. 2018-09-17 Uros Bizjak * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier. Bootstrapped and regression tested on x86_64-linux-gnu. Committed to mainline SVN. Uros. Index: config/i386/i386.c ==

Transform assertion into optimization hints

2018-09-17 Thread François Dumont
We talk about it a while back. I've run testsuite several times since I have this patch on my local copy. Note that when I implemented it the wrong way tests started to fail so it is clearly having an effect on the generated code. * include/bits/c++config [__OPTIMIZE__](__glibcxx_assert): Def

Re: [PATCH 0/5] RFC: gimple-ssa-sprintf.c: a new approach (PR middle-end/77696)

2018-09-17 Thread Martin Sebor
On 09/14/2018 12:17 PM, David Malcolm wrote: Martin: on the way back from Cauldron I had a go at implementing new output formats for the warnings from gimple-ssa-sprintf.c, to try to better indicate to the end user what the problem is. My plan was to implement some of the ASCII art ideas we've b

Re: Transform assertion into optimization hints

2018-09-17 Thread Marc Glisse
On Mon, 17 Sep 2018, François Dumont wrote: We talk about it a while back. I've run testsuite several times since I have this patch on my local copy. Note that when I implemented it the wrong way tests started to fail so it is clearly having an effect on the generated code. * include/bits/c

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-09-17 Thread Martin Sebor
On 09/17/2018 11:35 AM, Richard Biener wrote: On September 17, 2018 7:24:16 PM GMT+02:00, Jeff Law wrote: On 9/15/18 2:14 AM, Bernd Edlinger wrote: On 9/14/18, Martin Sebor wrote: As I said above, this happens during the dom walk in the ccp pass: substitute_and_fold_dom_walker walker (CDI_

Re: [PATCH v2] libgcc: m68k: avoid TEXTRELs in shared library (PR 86224)

2018-09-17 Thread Sergei Trofimovich via gcc-patches
On Sat, 28 Jul 2018 20:42:02 +0100 "slyfox.inbox.ru via gcc-patches" wrote: > From: Sergei Trofimovich > > Cc: Ian Lance Taylor > Cc: Jeff Law > Cc: Andreas Schwab > Signed-off-by: Sergei Trofimovich > --- > libgcc/config/m68k/lb1sf68.S | 3 +++ > 1 file changed, 3 insertions(+) > > diff

Re: [PATCH v2] libgcc: m68k: avoid TEXTRELs in shared library (PR 86224)

2018-09-17 Thread Jeff Law
On 9/17/18 3:18 PM, Sergei Trofimovich wrote: > On Sat, 28 Jul 2018 20:42:02 +0100 > "slyfox.inbox.ru via gcc-patches" wrote: > >> From: Sergei Trofimovich >> >> Cc: Ian Lance Taylor >> Cc: Jeff Law >> Cc: Andreas Schwab >> Signed-off-by: Sergei Trofimovich >> --- >> libgcc/config/m68k/lb1s

Re: C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions

2018-09-17 Thread Marek Polacek
On Fri, Sep 14, 2018 at 04:45:22PM -0400, Marek Polacek wrote: > On Fri, Sep 14, 2018 at 04:30:46PM -0400, Jason Merrill wrote: > > On Fri, Sep 14, 2018 at 1:19 PM, Marek Polacek wrote: > > > This patch implements another bit of C++20, virtual calls in constant > > > expression: > > >

Re: [PATCH v2] libgcc: m68k: avoid TEXTRELs in shared library (PR 86224)

2018-09-17 Thread Sergei Trofimovich via gcc-patches
On Mon, 17 Sep 2018 15:29:08 -0600 Jeff Law wrote: > On 9/17/18 3:18 PM, Sergei Trofimovich wrote: > > On Sat, 28 Jul 2018 20:42:02 +0100 > > "slyfox.inbox.ru via gcc-patches" wrote: > > > >> From: Sergei Trofimovich > >> > >> Cc: Ian Lance Taylor > >> Cc: Jeff Law > >> Cc: Andreas Schwab

Re: [PATCH] rtlanal: Fix nonzero_bits for non-load paradoxical subregs (PR85925)

2018-09-17 Thread Segher Boessenkool
On Mon, Jun 04, 2018 at 10:57:05PM +0200, Eric Botcazou wrote: > > In the PR we have insns: > > > > Trying 23 -> 24: > >23: r123:SI=zero_extend(r122:HI) > > REG_DEAD r122:HI > >24: [r115:SI]=r123:SI > > REG_DEAD r123:SI > > > > which should be combined to > > > > (set (mem:SI

Re: [PATCH,rs6000] Add builtins for accessing the FPSCR

2018-09-17 Thread Carl Love
Segher: This is an updated patch to add the following builtins: __builtin_mffsl, __builtin_set_fpscr_rn, __builtin_set_fpscr_rn, __builtin_mtfsb0, __builtin_mtfsb1. I have addressed you comments with regards to the change log entries. I have also addressed the various comments about the code, fu

Re: [PATCH v2] libgcc: m68k: avoid TEXTRELs in shared library (PR 86224)

2018-09-17 Thread Jeff Law
On 9/17/18 3:50 PM, Sergei Trofimovich wrote: > On Mon, 17 Sep 2018 15:29:08 -0600 > Jeff Law wrote: > >> On 9/17/18 3:18 PM, Sergei Trofimovich wrote: >>> On Sat, 28 Jul 2018 20:42:02 +0100 >>> "slyfox.inbox.ru via gcc-patches" wrote: >>> From: Sergei Trofimovich Cc: Ian Lanc

Re: [libgcc] Use v2 map syntax in libgcc-unwind.map if Solaris ld supports it

2018-09-17 Thread Jeff Law
On 9/16/18 5:28 AM, Rainer Orth wrote: > Currently, the libgcc-unwind.map file generated for use with Solaris ld > > http://gcc.gnu.org/ml/gcc-patches/2014-01/msg01088.html > > uses the v1 linker map file syntax because both that's supported > everywhere. However, with ld -z guidance, newe

Re: [PATCH 04/25] SPECIAL_REGNO_P

2018-09-17 Thread Jeff Law
On 9/13/18 8:08 AM, Andrew Stubbs wrote: > On 13/09/18 11:01, Andrew Stubbs wrote: >> The assert is caused because the def-use chains indicate that SCC >> conflicts with itself. I suppose the question is why is it doing that, >> but it's probably do do with that being a special register that gets >

Re: [GCC][PATCH][Aarch64] Added pattern to match zero extended bfxil

2018-09-17 Thread Christophe Lyon
On Fri, 14 Sep 2018 at 12:04, Sam Tebbs wrote: > > > > On 08/28/2018 11:54 PM, James Greenhalgh wrote: > > > > > > OK once the other one is approved, with the obvious rebase over the renamed > > function. > > > > James > > Here is the rebased patch. Still OK for me to commit to trunk now that > t

Re: [PATCH] Cleanup strcpy/stpcpy no nul warning code

2018-09-17 Thread Jeff Law
On 9/17/18 1:18 PM, Bernd Edlinger wrote: > > I suppose the expr.c change will likely work alone, but > it was designed to replace the stuff here. > > So I will try to split the expr.c part out, and post it > tomorrow. It does work alone. I've already verified that here :-) BUt will probably ca

Re: [GCC][PATCH][Aarch64] Added pattern to match zero extended bfxil

2018-09-17 Thread Ramana Radhakrishnan
On Mon, 17 Sep 2018, 23:56 Christophe Lyon, wrote: > On Fri, 14 Sep 2018 at 12:04, Sam Tebbs wrote: > > > > > > > > On 08/28/2018 11:54 PM, James Greenhalgh wrote: > > > > > > > > > > OK once the other one is approved, with the obvious rebase over the > renamed > > > function. > > > > > > James

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-09-17 Thread Jeff Law
On 9/14/18 4:11 PM, Martin Sebor wrote: > On 09/14/2018 03:35 PM, Jeff Law wrote: >> On 9/12/18 11:46 AM, Martin Sebor wrote: >>> On 08/31/2018 04:07 AM, Richard Biener wrote: On Thu, Aug 30, 2018 at 7:39 PM Martin Sebor wrote: > > On 08/30/2018 11:22 AM, Richard Biener wrote: >>

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-09-17 Thread Jeff Law
On 9/17/18 3:15 PM, Martin Sebor wrote: > On 09/17/2018 11:35 AM, Richard Biener wrote: >> On September 17, 2018 7:24:16 PM GMT+02:00, Jeff Law >> wrote: >>> On 9/15/18 2:14 AM, Bernd Edlinger wrote: On 9/14/18, Martin Sebor wrote: > As I said above, this happens during the dom walk in th

[PATCHv3][PR 81376] Remove unnecessary float casts in comparisons

2018-09-17 Thread Yuri Gribov
Hi all, This is a second iteration of patch which gets rid of float casts in comparisons when all values of casted integral type are exactly representable by the float type (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81376). The new version addresses issue spotted by Richard in previous version

[PATCH 01/14] Add D front-end (DMD) language implementation and license.

2018-09-17 Thread Iain Buclaw
This patch adds the DMD front-end proper and license (Boost) files, comprised of a lexer, parser, and semantic analyzer. ftp://ftp.gdcproject.org/patches/v4/01-v4-d-frontend-dmd.patch --- gcc/d/dmd/access.c | 670 +++ gcc/d/dmd/aggregate.h| 335 ++ gcc/d/dmd/aliasthis.c

  1   2   >