[PATCH][RFC] Sanitize POINTER_PLUS_EXPR offset operand requirements

2011-06-17 Thread Richard Guenther
This implements my idea of how POINTER_PLUS_EXPR should end up being changed. This addresses two things, 1) reduce the use of sizetype nodes, 2) properly handle targets where sizeof (void *) != sizeof (sizetype). Especially 2) is important as currently we lose information about the signedness

Re: PING: PATCH: PR other/49325: Incorrect target HAVE_INITFINI_ARRAY check

2011-06-17 Thread Paolo Bonzini
Why are you not changing the gcc_AC_ macro and instead introducing duplicate code? Perhaps the right solution is to add a final argument to the AC_RUN_IFELSE macro (don't know, I should be on holiday and hence I do not have the source code at hand :)); in any case this is _not_ how you add tests

Re: [PATCH PR45098] Disallow NULL pointer in pointer arithmetic

2011-06-17 Thread Richard Guenther
On Fri, Jun 17, 2011 at 12:40 PM, Tom de Vries vr...@codesourcery.com wrote: On 06/17/2011 12:01 AM, Jeff Law wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/16/11 00:39, Tom de Vries wrote: Hi, Consider the following example. extern unsigned int foo (int*)

Re: [PATCH PR45098] Disallow NULL pointer in pointer arithmetic

2011-06-17 Thread Zdenek Dvorak
Interesting.  I'd never thought about the generation/use angle to prove a pointer was non-null.  ISTM we could use that same logic to infer that more pointers are non-null in extract_range_from_binary_expr. Interested in tackling that improvement, obviously as an independent patch?

Re: [PATCH PR45098] Disallow NULL pointer in pointer arithmetic

2011-06-17 Thread Richard Guenther
2011/6/17 Zdenek Dvorak rakd...@kam.mff.cuni.cz: Interesting.  I'd never thought about the generation/use angle to prove a pointer was non-null.  ISTM we could use that same logic to infer that more pointers are non-null in extract_range_from_binary_expr. Interested in tackling that

Re: [PATCH]: Pass -no_pie on SYSTEMSPEC for darwin11

2011-06-17 Thread IainS
Hi Jack, On 17 Jun 2011, at 03:21, Jack Howarth wrote: The gcj compiler needs to pass -no_pie for linkage on darwin11 due to the new -pie default of the linker. The attached patch accomplishes this by passing -no_pie on SYSTEMSPEC for *-*-darwin[12]*. Since Darwin10 supports -no_pie in

Re: [PATCH PR45098] Disallow NULL pointer in pointer arithmetic

2011-06-17 Thread Zdenek Dvorak
Hi, Index: tree-vrp.c === --- tree-vrp.c  (revision 173703) +++ tree-vrp.c  (working copy) @@ -2273,7 +2273,12 @@ extract_range_from_binary_expr (value_ra        {          /* For pointer types, we are really

Re: [pph] Fix cxx_binding streaming logic (issue4646041)

2011-06-17 Thread Diego Novillo
On Thu, Jun 16, 2011 at 18:57, Gabriel Charette gch...@google.com wrote: At the end of pph_out_cxx_binding I could also simply do pph_out_uchar (stream, PPH_RECORD_END); instead of pph_out_cxx_binding_1 (stream, NULL, ref_p); which has the exact same effect. That's fine. I kind of prefer

Re: [PATCH PR45098] Disallow NULL pointer in pointer arithmetic

2011-06-17 Thread Richard Guenther
2011/6/17 Zdenek Dvorak rakd...@kam.mff.cuni.cz: Hi, Index: tree-vrp.c === --- tree-vrp.c  (revision 173703) +++ tree-vrp.c  (working copy) @@ -2273,7 +2273,12 @@ extract_range_from_binary_expr (value_ra        {

Re: [Patch, AVR]: QI builtins for parity, popcount, 1 n

2011-06-17 Thread Joseph S. Myers
On Fri, 17 Jun 2011, Georg-Johann Lay wrote: I don't see what's bat with the patch, it's straight forward. C is a high-level language, defined in terms of high-level semantics rather than machine instructions. C code should be written where possible using machine-independent functionality,

[PATCH] Fix ICEs with out of range immediates in SSE*/AVX*/XOP* intrinsics (PR target/49411)

2011-06-17 Thread Jakub Jelinek
On Fri, Jun 17, 2011 at 01:31:14AM +0200, Jakub Jelinek wrote: Not here, those are handled by ix86_expand_args_builtin instead of ix86_expand_multi_arg_builtin. Furthermore, only CODE_FOR_vcvtps2ph and CODE_FOR_vcvtps2ph256 have CONST_INT argument. And I believe ix86_expand_args_builtin

Re: unwinding fallback for mips-irix6 n32

2011-06-17 Thread Rainer Orth
Hi Olivier, Rainer Orth wrote: I've finally gotten around to this. Apart from some comment and code cleanups along the lines of the sol2-unwind.h files, I had to minimally adapt the N32 multithreaded code sequence for IRIX 6.5.30 that I'm running here. While I was at it, I added N64

Re: avx2 branch is created

2011-06-17 Thread Jason Merrill
On 06/17/2011 12:32 AM, H.J. Lu wrote: Jason, can you add it to git mirror? Done. Jason

Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10))

2011-06-17 Thread Michael Matz
Hi, On Thu, 16 Jun 2011, Richard Guenther wrote: If people want to not create useless conversions in the first place, though, I suspect there are lots of places that create useless conversions in the compiler. Yeah, the above looks it comes from the frontends - gimplification should

Re: [PATCH]: Pass -no_pie on SYSTEMSPEC for darwin11

2011-06-17 Thread Jack Howarth
/libexec/gcc/x86_64-apple-darwin11.0.0/4.7.0/lto-wrapper Target: x86_64-apple-darwin11.0.0 Configured with: ../gcc-4.7-20110617/configure --prefix=/sw --prefix=/sw/lib/gcc4.7 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.7/info --enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/sw

Re: [Patch, AVR]: PR49313, fix PR29524

2011-06-17 Thread Richard Henderson
On 06/17/2011 02:20 AM, Georg-Johann Lay wrote: Richard Henderson schrieb: On 06/15/2011 02:47 AM, Georg-Johann Lay wrote: +#if defined (L_loop_ffsqi2) +;; Helper for ffshi2, ffssi2 +;; r25:r24 = r26 + zero_extend16 (ffs8(r24)) +;; r24 must be != 0 +;; clobbers: r26 +DEFUN __loop_ffsqi2

Re: [Patch, AVR]: PR49313, fix PR29524

2011-06-17 Thread Georg-Johann Lay
Richard Henderson schrieb: On 06/17/2011 02:20 AM, Georg-Johann Lay wrote: Richard Henderson schrieb: On 06/15/2011 02:47 AM, Georg-Johann Lay wrote: Yes, you are right. Following patchlet ok? Johann * config/avr/libgcc.S (__ctzsi2, __ctzhi2): Map zero to 255. You'd also

Re: [PATCH]: Pass -no_pie on SYSTEMSPEC for darwin11

2011-06-17 Thread Mike Stump
On Jun 16, 2011, at 7:21 PM, Jack Howarth wrote: The gcj compiler needs to pass -no_pie for linkage on darwin11 due to the new -pie default of the linker. The attached patch accomplishes this by passing -no_pie on SYSTEMSPEC for *-*-darwin[12]*. Since Darwin10 supports -no_pie in its

[PATCH] parallelize g++ testing a bit more

2011-06-17 Thread Nathan Froyd
I've done a lot of g++-only testsuite runs lately and I noticed that it didn't parallelize all that well. The patch below adds a couple more .exp files to the parallel infrastructure. dg-torture.exp is the big one; it takes about as much time as old-deja.exp. Other valid candidates are lto.exp

Re: [PATCH PR45098] Disallow NULL pointer in pointer arithmetic

2011-06-17 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/17/11 08:12, Zdenek Dvorak wrote: if we do, we definitely should not -- the only point of such a construction is to bypass the pointer arithmetics restrictions, Ok, we don't. Where does the C standard say that NULL + 0 is undefined? I

Re: [PATCH, PR 49089] Don't split AVX256 unaligned loads by default on bdver1 and generic

2011-06-17 Thread H.J. Lu
On Fri, Jun 17, 2011 at 10:45 AM, Fang, Changpeng changpeng.f...@amd.com wrote: Why not just move AVX256_SPLIT_UNALIGNED_STORE and AVX256_SPLIT_UNALIGNED_LOAD to ix86_tune_indices? I would like to keep the -m option so that at least we can explicitly turn off the splittings when regressions are

Re: [PATCH] parallelize g++ testing a bit more

2011-06-17 Thread Jason Merrill
OK. Jason

Re: [Patch, AVR]: QI builtins for parity, popcount, 1 n

2011-06-17 Thread Georg-Johann Lay
Joseph S. Myers schrieb: On Fri, 17 Jun 2011, Georg-Johann Lay wrote: I don't see what's bat with the patch, it's straight forward. C is a high-level language, defined in terms of high-level semantics rather than machine instructions. C code should be written where possible using

Re: [Patch, AVR]: QI builtins for parity, popcount, 1 n

2011-06-17 Thread Georg-Johann Lay
Georg-Johann Lay schrieb: To come back to the original topic, here is a tentative patch for better popcount and parity: * config/avr/t-avr (LIB1ASMFUNCS): Rename _loop_ffsqi2 to _ffsqi2_nz. * confif/avr/libgcc.S: Ditto. Rename __loop_ffsqi2 to __ffsqi2_nz.

[Patch, Fortran, committed] PR 48699: [4.6/4.7 Regression] [OOP] MOVE_ALLOC inside SELECT TYPE

2011-06-17 Thread Janus Weil
Hi all, I have just committed to trunk a simple patch for an OOP regression with MOVE_ALLOC (see comment #9-#11 in the PR): http://gcc.gnu.org/viewcvs?view=revisionrevision=175151 I will apply this to the 4.6 branch soon. Cheers, Janus

Re: Improve DSE in the presence of calls

2011-06-17 Thread Easwaran Raman
This patch seems to break ia64 and some other targets. I have updated Bug 49429 with a test case triage. It looks like for some EXPR, may_be_aliased returns incorrect value and hence can_escape incorrectly concludes the variable can't escape resulting in removal of useful stores. (So

Re: [PATCH, PR 49089] Don't split AVX256 unaligned loads by default on bdver1 and generic

2011-06-17 Thread H.J. Lu
On Fri, Jun 17, 2011 at 3:18 PM, Fang, Changpeng changpeng.f...@amd.com wrote: Hi,  I added AVX256_SPLIT_UNALIGNED_STORE to ix86_tune_indices and put m_COREI7, m_BDVER1 and m_GENERIC as the targets that enable it. Is this OK? Can you do something similar to how

[pph] Initialize cache_ix in all paths in pph_start_record (issue4642045)

2011-06-17 Thread Gabriel Charette
Read the comment in the diff for all the details. I found this while working on my current patch, adding some assertion at the end of the function would create a new build error and moving it around in the function would stop showing the error. I discussed this with Collin and Jeff and it

[pph] Rename two pph_start_record functions adding in/out. (issue4629049)

2011-06-17 Thread Gabriel Charette
There were two pph_start_record functions, one for the in part, one for the out part. I renamed them to have different names to avoid confusion for the reader (and it also makes it easier for tags). 2011-06-17 Gabriel Charette gch...@google.com * gcc/cp/pph-streamer-in.c

Re: [Patch, libfortran] PR 49296 List read of file without EOR

2011-06-17 Thread jerry DeLisle
On 06/17/2011 12:02 PM, Janne Blomqvist wrote: PING. Also, here's a slightly simplfied testcase: Yes, OK Jerry

[PATCH] move libiconv linkage from libgcj.spec.in to libgcj_la_LDFLAGS

2011-06-17 Thread Jack Howarth
The attached patch moves the linkage on $(LDLIBICONV) from libgcj.spec.in to a more correct direct linkage on libgcj which contains the unresolved symbols. This change also solves problems when a multilib only has libiconv for one of the two architectures (ie building gcc trunk on x86_64

C++ PATCH for c++/49458 (rvalue reference to function and conversion ops)

2011-06-17 Thread Jason Merrill
Another special case for the rule that an rvalue reference to function is an lvalue. Tested x86_64-pc-linux-gnu, applying to trunk. commit df1f90245e5436ceadf6b3df5cc6f7ef7e0536c0 Author: Jason Merrill ja...@redhat.com Date: Fri Jun 17 16:45:44 2011 -0400 PR c++/49458 * call.c