[C++ PATCH] Fix -Wunused-but-set-* with delete [] (PR c++/58325)

2013-09-09 Thread Jakub Jelinek
Hi! If base of delete[] has TREE_SIDE_EFFECTS, build_vec_delete calls get_target_expr on it and we never call mark_exp_read on it in the end. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/4.8? 2013-09-09 Jakub Jelinek PR c++/58325 * init.c

Re: [C++ PATCH] Fix -Wunused-but-set-* with delete [] (PR c++/58325)

2013-09-09 Thread Jason Merrill
OK. Jason

Re: operator new returns nonzero

2013-09-09 Thread Mike Stump
On Sep 7, 2013, at 1:03 PM, Marc Glisse wrote: > On Sat, 7 Sep 2013, Mike Stump wrote: > >> >> On Sep 7, 2013, at 12:37 PM, Gabriel Dos Reis >> wrote: >> >>> On Sat, Sep 7, 2013 at 2:27 PM, Marc Glisse wrote: On Sat, 7 Sep 2013, Mike Stump wrote: > On Sep 7, 2013, at 3:33 AM,

Re: operator new returns nonzero

2013-09-09 Thread Mike Stump
On Sep 9, 2013, at 5:41 AM, Gabriel Dos Reis wrote: > On Mon, Sep 9, 2013 at 4:06 AM, Richard Biener > wrote: >> On Sat, Sep 7, 2013 at 11:00 PM, Marc Glisse wrote: >>> On Sat, 7 Sep 2013, Mike Stump wrote: >>> On Sep 7, 2013, at 12:27 PM, Marc Glisse wrote: > > Now flag_check_n

Re: operator new returns nonzero

2013-09-09 Thread Mike Stump
On Sep 7, 2013, at 5:34 PM, Gabriel Dos Reis wrote: > On Sat, Sep 7, 2013 at 2:46 PM, Mike Stump wrote: >> >> On Sep 7, 2013, at 12:37 PM, Gabriel Dos Reis >> wrote: >> >>> On Sat, Sep 7, 2013 at 2:27 PM, Marc Glisse wrote: On Sat, 7 Sep 2013, Mike Stump wrote: > On Sep 7, 20

Re: [PATCH] Fix init_range_entry (PR tree-optimization/58364)

2013-09-09 Thread Richard Biener
Jakub Jelinek wrote: >Hi! > >It is not safe to always handle a = ~b; for bool a and b as >in_p = !in_p; exp = arg0. If the current range is say >+[-,-] or -[-,-] or similar (i.e. unconditional false or true), >then the value of exp doesn't matter and thus the fact that exp >has been negated is ir

RE: [PATCH GCC]Catch more MEM_REFs sharing common addressing part in gimple strength reduction

2013-09-09 Thread Bill Schmidt
On Mon, 2013-09-09 at 10:20 -0500, Bill Schmidt wrote: > On Mon, 2013-09-09 at 14:25 +0800, bin.cheng wrote: > > Thanks for reviewing, I will correct all stupid spelling problem in the > > next version of patch. > > > > On Mon, Sep 9, 2013 at 8:15 AM, Bill Schmidt > > wrote: > > > > > >>>+

Re: [PATCH i386 2/8] [AVX512] Add mask registers.

