PowerPC prologue and epilogue 6

2012-04-21 Thread Alan Modra
This patch adds out-of-line vector saves and restores. To do this I made some infrastructure changes to various functions like rs6000_emit_savres_rtx that currently take boolean parameters (savep, gpr, and lr). Rather than add yet another boolean to specify vector regs, I chose to lump them all

Re: [libcpp] maybe canonicalize system paths in line-map

2012-04-21 Thread Manuel López-Ibáñez
Ping: http://gcc.gnu.org/ml/gcc-patches/2012-04/msg00903.html On 15 April 2012 20:44, Manuel López-Ibáñez lopeziba...@gmail.com wrote: This patch tries to store the shortest form of a path to a system file, either the original given or the canonical form returned by realpath. User files are

[C] improve missing initializers diagnostics

2012-04-21 Thread Manuel López-Ibáñez
This patch improves missing initializers diagnostics. From: pr36446.c:13:3: warning: missing initializer [-Wmissing-field-initializers] .h = {1}, ^ pr36446.c:13:3: warning: (near initialization for ‘m0.h.b’) [-Wmissing-field-initializers] .h = {1}, ^ to: pr36446.c:13:3: warning:

Re: [libcpp] maybe canonicalize system paths in line-map

2012-04-21 Thread Jonathan Wakely
I think this patch is a *huge* improvement for C++ diagnostics that refer to standard library files, I really hope it will be approved in some form. On 21 April 2012 12:58, Manuel López-Ibáñez lopeziba...@gmail.com wrote: Ping: http://gcc.gnu.org/ml/gcc-patches/2012-04/msg00903.html On 15

Re: [RFA, C++] Symbol table 12/many: Remove cxx_analyze_expr hook

2012-04-21 Thread Jason Merrill
OK. Jason

Re: [C/ObjC/C++/ObjC++] cleanup diagnostics initialization

2012-04-21 Thread Manuel López-Ibáñez
I created PR 53061 to track this. I prefer to focus on other things, so feel free to take the patch there and do whatever you need to get it approved. Cheers, Manuel.

Re: [libcpp] maybe canonicalize system paths in line-map

2012-04-21 Thread Jason Merrill
It seems like we'll do this for every line in the header, which could lead to a lot of leaked memory. Instead, we should canonicalize when setting ORDINARY_MAP_FILE_NAME. Jason

Re: [RFA, C++] Symbol table 12/many: Remove cxx_analyze_expr hook

2012-04-21 Thread Jan Hubicka
Jason, thank you. My goal is to get rid of places where C++ FE is forcing symbols to be output unconditoinally. I think the remaining cases are those where mark_decl_referenced is called. My understnading is that those are 1) COMDAT symbols that must be output because they are keyed, but for

Re: [libcpp] maybe canonicalize system paths in line-map

2012-04-21 Thread Manuel López-Ibáñez
On 21 April 2012 14:56, Jason Merrill ja...@redhat.com wrote: It seems like we'll do this for every line in the header, which could lead to a lot of leaked memory.  Instead, we should canonicalize when setting ORDINARY_MAP_FILE_NAME. Hum, my understanding of the code is that this is exactly

[RFC] improve caret diagnostics for overload failures

2012-04-21 Thread Manuel López-Ibáñez
As noticed by Jason in PR 2485. The current output with caret diagnostics is a bit verbose in some cases: wa2.C: In function ‘int main()’: wa2.C:6:6: error: no matching function for call to ‘f(int)’ f(1); ^ wa2.C:6:6: note: candidates are: f(1); ^ wa2.C:1:6: note: void f() void

[C/C++] Do not pretty-print expressions with caret diagnostics for wrong function call

2012-04-21 Thread Manuel López-Ibáñez
This patch avoids pretty-printing expressions when the caret is enabled for the error given when calling as a function something that is not a function. This fixes (when caret is enabled) the bugs described in PR35441 and also shown here http://clang.llvm.org/diagnostics.html (No Pretty Printing

Re: [RFC] improve caret diagnostics for overload failures

