Re: [C++0x] Range-based for statements and ADL

2011-03-29 Thread Jonathan Wakely
On 29 March 2011 01:49, Rodrigo Rivas wrote: Hi again. Here it is my first try at this. I have changed the list to gcc-patches, I don't know if cross post would be correct. Please, note that this patch is not finished: the new test cases are still missing, and expect format mistakes, 

Re: [PATCH: ARM] PR 45335 Use ldrd and strd to access two consecutive words

2011-03-29 Thread Carrot Wei
Thank you for the knowledge. I've updated the insn patterns accordingly. Again tested on arm qemu. thanks Carrot ChangeLog: 2011-03-29 Wei Guozhi car...@google.com PR target/45335 * gcc/config/arm/ldmstm.md (ldm2_ia, stm2_ia, ldm2_ib, stm2_ib, ldm2_da, stm2_da,

PING^3: PR 47551: ARM patch for Neon-related spill failure

2011-03-29 Thread Richard Sandiford
Third ping for this ARM-specific reload fix: http://gcc.gnu.org/ml/gcc-patches/2011-01/msg02266.html Thanks, Richard

Re: [patch, ARM] Fix PR48250, adjust DImode reload address legitimizing

2011-03-29 Thread Chung-Lin Tang
On 2011/3/24 06:51 PM, Richard Earnshaw wrote: On Thu, 2011-03-24 at 12:56 +0900, Chung-Lin Tang wrote: Hi, PR48250 happens under TARGET_NEON, where DImode is included within the valid NEON modes. This turns the range of legitimate constant indexes to step-4 (coproc load/store), thus

[patch] Fix PR tree-optmization/48290

2011-03-29 Thread Ira Rosen
Hi, This patch fixes the vectorizer part of PR tree-optmization/48290 by checking that if we have a phi in outer loop in the basic block after the inner loop, then this phi is really inner loop's exit phi, i.e., its operand is defined in the inner loop. Bootstrapped with vectorization enabled

Re: [patch] Fix PR48183, NEON ICE in emit-rtl.c:immed_double_const() under -g

2011-03-29 Thread Richard Sandiford
Julian Brown jul...@codesourcery.com writes: On Thu, 24 Mar 2011 10:57:06 + Richard Sandiford richard.sandif...@linaro.org wrote: Chung-Lin Tang clt...@codesourcery.com writes: PR48183 is a case where ARM NEON instrinsics, under -O -g, produce debug insns that tries to expand OImode

Re: [patch] Fix PR48183, NEON ICE in emit-rtl.c:immed_double_const() under -g

2011-03-29 Thread Richard Guenther
On Thu, Mar 24, 2011 at 11:57 AM, Richard Sandiford richard.sandif...@linaro.org wrote: Chung-Lin Tang clt...@codesourcery.com writes: PR48183 is a case where ARM NEON instrinsics, under -O -g, produce debug insns that tries to expand OImode (32-byte integer) zero constants, much too large to

[PATCH, alpha]: Fix ICE in mems_in_disjoint_alias_sets_p

2011-03-29 Thread Uros Bizjak
Hello! Attached patch fixes the same ICE as seen on sparc [1], where it was fixed by [2]. 2011-03-29 Uros Bizjak ubiz...@gmail.com * config/alpha/alpha.c (alpha_sr_alias_set): Don't define. (alpha_option_override): Don't set alpha_sr_alias_set. (emit_frame_store_1):

[PATCH, PR 48195] Move around ipa_check_create_node_params and ipa_check_create_edge_args

2011-03-29 Thread Martin Jambor
Hi, PR 48195 happens because analyze_node in ipa-inline can be called from add_new_function hook and thus bypass calls for ipa_check_create_node_params and ipa_check_create_edge_args in inline_generate_summary. The two functions are required to reallocate info arrays if necessary before calling

Re: [patch] Fix PR48183, NEON ICE in emit-rtl.c:immed_double_const() under -g

2011-03-29 Thread Richard Sandiford
Richard Guenther richard.guent...@gmail.com writes: On Thu, Mar 24, 2011 at 11:57 AM, Richard Sandiford richard.sandif...@linaro.org wrote: Chung-Lin Tang clt...@codesourcery.com writes: PR48183 is a case where ARM NEON instrinsics, under -O -g, produce debug insns that tries to expand OImode

Re: Cleaning up expand optabs code

