Re: [PATCH] Fix part of PR58712

2013-10-21 Thread Markus Trippelsdorf
LTO bootstrapped and tested on x86_64-unknown-linux-gnu. I would be grateful if one of you guys could apply it. Thanks. 2013-10-21 Markus Trippelsdorf PR ipa/58712 * cgraph.c (cgraph_create_edge_1): Add indirect_unknown_callee as argument. (cgraph_crea

Re: [PATCH] Fix PR58775

2013-10-21 Thread Jakub Jelinek
On Mon, Oct 21, 2013 at 01:20:06PM +0800, Zhenqiang Chen wrote: > Thanks for the comments. > > Patch is updated to set uid in update_range_test after > force_gimple_operand_gsi. > > I am not sure the patch can cover all cases. If not, I think > force_gimple_operand_gsi_1 maybe the only place to

Re: [PR libstdc++/58804][PR libstdc++/58729] tr2/dynamic_bitset issues.

2013-10-21 Thread Paolo Carlini
On 10/21/2013 02:02 AM, Ed Smith-Rowland wrote: Greetings. Here is a patch to correct tr2/dynamic_bitset to use __builtin_xxxll for long long instead of the long versions. Relevant bugs: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58804 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58729 Build

[PATCH][AArch64] Get %c output template tests to pass for -fPIC

2013-10-21 Thread Kyrill Tkachov
Hi all, When I added the tests for the %c output template for aarch64 I did not take into account that compiling them with -fPIC would fail. This patch fixes them to use the 'S' constraint to get them to work. Ok for trunk? Tested on aarch64-none-elf/-fPIC Thanks, Kyrill [gcc/testsuite] 2

Re: libstdc++ Testsuite extension for sort, partial_sort, partial_sort_copy, nth_element

2013-10-21 Thread Paolo Carlini
Hi, On 10/19/2013 11:10 PM, Christopher Jefferson wrote: The following patch (related to my 58800 patch) adds many more tests for several important functions. While 58800 is my fault, the reason it was not caught earlier is that many functions in libstdc++ have almost no testing. This works towa

Re: [PATCH][i386] Enable vector_loop in memset expanding and merge expanders for memset and memmov

2013-10-21 Thread Michael V. Zolotukhin
> The patch is OK. Thanks, the patch was committed. > > That's a good point. I added a check for this case - so if CONST_INT is > > passed > > we assume that mode is QI. But usually promoted value resides in a > > register, so > > we don't go over-conservative here. > Hmm, so if we use broadca

Re: [Patch, fortran] PR58793 - Wrong value for _vtab for intrinsic types with CLASS(*): storage_size of class(*) gives wrong result

2013-10-21 Thread Tobias Burnus
Paul Richard Thomas wrote: This patch is fairly obvious and follows a suggestion from Tobias to use gfc_element_size. He even wrote the testcase! Bootstrapped and regested on FC17/x86_64 - OK for trunk? Looks good to me. Thanks for the patch. PS In writing this, I have just noted that I need

[4.8 branch] Handle svn 1.8.1

2013-10-21 Thread Andreas Jaeger
I'd like to backport this patch from trunk to handle subversion 1.8.1 output. Ok to commit? Andreas 2013-10-21 Mike Stump * gcc_update (configure): Update to handle svn 1.8.1. Index: contrib/gcc_update === --- contrib/

Re: [4.8 branch] Handle svn 1.8.1

2013-10-21 Thread Jakub Jelinek
On Mon, Oct 21, 2013 at 12:01:28PM +0200, Andreas Jaeger wrote: > Ok to commit? > > Andreas > > 2013-10-21 Mike Stump > > * gcc_update (configure): Update to handle svn 1.8.1. Ok. > --- contrib/gcc_update(revision 203886) > +++ contrib/gcc_update(working copy) > @@ -38

[Patch] Fix gcc.dg/20050922-*.c

2013-10-21 Thread Vidya Praveen
Hello, Tests gcc.dg/20050922-1.c and gcc.dg/20050922-2.c includes stdlib.h. This can be a issue especially since they define uint32_t. Testcase writing guidelines discourages such inclusion as well. This patch replaces these #includes with manual declarations. Tested for aarch64-none-elf, arm-no

Add FLAGS_REG clobber to kxnor

2013-10-21 Thread Uros Bizjak
Hello! We are splitting it to normal XOR that includes clobber, so better start with the clobber from the beginning. 2013-10-20 Uros Bizjak * config/i386/i386.md (kxnor): Add FLAGS_REG clobber. Tested on x86_64-pc-linux-gnu and committed to mainline SVN. Uros. Index: i386.md ===

Re: [Patch, fortran] PR58793 - Wrong value for _vtab for intrinsic types with CLASS(*): storage_size of class(*) gives wrong result

2013-10-21 Thread Paul Richard Thomas
Dear Tobias, > > Looks good to me. Thanks for the patch. > > > I think that should be done as follow-up patch.In particular, it is not > obvious how it should be handled. OK - I'll commit tonight, as is. > > The program below ICEs in gfc_typenode_for_spec;with both Intel's and Cray's >

Re: [wide-int] Add is_sign_extended optimisation

2013-10-21 Thread Richard Biener
On Sun, 20 Oct 2013, Richard Sandiford wrote: > Another follow-up to yesterday's patch. This one implements Richard's > suggestion of having an is_sign_extended trait to optimise cases where > excess upper bits are known to be signs rather than undefined. > > The uses so far are: > > * make to_

[PATCH] Fix regression parts of PR58742

2013-10-21 Thread Richard Biener
This fixes a regression introduced in GCC 4.2 after which we no longer fold (unsigned) (X /[ex] 4) * 4 to (unsigned) X. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2013-10-21 Richard Biener PR middle-end/58742 * fold-const.c (fold_binary_l

[PATCH, MPX, 2/X] Pointers Checker [1/25] Hooks

2013-10-21 Thread Ilya Enkovich
Hi, This patch starts the series which introduces Pointers Checker and its support in i386 via Intel MPX. Pointers Checker is described on Wiki page - http://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler. This series actually replaces previously sent patch (http://gcc.gnu.

Re: [PATCH, MPX, 2/X] Pointers Checker [1/25] Hooks

2013-10-21 Thread Joseph S. Myers
On Mon, 21 Oct 2013, Ilya Enkovich wrote: > +DEFHOOK > +(builtin_chkp_function, > + "Pointers checker instrumentation pass uses this hook to obtain\n\ > +target-specific functions which implement specified generic checker\n\ > +builtins.", > + tree, (unsigned fcode), > + default_builtin_chkp_funct

[PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins

2013-10-21 Thread Ilya Enkovich
Hi, This patch introduces built-in functions used by Pointers Checker and flag to enable Pointers Checker. Builtins available for user are expanded in expand_builtin. All other builtins are not allowed in expand until generic version of Pointers Cheker is implemented. Bootstrapped and tested o

RE: [PATCH] Fix PR58682

2013-10-21 Thread Paulo Matos
> -Original Message- > From: Richard Biener [mailto:richard.guent...@gmail.com] > Sent: 18 October 2013 13:12 > To: Paulo Matos > Cc: Mike Stump; Kyrill Tkachov; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Fix PR58682 > > Please re-post the latest version of the patch and CC Honza. >

Re: [PATCH] Fix regression parts of PR58742

2013-10-21 Thread Jakub Jelinek
On Mon, Oct 21, 2013 at 01:30:37PM +0200, Richard Biener wrote: > This fixes a regression introduced in GCC 4.2 after which we no > longer fold (unsigned) (X /[ex] 4) * 4 to (unsigned) X. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Don't we want to do the same optim

Re: [PATCH] Fix regression parts of PR58742

2013-10-21 Thread Richard Biener
On Mon, 21 Oct 2013, Jakub Jelinek wrote: > On Mon, Oct 21, 2013 at 01:30:37PM +0200, Richard Biener wrote: > > This fixes a regression introduced in GCC 4.2 after which we no > > longer fold (unsigned) (X /[ex] 4) * 4 to (unsigned) X. > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu,

[PATCH, MPX, 2/X] Pointers Checker [3/25] Attributes

2013-10-21 Thread Ilya Enkovich
Hi, This patch adds attributes 'bnd_variable_size' and 'bnd_legacy' used by Pointers Checker. Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/ 2013-10-21 Ilya Enkovich * c-family/c-common.c (handle_bnd_variable_size_attribute): New. (handle_bnd_legacy): New.

Re: [PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins

2013-10-21 Thread Joseph S. Myers
On Mon, 21 Oct 2013, Ilya Enkovich wrote: > + if (flag_check_pointers) > +{ > + if (flag_lto) > + sorry ("Pointers checker is not yet fully supported for link-time > optimization"); That sounds wrong. It suggests some bug somewhere in your patch series failing to allow for LTO, w

[PATCH, MPX, 2/X] Pointers Checker [4/25] Constructors

2013-10-21 Thread Ilya Enkovich
Hi, This patch introduces two new contructor types supported by cgraph_build_static_cdtor. 'B' type is used to initialize static objects (bounds) created by Pointers Checker. The difference of this type from the regular constructor is that 'B' constructor is never instrumented by Pointers Chec

Re: [patch 1/8] Remove gimple-low.h from the tree-ssa.h include list.

2013-10-21 Thread Richard Biener
On Fri, Oct 18, 2013 at 9:01 PM, Andrew MacLeod wrote: > On 10/18/2013 12:10 PM, Jeff Law wrote: >> >> On 10/18/13 07:37, Andrew MacLeod wrote: >>> >>> >>> gimple_check_call_matching_types() was being called from 3 or 4 >>> different files,and seemed more appropriate as a cgraph routine (which >>>

Re: [RFC] Isolate & simplify paths with undefined behaviour

2013-10-21 Thread Richard Biener
On Fri, Oct 18, 2013 at 7:12 PM, Jeff Law wrote: > > > Back in 2011 I wrote code to detect cases when traversing a particular path > could be proven to trigger undefined behaviour (such as a null pointer > dereference). That original patch would find the control dependent edges > leading to the d

Re: [PATCH] Fix PR58682

2013-10-21 Thread Jan Hubicka
> > -Original Message- > > From: Richard Biener [mailto:richard.guent...@gmail.com] > > Sent: 18 October 2013 13:12 > > To: Paulo Matos > > Cc: Mike Stump; Kyrill Tkachov; gcc-patches@gcc.gnu.org > > Subject: Re: [PATCH] Fix PR58682 > > > > Please re-post the latest version of the patch a

Re: [PATCH]Fix computation of offset in ivopt

2013-10-21 Thread Richard Biener
On Fri, Oct 18, 2013 at 5:48 PM, Bin.Cheng wrote: > Hi Richard, > Is the first patch OK? Since there is a patch depending on it. > http://gcc.gnu.org/ml/gcc-patches/2013-09/msg01931.html Yes. Richard. > Thanks. > bin > > On Fri, Oct 18, 2013 at 7:18 PM, Richard Biener > wrote: >> On Thu, Oct

[PATCH, MPX, 2/X] Pointers Checker [5/25] Tree and gimple ifaces

2013-10-21 Thread Ilya Enkovich
Hi, This patch adds bounds related iface macros and functions for tree and gimple. Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/ 2013-10-21 Ilya Enkovich * tree-core.h (tree_index): Add TI_BOUND_TYPE. * tree.h (BOUND_P): New. (BOUNDED_TYPE_P): New.

[PATCH] Fix DECL_BIT_FIELD dependent on flag_strict_volatile_bitfields

2013-10-21 Thread Bernd Edlinger
Hello, this patch removes the dependency of DECL_BIT_FIELD on the flag_strict_volatile_bitfields, and makes get_inner_reference not returning a different mode for non-volatile members if flag_strict-volatile_bitfields is used. This fixes the regression on the SH-target, due to the patch "Fix as

RE: [PATCH] Fix DECL_BIT_FIELD dependent on flag_strict_volatile_bitfields

2013-10-21 Thread Bernd Edlinger
Oops... > Hello, > > this patch removes the dependency of DECL_BIT_FIELD on the > flag_strict_volatile_bitfields, > and makes get_inner_reference not returning a different mode for non-volatile > members > if flag_strict-volatile_bitfields is used. > > This fixes the regression on the SH-target

Re: [PATCH] Fix DECL_BIT_FIELD dependent on flag_strict_volatile_bitfields

2013-10-21 Thread Richard Biener
On Mon, Oct 21, 2013 at 2:33 PM, Bernd Edlinger wrote: > Oops... > > >> Hello, >> >> this patch removes the dependency of DECL_BIT_FIELD on the >> flag_strict_volatile_bitfields, >> and makes get_inner_reference not returning a different mode for >> non-volatile members >> if flag_strict-volatil

[PATCH, rs6000] Be careful with special permute masks for little endian

2013-10-21 Thread Bill Schmidt
Hi, In altivec_expand_vec_perm_const, we look for special masks that match the behavior of specific instructions, so we can use those instructions rather than load a constant control vector and perform a permute. Some of the masks must be treated differently for little endian mode. The masks tha

[PATCH] Fix PR58794

2013-10-21 Thread Richard Biener
This fixes another case of unequal addresses of volatile fields. Boostrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2013-10-21 Richard Biener PR tree-optimization/58794 * fold-const.c (operand_equal_p): Compare FIELD_DECL operand of COMPONENT_REFs

Re: [patch] Cleanup tree-ssa-ter.c exports

2013-10-21 Thread Andrew MacLeod
On 10/20/2013 09:53 AM, Eric Botcazou wrote: Unfortunately, tree-ssa-ter.c also has 2 functions (find_replaceable_exprs() and dump_replaceable_exprs()) which are exported and utilized by tree-outof-ssa.c (the file is a part of the out-of-ssa module). So I moved the prototypes from tree-ssa-li

Re: [PATCH][i386] Enable vector_loop in memset expanding and merge expanders for memset and memmov

2013-10-21 Thread Jan Hubicka
> > The patch is OK. > Thanks, the patch was committed. > > > > That's a good point. I added a check for this case - so if CONST_INT is > > > passed > > > we assume that mode is QI. But usually promoted value resides in a > > > register, so > > > we don't go over-conservative here. > > Hmm, so

[PATCH][ARM] Update Cortex A9 DImode mult extend rtx costs

2013-10-21 Thread Kyrill Tkachov
Hi all, There's a slight error in the Cortex A9 costs I committed recently. The extend and extend_add costs refer to 32x32->64 bit operations and thus have valid costs in aarch32. This patches updates those costs for the Cortex A9. The other existing cost tables are correct in this regard and

Re: [PATCH][ARM] Update Cortex A9 DImode mult extend rtx costs

2013-10-21 Thread Richard Earnshaw
On 21/10/13 14:37, Kyrill Tkachov wrote: > Hi all, > > There's a slight error in the Cortex A9 costs I committed recently. The > extend > and extend_add costs refer to 32x32->64 bit operations and thus have valid > costs > in aarch32. This patches updates those costs for the Cortex A9. The oth

Re: [PATCH][i386] Enable vector_loop in memset expanding and merge expanders for memset and memmov

2013-10-21 Thread Michael V. Zolotukhin
> OK, I merged in my misaligned prologues changes and will post patch after full > testing. It seemed to go seamlessly. I spotted there are still few places > for > cleanup, so i will try to handle there incrementally. Great! Hope these recent memcpy/memset changes will lead to some gains soon

Re: [PATCH, rs6000] Be careful with special permute masks for little endian

2013-10-21 Thread David Edelsohn
On Mon, Oct 21, 2013 at 8:49 AM, Bill Schmidt wrote: > Hi, > > In altivec_expand_vec_perm_const, we look for special masks that match > the behavior of specific instructions, so we can use those instructions > rather than load a constant control vector and perform a permute. Some > of the masks m

Re: [C++ PATCH] Fix PR58705

2013-10-21 Thread Marek Polacek
Ping. On Mon, Oct 14, 2013 at 02:23:59PM +0200, Marek Polacek wrote: > We were ICEing on the attached testcase, because in check_narrowing, > for = {{}}, we wanted to check recursively the CONSTRUCTOR_ELTs, > even though init in this case has 0 CONSTRUCTOR_NELTS. So I added > the check for CONSTR

Re: [PATCH, MPX, 2/X] Pointers Checker [1/25] Hooks

2013-10-21 Thread Ilya Enkovich
esOn 21 Oct 11:44, Joseph S. Myers wrote: > On Mon, 21 Oct 2013, Ilya Enkovich wrote: > > > +DEFHOOK > > +(builtin_chkp_function, > > + "Pointers checker instrumentation pass uses this hook to obtain\n\ > > +target-specific functions which implement specified generic checker\n\ > > +builtins.", >

RE: [PATCH] Fix PR58682

2013-10-21 Thread Paulo Matos
> -Original Message- > From: Jan Hubicka [mailto:hubi...@ucw.cz] > Sent: 21 October 2013 13:21 > To: Paulo Matos > Cc: Richard Biener; Mike Stump; Kyrill Tkachov; gcc-patches@gcc.gnu.org; Jan > Hubicka (hubi...@ucw.cz) > Subject: Re: [PATCH] Fix PR58682 > > This won't work - the max_count

Doc patch committed: Improve attributes doc in -fno-toplevel-reorder

2013-10-21 Thread Ian Lance Taylor
This patch adds the words "when possible" to make clear that it is not always possible to use attributes to replace the effects of -fno-toplevel-reorder. I also fixed a typo s/includes files/include files/ I noticed a while ago. Bootstrapped on x86_64-unknown-linux-gnu. Committed to mainline. Ia

Re: [PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins

2013-10-21 Thread Ilya Enkovich
On 21 Oct 12:08, Joseph S. Myers wrote: > On Mon, 21 Oct 2013, Ilya Enkovich wrote: > > > + if (flag_check_pointers) > > +{ > > + if (flag_lto) > > + sorry ("Pointers checker is not yet fully supported for link-time > > optimization"); > > That sounds wrong. It suggests some bug som

[PATCH] Make fold_range_test work only on integral types (PR middle-end/58809)

2013-10-21 Thread Marek Polacek
In this PR (well, in the first testcase in it), the problem was that fold_range_test got op0 and op1 of a COMPLEX_TYPE, subsequent call of make_range then failed because it wants to create an integer constant using build_int_cst - and that can't handle COMPLEX_TYPE. Also, we can't just compare com

Re: [PATCH] Fix PR58682

2013-10-21 Thread Jan Hubicka
> > -Original Message- > > From: Jan Hubicka [mailto:hubi...@ucw.cz] > > Sent: 21 October 2013 13:21 > > To: Paulo Matos > > Cc: Richard Biener; Mike Stump; Kyrill Tkachov; gcc-patches@gcc.gnu.org; Jan > > Hubicka (hubi...@ucw.cz) > > Subject: Re: [PATCH] Fix PR58682 > > > > This won't wor

[PATCH] More jump threading cleanups

2013-10-21 Thread Jeff Law
Two cleanups I noticed late last week while working on the general case FSA optimization. First, we were not cancelling jump threads through joiner blocks when there is any edge on the jump threading path with a recorded jump thread opportunity. We were not nearly as aggressive at pruning a

Doc patch RFA: Remove docs for -fno-default-inline

2013-10-21 Thread Ian Lance Taylor
According to c.opt, the -fdefault-inline patch is ignored, and only exists for backward compatibility. The only use of flag_default_inline was removed by Honza here: http://gcc.gnu.org/ml/gcc-patches/2008-07/msg02104.html This patch removes the docs for -fdefault-inline. Bootstrapped on x86_64-u

Re: patch to enable LRA for ppc

2013-10-21 Thread Michael Meissner
On Sun, Oct 20, 2013 at 10:48:08PM -0400, Vladimir Makarov wrote: > On 13-10-18 11:26 AM, David Edelsohn wrote: > >On Thu, Oct 3, 2013 at 5:02 PM, Vladimir Makarov wrote: > >>The following patch permits today trunk to use LRA for ppc by default. > >>To switch it off -mno-lra can be used. > >> > >>

[PATCH, PR 10474] Split live-ranges of function arguments to help shrink-wrapping

2013-10-21 Thread Martin Jambor
Hi, in spring I have suggested to shedule pass_cprop_hardreg before pass_thread_prologue_and_epilogue in order to create many more shrink-wrapping opportunities. The problem is that formal arguments of a functions which need to be saved across calls on slow paths often get assigned callee saved r

Re: [PATCH, rs6000] Be careful with special permute masks for little endian

2013-10-21 Thread Bill Schmidt
Whoops, looks like I missed some simpler cases (REG with the wrong mode instead of SUBREG with the wrong mode). Is this revised version ok, assuming it passes testing? It should fix a few more test cases. The changed code from the previous version is in the last hunk. Thanks, Bill Index: gcc/

Re: [PATCH] Hoist loop invariant statements containing data refs with zero-step during loop-versioning in vectorization.

2013-10-21 Thread Cong Hou
Jeff, thank you for installing this patch. Actually I already have the write privileges. I just came back from a trip. Thank you again! thanks, Cong On Fri, Oct 18, 2013 at 10:22 PM, Jeff Law wrote: > On 10/18/13 03:56, Richard Biener wrote: >> >> On Thu, 17 Oct 2013, Cong Hou wrote: >> >>>

Re: [PATCH] Hoist loop invariant statements containing data refs with zero-step during loop-versioning in vectorization.

2013-10-21 Thread Jeff Law
On 10/21/13 10:45, Cong Hou wrote: Jeff, thank you for installing this patch. Actually I already have the write privileges. I just came back from a trip. Ah. I didn't see you in the MAINTAINERS file. Can you update that file please. Thanks, jeff

Re: [Patch] Fix gcc.dg/20050922-*.c

2013-10-21 Thread Jeff Law
On 10/21/13 04:28, Vidya Praveen wrote: Hello, Tests gcc.dg/20050922-1.c and gcc.dg/20050922-2.c includes stdlib.h. This can be a issue especially since they define uint32_t. Testcase writing guidelines discourages such inclusion as well. This patch replaces these #includes with manual declarat

Re-factor inclusion of tree.h

2013-10-21 Thread Diego Novillo
This moves tree.h out of every header. This exposes dependencies of tree.h in files that should probably not need it after tree and gimple are separated. After this change, no header should include tree.h directly. It should only be included by a .c file. Unfortunately, I did not find an automatic

Re: [PATCH] Make fold_range_test work only on integral types (PR middle-end/58809)

2013-10-21 Thread Jeff Law
On 10/21/13 09:13, Marek Polacek wrote: In this PR (well, in the first testcase in it), the problem was that fold_range_test got op0 and op1 of a COMPLEX_TYPE, subsequent call of make_range then failed because it wants to create an integer constant using build_int_cst - and that can't handle COMP

Re: Re-factor inclusion of tree.h

2013-10-21 Thread Jeff Law
On 10/21/13 10:52, Diego Novillo wrote: This moves tree.h out of every header. This exposes dependencies of tree.h in files that should probably not need it after tree and gimple are separated. After this change, no header should include tree.h directly. It should only be included by a .c file.

Re: [PATCH] Hoist loop invariant statements containing data refs with zero-step during loop-versioning in vectorization.

2013-10-21 Thread Cong Hou
OK. Have done that. And this is also a "patch", right? ;) thanks, Cong diff --git a/MAINTAINERS b/MAINTAINERS index 15b6cc7..a6954da 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -406,6 +406,7 @@ Fergus Hendersonf...@cs.mu.oz.au Stuart Henderson

Re: [PATCH] Cilk Keywords (_Cilk_spawn and _Cilk_sync) for C (and C++)

2013-10-21 Thread Jeff Law
On 10/18/13 15:06, Iyer, Balaji V wrote: Hi Jeff, Please see my comments below. Also, I am adding all these changes to the files as you requested in my local directory. Should I send you an updated patch along the way? I'll let you know when I've worked my way through everything. ISTM an update

Re: [PATCH] Hoist loop invariant statements containing data refs with zero-step during loop-versioning in vectorization.

2013-10-21 Thread Jeff Law
On 10/21/13 11:00, Cong Hou wrote: OK. Have done that. And this is also a "patch", right? ;) Right :-) Approved. jeff

[Patch, Fortran] PR58803 - Prevent a double-free with proc-pointer components

2013-10-21 Thread Tobias Burnus
As written in the PR: The problem is that in free_components one frees: 2054free_components (gfc_component *p) ... 2058 for (; p; p = q) 2059{ 2060 q = p->next; 2061 2062 gfc_free_array_spec (p->as); 2063 gfc_free_expr (p->initializer); 2064 f

Re: [PATCH] Make fold_range_test work only on integral types (PR middle-end/58809)

2013-10-21 Thread Marek Polacek
On Mon, Oct 21, 2013 at 10:56:52AM -0600, Jeff Law wrote: > On 10/21/13 09:13, Marek Polacek wrote: > >In this PR (well, in the first testcase in it), the problem was that > >fold_range_test got op0 and op1 of a COMPLEX_TYPE, subsequent call > >of make_range then failed because it wants to create a

[jit] Implement gcc_jit_lvalue_get_address

2013-10-21 Thread David Malcolm
Committed to dmalcolm/jit: gcc/jit/ * TODO.rst ("the C unary prefix "&" operator"): Remove completed item. * internal-api.c (gcc::jit::lvalue::get_address): New. * internal-api.h (gcc::jit::lvalue::get_address): New. * libgccjit.c (gcc_jit_lvalue_get_address): New.

Re: [RFC] Isolate & simplify paths with undefined behaviour

2013-10-21 Thread Jeff Law
On 10/21/13 06:19, Richard Biener wrote: I wonder why this isn't part of the regular jump-threading code - after all the opportunity is to thead to __builtin_unreachable () ;) Otherwise the question is always where you'd place this pass and whether it enables jump threading or CSE opportunitie

[Patch, Fortran] PR58793 - reject passing TYPE(*) to CLASS(*)

2013-10-21 Thread Tobias Burnus
The issue came up while reviewing the patch for PR58793. Build and regtested on x86-64-gnu-linux OK for the trunk? Tobias 2013-10-21 Tobias Burnus PR fortran/58793 * interface.c (compare_parameter): Reject passing TYPE(*) to CLASS(*). 2013-10-21 Tobias Burnus PR fortran/58793 * gfo

Re: [Patch] Fix gcc.dg/20050922-*.c

2013-10-21 Thread Mike Stump
On Oct 21, 2013, at 3:28 AM, Vidya Praveen wrote: > Tests gcc.dg/20050922-1.c and gcc.dg/20050922-2.c includes stdlib.h. This can > be a issue especially since they define uint32_t. > OK for 4.7, 4.8? For release branches, you'd need to transition from the theoretical to the practical. On whic

Re: [PATCH] Cilk Keywords (_Cilk_spawn and _Cilk_sync) for C (and C++)

2013-10-21 Thread Jeff Law
On 10/18/13 15:06, Iyer, Balaji V wrote: The main reason why I made it volatile (as expressed by the volatil bool variable) is that I want to make sure these values aren't optimized by the compiler and the value is fetched from memory on every access. I have added an explanation to the header co

[C++ Patch] PR 58810

2013-10-21 Thread Paolo Carlini
Hi, this is just an ICE on invalid, but I think it hints to a small clean-up. Essentially the issue is that we diagnose qualified free functions in two different places: in the grokdeclarator itself and in grokfndecl. The former handles non-friend declarations and does type = TYPE_MAIN_VARIAN

Re: [PATCH, i386, MPX, 1/X] Support of Intel MPX ISA. 1/2 Bound type and modes

2013-10-21 Thread Jeff Law
On 10/15/13 07:31, Ilya Enkovich wrote: Hey guys, could please someone look at this small patch? It blocks approved MPX ISA support on i386 target. diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi index 1d62223..02b1214 100644 --- a/gcc/doc/rtl.texi +++ b/gcc/doc/rtl.texi @@ -1382,6 +1382,10

Re: patch to enable LRA for ppc

2013-10-21 Thread Steven Bosscher
On Mon, Oct 21, 2013 at 5:51 PM, Michael Meissner wrote: > What I'm doing is adding secondary reload support so that up until reload > time, > we can represent VSX addresses as reg+offset, and in secondary reload, create > the addition instructions to put the offset in a base register. I haven't

Re: [C PATCH] Warn for _Alignas in an array declarator (PR c/58267)

2013-10-21 Thread Marek Polacek
On Sat, Oct 19, 2013 at 07:23:20PM +, Joseph S. Myers wrote: > On Wed, 16 Oct 2013, Marek Polacek wrote: > > > @@ -2946,7 +2957,8 @@ c_parser_declarator (c_parser *parser, b > >struct c_declspecs *quals_attrs = build_null_declspecs (); > >struct c_declarator *inner; > >

[jit] Improve error message in gcc_jit_function_new_local

2013-10-21 Thread David Malcolm
Committed to dmalcolm/jit: gcc/jit/ * libgccjit.c (gcc_jit_function_new_local): Use a more clear error message for the case where someone tries to add a local to a function imported from elsewhere. --- gcc/jit/ChangeLog.jit | 6 ++ gcc/jit/libgccjit.c | 5 - 2 fi

Re: [Patch, Fortran] PR58803 - Prevent a double-free with proc-pointer components

2013-10-21 Thread Steve Kargl
On Mon, Oct 21, 2013 at 07:15:07PM +0200, Tobias Burnus wrote: > - c->tb = tb; > + if (num == 1) > + c->tb = tb; > + else > + { > + c->tb = XCNEW (gfc_typebound_proc); > + c->tb->where = gfc_current_locus; > + *c->tb = *tb; I haven't convinced myself yet, b

[jit] Show source locations (if any) in gimple dump

2013-10-21 Thread David Malcolm
Committed to dmalcolm/jit: gcc/jit/ * internal-api.c (gcc::jit::context::postprocess): Show source line numbers (if any) in gimple dump. --- gcc/jit/ChangeLog.jit | 5 + gcc/jit/internal-api.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/jit/Chang

[jit] Fix error-handling within gcc::jit::context::compile (timevar issues)

2013-10-21 Thread David Malcolm
Committed to dmalcolm/jit: gcc/jit/ * internal-api.c (gcc::jit::context::compile): Correctly cleanup timevars in error-handling, preventing an issue where an error on a context left timevar.c in an unstopped state, leading to an assertion failure when restarting tim

Re: [PATCH] Cilk Keywords (_Cilk_spawn and _Cilk_sync) for C (and C++)

2013-10-21 Thread Jeff Law
On 09/11/13 12:18, Iyer, Balaji V wrote: Hello Everyone, Couple weeks back, I had submitted a patch for review that will implement Cilk keywords (_Cilk_spawn and _Cilk_sync) into the C compiler. I recently finished C++ implementation also. In this email, I am attaching 2 patches: 1 for C (and the

Re: patch to enable LRA for ppc

2013-10-21 Thread Michael Meissner
On Mon, Oct 21, 2013 at 08:18:22PM +0200, Steven Bosscher wrote: > On Mon, Oct 21, 2013 at 5:51 PM, Michael Meissner wrote: > > What I'm doing is adding secondary reload support so that up until reload > > time, > > we can represent VSX addresses as reg+offset, and in secondary reload, > > create

Re: [Patch, Fortran] PR58803 - Prevent a double-free with proc-pointer components

2013-10-21 Thread Tobias Burnus
Steve Kargl wrote: On Mon, Oct 21, 2013 at 07:15:07PM +0200, Tobias Burnus wrote: - c->tb = tb; + if (num == 1) + c->tb = tb; + else + { + c->tb = XCNEW (gfc_typebound_proc); + c->tb->where = gfc_current_locus; + *c->tb = *tb; I haven't convinc

Re: [C++ Patch] PR 58810

2013-10-21 Thread Paolo Carlini
... this is an alternate, more conservative approach: a check remains in grokdeclarator and it handles friends too. At variance with the check in grokfndecl it's about function *types*. Thanks, Paolo. /// Index: cp/decl.c

Re: [Patch, Fortran] PR58803 - Prevent a double-free with proc-pointer components

2013-10-21 Thread Steve Kargl
On Mon, Oct 21, 2013 at 09:04:22PM +0200, Tobias Burnus wrote: > Steve Kargl wrote: > > On Mon, Oct 21, 2013 at 07:15:07PM +0200, Tobias Burnus wrote: > >> - c->tb = tb; > >> + if (num == 1) > >> + c->tb = tb; > >> + else > >> + { > >> +c->tb = XCNEW (gfc_typebound_proc); (see

Re: Re-factor inclusion of tree.h

2013-10-21 Thread Diego Novillo
On Mon, Oct 21, 2013 at 12:57 PM, Jeff Law wrote: > On 10/21/13 10:52, Diego Novillo wrote: >> >> I plan to commit this by tomorrow, unless there are objections. > > I can't think of a good reason to even bother waiting :-) Heh, OK, thanks. After analyzing all the build failures in config-list.m

pr37868

2013-10-21 Thread Mike Stump
Concerning: 2008-11-20 Richard Guenther PR tree-optimization/37868 * gcc.dg/torture/pr37868.c: New testcase. * gcc.c-torture/execute/pr38048-1.c: Likewise. * gcc.c-torture/execute/pr38048-2.c: Likewise. So, is there any reason why we can't make the test case

Re: Patch: Add #pragma ivdep support to the ME and C FE

2013-10-21 Thread Tobias Burnus
Dear all, attached is a new version of the patch. Changes: * "#pragma GCC ivdep" instead of "#pragma ivdep" * Corrections to the error message in c-parser.c and a test case for it * New wording in the .texi and examples I am still not completely happy with the wording – and I am open for sugges

Re: [PATCH, rs6000] Be careful with special permute masks for little endian

2013-10-21 Thread Bill Schmidt
Please hold off reviewing this. I see at least one testcase that will have to be modified (expected code generation pattern will be different for LE vs. BE). I'll resubmit the whole thing later today. Thanks, Bill On Mon, 2013-10-21 at 11:39 -0500, Bill Schmidt wrote: > Whoops, looks like I mis

Re: [PATCH] reimplement -fstrict-volatile-bitfields v4, part 2/2

2013-10-21 Thread DJ Delorie
> have an option for true AAPCS compliance, which will > be allowed to break the C++11 memory model and > And an option that addresses your requirements, > which will _not_ break the C++11 memory model So the problem isn't that what *I* need conflicts with C++11, it's that what AAPCS needs confl

[PATCH] Generate fused widening multiply-and-accumulate operations only when the widening multiply has single use

2013-10-21 Thread Yufeng Zhang
Hi, This patch changes the widening_mul pass to fuse the widening multiply with accumulate only when the multiply has single use. The widening_mul pass currently does the conversion regardless of the number of the uses, which can cause poor code-gen in cases like the following: typedef int

Re: [PATCH, PR 10474] Split live-ranges of function arguments to help shrink-wrapping

2013-10-21 Thread Steven Bosscher
On Mon, Oct 21, 2013 at 6:32 PM, Martin Jambor wrote: > --- a/gcc/ira.c > +++ b/gcc/ira.c > @@ -4314,6 +4314,197 @@ find_moveable_pseudos (void) >free_dominance_info (CDI_DOMINATORS); > } > > + > +/* If insn is interesting for parameter range-splitting shring-wrapping > + preparation, i.e. i

Re: [PATCH i386 4/8] [AVX512] [1/n] Add substed patterns.

2013-10-21 Thread Richard Henderson
On 10/17/2013 07:15 AM, Kirill Yukhin wrote: > +(define_mode_attr ssescalarsize > + [(V8DI "64") (V4DI "64") (V2DI "64") > + (V32HI "16") (V16HI "16") (V8HI "16") > + (V16SI "32") (V8SI "32") (V4SI "32") > + (V16SF "16") (V8DF "64")]) Error on V16SF. Probably better to fill this out. >

Re: [patch] Cleanup tree-ssa-ter.c exports

2013-10-21 Thread Eric Botcazou
> what went wrong? I see it in my checkouts...? Just open the file in your preferred editor. :-) -- Eric Botcazou

[PATCH, rs6000] Be careful with special permute masks for little endian, take 2

2013-10-21 Thread Bill Schmidt
Hi, This is a revision of my earlier patch on the subject, expanded to catch a few more cases and with some attendant test-case adjustments: In altivec_expand_vec_perm_const, we look for special masks that match the behavior of specific instructions, so we can use those instructions rather than l

RE: [PATCH] reimplement -fstrict-volatile-bitfields v4, part 1/2

2013-10-21 Thread Bernd Edlinger
Hi, On Sun, 20 Oct 2013 20:23:49, Sandra Loosemore wrote: > Hr. After some further testing, I'm afraid this patch is still > buggy. :-( > > I tried a backport to GCC 4.8 and tested on arm-none-eabi. On the new > pr56997-1.c testcase, it got stuck in infinite recursion between > store_split_bit

RE: [PATCH] reimplement -fstrict-volatile-bitfields v4, part 2/2

2013-10-21 Thread Bernd Edlinger
> >> have an option for true AAPCS compliance, which will >> be allowed to break the C++11 memory model and > >> And an option that addresses your requirements, >> which will _not_ break the C++11 memory model > > So the problem isn't that what *I* need conflicts with C++11, it's > that what AAPCS

Re: patch to enable LRA for ppc

2013-10-21 Thread Vladimir Makarov
On 13-10-21 11:51 AM, Michael Meissner wrote: On Sun, Oct 20, 2013 at 10:48:08PM -0400, Vladimir Makarov wrote: On 13-10-18 11:26 AM, David Edelsohn wrote: On Thu, Oct 3, 2013 at 5:02 PM, Vladimir Makarov wrote: The following patch permits today trunk to use LRA for ppc by default. To switch

Re: patch to enable LRA for ppc

2013-10-21 Thread Vladimir Makarov
On 13-10-21 2:55 PM, Michael Meissner wrote: On Mon, Oct 21, 2013 at 08:18:22PM +0200, Steven Bosscher wrote: On Mon, Oct 21, 2013 at 5:51 PM, Michael Meissner wrote: What I'm doing is adding secondary reload support so that up until reload time, we can represent VSX addresses as reg+offset, an

Re: [PATCH, PR 10474] Split live-ranges of function arguments to help shrink-wrapping

2013-10-21 Thread Vladimir Makarov
On 13-10-21 6:56 PM, Steven Bosscher wrote: + { + bitmap_clear (&need_new); + bitmap_clear (&reachable); + return; + } + + for (df_ref use = DF_REG_USE_CHAIN (REGNO(dest)); + use; + use = DF_REF_NEXT_REG (use)) You're using DF in these p

[patch] fix tree-ssa-ter.h dup

2013-10-21 Thread Andrew MacLeod
On 10/21/2013 07:56 PM, Eric Botcazou wrote: what went wrong? I see it in my checkouts...? Just open the file in your preferred editor. :-) ah. open it in an editor with more than 25 lines on the screen you mean :-) Thanks fixed... revision 203914 Andrew * tree-ssa-ter.h: Remove duplicate

Re: [Patch, fortran] PR58793 - Wrong value for _vtab for intrinsic types with CLASS(*): storage_size of class(*) gives wrong result

2013-10-21 Thread Paul Richard Thomas
Committed as r203915. I have a fix for the hollerith nonsense that yields the same behaviour as other brands. I'll submit tonight. Cheers Paul On 21 October 2013 11:20, Tobias Burnus wrote: > Paul Richard Thomas wrote: >> >> This patch is fairly obvious and follows a suggestion from Tobias to

RE: Honnor ix86_accumulate_outgoing_args again

2013-10-21 Thread Zamyatin, Igor
Jan, Please see my answers below > -Original Message- > From: Jan Hubicka [mailto:hubi...@ucw.cz] > Sent: Sunday, October 20, 2013 12:30 AM > To: Zamyatin, Igor; gcc-patches@gcc.gnu.org; vmaka...@redhat.com > Cc: 'Jan Hubicka' > Subject: Re: Honnor ix86_accumulate_outgoing_args again > >