Re: [PATCH] Make mempcpy more optimal (PR middle-end/70140).

2017-08-02 Thread Martin Liška
On 08/01/2017 09:50 PM, Jakub Jelinek wrote: > On Thu, Jul 20, 2017 at 08:59:29AM +0200, Martin Liška wrote: >> Hello. >> >> Following patch does sharing of expansion for mem{p,}cpy and also strpcy >> (with a known constant as source) >> so that we use same type of expansion (direct insns emission

Re: [PATCH] Make mempcpy more optimal (PR middle-end/70140).

2017-08-02 Thread Jakub Jelinek
On Wed, Aug 02, 2017 at 09:13:40AM +0200, Martin Liška wrote: > On 08/01/2017 09:50 PM, Jakub Jelinek wrote: > > On Thu, Jul 20, 2017 at 08:59:29AM +0200, Martin Liška wrote: > >> Hello. > >> > >> Following patch does sharing of expansion for mem{p,}cpy and also strpcy > >> (with a known constant

Re: [PATCH] Make mempcpy more optimal (PR middle-end/70140).

2017-08-02 Thread Martin Liška
On 08/02/2017 09:16 AM, Jakub Jelinek wrote: > On Wed, Aug 02, 2017 at 09:13:40AM +0200, Martin Liška wrote: >> On 08/01/2017 09:50 PM, Jakub Jelinek wrote: >>> On Thu, Jul 20, 2017 at 08:59:29AM +0200, Martin Liška wrote: Hello. Following patch does sharing of expansion for mem{p,}c

[C++ committed] Fix ICE with -Wshadow=compatible-local (PR c++/81640)

2017-08-02 Thread Jakub Jelinek
Hi! The r250440 change removed two spots that ensured that for !CLASS_TYPE_P (type) it returned -1 (from the idx routines that are gone now) and eventually NULL from the non-idx ones. I've bootstrapped/regtested a change with various assertions that showed that except for this testcase and spot in

Re: [PATCH] Fix PR81354 (rewrite gimple_split_edge)

2017-08-02 Thread Richard Biener
On Tue, Aug 1, 2017 at 5:56 PM, Bill Schmidt wrote: > On Aug 1, 2017, at 8:50 AM, Bill Schmidt wrote: >> >> On Aug 1, 2017, at 7:44 AM, Bill Schmidt wrote: >>> On Aug 1, 2017, at 3:46 AM, Richard Biener wrote: On Mon, Jul 31, 2017 at 4:03 PM, Bill Schmidt wrote:

Re: [PATCH 1/2] add unique_ptr header

2017-08-02 Thread Richard Biener
On Tue, Aug 1, 2017 at 4:40 PM, David Malcolm wrote > On Mon, 2017-07-31 at 19:46 -0400, tbsaunde+...@tbsaunde.org wrote: >> From: Trevor Saunders >> >> For most of the history of this see >> https://sourceware.org/ml/gdb-patches/2016-10/msg00223.html >> The changes are mostly s/gdb/gtl/g >> >> i

Re: [GCC]][AArch64][PATCH] Fix big endian float immediate moves.

2017-08-02 Thread James Greenhalgh
On Tue, Aug 01, 2017 at 04:05:13PM +0100, Tamar Christina wrote: > Hi All, > > real_to_target seems to return the order of the elements in the array > differently depending on the endiannes. This undoes the endianness when > combining the values back to a HOST_WIDE_INT. > > Regtested on aach64-no

[RFC] [PATCH] Patch candidate for PR81657

2017-08-02 Thread Martin Liška
Hi. I've just sketched a patch for the PR. Well I'm not fully happy about complexity of emit_block_move_hints function and I need to add another logic. Any ideas how to make it more transparent? Maybe split it into analysis function that will return decision and second that will just do the decisi

Re: [PATCH] Make mempcpy more optimal (PR middle-end/70140).

2017-08-02 Thread Bin.Cheng
On Wed, Aug 2, 2017 at 8:26 AM, Martin Liška wrote: > On 08/02/2017 09:16 AM, Jakub Jelinek wrote: >> On Wed, Aug 02, 2017 at 09:13:40AM +0200, Martin Liška wrote: >>> On 08/01/2017 09:50 PM, Jakub Jelinek wrote: On Thu, Jul 20, 2017 at 08:59:29AM +0200, Martin Liška wrote: > Hello. >

Re: [PATCHv2][PING^2][PR 56727] Bypass PLT for recursive calls

2017-08-02 Thread Jan Hubicka
Hi, > On Mon, Jul 17, 2017 at 10:27 AM, Jan Hubicka wrote: > >> Hi all, > >> > >> This is a new version of previous patch > >> (https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00020.html), fixed > >> after Rainer's remarks. > > Hi, > > the patch looks OK, but I wonder why you included can_be_discard

Re: [PATCH][PR 59521] Respect probabilities when expanding switch statement

2017-08-02 Thread Jan Hubicka
Hello, sorry for not responding for a while. Martin Liska has patch to move switch expansion to gimple level that will likely simplify the code combinatoin. > > combine_predictions_for_bb calculates final probability for edges of > if-else or switch statements. > > For if-elses this is done by

Re: [PATCH] Make mempcpy more optimal (PR middle-end/70140).

2017-08-02 Thread Martin Liška
On 08/02/2017 11:45 AM, Bin.Cheng wrote: > Hi Martin, > With r250771, GCC failed to build glibc for arm/aarch64 linux cross toolchain: Hi. Sorry for the breakage, I accidentally installed wrong version of patch. Should be fixed in r250789. M.

C PATCH to fix a crash on invalid (PR c/81289)

2017-08-02 Thread Marek Polacek
The compiler could crash in c_parser_unary_expression in case CPP_MULT: 7050 exp_loc = c_parser_peek_token (parser)->location; 7051 op = c_parser_cast_expression (parser, NULL); 7052 finish = op.get_finish (); ... 7054 location_t combined_loc = make_location (op

[PATCH] Tweak tree-ssa/pr81588.c testcase (PR tree-optimization/81655)

2017-08-02 Thread Jakub Jelinek
Hi! I have an improvement that handles tree-ssa/pr81588.c optimization even on branch cost 1, but as it is effectively an extension to the range var_bound optimization, I'm not sure it should be backported. Therefore, this patch treats this testcase similarly to other testcases that rely on branc

Re: [PATCH] Tweak tree-ssa/pr81588.c testcase (PR tree-optimization/81655)

2017-08-02 Thread Richard Biener
On Wed, Aug 2, 2017 at 12:11 PM, Jakub Jelinek wrote: > Hi! > > I have an improvement that handles tree-ssa/pr81588.c optimization > even on branch cost 1, but as it is effectively an extension to the > range var_bound optimization, I'm not sure it should be backported. > > Therefore, this patch t

Re: [PATCH] toplev: avoid recursive emergency_dump_function

2017-08-02 Thread Alexander Monakov
Hello, On Thu, 20 Jul 2017, Alexander Monakov wrote: > Segher pointed out on IRC that ICE reporting with dumps enabled got worse: > if emergency_dump_function itself leads to an ICE (e.g. by segfaulting), > nested ICE reporting will invoke emergency_dump_function in exactly the > same context, but

Re: [PATCH][2/2] early LTO debug, main part

2017-08-02 Thread Richard Biener
On Wed, 2 Aug 2017, Jason Merrill wrote: > On 05/19/2017 06:42 AM, Richard Biener wrote: > > + /* ??? In some cases the C++ FE (at least) fails to > > +set DECL_CONTEXT properly. Simply globalize stuff > > +in this case. For example > > +__dso_handle created via iost

Re: [PATCH] Make mempcpy more optimal (PR middle-end/70140).

2017-08-02 Thread Bin.Cheng
On Wed, Aug 2, 2017 at 10:54 AM, Martin Liška wrote: > On 08/02/2017 11:45 AM, Bin.Cheng wrote: >> Hi Martin, >> With r250771, GCC failed to build glibc for arm/aarch64 linux cross >> toolchain: > > Hi. > > Sorry for the breakage, I accidentally installed wrong version of patch. > Should be fixed

Re: [PATCH][PR 59521] Respect probabilities when expanding switch statement

2017-08-02 Thread Martin Liška
On 08/02/2017 11:53 AM, Jan Hubicka wrote: > Hello, > sorry for not responding for a while. Martin Liska has patch to move switch > expansion to gimple level that will likely simplify the code combinatoin. Hello. Yep, will land today to gcc-patches mailing list. > >> >> combine_predictions_for

Re: [PATCH][PR 59521] Respect probabilities when expanding switch statement

2017-08-02 Thread Martin Liška
On 08/02/2017 12:52 PM, Yury Gribov wrote: > On Wed, Aug 2, 2017 at 11:42 AM, Martin Liška > wrote: > > On 08/02/2017 11:53 AM, Jan Hubicka wrote: > > Hello, > > sorry for not responding for a while. Martin Liska has patch to move > switch > > expansion to

GCC 7.2 Status Report (2017-08-02)

2017-08-02 Thread Richard Biener
Status == The GCC 7 branch is now frozen for the upcoming release candidate and release. All changes require release manager approval.

Re: [PATCH] Add macro DISABLE_COPY_AND_ASSIGN

2017-08-02 Thread Yao Qi
On Wed, Jul 26, 2017 at 9:55 AM, Yao Qi wrote: > On 17-07-19 10:30:45, Yao Qi wrote: >> We have many classes that copy cotr and assignment operator are deleted >> in different projects, gcc, gdb and gold. So this patch adds a macro >> to do this, and replace these existing mechanical code with ma

[PATCH][RFC] Make expansion of balanced binary trees of switches on tree level.

2017-08-02 Thread Martin Liška
Hello. After some discussions with Honza, I've decided to convert current code in stmt.c that is responsible for switch expansion. More precisely, I would like to convert the code to expand gswitch statements on tree level. Currently the newly created pass is executed at the end of tree optimiz

Re: [PATCH v2][RFC] Canonize names of attributes.

2017-08-02 Thread Joseph Myers
On Thu, 13 Jul 2017, Martin Liška wrote: > +/* For a given IDENTIFIER_NODE, strip leading and trailing '_' characters > + so that we have a canonical form of attribute names. */ > + > +static inline tree > +canonicalize_attr_name (tree attr_name) > +{ > + const size_t l = IDENTIFIER_LENGTH (at

Re: [PATCH] Add -nolibc option

2017-08-02 Thread Joseph Myers
On Thu, 27 Jul 2017, Tristan Gingold wrote: > Index: gcc/common.opt > === > --- gcc/common.opt(revision 250563) > +++ gcc/common.opt(working copy) > @@ -2956,6 +2956,10 @@ > nostdlib > Driver > > +nolibc > +Driver > +Do not

Re: c-family PATCH to improve and simplify -Wmultistatement-macros (PR c/81448, c/81306)

2017-08-02 Thread Joseph Myers
On Thu, 27 Jul 2017, Marek Polacek wrote: > Bootstrapped/regtested on x86_64-linux and ppc64le-linux, ok for trunk? > > 2017-07-27 Marek Polacek > > PR c/81448 > PR c/81306 > * c-warn.c (warn_for_multistatement_macros): Prevent bogus > warnings. Avoid walking MACRO_MA

Re: C PATCH to fix a crash on invalid (PR c/81289)

2017-08-02 Thread Joseph Myers
On Wed, 2 Aug 2017, Marek Polacek wrote: > 2017-08-02 Marek Polacek > > PR c/81289 > * c-parser.c (c_parser_unary_expression): Use set_error. > > * gcc.dg/noncompile/pr81289.c: New test. OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH][RFC] Make expansion of balanced binary trees of switches on tree level.

2017-08-02 Thread Richard Biener
On Wed, Aug 2, 2017 at 1:20 PM, Martin Liška wrote: > Hello. > > After some discussions with Honza, I've decided to convert current code in > stmt.c that > is responsible for switch expansion. More precisely, I would like to convert > the code > to expand gswitch statements on tree level. Curren

Re: c-family PATCH to improve and simplify -Wmultistatement-macros (PR c/81448, c/81306)

2017-08-02 Thread Marek Polacek
On Wed, Aug 02, 2017 at 11:37:27AM +, Joseph Myers wrote: > On Thu, 27 Jul 2017, Marek Polacek wrote: > > > Bootstrapped/regtested on x86_64-linux and ppc64le-linux, ok for trunk? > > > > 2017-07-27 Marek Polacek > > > > PR c/81448 > > PR c/81306 > > * c-warn.c (warn_for_multi

[nvptx, committed] Add missing probabilities in nvptx_lock{less,full}_update

2017-08-02 Thread Tom de Vries
[ was: Re: [PATCH] update edge profile info in nvptx.c ] On 07/13/2017 06:53 PM, Cesar Philippidis wrote: The recent basic block profiling changes broke a couple of libgomp OpenACC execution tests involving reductions with nvptx offloading. For gang and worker reductions, the nvptx BE updates th

[PATCH] Fix PR bootstrap/81638

2017-08-02 Thread David Edelsohn
To fix the false-positive uninitialized warning, this patch initializes the "incl" variable.

Re: C PATCH to further improve diagnostic for -Wsign-compare (PR c/81417)

2017-08-02 Thread Marek Polacek
On Tue, Aug 01, 2017 at 04:48:01PM -0400, David Malcolm wrote: > I'm wondering if the messages could use a slight rewording, to give a > clue to the user about the reason *why* the expression has changed > signedness. The old message "signed and unsigned type in conditional > expression" gave the

Re: [PATCH] Fix PR bootstrap/81638

2017-08-02 Thread David Edelsohn
To fix the false-positive uninitialized warning, this patch initializes the "incl" variable. * xcoff.c (xcoff_process_linenos): Initialize incl to NULL. Index: xcoff.c === --- xcoff.c (revision 250806) +++ xcoff.c (working co

PATCH for base_pool_allocator (PR other/81667)

2017-08-02 Thread Marek Polacek
This PR points out that m_elt_size was left uninitialized in the member initializer list for base_pool_allocator. I think it makes sense to initialize it like this. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2017-08-02 Marek Polacek PR other/81667 * alloc-pool.h (b

Re: [PATCH] Fix PR81354 (rewrite gimple_split_edge)

2017-08-02 Thread Bill Schmidt
On Aug 2, 2017, at 3:09 AM, Richard Biener wrote: > > On Tue, Aug 1, 2017 at 5:56 PM, Bill Schmidt > wrote: >> On Aug 1, 2017, at 8:50 AM, Bill Schmidt wrote: >>> >>> On Aug 1, 2017, at 7:44 AM, Bill Schmidt >>> wrote: > > On Aug 1, 2017, at 3:46 AM, Richard Biener > wro

Re: [PATCH][RFC] Make expansion of balanced binary trees of switches on tree level.

2017-08-02 Thread Martin Liška
On 08/02/2017 01:51 PM, Richard Biener wrote: > On Wed, Aug 2, 2017 at 1:20 PM, Martin Liška wrote: >> Hello. >> >> After some discussions with Honza, I've decided to convert current code in >> stmt.c that >> is responsible for switch expansion. More precisely, I would like to convert >> the cod

Re: PATCH for base_pool_allocator (PR other/81667)

2017-08-02 Thread Richard Biener
On Wed, Aug 2, 2017 at 2:45 PM, Marek Polacek wrote: > This PR points out that m_elt_size was left uninitialized in the member > initializer list for base_pool_allocator. I think it makes sense to > initialize > it like this. > > Bootstrapped/regtested on x86_64-linux, ok for trunk? Ok. Richar

[patch, fortran] Fix PR 60355, missing error for BIND(C) outside module scope

2017-08-02 Thread Thomas Koenig
Hello world, the attached patch is a bit smaller than it looks, because most of it is due to reformatting a large comment. It is rather simple - checking for an incorrectly placed BIND(C) variable was sometimes not done because the test was mixed in with other tests where implicitly typed variab

[testsuite, committed] Use relative line number in gcc.dg/Walloca-14.c

2017-08-02 Thread Tom de Vries
[ was: Re: Avoid generating useless range info ] On 06/28/2017 09:56 AM, Aldy Hernandez wrote: void *q = __builtin_alloca (p); /* { dg-warning "passing argument 1" } */ + /* { dg-warning "unbounded use of 'alloca'" "unbounded" { target *-*-* } 11 } */ Hi, Please use relative line number

Re: [PATCH][RFC] Make expansion of balanced binary trees of switches on tree level.

2017-08-02 Thread David Malcolm
On Wed, 2017-08-02 at 13:20 +0200, Martin Liška wrote: > Hello. > > After some discussions with Honza, I've decided to convert current > code in stmt.c that > is responsible for switch expansion. More precisely, I would like to > convert the code > to expand gswitch statements on tree level. Curre

[PATCH, i386]: Fix PR81644, ICE in rtl_verify_bICE in rtl_verify_bb_insn, BBRO pass duplicates BB that ends with flow control insnb_insn, BBRO pass duplicates BB that ends with flow control insn

2017-08-02 Thread Uros Bizjak
It turned out we can't simply emit trap insn during epilogue expansion, since epilogue is expanded on FALLTHRU edge to EXIT BB. Later passes rightfully choke on control flow insn in BB with FALTHRU exit edge. So, instead of using TRAP_IF in the prologue, use UNSPEC_VOLATILE that directly emits "ud

Add include-guard to tree-vrp.h

2017-08-02 Thread Prathamesh Kulkarni
Add include-guard to tree-vrp.h. OK to commit ? Thanks, Prathamesh 2017-08-02 Prathamesh Kulkarni * tree-vrp.h: Add include guard. diff --git a/gcc/tree-vrp.h b/gcc/tree-vrp.h index ef2c68a752b..f84403a0f83 100644 --- a/gcc/tree-vrp.h +++ b/gcc/tree-vrp.h @@ -17,6 +17,9 @@ You should

Re: [PATCH], PR target/81593, Optimize PowerPC vector sets coming from a vector extracts

2017-08-02 Thread Michael Meissner
On Fri, Jul 28, 2017 at 04:08:50PM -0500, Segher Boessenkool wrote: > > "emit" is not a good name for this: that is generally used for something > that does emit_insn, i.e. put an insn in the instruction stream. This > function returns a string a define_insn can return. For the rl* insns > I cal

Re: Add include-guard to tree-vrp.h

2017-08-02 Thread Jeff Law
On 08/02/2017 08:16 AM, Prathamesh Kulkarni wrote: > Add include-guard to tree-vrp.h. > OK to commit ? OK. jeff

[PATCH 1/1] sparc: support for -mmisalign in the SPARC M8

2017-08-02 Thread qinzhao
This patch adds support to GCC for the misaligned load/store instructions introduced in the Oracle SPARC Architecture 2017 and implemented by the SPARC M8 processor. A new command line option -mmisaligned is added, that activates the usage of the new instructions. The SPAR

[PATCH, rs6000] Clean up capitalized diagnostic messages

2017-08-02 Thread Bill Schmidt
Hi, Jakub pointed out that we've had several error messages slip into the POWER back end that incorrectly start with a capital letter. This patch hunts those down and cleans them up. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this ok for trunk? I don't anticipa

Re: [PATCH] Improve extraction of changed file in contrib/mklog

2017-08-02 Thread Jeff Law
On 07/27/2017 08:33 PM, Yuri Gribov wrote: > On Wed, Jul 26, 2017 at 6:11 PM, Jeff Law wrote: >> On 07/09/2017 01:03 PM, Yuri Gribov wrote: >>> Hi, >>> >>> Currently mklog will fail to analyze lines like this in patches: >>> diff -rupN gcc/gcc/testsuite/lib/profopt.exp >>> gcc-compare-checks/gcc/t

Re: [PATCH 0/2] Python testcases to check DWARF output

2017-08-02 Thread Jeff Law
On 07/26/2017 10:00 AM, Pierre-Marie de Rodat wrote: > Hello, > > At the last GNU Cauldron, Richard Biener and I talked about DWARF output > testing. Except for guality tests, which are disabled on several > targets, the only way tests check the DWARF is scanning the annotated > assembly (-dA), ma

Re: [PATCH 0/2] Python testcases to check DWARF output

2017-08-02 Thread Jeff Law
On 07/27/2017 01:52 AM, Richard Biener wrote: > On Wed, Jul 26, 2017 at 11:25 PM, Mike Stump wrote: >> On Jul 26, 2017, at 9:00 AM, Pierre-Marie de Rodat >> wrote: >>> At the last GNU Cauldron, Richard Biener and I talked about DWARF output >>> testing. Except for guality tests, which are disabl

Re: [PATCH, rs6000] Clean up capitalized diagnostic messages

2017-08-02 Thread Jakub Jelinek
On Wed, Aug 02, 2017 at 10:29:20AM -0500, Bill Schmidt wrote: > --- gcc/config/rs6000/rs6000.c(revision 250791) > +++ gcc/config/rs6000/rs6000.c(working copy) > @@ -4132,7 +4132,7 @@ rs6000_option_override_internal (bool global_init_ >|| rs6000_cpu == PROCESSOR_PPCE5500) >

Re: [PATCH] toplev: avoid recursive emergency_dump_function

2017-08-02 Thread Jeff Law
On 07/20/2017 08:40 AM, Alexander Monakov wrote: > Hi, > > Segher pointed out on IRC that ICE reporting with dumps enabled got worse: > if emergency_dump_function itself leads to an ICE (e.g. by segfaulting), > nested ICE reporting will invoke emergency_dump_function in exactly the > same context,

Re: [PATCH, rs6000] Clean up capitalized diagnostic messages

2017-08-02 Thread Joseph Myers
On Wed, 2 Aug 2017, Jakub Jelinek wrote: > On Wed, Aug 02, 2017 at 10:29:20AM -0500, Bill Schmidt wrote: > > --- gcc/config/rs6000/rs6000.c (revision 250791) > > +++ gcc/config/rs6000/rs6000.c (working copy) > > @@ -4132,7 +4132,7 @@ rs6000_option_override_internal (bool global_init_ > >

[PATCH] Verify edge probability consistency in verify_flow_info

2017-08-02 Thread Tom de Vries
Hi, I. for target nvptx we recently ran into PR81442, an ICE in verify_flow_info: ... error: verify_flow_info: REG_BR_PROB is set but cfg probability is not ... We start out with a jump instruction: ... (jump_insn 18 17 31 2 (set (pc) (if_then_else (ne (reg:BI 83) (const

[PATCH] Add missing edge probability in simd_clone_adjust

2017-08-02 Thread Tom de Vries
[ Re: [PATCH] Verify edge probability consistency in verify_flow_info ] On 08/02/2017 06:07 PM, Tom de Vries wrote: I've written this patch to check for the missing probability more consistently. I'm not certain if we can require that the probability should always be set, so I'm just requiring

Re: [PATCH] minor readability tweaks to print_node

2017-08-02 Thread Jeff Law
On 08/01/2017 07:16 PM, Martin Sebor wrote: > This is a small readability tweak to the tree printer to have > it consistently use dashes and colons in tree attribute names > in favor of spaces. It's been tested on x86_64-linux. > > The tree printer tends to avoid using spaces to separate tree > a

Re: [PATCH] Rewrite mklog in Python

2017-08-02 Thread Jeff Law
On 08/01/2017 01:00 PM, Yury Gribov wrote: > Hi all, > > This is a rewrite of contrib/mklog in Python. I started adding features > suggested by Trevor some time ago but this quickly turned into a full > rewrite of existing Perl mklog and then I decided to just fully rewrite > it in Python (given

Re: ping [PATCH] [MSP430] Fix PR78849: ICE on initialization of global struct containing __int20 array

2017-08-02 Thread Jeff Law
On 07/31/2017 05:08 PM, Joseph Myers wrote: > On Wed, 26 Jul 2017, Jeff Law wrote: > >> TYPE_SIZE, according to my understanding, should be a tree for the size >> of the expression in bits. >> >> The problem is for msp430 that size varies depending on where it's used. >> ie, in a register an obje

Go patch committed: Only finalize embedded fields before finalizing methods

2017-08-02 Thread Ian Lance Taylor
In the Go frontend, when finalizing the methods of a named struct type, we used to finalize all the field types first. That can fail if the field types refer indirectly to the named type. Change it to just finalize the embedded field types first, and the rest of the fields later. This fixes http

Re: [PATCH] Add missing edge probability in simd_clone_adjust

2017-08-02 Thread Jakub Jelinek
On Wed, Aug 02, 2017 at 06:15:31PM +0200, Tom de Vries wrote: > 2017-08-02 Tom de Vries > > * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability. I think that is not the right probability, when using masked simd, the point is that it is called from conditional code where

Re: ping [PATCH] [MSP430] Fix PR78849: ICE on initialization of global struct containing __int20 array

2017-08-02 Thread Jeff Law
On 08/01/2017 10:26 AM, Jozef Lawrynowicz wrote: > On 01/08/2017 00:08, Joseph Myers wrote: >> On Wed, 26 Jul 2017, Jeff Law wrote: >> >>> TYPE_SIZE, according to my understanding, should be a tree for the size >>> of the expression in bits. >>> >>> The problem is for msp430 that size varies depend

Re: [PATCH 1/5] Rename existing insn_cost to insn_sched_cost

2017-08-02 Thread Jeff Law
On 07/31/2017 05:25 PM, Segher Boessenkool wrote: > haifa-sched exports an insn_cost function, but it is only used in a > few places and specialised to scheduling. This patch renames it to > insn_sched_cost. > > --- > gcc/haifa-sched.c | 14 +++--- > gcc/sched-int.h| 2 +- > gcc/sc

Re: [PATCH 2/5] Replace insn_rtx_cost with insn_cost and pattern_cost

2017-08-02 Thread Jeff Law
On 07/31/2017 05:25 PM, Segher Boessenkool wrote: > This renames insn_rtx_cost to pattern cost, and adds a new function > insn_cost that takes an rtx_insn * instead of an instruction pattern > as input. It uses the latter function anywhere an instruction is > readily available (instead of just an

Re: [PATCH 4/5] Add targetm.insn_cost hook

2017-08-02 Thread Jeff Law
On 07/31/2017 05:25 PM, Segher Boessenkool wrote: > This introduces a hook to implement insn_cost. If a target does not > implement the hook, the old function (i.e. pattern_cost) is used. > > --- > gcc/doc/tm.texi| 12 > gcc/doc/tm.texi.in | 2 ++ > gcc/rtlanal.c | 3 +++

Re: [PATCH 3/5] combine: Use insn_cost instead of pattern_cost everywhere

2017-08-02 Thread Jeff Law
On 07/31/2017 05:25 PM, Segher Boessenkool wrote: > This changes combine to always use insn_cost, not pattern_cost. I don't > intend to commit it like this: it calls recog more often than necessary, > and it is very ugly (no, don't look at it). But it's good enough to test > things with. So what

Re: [PATCH 1/1] sparc: support for -mmisalign in the SPARC M8

2017-08-02 Thread David Miller
From: qinzhao Date: Wed, 2 Aug 2017 10:27:51 -0500 > This patch adds support to GCC for the misaligned load/store > instructions introduced in the Oracle SPARC Architecture 2017 and > implemented by the SPARC M8 processor. > > A new command line option -mmisaligned is added, tha

Re: ping [PATCH] [MSP430] Fix PR78849: ICE on initialization of global struct containing __int20 array

2017-08-02 Thread Joseph Myers
On Wed, 2 Aug 2017, Jeff Law wrote: > I think Joseph's suggestion for looking at partial float handling may be > useful, though ia64's RFmode may be more interesting as it's not a > multiple of 8 in bitsize. IF/KF modes on the ppc port have similar > properties. The key issue those floating-poin

Re: [PATCH, rs6000] Clean up capitalized diagnostic messages

2017-08-02 Thread Martin Sebor
On 08/02/2017 09:29 AM, Bill Schmidt wrote: Hi, Jakub pointed out that we've had several error messages slip into the POWER back end that incorrectly start with a capital letter. This patch hunts those down and cleans them up. Others have already commented on some aspects of the patch but l

Re: [PATCH] enhance overflow and truncation detection in strncpy and strncat (PR 81117)

2017-08-02 Thread Jeff Law
On 07/31/2017 01:42 PM, Martin Sebor wrote: >> So I *think* TYPE_SIZE_UNIT isn't necessarily guaranteed to be a >> INTEGER_CST, it could be a non-constant expression for the size. Are >> the callers of compute_objsize prepared to handle that? Just to be >> clear, I'd prefer to return TYPE_SIZE_UN

Re: [PING #2] [PATCH] enhance -Wrestrict to handle string built-ins (PR 78918)

2017-08-02 Thread Jeff Law
On 08/01/2017 03:25 AM, Richard Biener wrote: > On Tue, Aug 1, 2017 at 11:23 AM, Richard Biener > wrote: >> On Tue, Aug 1, 2017 at 4:27 AM, Martin Sebor wrote: >>> Richard, >>> >>> in discussing this work Jeff mentioned that your comments on >>> the tree-ssa-alias.c parts would be helpful. When

Re: [PATCH 6/6] qsort comparator consistency checking

2017-08-02 Thread Jeff Law
On 07/31/2017 12:27 PM, Alexander Monakov wrote: > On Mon, 31 Jul 2017, Jeff Law wrote: >> I must have missed something. Can't you just define >> >> qsort (BASE, NMEMB, SIZE, COMPARE) into >> >> qsort_chk (BASE, NMEMB, SIZE, COMPARE) >> >> That shouldn't affect the qsort from vec? Right? Or am

Re: c-family PATCH to improve and simplify -Wmultistatement-macros (PR c/81448, c/81306)

2017-08-02 Thread Steve Ellcey
On Wed, 2017-08-02 at 11:37 +, Joseph Myers wrote: > On Thu, 27 Jul 2017, Marek Polacek wrote: > > > > > Bootstrapped/regtested on x86_64-linux and ppc64le-linux, ok for > > trunk? > > > > 2017-07-27  Marek Polacek   > > > > PR c/81448 > > PR c/81306 > > * c-warn.c (warn_for_mul

Re: [PATCH 6/6] qsort comparator consistency checking

2017-08-02 Thread Jeff Law
On 07/15/2017 02:47 PM, Alexander Monakov wrote: > This is the updated qsort comparator verifier. > > Since we have vec::qsort(cmp), the patch uses the macro argument counting > trick to redirect only the four-argument invocations of qsort to qsort_chk. > I realize that won't win much sympathies,

Re: c-family PATCH to improve and simplify -Wmultistatement-macros (PR c/81448, c/81306)

2017-08-02 Thread Marek Polacek
On Wed, Aug 02, 2017 at 10:16:54AM -0700, Steve Ellcey wrote: > On Wed, 2017-08-02 at 11:37 +, Joseph Myers wrote: > > On Thu, 27 Jul 2017, Marek Polacek wrote: > > > > > > > > Bootstrapped/regtested on x86_64-linux and ppc64le-linux, ok for > > > trunk? > > > > > > 2017-07-27  Marek Polacek

[PATCH 1/3] optabs: ensure mem_thread_fence is a compiler barrier

2017-08-02 Thread Alexander Monakov
As recently discussed in the previous thread for PR 80640, some targets have sufficiently strong hardware memory ordering that implementation of C11 atomic fences might not need machine barriers. However, a compiler memory barrier nevertheless must be present, and at least two targets (x86, s390)

[PATCH 3/3] optabs: ensure atomic_load/stores have compiler barriers

2017-08-02 Thread Alexander Monakov
Again, like in patch 1/3, a backend might expand C11 atomic load/store to a volatile memory access if hardware memory ordering is sufficiently strong that no machine barrier is required. Nevertheless, we must ensure that compiler memory barrier(s) are present before/after the access to prevent wro

[PATCH 2/3] retire mem_signal_fence pattern

2017-08-02 Thread Alexander Monakov
Similar to mem_thread_fence issue from the patch 1/3, RTL representation of __atomic_signal_fence must be a compiler barrier. We have just one backend offering this pattern, and it does not place a compiler barrier. It does not appear useful to expand signal_fence to some kind of hardware instruc

Re: [PATCH 6/6] qsort comparator consistency checking

2017-08-02 Thread Alexander Monakov
On Wed, 2 Aug 2017, Jeff Law wrote: > Well, there's not *that* many qsort calls. My quick grep shows 94 and > its a very mechanical change. Then a poison in system.h to ensure raw > calls to qsort don't return. Any suggestion for the non-poisoned replacement? xqsort? gcc_qsort? Can you review

Re: [PATCH 6/6] qsort comparator consistency checking

2017-08-02 Thread Jeff Law
On 08/02/2017 12:00 PM, Alexander Monakov wrote: > On Wed, 2 Aug 2017, Jeff Law wrote: >> Well, there's not *that* many qsort calls. My quick grep shows 94 and >> its a very mechanical change. Then a poison in system.h to ensure raw >> calls to qsort don't return. > > Any suggestion for the non-

Re: [patch][Ping #3] PR80929: Realistic PARALLEL cost in seq_cost.

2017-08-02 Thread Jeff Law
On 06/29/2017 02:51 AM, Georg-Johann Lay wrote: > On 28.06.2017 22:18, Wilco Dijkstra wrote: >> Georg-Johann Lay wrote: >> >> @@ -5300,6 +5300,9 @@ seq_cost (const rtx_insn *seq, bool spee >> set = single_set (seq); >> if (set) >> cost += set_rtx_cost (set, speed); >> +

Re: [PATCH] Add missing edge probability in simd_clone_adjust

2017-08-02 Thread Tom de Vries
On 08/02/2017 06:29 PM, Jakub Jelinek wrote: On Wed, Aug 02, 2017 at 06:15:31PM +0200, Tom de Vries wrote: 2017-08-02 Tom de Vries * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability. I think that is not the right probability, when using masked simd, the point is that

Re: GCC 7.2 Status Report (2017-08-02)

2017-08-02 Thread Ian Lance Taylor
On Wed, Aug 2, 2017 at 4:17 AM, Richard Biener wrote: > > Status > == > > The GCC 7 branch is now frozen for the upcoming release candidate > and release. All changes require release manager approval. Whoops, I committed a patch to the GCC 7 branch this morning (my time) before I saw this e-

Re: [PATCH] Add missing edge probability in simd_clone_adjust

2017-08-02 Thread Jakub Jelinek
On Wed, Aug 02, 2017 at 08:19:41PM +0200, Tom de Vries wrote: > 2017-08-02 Tom de Vries > > * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability. Ok, thanks. > diff --git a/gcc/omp-simd-clone.c b/gcc/omp-simd-clone.c > index a1a563e..fbb122c 100644 > --- a/gcc/omp-simd-c

Re: [RFC][PR 67336][PING^6] Verify pointers during stack unwind

2017-08-02 Thread Jeff Law
On 07/17/2017 01:23 AM, Yuri Gribov wrote: > Hi all, > > I've rebased the previous patch to trunk per Andrew's suggestion. > Original patch description/motivation/questions are in > https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01869.html Is his stuff used for exception handling? If so, doesn't t

Re: [PATCH 1/2] Introduce testsuite support to run Python tests

2017-08-02 Thread Jeff Law
On 07/26/2017 10:48 AM, David Malcolm wrote: > On Wed, 2017-07-26 at 18:35 +0200, Pierre-Marie de Rodat wrote: >> On 07/26/2017 06:25 PM, David Malcolm wrote: >>> str.format was introduced in Python 2.6, so presumably the minimum >>> python 2 version here is at least 2.6+; for Python 3 I believe it

Re: [RFC][PR 67336][PING^6] Verify pointers during stack unwind

2017-08-02 Thread Jakub Jelinek
On Wed, Aug 02, 2017 at 12:38:13PM -0600, Jeff Law wrote: > On 07/17/2017 01:23 AM, Yuri Gribov wrote: > > I've rebased the previous patch to trunk per Andrew's suggestion. > > Original patch description/motivation/questions are in > > https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01869.html > Is h

Re: [PATCH, rs6000] Clean up capitalized diagnostic messages

2017-08-02 Thread Bill Schmidt
On Aug 2, 2017, at 11:04 AM, Joseph Myers wrote: > > On Wed, 2 Aug 2017, Jakub Jelinek wrote: > >> On Wed, Aug 02, 2017 at 10:29:20AM -0500, Bill Schmidt wrote: >>> --- gcc/config/rs6000/rs6000.c (revision 250791) >>> +++ gcc/config/rs6000/rs6000.c (working copy) >>> @@ -4132,7 +4132,7

Re: [PATCH][2/2] early LTO debug, main part

2017-08-02 Thread Jason Merrill
On Wed, Aug 2, 2017 at 6:35 AM, Richard Biener wrote: > On Wed, 2 Aug 2017, Jason Merrill wrote: > >> On 05/19/2017 06:42 AM, Richard Biener wrote: >> > + /* ??? In some cases the C++ FE (at least) fails to >> > +set DECL_CONTEXT properly. Simply globalize stuff >> > +in this

Re: [RFC][PR 67336][PING^6] Verify pointers during stack unwind

2017-08-02 Thread Jeff Law
On 08/02/2017 12:47 PM, Jakub Jelinek wrote: > On Wed, Aug 02, 2017 at 12:38:13PM -0600, Jeff Law wrote: >> On 07/17/2017 01:23 AM, Yuri Gribov wrote: >>> I've rebased the previous patch to trunk per Andrew's suggestion. >>> Original patch description/motivation/questions are in >>> https://gcc.gnu

Re: [PATCH] fix the handling of string precision in pretty printer (PR 81586)

2017-08-02 Thread Jeff Law
On 07/27/2017 05:29 PM, Martin Sebor wrote: > The pretty printer treats precision in %s directives as a request > to print exactly as many characters from the string argument when > what precision normally (in C) means is the maximum number of > characters to read from the string. It doesn't mean

Re: [PATCH] Fix target attribute handling (PR c++/81355).

2017-08-02 Thread Jeff Law
On 07/28/2017 05:13 AM, Martin Liška wrote: > Hello. > > Following patch skips empty strings in 'target' attribute. > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? > Martin > > gcc/ChangeLog: > > 2017-07-13 Martin Liska > > PR c+

Re: [PING^4][PATCH v2] Generate reproducible output independently of the build-path

2017-08-02 Thread Jeff Law
On 07/21/2017 10:15 AM, Ximin Luo wrote: > (Please keep me on CC, I am not subscribed) > > > Proposal > > > This patch series adds a new environment variable BUILD_PATH_PREFIX_MAP. When > this is set, GCC will treat this as extra implicit "-fdebug-prefix-map=$value" > command-line argum

Re: [PATCH 1/3] Use BUILD_PATH_PREFIX_MAP envvar for debug-prefix-map

2017-08-02 Thread Jeff Law
On 07/21/2017 10:15 AM, Ximin Luo wrote: > Define the BUILD_PATH_PREFIX_MAP environment variable, and treat it as > implicit > -fdebug-prefix-map CLI options specified before any explicit such options. > > Much of the generic code for applying and parsing prefix-maps is implemented > in > libibe

Re: [PATCH] RTEMS: Add GCC Runtime Library Exception

2017-08-02 Thread Jeff Law
On 07/24/2017 12:03 AM, Sebastian Huber wrote: > gcc/ > > PR libgcc/61152 > * aarch64/rtems.h: Add GCC Runtime Library Exception. Format > changes. > * arm/rtems.h: Likewise. > * bfin/rtems.h: Likewise. > * i386/rtemself.h: Likewise. > * lm32/rtems.h: Lik

Re: [PATCH v2][RFC] Canonize names of attributes.

2017-08-02 Thread Jason Merrill
OK. On Thu, Jul 13, 2017 at 9:48 AM, Martin Liška wrote: > On 07/11/2017 05:52 PM, Jason Merrill wrote: >> On Tue, Jul 11, 2017 at 9:37 AM, Martin Liška wrote: >>> On 07/03/2017 11:00 PM, Jason Merrill wrote: On Mon, Jul 3, 2017 at 5:52 AM, Martin Liška wrote: > On 06/30/2017 09:34 PM,

Re: [PATCH] Fix target attribute handling (PR c++/81355).

2017-08-02 Thread Martin Sebor
On 08/02/2017 01:04 PM, Jeff Law wrote: On 07/28/2017 05:13 AM, Martin Liška wrote: Hello. Following patch skips empty strings in 'target' attribute. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin gcc/ChangeLog: 2017-07-13 Martin Lis

Re: [PATCH 1/1] sparc: support for -mmisalign in the SPARC M8

2017-08-02 Thread Qing Zhao
Hi, David, thanks a lot for your comment. see my reply below > STRICT_ALIGNMENT has a lot of implications. from the definition of STRICT_ALIGNMENT: /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ #define STRICT_ALIGNMENT 1 for MISALIGN_TAR

Re: [RFC][PR 67336][PING^6] Verify pointers during stack unwind

2017-08-02 Thread Yury Gribov
On 02.08.2017 20:02, Jeff Law wrote: On 08/02/2017 12:47 PM, Jakub Jelinek wrote: On Wed, Aug 02, 2017 at 12:38:13PM -0600, Jeff Law wrote: On 07/17/2017 01:23 AM, Yuri Gribov wrote: I've rebased the previous patch to trunk per Andrew's suggestion. Original patch description/motivation/questio

Re: [RFC][PR 67336][PING^6] Verify pointers during stack unwind

2017-08-02 Thread H.J. Lu
On Wed, Aug 2, 2017 at 1:39 PM, Yury Gribov wrote: > On 02.08.2017 20:02, Jeff Law wrote: >> >> On 08/02/2017 12:47 PM, Jakub Jelinek wrote: >>> >>> On Wed, Aug 02, 2017 at 12:38:13PM -0600, Jeff Law wrote: On 07/17/2017 01:23 AM, Yuri Gribov wrote: > > I've rebased the previous

Re: [RFC][PR 67336][PING^6] Verify pointers during stack unwind

2017-08-02 Thread Yury Gribov
On 02.08.2017 21:48, H.J. Lu wrote: On Wed, Aug 2, 2017 at 1:39 PM, Yury Gribov wrote: On 02.08.2017 20:02, Jeff Law wrote: On 08/02/2017 12:47 PM, Jakub Jelinek wrote: On Wed, Aug 02, 2017 at 12:38:13PM -0600, Jeff Law wrote: On 07/17/2017 01:23 AM, Yuri Gribov wrote: I've rebased the

[C++ Patch] PR 71440 ("ICE on invalid C++ code in instantiate_type, at cp/class.c...")

2017-08-02 Thread Paolo Carlini
Hi, by and large this issue seems already fixed in mainline, ie, we don't ICE anymore during error recovery, but I noticed that we try to prettyprint constructor and destructor as expressions and we end up with ugliness like: error: taking address of constructor ‘((C*)this)->*A::__ct ’ thus

  1   2   >