2012-04-21 Thread Gabriel Dos Reis
Do no use 'char' as the type of a flag. Prefer 'unsigned int'. On Sat, Apr 21, 2012 at 8:57 AM, Manuel López-Ibáñez lopeziba...@gmail.com wrote: As noticed by Jason in PR 2485. The current output with caret diagnostics is a bit verbose in some cases: wa2.C: In function ‘int main()’:

Re: [RFC] improve caret diagnostics for overload failures

2012-04-21 Thread Manuel López-Ibáñez
On 21 April 2012 16:22, Gabriel Dos Reis g...@integrable-solutions.net wrote: Do no use 'char' as the type of a flag.  Prefer 'unsigned int'. Thanks, good catch! Should I worry about memory here and use something shorter? Cheers, Manuel.

Re: [C/C++] Do not pretty-print expressions with caret diagnostics for wrong function call

2012-04-21 Thread Manuel López-Ibáñez
Hi Gabriel, I hope you meant to send this OK also to gcc-patches. Cheers, Manuel. On 21 April 2012 16:25, Gabriel Dos Reis g...@integrable-solutions.net wrote: OK. On Sat, Apr 21, 2012 at 9:06 AM, Manuel López-Ibáñez lopeziba...@gmail.com wrote: This patch avoids pretty-printing

Re: [C/C++] Do not pretty-print expressions with caret diagnostics for wrong function call

2012-04-21 Thread Gabriel Dos Reis
On Sat, Apr 21, 2012 at 9:41 AM, Manuel López-Ibáñez lopeziba...@gmail.com wrote: Hi Gabriel, I hope you meant to send this OK also to gcc-patches. Indeed. Cheers, Manuel. On 21 April 2012 16:25, Gabriel Dos Reis g...@integrable-solutions.net wrote: OK. On Sat, Apr 21, 2012 at 9:06

Re: [RFC] improve caret diagnostics for overload failures

2012-04-21 Thread Jakub Jelinek
On Sat, Apr 21, 2012 at 04:26:32PM +0200, Manuel López-Ibáñez wrote: On 21 April 2012 16:22, Gabriel Dos Reis g...@integrable-solutions.net wrote: Do no use 'char' as the type of a flag.  Prefer 'unsigned int'. Thanks, good catch! Should I worry about memory here and use something

Re: [RFC] improve caret diagnostics for overload failures

2012-04-21 Thread Gabriel Dos Reis
On Sat, Apr 21, 2012 at 9:42 AM, Jakub Jelinek ja...@redhat.com wrote: On Sat, Apr 21, 2012 at 04:26:32PM +0200, Manuel López-Ibáñez wrote: On 21 April 2012 16:22, Gabriel Dos Reis g...@integrable-solutions.net wrote: Do no use 'char' as the type of a flag.  Prefer 'unsigned int'.

[PATCH] genattrtab: avoid NULL-deref on error

2012-04-21 Thread Jim Meyering
I see that no one responded when I posted this in February. Ok to commit, now? 2012-02-24 Jim Meyering meyer...@redhat.com * genattrtab.c (gen_attr): Avoid NULL-deref after diagnosing absence of an define_enum call. diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index

Re: [PATCH] Fix PR53011

2012-04-21 Thread H.J. Lu
On Tue, Apr 17, 2012 at 6:38 AM, Richard Guenther rguent...@suse.de wrote: This fixes PR53011 - EH cleanup needs to cater for loops now (or avoid some transforms). Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. This caused:

Re: [C/C++] Do not pretty-print expressions with caret diagnostics for wrong function call

2012-04-21 Thread Jakub Jelinek
On Sat, Apr 21, 2012 at 04:06:17PM +0200, Manuel López-Ibáñez wrote: This patch avoids pretty-printing expressions when the caret is enabled for the error given when calling as a function something that is not a function. This fixes (when caret is enabled) the bugs described in PR35441 and

Re: [PATCH] Fix PR53011

2012-04-21 Thread H.J. Lu
On Sat, Apr 21, 2012 at 10:19 AM, H.J. Lu hjl.to...@gmail.com wrote: On Tue, Apr 17, 2012 at 6:38 AM, Richard Guenther rguent...@suse.de wrote: This fixes PR53011 - EH cleanup needs to cater for loops now (or avoid some transforms). Bootstrapped and tested on x86_64-unknown-linux-gnu,