2011-03-29 Thread Mikael Pettersson
Richard Sandiford writes: Andreas Krebbel kreb...@linux.vnet.ibm.com writes: On 03/22/2011 06:48 PM, Richard Henderson wrote: Ok. Watch out for other target problems this week. This unfortunately broke bootstrap on s390. This is PR 48263. Since it seems to be affecting

Re: [patch] Fix PR48183, NEON ICE in emit-rtl.c:immed_double_const() under -g

2011-03-29 Thread Richard Guenther
On Tue, Mar 29, 2011 at 1:52 PM, Richard Sandiford richard.sandif...@linaro.org wrote: Richard Guenther richard.guent...@gmail.com writes: On Thu, Mar 24, 2011 at 11:57 AM, Richard Sandiford richard.sandif...@linaro.org wrote: Chung-Lin Tang clt...@codesourcery.com writes: PR48183 is a case

[Patch] improve bfin conditional move support

2011-03-29 Thread Henderson, Stuart
The attached patch improves conditional move mode support for Blackfin. 2011-03-29 Stuart Henderson stuart.hender...@analog.com From Bernd Schmidt: * config/bfin/bfin.md (MOVCC): New mode_macro. (movmodecc_insn1, movmodecc_insn2, movmodecc): Renamed from movsicc_insn1,

Re: Cleaning up expand optabs code

2011-03-29 Thread Richard Sandiford
Mikael Pettersson mi...@it.uu.se writes: Richard Sandiford writes: Andreas Krebbel kreb...@linux.vnet.ibm.com writes: On 03/22/2011 06:48 PM, Richard Henderson wrote: Ok. Watch out for other target problems this week. This unfortunately broke bootstrap on s390. This

C++ PATCHes for c++/48296 (constexpr function returning current class)

2011-03-29 Thread Jason Merrill
In 48296, the problem was that we were checking the parameter and return types for literality too soon; we don't know whether the current class is literal until we're done defining it. So let's be more patient about checking. The second patch changes the validation errors to point at the

[patch] Introduce -Wstack-usage

2011-03-29 Thread Eric Botcazou
Hi, in the wake of the -fstack-usage switch that was introduced in GCC 4.6, I'm proposing the associated -Wstack-usage warning. GCC already has had something related for quite some time: `-Wframe-larger-than=LEN' Warn if the size of a function frame is larger than LEN bytes. The

Re: Cleaning up expand optabs code

2011-03-29 Thread Mikael Pettersson
Richard Sandiford writes: Mikael Pettersson mi...@it.uu.se writes: Richard Sandiford writes: Andreas Krebbel kreb...@linux.vnet.ibm.com writes: On 03/22/2011 06:48 PM, Richard Henderson wrote: Ok. Watch out for other target problems this week. This

Re: [patch, ARM] Fix PR48250, adjust DImode reload address legitimizing

2011-03-29 Thread Richard Earnshaw
On Tue, 2011-03-29 at 18:25 +0800, Chung-Lin Tang wrote: On 2011/3/24 06:51 PM, Richard Earnshaw wrote: On Thu, 2011-03-24 at 12:56 +0900, Chung-Lin Tang wrote: Hi, PR48250 happens under TARGET_NEON, where DImode is included within the valid NEON modes. This turns the range of

Re: PING^3: PR 47551: ARM patch for Neon-related spill failure

2011-03-29 Thread Nick Clifton
Hi Richard, Third ping for this ARM-specific reload fix: http://gcc.gnu.org/ml/gcc-patches/2011-01/msg02266.html Tested on arm-linux-gnueabi (-marm and -mthumb). I don't think this is a regression, so: OK to install once 4.7 is open? Yes. gcc/ PR target/47551 *

Some remodelling of the ARM vld and vst patterns