2013-09-09 Thread Richard Henderson
On 08/29/2013 04:59 AM, Kirill Yukhin wrote: > @@ -7616,10 +7677,10 @@ >[(set_attr "type" "alu") > (set_attr "mode" "SI")]) > > -(define_insn "*andhi_1" > - [(set (match_operand:HI 0 "nonimmediate_operand" "=rm,r,Ya") > - (and:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0,qm")

Avoid g++.dg/template/cond2.C fail

2013-09-09 Thread Paolo Carlini
Hi, thus the below is what I actually tested on x86_64-linux. I think we discuss already most of it. Thanks! Paolo. 2013-09-09 Jan Hubicka Paolo Carlini * cgraphunit.c (analyze_functions): Save input_location, set it to UNKNOWN_LOCATION a

Re: Fwd: [PATCH] Scheduling result adjustment to enable macro-fusion

2013-09-09 Thread Wei Mi
Add a testcase. bootstrap and regression ok for the patch in last mail. 2013-09-09 Wei Mi * gcc/testsuite/gcc.dg/macro-fusion-1.c: New. Index: gcc/testsuite/gcc.dg/macro-fusion-1.c === --- gcc/testsuite/gcc.dg/macro-fusio

patch to make wide-int assume that everything is canonical beyond the precision?

2013-09-09 Thread Kenneth Zadeck
i still have more testing to go on this but it seems to be ok.my current problem is that the branch seems to have a fair number of failures so i want to get that cleaned up before i do further testing and commit this. I left the old rtl constructor ifdefed out. We are likely to want them

Re: operator new returns nonzero

2013-09-09 Thread Mike Stump
On Sep 7, 2013, at 2:00 PM, Marc Glisse wrote: > @@ -16171,21 +16171,31 @@ tree_expr_nonzero_warnv_p (tree t, bool > + if (TREE_CODE (fndecl) != FUNCTION_DECL) return false; > + if (!flag_check_new > + && DECL_IS_OPERATOR_NEW (fndecl) > + && !TREE_NOTHROW (fndecl)) > +

[PATCH][ARM] Improve cond_exec opportunities for immediate shifts for -mrestrict-it

2013-09-09 Thread Kyrylo Tkachov
Hi all, Shift operations with an immediate can generate a 16-bit encoding when the immediate is 5-bit wide, i.e. in the range [0-31]. Therefore we can use them in IT blocks even with the -mrestrict-it rules. I decided to reuse the "N" constraint with a slight modification by removing the !TARGET_

Re: operator new returns nonzero

2013-09-09 Thread Mike Stump
On Sep 9, 2013, at 10:25 AM, Gabriel Dos Reis wrote: > On Mon, Sep 9, 2013 at 11:16 AM, Mike Stump wrote: >> You've failed to understand g++. Please seek to understand the compiler, >> before you weigh in. > > Gee Mike, see a medical assistance for your and our benefits. Seems overly hostile

Re: operator new returns nonzero

2013-09-09 Thread Gabriel Dos Reis
On Mon, Sep 9, 2013 at 11:16 AM, Mike Stump wrote: > You've failed to understand g++. Please seek to understand the compiler, > before you weigh in. Gee Mike, see a medical assistance for your and our benefits. -- Gaby

Re: patch to make wide-int assume that everything is canonical beyond the precision?

2013-09-09 Thread Richard Sandiford
Kenneth Zadeck writes: > + int blocks_needed = (precision + HOST_BITS_PER_WIDE_INT - 1) / > HOST_BITS_PER_WIDE_INT; Watch out for the long lines. There are several others in the patch too. You'll need to clean up the existing ones before the merge :-) > +case CONST_WIDE_INT: > + len

PATCH: PR other/58374: Wrong target check in configure.ac in libvtv

2013-09-09 Thread H.J. Lu
configure.tgt in libvtv only recognizes canonical targets. This patch moves the VTV_SUPPORTED check after AC_CANONICAL_SYSTEM for targets like i686-linux or x86_64-linux. OK to install? Thanks. H.J. --- diff --git a/libvtv/ChangeLog b/libvtv/ChangeLog index 20092f4..3c344f9 100644 --- a/libvtv

Re: [c++-concepts] pretty print fix

2013-09-09 Thread Gabriel Dos Reis
Andrew Sutton writes: | The last merge didn't compile for me. Apparently some pretty printing | functions have disappeared that were being called in the concept | stuff. This patch just replaces the broken calls to pp_cxx_type_id | with pp->type_id. | | Ok to commit? yes, please. Sorry for tha

Re: RFC: patch to build GCC for arm with LRA

2013-09-09 Thread Richard Sandiford
Yvan Roux writes: > Thanks for noticing it Richard, I made a refactoring mistake and addr > was supposed to be used instead of x. In fact on AArch64 it occurs > that we don't have stripped rtxes at this step and we have some of the > form below, this if why I added the strip. > > (insn 29 27 5 7

[PATCH v2 1/6] Convert symtab, cgraph and varpool nodes into a real class hierarchy

2013-09-09 Thread David Malcolm
This patch is the handwritten part of the conversion of these types to C++; it requires the followup patch, which is autogenerated. It converts: struct GTY(()) symtab_node_base to: class GTY((user)) symtab_node_base and converts: struct GTY(()) cgraph_node to: struct GTY((user)) cgraph_no

[PATCH v2 2/6] Automated conversion of symtab to class hierarchy

2013-09-09 Thread David Malcolm
This patch is 439KB in size, so to avoid mailing-list limitations I've uploaded it to: http://dmalcolm.fedorapeople.org/gcc/large-patches/fd607e77883b8d3f8fb7c8091d0626dbbd31b9a5-0002-Automated-conversion-of-symtab-to-class-hierarchy.patch ChangeLog entry and diffstat follow: gcc/ Patch

Re: operator new returns nonzero

2013-09-09 Thread Gabriel Dos Reis
On Mon, Sep 9, 2013 at 12:54 PM, Mike Stump wrote: > On Sep 9, 2013, at 10:25 AM, Gabriel Dos Reis > wrote: >> On Mon, Sep 9, 2013 at 11:16 AM, Mike Stump wrote: >>> You've failed to understand g++. Please seek to understand the compiler, >>> before you weigh in. >> >> Gee Mike, see a medical

[PATCH v2 6/6] Update hand-written GTY routines for type renaming

2013-09-09 Thread David Malcolm
* cgraph.c (gt_ggc_mx): Update for renaming of symtab_node_base to symtab_node (gt_pch_nx): Likewise. --- gcc/cgraph.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gcc/cgraph.c b/gcc/cgraph.c index bb2626d..abbffa1 100644 --

Re: [PATCH] Handle target specific memory models in C frontend

2013-09-09 Thread Richard Henderson
On 08/10/2013 12:40 PM, Andi Kleen wrote: > On Fri, Nov 09, 2012 at 07:08:07AM -0800, Richard Henderson wrote: >> On 2012-11-09 07:03, Andi Kleen wrote: >>> PR55139 >>> * c-common.c (get_atomic_generic_size): Mask with >>> MEMMODEL_MASK >> >> Ok. > > I would like to backport this p

Re: operator new returns nonzero

2013-09-09 Thread Marc Glisse
I have now tested bootstrap+testsuite and there was no regression. 2013-09-07 Marc Glisse PR c++/19476 gcc/ * fold-const.c (tree_expr_nonzero_warnv_p): Handle operator new. * tree-vrp.c (gimple_stmt_nonzero_warnv_p, stmt_interesting_for_vrp): Likewise.

Re: [PATCH][RFC] Move IVOPTs closer to RTL expansion

2013-09-09 Thread Steven Bosscher
On Mon, Sep 9, 2013 at 10:01 AM, Richard Biener wrote: >> >> First, the loop passes that at the moment preceede IVOPTs leave >> >> around IL that is in desparate need of basic re-optimization >> >> like CSE, constant propagation and DCE. That puts extra load >> >> on IVOPTs and its cost model, inc

[PATCH v2 0/6] Port symtab/cgraph/varpool nodes to use C++ inheritance; rename types.

2013-09-09 Thread David Malcolm
Here's version 2 of this patch series. This is now 6 patches. The first two patches correspond to the two patches from the original patch series (and must both be applied together to make sense). They convert cgraph_node and varpool_node to inherit from symtab_node_base, eliminating union symtab

Re: PATCH: PR other/58374: Wrong target check in configure.ac in libvtv

2013-09-09 Thread Caroline Tice
The patch looks good to me, but somebody else needs to approve it. -- Caroline Tice cmt...@google.com On Mon, Sep 9, 2013 at 11:48 AM, H.J. Lu wrote: > configure.tgt in libvtv only recognizes canonical targets. This patch > moves the VTV_SUPPORTED check after AC_CANONICAL_SYSTEM for targets > l

[PATCH v2 3/6] Split symtab_node declarations onto multiple lines

2013-09-09 Thread David Malcolm
Amongst other things, the rename_symtab.py script converts "symtab_node" to "symtab_node *". This will lead to broken code on declarations that declare more than one variable (only the first would get a "*"), so split up such declarations. gcc/ * cgraphunit.c (analyze_functions): Split sy

[Patch, Fortran, committed] invoke.texi - add a missing hyphen

2013-09-09 Thread Tobias Burnus
Committed as obvious, Rev. 202416 Tobias Index: ChangeLog === --- ChangeLog (Revision 202415) +++ ChangeLog (Arbeitskopie) @@ -1,3 +1,7 @@ +2013-09-09 Tobias Burnus + + * invoke.texi (Error and Warning Options): Add hyphen. + 201

crash fix for unhanded operation

2013-09-09 Thread Mike Stump
Presently gcc just dies with a crash for an unhanded operation, the below handles it better. I'm torn between sorry and error, error might be better. Thoughts? Ok? diff --git a/gcc/expmed.c b/gcc/expmed.c index a83d549..127085f 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -4954,6 +4954,12 @

Re: crash fix for unhanded operation

2013-09-09 Thread Joseph S. Myers
On Mon, 9 Sep 2013, Mike Stump wrote: > Presently gcc just dies with a crash for an unhanded operation, the > below handles it better. > > I'm torn between sorry and error, error might be better. Thoughts? error means there is something wrong with the user's source code, and should generally

Re: crash fix for unhanded operation

2013-09-09 Thread Mike Stump
On Sep 9, 2013, at 3:48 PM, "Joseph S. Myers" wrote: > On Mon, 9 Sep 2013, Mike Stump wrote: > >> Presently gcc just dies with a crash for an unhanded operation, the >> below handles it better. >> >> I'm torn between sorry and error, error might be better. Thoughts? > > error means there is s

[PATCH v2 4/6] Remove symtab_node and const_symtab_node typedefs.

2013-09-09 Thread David Malcolm
gcc/ * ipa-ref.h (symtab_node): Remove typedef to pointer type, as it clashes with the preferred name for the base class. (const_symtab_node): Remove redundant typedef. --- gcc/ipa-ref.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/gcc/ipa-ref.h b/gcc/ipa-ref.h ind

[patch] Remove unused macro and functions from tree-flow.h and tree-flow-inline.h

2013-09-09 Thread Andrew MacLeod
Whilst poking around, I discovered these hast table functions and the macro are no longer used anywhere in the compiler. bootstraps on x86_64-unknown-linux-gnu. Probably obvious but in case I missed something... OK? Andrew * hash-table.h: Remove comment relating to deleted macro. * tree-flo

Re: [PATCH] Fixing improper conversion from sin() to sinf() in optimization mode.

2013-09-09 Thread Xinliang David Li
On Fri, Sep 6, 2013 at 3:24 PM, Cong Hou wrote: > First, thank you for your detailed comments again! Then I deeply > apologize for not explaining my patch properly and responding to your > previous comment. I didn't understand thoroughly the problem before > submitting the patch. > > Previously I

[PATCH V4 2/2] Support using 'auto' in a function parameter list to introduce an implicit template parameter.

2013-09-09 Thread Adam Butcher
* cp-tree.h (type_uses_auto_or_concept): Declare. (is_auto_or_concept): Declare. * decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with -std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions. * type-utils.h: New header defining ...

[PATCH V4 1/2] Support lambda templates.

2013-09-09 Thread Adam Butcher
* parser.c (cp_parser_lambda_declarator_opt): Accept template parameter list with std=c++1y or std=gnu++1y. (cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call operator template to avoid adding template result to symbol table. * lambda.c

V4 Lambda templates and implicit function templates.

2013-09-09 Thread Adam Butcher
Hi Jason, Here's the latest patch set; reduced to two patches now. Remaining issues: - Instantiation of generic conversion op ICEs if the call op contains declarations and hasn't already been instantiated. - Still haven't figured out a clean way to make 'auto...' work. Cheers, Adam Patch s

Re: [PATCH] Fixing improper conversion from sin() to sinf() in optimization mode.

2013-09-09 Thread Cong Hou
On Mon, Sep 9, 2013 at 6:26 PM, Xinliang David Li wrote: > On Fri, Sep 6, 2013 at 3:24 PM, Cong Hou wrote: >> First, thank you for your detailed comments again! Then I deeply >> apologize for not explaining my patch properly and responding to your >> previous comment. I didn't understand thorough

Re: [patch] Remove unused macro and functions from tree-flow.h and tree-flow-inline.h

2013-09-09 Thread Jeff Law
On 09/09/2013 06:59 PM, Andrew MacLeod wrote: Whilst poking around, I discovered these hast table functions and the macro are no longer used anywhere in the compiler. bootstraps on x86_64-unknown-linux-gnu. Probably obvious but in case I missed something... OK? If they're unused, eliminate them

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-09 Thread Kugan
On 09/09/13 19:01, Richard Biener wrote: On Mon, Sep 9, 2013 at 1:09 AM, Kugan wrote: On 06/09/13 16:16, Richard Biener wrote: On 9/3/13 2:15 PM, Kugan wrote: Thanks Richard for reviewing. On 02/09/13 22:15, Richard Biener wrote: On Wed, Jul 3, 2013 at 2:25 PM, Kugan wrote: On 17/06/

Re: Dump framework newline cleanup

2013-09-09 Thread Xinliang David Li
looks fine to me. In the long run, I wonder if the machinery in diagnostic messages can be reused for opt-info dumping -- i.e., support different streams. It has many nice features including %qD specifier for printing tree decls. David On Mon, Sep 9, 2013 at 12:01 PM, Teresa Johnson wrote: > I'

Re: [patch] Remove unused macro and functions from tree-flow.h and tree-flow-inline.h

2013-09-09 Thread Jakub Jelinek
On Mon, Sep 09, 2013 at 08:39:16PM -0600, Jeff Law wrote: > On 09/09/2013 06:59 PM, Andrew MacLeod wrote: > >Whilst poking around, I discovered these hast table functions and the > >macro are no longer used anywhere in the compiler. > >bootstraps on x86_64-unknown-linux-gnu. > >Probably obvious but

[Patch, Fortran] PR57697 - Fix an issue with defined assignment

2013-09-09 Thread Tobias Burnus
Dear all, in Fortran 2003, it can happen that for an intrinisic assignment of a derived type, the component fits to a defined assignment; in that case, the latter is invoked. gfortran implements this since GCC 4.8 (December). However, it turned out that the current algorithm doesn't work if t

<    1   2