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 Date: Fri Jun 17 16:45:44 2011 -0400 PR c++/49458 * call.c (convert_class_to_ref

[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 fink

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

2011-06-17 Thread Jack Howarth
On Fri, Jun 17, 2011 at 12:04:34PM +0100, IainS wrote: > 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 o

[PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11

2011-06-17 Thread Jack Howarth
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 linker, I included it in the triplet match to simplify the

Re: Remove separate tarballs

2011-06-17 Thread Gerald Pfeifer
On Thu, 16 Jun 2011, Andrew Haley wrote: > As long as it doesn't suffer bitrot, it doesn't much matter whether > gcj is a part of a single gcc tarball or not. That may be the case for most GNU/Linux distros. On Gentoo or FreeBSD, for example, thousands and thousands of users (of the FreeBSD port

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

2011-06-17 Thread Gabriel Charette
Clarified comment from v1 of this patch. 2011-06-17 Gabriel Charette * gcc/cp/pph-streamer-in.c (pph_start_record): Initialize cache_ix in all paths. diff --git a/gcc/cp/pph-streamer-in.c b/gcc/cp/pph-streamer-in.c index b3c2ac9..186100f 100644 --- a/gcc/cp/pph-streamer-in.c +

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

2011-06-17 Thread Mike Stump
On Jun 17, 2011, at 10:47 AM, Nathan Froyd wrote: > I've done a lot of g++-only testsuite runs lately I think it is reasonable to have even more of them, say, if you have 16 cores and just test c++... I wonder what the scaling is like as we approach larger N. :-)

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: fix collect2 handling of --demangle and --no-demangle

2011-06-17 Thread Sandra Loosemore
We had a bug report from a customer that the linker was ignoring the --demangle and --no-demangle options when generating map files. Moreover, it was failing in a host-dependent way; on Windows hosts, it was always emitting demangled names in the map file, while on Linux hosts, it never did. M

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

2011-06-17 Thread H.J. Lu
On Fri, Jun 17, 2011 at 3:41 AM, Paolo Bonzini wrote: > 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 c

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

2011-06-17 Thread Gabriel Charette
Updating the first version of this patch (I accidently sent an old patch with the renaming backwards). 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 tag

[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 * gcc/cp/pph-streamer-in.c (pph_in_start_record):

[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 appears

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 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 MASK_ACCUMULATE_OUTGOING_ARGS is handled? T

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

2011-06-17 Thread Fang, Changpeng
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? Thanks, Changpeng From: H.J. Lu [hjl.to...@gmail.com] Sent: Friday, June 17, 2011 1:08 PM To: Fang, Cha

Re: __sync_swap* with acq/rel/full memory barrier semantics

2011-06-17 Thread Andrew MacLeod
On 06/02/2011 02:52 PM, Aldy Hernandez wrote: Wouldn't it be better to pass the model (as an extra CONST_INT operand) to the expanders? Targets where atomic instructions always act as full barriers could just ignore that argument, other could decide what to do based on the value. *shrug* I don't

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 can_escape()

[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=revision&revision=175151 I will apply this to the 4.6 branch soon. Cheers, Janus

C++ PATCH for c++/43912 (lambda debug info)

2011-06-17 Thread Jason Merrill
G++ wasn't emitting sufficient debug info for the debugger to be able to map capture names to the fields in the closure while inside the lambda body. This patch changes the lambda implementation to generate proxy VAR_DECLs with DECL_VALUE_EXPR set so that they expand to the appropriate COMPONE

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

2011-06-17 Thread Jack Howarth
On Fri, Jun 17, 2011 at 10:43:07AM -0700, Mike Stump wrote: > 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 SYST

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

2011-06-17 Thread Uros Bizjak
On Fri, Jun 17, 2011 at 3:01 PM, 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_builti

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

2011-06-17 Thread Janne Blomqvist
PING. Also, here's a slightly simplfied testcase: ! { dg-do run } ! PR 49296 List formatted read of file without EOR marker (\n). program read_list_eof_1 implicit none character(len=100) :: s call genfil () open (unit=20, file='read.dat', form='FORMATTED', action='READ', & status='

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. > (_

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] parallelize g++ testing a bit more

2011-06-17 Thread Jason Merrill
OK. Jason

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 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 found! I prefe

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 und

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

2011-06-17 Thread Fang, Changpeng
>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 found! By the way, I can add an index for store splitting, if you want. Thanks

[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 a

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 l

Re: [PATCH,C/C++/ObjC/C++] get rid of build_function_call

2011-06-17 Thread Mike Stump
On Jun 17, 2011, at 10:25 AM, Nathan Froyd wrote: > build_function_call uses an outdated interface (a TREE_LIST containing > the arguments passed to the function) and is only used by the ObjC/C++ > FEs. > OK to commit? Ok.

[PATCH,C/C++/ObjC/C++] get rid of build_function_call

2011-06-17 Thread Nathan Froyd
build_function_call uses an outdated interface (a TREE_LIST containing the arguments passed to the function) and is only used by the ObjC/C++ FEs. The patch below deletes it and introduces a new build_function_call_nary interface modeled after cp_build_function_call_nary. The C/C++ changes are mi

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

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 >>> +DE

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

2011-06-17 Thread Jack Howarth
On Fri, Jun 17, 2011 at 12:04:34PM +0100, IainS wrote: > 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 o

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

2011-06-17 Thread Jack Howarth
j.spec rename spec startfile to startfileorig rename spec lib to liborig COLLECT_GCC=gcj-fsf-4.7 COLLECT_LTO_WRAPPER=/sw/lib/gcc4.7/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/li

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 > >> >> >        { > >> >> >

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

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: 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 N6

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

2011-06-17 Thread Jack Howarth
On Fri, Jun 17, 2011 at 12:04:34PM +0100, IainS wrote: > 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 o

[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 h

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, f

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

2011-06-17 Thread Richard Guenther
2011/6/17 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 >> >> >  

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

2011-06-17 Thread Diego Novillo
On Thu, Jun 16, 2011 at 18:57, Gabriel Charette 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 the way you di

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 point

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 it

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

2011-06-17 Thread Richard Guenther
2011/6/17 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 improvem

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

2011-06-17 Thread Georg-Johann Lay
Joseph S. Myers schrieb: > On Thu, 16 Jun 2011, Georg-Johann Lay wrote: > >> The recent implementation of some asm function in libgcc added >> __popcountqi2 and __parityqi2. This patch makes these functions >> available as __builtin_avr_popcount8 resp. __builtin_avr_parity8. >> >> Moreover, just o

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 independen

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 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*) __attribute__((pur

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 th

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

2011-06-17 Thread Tom de Vries
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*) __attribute__((pure)); >> unsigned int >> tr (int array[], int n) >> { >> unsigne

[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 o

[APPROVED PATCH] c-pragma: adding a data field to pragma_handler

2011-06-17 Thread Pierre Vittet
Thoses two patchs have already been approved (see http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01159.html). I haven't write permission currently, could someone commit them? ChangeLogs have to be applied on gcc/c-family/ChangeLog . Thanks ! Pierre Vittet Index: gcc/c-family/c-pragma.c

Re: [google/integration] Support arm-grtev2-linux-*eabi (issue4628043)

2011-06-17 Thread Diego Novillo
On Fri, Jun 17, 2011 at 02:27, Chris Demetriou wrote: > 2011-06-16  Chris Demetriou   > >        * config/arm/linux-grtev2.h: New file. >        * config/arm/linux-elf.h (GLIBC_DYNAMIC_LINKER): Prefix with >        RUNTIME_ROOT_PREFIX. >        * config/arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER): Li

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

2011-06-17 Thread Georg-Johann Lay
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 > > Why does this function have "loop"