2011-03-29 Thread Richard Sandiford
The patterns for the Neon vld and vst intrinsics use the following sort of construct to refer to memory: (mem:FOO (match_operand:SI X register_operand r)) This patch changes them to use: (match_operand:FOO' X neon_struct_operand (=)Um) instead. This has some performance benefits: -

Re: [patch, ARM] Fix PR48250, adjust DImode reload address legitimizing

2011-03-29 Thread Chung-Lin Tang
On 2011/3/29 下午 10:26, Richard Earnshaw wrote: On Tue, 2011-03-29 at 18:25 +0800, Chung-Lin Tang wrote: On 2011/3/24 06:51 PM, Richard Earnshaw wrote: On Thu, 2011-03-24 at 12:56 +0900, Chung-Lin Tang wrote: Hi, PR48250 happens under TARGET_NEON, where DImode is included within the valid

Restore SPARC bootstrap (PR bootstrap/48337)

2011-03-29 Thread Rainer Orth
As described in the PR, SPARC bootstrap is currently broken. This patch, derived from Joseph's hint, fixes this. I'm now into stage 3 on sparc-sun-solaris2.11, ok for mainline once that is completed? I don't expect problems for the target libraries and would like to restore bootstrap ASAP.

[Patch] Bfin: Ensure rotrsi and rotlsi don't accept non-const INTVALS

2011-03-29 Thread Henderson, Stuart
The attached patch ensures rotrsi and rotlsi don't accept non-const INTVALS. 2011-03-29 Stuart Henderson stuart.hender...@analog.com From Bernd Schmidt * config/bfin/bfin.md (rotrsi, rotlsi): Don't take INTVAL of anything that's not CONST_INT. Thanks, Stu upstream.patch

[PATCH] Another EQ/NE folder type fix (PR c/48305)

2011-03-29 Thread Jakub Jelinek
Hi! I've left these 4 out because I thought they should be fine given that the other operands are equal. But the testcase shows I was wrong. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2011-03-29 Jakub Jelinek ja...@redhat.com PR c/48305

[PATCH] -E/-save-temps locus fix (PR preprocessor/48248)

2011-03-29 Thread Jakub Jelinek
Hi! My PR41445 fix apparently sometimes results in wrong locus. The problem is if we switch temporarily to a locus of some token from a header file (PR41445 was fixing a problem where -save-temps behaved differently then normal compilation as locuses were different) and the line in the header

Re: [PATCH, alpha]: Fix ICE in mems_in_disjoint_alias_sets_p

2011-03-29 Thread Richard Henderson
On 03/29/2011 04:26 AM, Uros Bizjak wrote: 2011-03-29 Uros Bizjak ubiz...@gmail.com * config/alpha/alpha.c (alpha_sr_alias_set): Don't define. (alpha_option_override): Don't set alpha_sr_alias_set. (emit_frame_store_1): Use gen_frame_mem rather than calling

Re: [C++0x] Range-based for statements and ADL

2011-03-29 Thread Rodrigo Rivas
On Tue, Mar 29, 2011 at 5:46 PM, Gabriel Dos Reis g...@integrable-solutions.net wrote: or new-style for loop? Well, that is what they are called in Java, isn't it? And the syntax is just the same, so it would make kind of sense. But in the C++0x draft and the GCC docs it is almost always called

a tiny patch for IRA

2011-03-29 Thread Vladimir Makarov
I found that parent_max variable can be not used by code in macro SET_MINMAX_SET_BIT if release mode is used. That results in generation of an unnecessary warning. The following patch removes the warning and is committed as obvious. 2011-03-29 Vladimir Makarov vmaka...@redhat.com *

Re: [PATCH] -E/-save-temps locus fix (PR preprocessor/48248)

2011-03-29 Thread Joseph S. Myers
On Tue, 29 Mar 2011, Jakub Jelinek wrote: Hi! My PR41445 fix apparently sometimes results in wrong locus. The problem is if we switch temporarily to a locus of some token from a header file (PR41445 was fixing a problem where -save-temps behaved differently then normal compilation as

[cxx-mem-model] bitfield tests

2011-03-29 Thread Aldy Hernandez
[Language lawyers, please correct me if I have mis-interpreted the upcoming standard in any way.] In the C++ memory model, contiguous bitfields comprise a single memory location, so it's fair game to bit twiddle them when setting them. For example: struct { unsigned

Re: [x32] PATCH: PR middle-end/47725: [x32] error: unable to find a register to spill in class DIREG

2011-03-29 Thread H.J. Lu
On Thu, Mar 24, 2011 at 8:51 AM, Eric Botcazou ebotca...@adacore.com wrote: Pointer is promoted to Pmode from ptr_mode. Indeed.  However the problem is the 2 in assign_parm_setup_reg:  /* Store the parm in a pseudoregister during the function, but we may     need to do it in a wider mode.  

Re: [testsuite] Fix gcc.dg/torture/pr47917.c on IRIX 6.5

2011-03-29 Thread Steve Ellcey
On Fri, Mar 25, 2011 at 4:27 PM, Rainer Orth wrote: The new gcc.dg/torture/pr47917.c test currently fails the execution test on IRIX 6.5. To get a C99-conformant snprintf, one needs to include stdio.h with _XOPEN_SOURCE defined as 500. The following patch does this. Rainer, This patch

Re: [testsuite] Fix gcc.dg/torture/pr47917.c on IRIX 6.5

2011-03-29 Thread Rainer Orth
Steve, This patch re-broke pr47917.c on HP-UX because it doesn't see the snprintf prototype in stdio.h when using -std=c99. I do see it if I use sorry for that. I noticed later that this standards-conformant snprintf business is a total mess on several platforms (e.g. it also fails on Tru64

C++ PATCH for c++/48319 (ICE with value-dependent call)

2011-03-29 Thread Jason Merrill
In this testcase, we were failing to consider declval_Args1 as value-dependent, even though it is due to the use of a type parameter. We previously just handled TEMPLATE_ID_EXPR as a normal binary expression and assumed that a TREE_VEC was always non-dependent. Tested x86_64-pc-linux-gnu,

Re: Prune empty cases from toplevel configure.ac

2011-03-29 Thread Nathanael Nerode (GCC)
On 03/21/2011 06:41 AM, Joseph S. Myers wrote: This patch, relative to a tree with my deprecated targets removal patch http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01088.html applied, further cleans up the toplevel configure.ac by removing empty cases from a case statement. The original

Re: More toplevel configure.ac pruning

2011-03-29 Thread Nathanael Nerode (GCC)
On 03/25/2011 07:33 AM, Joseph S. Myers wrote: -# Some tools are only suitable for building in a native situation. -# Remove these if host!=target. -native_only=autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff

RFA: patch to solve PR 48331 and PR 48334 in IRA

2011-03-29 Thread Vladimir Makarov
The following patch solves PR 48331 and PR 48334. The problem was in that allocno profitable hard regs were not set up for priority colouring and function assign_hard_reg used a garbage in its decisions generating wrong code or code of awful quality. Is it ok to commit? 2011-03-29 Vladimir

go patch committed: Recognize new tests in go-test.exp

2011-03-29 Thread Ian Lance Taylor
This patch updates go-test.exp to recognize various new tests I am about to commit. Ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian 2011-03-29 Ian Lance Taylor i...@google.com * go.test/go-test.exp: Handle the test lines used in several new tests.

Go patch committed: Update testsuite

2011-03-29 Thread Ian Lance Taylor
I committed a patch to update the Go testsuite to the master sources. Ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian foo.patch.bz2 Description: patch

Re: RFA: patch to solve PR 48331 and PR 48334 in IRA

2011-03-29 Thread Bernd Schmidt
On 03/29/2011 09:54 PM, Vladimir Makarov wrote: The following patch solves PR 48331 and PR 48334. The problem was in that allocno profitable hard regs were not set up for priority colouring and function assign_hard_reg used a garbage in its decisions generating wrong code or code of awful

Re: Tweak ARM vld3q and vld4q patterns

2011-03-29 Thread Ramana Radhakrishnan
Tested on arm-linux-gnueabi. OK to install? Thanks for this - yes , this is ok for trunk. It fixes PR43590 as well. cheers Ramana Richard gcc/ * config/arm/neon.md (neon_vld3qamode, neon_vld4qamode): Remove operand 1 and reshuffle the operands to match.

Continue toplevel cleanup (GCC library handling for unsupported targets etc.)

2011-03-29 Thread Joseph S. Myers
This patch continues cleaning up the toplevel configure.ac, in particular as regards cases handling GCC libraries for targets where GCC is no longer (or never was) supported. The principle there, as discussed for the original deprecated targets removal patch, is that in the absence of GCC

Re: [testsuite] Fix gcc.dg/torture/pr47917.c on IRIX 6.5

2011-03-29 Thread Steve Ellcey
On Tue, 2011-03-29 at 19:50 +0200, Rainer Orth wrote: /* { dg-options -std=gnu99 { target *-*-hpux* } } */ Alternatively, the mips-sgi-irix6.5 variant might work, too. Either patch is preapproved if this works for you. Thanks. Rainer I went with the -std=gnu99 option. Here is

Re: [PING][PATCH, testsuite] Update gcc.dg/stack-usage-1.c SIZE values for powerpc

2011-03-29 Thread Peter Bergner
On Tue, 2011-03-29 at 13:20 -0700, Mike Stump wrote: On Mar 29, 2011, at 5:14 AM, Peter Bergner wrote: Mike and David, I assume the updated patch below is ok for mainline? Ok. I applied it for you... I'm assuming you don't have write after yet... Thanks for all the work. I do have svn

Re: Continue toplevel cleanup (GCC library handling for unsupported targets etc.)

2011-03-29 Thread Joseph S. Myers
On Tue, 29 Mar 2011, Joseph S. Myers wrote: Other cleanups here: Also: bfin-*-* had code relating to target-bsp and target-cygmon, but there is no actual Makefile.* support for building those, so the code relating to them in configure.ac is removed. -- Joseph S. Myers

Re: [C++0x] Range-based for statements and ADL

2011-03-29 Thread Jonathan Wakely
On 29 March 2011 21:33, Rodrigo Rivas wrote: On Tue, Mar 29, 2011 at 8:22 PM, Jonathan Wakely jwakely@gmail.com wrote: How about No suitable %begin% and %end% functions found for range expression of type %qT in %for% statement ? Nice. But the problem here is that there are a lot of

Re: Cleaning up expand optabs code

2011-03-29 Thread Richard Henderson
On 03/29/2011 06:21 AM, Richard Sandiford wrote: - enum machine_mode mode0 = insn_data[(int) icode].operand[1].mode; - enum machine_mode mode1 = insn_data[(int) icode].operand[2].mode; - enum machine_mode tmp_mode; + enum machine_mode xmode0 = insn_data[(int) icode].operand[1].mode; +

Make option flags consistently unsigned

2011-03-29 Thread Joseph S. Myers
This patch makes variables, fields, parameters and macros used for command-line option flags consistently unsigned. In most places they were already unsigned, but the CL_* values themselves were signed and some other places used signed int for flags. As noted in

Re: Restore SPARC bootstrap (PR bootstrap/48337)

2011-03-29 Thread Eric Botcazou
I'm now into stage 3 on sparc-sun-solaris2.11, ok for mainline once that is completed? I don't expect problems for the target libraries and would like to restore bootstrap ASAP. IMO this was on the obvious side, but... 2011-03-29 Joseph Myers jos...@codesourcery.com Rainer Orth

Re: [C++0x] Range-based for statements and ADL

2011-03-29 Thread Rodrigo Rivas
On Tue, Mar 29, 2011 at 11:13 PM, Jonathan Wakely jwakely@gmail.com wrote: Thank you for your suggestions! IMO, error cases 3 (hey, two 3s!), 4 and 6 are not so likely, as including any STL container header will make a begin and an end functions declared, though maybe not usabe. In these cases

Re: [PATCH, ARM] PR47855 Compute attr length for some thumb2 insns

2011-03-29 Thread Ramana Radhakrishnan
Hi Carrot, On 26/03/11 15:14, Carrot Wei wrote: Index: arm.md === --- arm.md (revision 171337) +++ arm.md (working copy) @@ -7115,7 +7115,18 @@ @ cmp%?\\t%0, %1 cmn%?\\t%0, #%n1 - [(set_attr conds set)] +

Re: RFA: patch to solve IRA PR48336, PR48342, PR48345

2011-03-29 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/29/11 19:28, Vladimir Makarov wrote: The following patch is to solve PR48336, PR48342, PR48345. The profitable hard regs exclude hard regs which are prohibited for the corresponding allocno mode. It is true for primary allocation and it is

Re: RFA: patch to solve IRA PR48336, PR48342, PR48345

2011-03-29 Thread Hans-Peter Nilsson
On Tue, 29 Mar 2011, Vladimir Makarov wrote: 2011-03-29 Vladimir Makarov vmaka...@redhat.com PR target/48336 PR middle-end/4834 (A typo here, 48342. Or maybe also needed for 48334?) PR rtl-optimization/48345 * ira-color.c (setup_conflict_profitable_regs):

C++ PATCH for c++/48265 (ICE with variable used in its own initializer)

2011-03-29 Thread Jason Merrill
We were infinitely recursing in value_dependent_expression_p. As it happens, we're already doing the heavy lifting for determining whether or not a potentially constant variable has a constant initializer, so we can just use decl_constant_var_p here. Tested x86_64-pc-linux-gnu, applied to

Merged mainline to gccgo branch

2011-03-29 Thread Ian Lance Taylor
I merged revsion mainline revision 171700 to the gccgo branch. Ian

Re: [PATCH, ARM] PR47855 Compute attr length for some thumb2 insns

2011-03-29 Thread Chung-Lin Tang
On 2011/3/30 06:35 AM, Ramana Radhakrishnan wrote: Hi Carrot, On 26/03/11 15:14, Carrot Wei wrote: Index: arm.md === --- arm.md(revision 171337) +++ arm.md(working copy) @@ -7115,7 +7115,18 @@ @ cmp%?\\t%0,