Re: rfa: vectorize strided loads [2/2] [PR 18437]

2012-04-21 Thread H.J. Lu
On Tue, Apr 10, 2012 at 6:46 AM, Michael Matz m...@suse.de wrote: Hi, Michael.        PR tree-optimization/18437        * tree-vectorizer.h (_stmt_vec_info.stride_load_p): New member.        (STMT_VINFO_STRIDE_LOAD_P): New accessor.        (vect_check_strided_load): Declare.        *

Re: rfa: vectorize strided loads [2/2] [PR 18437]

2012-04-21 Thread H.J. Lu
On Sat, Apr 21, 2012 at 11:11 AM, H.J. Lu hjl.to...@gmail.com wrote: On Tue, Apr 10, 2012 at 6:46 AM, Michael Matz m...@suse.de wrote: Hi, Michael.        PR tree-optimization/18437        * tree-vectorizer.h (_stmt_vec_info.stride_load_p): New member.        (STMT_VINFO_STRIDE_LOAD_P):

libgo patch committed: More syscall package improvements

2012-04-21 Thread Ian Lance Taylor
This patch to libgo brings the syscall package closer to the one provided on GNU/Linux systems by the master Go library. This is mostly additional constants, but also corrects the Tgkill and Mount functions. This an incremental step; there is more work to do. Bootstrapped and ran Go testsuite on

[committed] Restore fold checking

2012-04-21 Thread Richard Sandiford
Noticed after making yes,rtl,df,fold my default --enable-checking option (the rtl and df bits being long overdue). Bootstrapped regression-tested on x86_64-linux-gnu and installed as obvious. Richard gcc/ * fold-const.c (fold_checksum_tree): Fix VECTOR_CST case. Index:

[committed] Clean up ADDRESS handling in alias.c, take 2

2012-04-21 Thread Richard Sandiford
To compound my woe on this one: it turns out that there's also a use of ADDRESS in store-motion.c. Obviously a very poor grep session on my part. dse.c and store-motion.c are checking for the same thing, and they are also the only two external users of find_base_term. It seemed better to define

Re: [PATCH] Fix parts of PR52975

2012-04-21 Thread H.J. Lu
On Mon, Apr 16, 2012 at 2:22 AM, Richard Guenther rguent...@suse.de wrote: When looking at the code we produce from if-conversion and vectorization I noticed several things.  For one, we are not handling TARGET_MEM_REF in operand_equal_p which means that DOM does not clean up loads/stores of

Re: [PATCH][1/2] Fix PR44688, set and preserve the maximum iterations of vectorizer prologue loops

2012-04-21 Thread H.J. Lu
On Wed, Apr 18, 2012 at 4:30 AM, Richard Guenther rguent...@suse.de wrote: Finally. Boostrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2012-04-18  Richard Guenther  rguent...@suse.de        PR tree-optimization/44688        * cfgloop.h (record_niter_bound):

Re: [PATCH] Fix PR53031

2012-04-21 Thread H.J. Lu
On Thu, Apr 19, 2012 at 5:47 AM, Richard Guenther rguent...@suse.de wrote: This fixes PR53031 and reverts back to using the number of latch iterations in VRP when computing ranges for induction variables. Now after ira_allocno_object_iter_cond is fixed this no longer breaks bootstrap.

Re: [C/C++] Do not pretty-print expressions with caret diagnostics for wrong function call

2012-04-21 Thread Manuel López-Ibáñez
On 21 April 2012 18:49, Jakub Jelinek ja...@redhat.com wrote: Before we start to add many similar tests, I wonder if we shouldn't test not just that caret diagnostics is on, but that it will be actually printed for the specific locus.  The source could come up from stdin, or the file no

Re: [C/C++] Do not pretty-print expressions with caret diagnostics for wrong function call

2012-04-21 Thread Gabriel Dos Reis
I don't think the proper fix is to copy Clang. Clang isn't the gold standard and we shouldn't act as if it was. When caret is not enable, the diagnostic should mention clearly the elements in the input expressions that are problematic without getting obtuse or elliptic -- two extremes easy to