Re: [Patch, Fortran, OOP] PR 49417: [4.6/4.7 Regression] ICE on invalid CLASS component declaration

2011-06-16 Thread Tobias Burnus
Janus Weil wrote: > here is the fix for an OOP-regression reported today by Andrew Benson > > The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk? The patch is OK - thanks for the quick fix. Do you plan to also backport it to 4.6, given that it is a regression? Tobias

RFC: Backport deep-copy assignment for constructors (PR 49324)

2011-06-16 Thread Tobias Burnus
Hi all, if the RHS is an array constructor, gfortran didn't deep copy allocatable components. That was fixed for the trunk by the patch at http://gcc.gnu.org/ml/fortran/2011-06/msg00095.html The wrong-code issue is not a regression and code leading to the bug seems to be sparse, judging how man

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

2011-06-16 Thread Zdenek Dvorak
Hi, > Consider the following example. > > extern unsigned int foo (int*) __attribute__((pure)); > unsigned int > tr (int array[], int n) > { > unsigned int i; > unsigned int sum = 0; > for (i = 0; i < n; i++) > sum += foo (&array[i]); > return sum; > } > > For 32-bit pointers, the an

Re: [patch] Don't insert pattern statements into the code (was Fix PR tree-optimization/49318)

2011-06-16 Thread Ira Rosen
On 14 June 2011 15:01, Richard Guenther wrote: > On Tue, Jun 14, 2011 at 1:38 PM, Ira Rosen wrote: >> On 14 June 2011 14:27, Richard Guenther wrote: >> > >   /* Mark the stmts that are involved in the pattern. */ > -  gsi_insert_before (&si, pattern_stmt, GSI_SAME_STMT); >   set_

Re: [PATCH, PR 49343] Make SRA cope with some fields with variable offsets

2011-06-16 Thread Richard Guenther
On Wed, Jun 15, 2011 at 6:33 PM, Martin Jambor wrote: > Hi, > > PR 49343 showed that build_ref_for_model in tree-sra.c used a more > primitive technique to determine an offset of a field than > get_ref_base_and_extent, cannot crunch fields with "placeholders" in > their offsets and ICEs on them (w

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

2011-06-16 Thread Richard Guenther
On Wed, Jun 15, 2011 at 7:46 PM, Mike Stump wrote: > On Jun 15, 2011, at 2:04 AM, Richard Guenther wrote: >> This VIEW_CONVERT_EXPR looks useless - in fact useless_type_conversion_p >> will tell you that, so you can omit it. > > So, I tracked down who created it: > > tree > convert_to_vector (tree

Re: [PATCH] Call estimate_numbers_of_iterations after insert_range_assertions (PR tree-optimization/49419)

2011-06-16 Thread Richard Guenther
On Wed, Jun 15, 2011 at 8:57 PM, Jakub Jelinek wrote: > Hi! > > The following testcase is miscompiled e.g. on powerpc (not on x86_64/i686 > due to different ivopts choices), because estimate_numbers_of_iterations > was called before assert_exprs are added to the IL and gets info cached > until adj

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

2011-06-16 Thread Richard Guenther
On Wed, Jun 15, 2011 at 11:06 PM, Fang, Changpeng wrote: >>I have no problems on -mtune=Bulldozer.  But I object -mtune=generic >>change and did suggest a different approach for -mtune=generic. > > Something must have been broken for the unaligned load splitting in generic > mode. > > While we lo

Re: Improve jump threading #5 of N

2011-06-16 Thread Richard Guenther
On Thu, Jun 16, 2011 at 6:26 AM, Jeff Law wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > > So as I've mentioned previously, I've been working on a relatively small > change to the jump threading code which would allow it to duplicate a > join block when doing so allows us to thre

Re: [Patch, AVR]: Hack around PR34734

2011-06-16 Thread Richard Guenther
On Wed, Jun 15, 2011 at 3:54 PM, Georg-Johann Lay wrote: > Weddington, Eric schrieb: >> Hi Johann, >> >> I understand your reasoning, but I'm not particularly fond of this hack. > > Yes, ACK. It's a hack to get rid of the PR. > >> Surely there's a way to fix this correctly without relying on this

Re: PATCH [5/n]: Prepare x32: PR middle-end/48016: Inconsistency in non-local goto save area

2011-06-16 Thread Richard Guenther
On Wed, Jun 15, 2011 at 9:55 PM, H.J. Lu wrote: > On Wed, Jun 15, 2011 at 8:16 AM, Michael Matz wrote: >> Hi, >> >> On Wed, 15 Jun 2011, H.J. Lu wrote: >> >>> >> +  /* FIXME: update_nonlocal_goto_save_area may pass SA in the wrong >>> >> mode.  */ >>> >> +  if (GET_MODE (sa) != mode) >>> >> +  

Re: [patch] Another enhancement of widen-mult in the vectorizer

2011-06-16 Thread Richard Guenther
On Thu, Jun 16, 2011 at 8:54 AM, Ira Rosen wrote: > Hi, > > For > > unsigned char in[N]; > int out[N]; > for (i = 0; i < N; i++) >    out[i] = in[i] * 300; > > in[i] is first promoted to int and then multiplied by 300. This > over-promotion prevents the vectorizer from using the widen-mult > patte

Re: [patch] Another enhancement of widen-mult in the vectorizer

2011-06-16 Thread Richard Guenther
On Thu, Jun 16, 2011 at 10:00 AM, Richard Guenther wrote: > On Thu, Jun 16, 2011 at 8:54 AM, Ira Rosen wrote: >> Hi, >> >> For >> >> unsigned char in[N]; >> int out[N]; >> for (i = 0; i < N; i++) >>    out[i] = in[i] * 300; >> >> in[i] is first promoted to int and then multiplied by 300. This >>

[lra] a patch to speed LRA up

2011-06-16 Thread Vladimir Makarov
The following patch considerably speeds LRA up. The patch was successfully bootstrapped on x86-64, ia64, and ppc64. 2011-06-15 Vladimir Makarov * lra-assigns.c (live_pseudos_reg_renumber): New array. (init_lives): Initialize the array. (finish_lives): Free the array. (update_

Re: Remove separate tarballs

2011-06-16 Thread Andrew Haley
On 16/06/11 01:43, Gerald Pfeifer wrote: > On Tue, 7 Jun 2011, Andrew Haley wrote: >>> The vast majority of users does not need the former and the latter is >>> on the verge of becoming practically irrelevant. As one datapoint, the >>> entire FreeBSD Ports Collection has a single(!) port relying o

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

2011-06-16 Thread Ian Lance Taylor
Georg-Johann Lay writes: > gcc/ > PR target/49313 > PR target/29524 > > * longlong.h: Add AVR support: > (count_leading_zeros): New macro. > (count_trailing_zeros): New macro. > (COUNT_LEADING_ZEROS_0): New macro. > > * config/avr/t-avr (LIB

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-06-16 Thread Stubbs, Andrew
On 02/06/11 11:36, Ramana Radhakrishnan wrote: > On 2 June 2011 10:03, Andrew Stubbs wrote: >> On 02/06/11 09:23, Ramana Radhakrishnan wrote: >>> >>> Please remove the alternatives in the subsi3 pattern since that is just >>> unnecessary. Please make the constraints internal only. >> >> Is this be

[Patch, Fortra, Coarray] Free allocated memory for static coarrays.

2011-06-16 Thread Daniel Carrera
Hello, This is my second patch for GFortran. This patch adds a linked list to keep track of the allocated memory of all static coarrays and ensures that at the end of the program the memory is freed. Additionally, I use MPI_Allgather in mpi.c to ensure that all images know the address of the

Re: [Patch, Fortran, OOP] PR 49417: [4.6/4.7 Regression] ICE on invalid CLASS component declaration

2011-06-16 Thread Janus Weil
2011/6/16 Tobias Burnus : > Janus Weil wrote: >> here is the fix for an OOP-regression reported today by Andrew Benson >> >> The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk? > > The patch is OK - thanks for the quick fix. Thanks, will commit soon. > Do you plan to also backport

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

2011-06-16 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/6/15 Georg-Johann Lay : >> This is a patch that implements some libgcc functions in assembler. >> The functions are used only very seldom but if, they lead to an >> unpleasant waste of resource. For example, some SF functions >> eventually lead to __clz_tab being dra

Re: [patch] Don't insert pattern statements into the code (was Fix PR tree-optimization/49318)

2011-06-16 Thread Ira Rosen
(I am resending this, since it's been already 4 hours since I sent it first time, and I don't see it on the list. I apologize for possible duplication.) > > On 14 June 2011 14:27, Richard Guenther wrote: > > > >   /* Mark the stmts that are involved in the pattern. */ > -  gsi_ins

Re: Updated^3: RFA: Fix middle-end/46500 (void * encapsulated)

2011-06-16 Thread Bernd Schmidt
Ok, much better. + cumulative_args_t dummy; + + return m32r_pass_by_reference (dummy, TYPE_MODE (type), type, false); Please initialize the variable. Otherwise I think it's OK. Thanks! Bernd

Re: PATCH: PR rtl-optimization/49088: Combine fails to properly handle zero-extension and signed int constant

2011-06-16 Thread Eric Botcazou
> force_to_mode has > > /* If X is a CONST_INT, return a new one. Do this here since the > test below will fail. */ > if (CONST_INT_P (x)) > { > if (SCALAR_INT_MODE_P (mode)) > return gen_int_mode (INTVAL (x) & mask, mode); > else > { > x = GEN_I

Re: [patch] Another enhancement of widen-mult in the vectorizer

2011-06-16 Thread Ira Rosen
>> >> +         && TREE_CODE (half_type1) == INTEGER_TYPE) >> +       { >> +         if (int_fits_type_p (oprnd0, half_type1)) >> >> I believe you need to check that oprnd0 is a INTEGER_CST before calling >> int_fits_type_p. >> >> +            { >> +             /* OPRND0 is a constant of HALF_TYPE

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Denis Chertykov
2011/6/16 Richard Henderson : > On 06/15/2011 02:58 PM, Richard Henderson wrote: >> Indeed, I can work around this particular crash by either >> hacking Z to be call-saved, or hacking the frame pointer to >> not be required.  The former of course changes the abi, and >> the second produces awful co

[PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR

2011-06-16 Thread Richard Guenther
This is a (possible) pre-requesite for the bitfield lowering patch, taken from the old mem-ref branch. It introduces BIT_FIELD_EXPR which can be used to do bitfield composition. BIT_FIELD_EXPR is equivalent to computing a & ~((1 << C1 - 1) << C2) | ((b << C2) & (1 << C1 = 1)), thus inserting b o

Re: [Patch, AVR]: Hack around PR34734

2011-06-16 Thread Georg-Johann Lay
Richard Guenther schrieb: > On Wed, Jun 15, 2011 at 3:54 PM, Georg-Johann Lay wrote: Is it possible not to quote my email address? Thanks. >> Weddington, Eric schrieb: >>> Hi Johann, >>> >>> I understand your reasoning, but I'm not particularly fond of this hack. >> Yes, ACK. It's a hack to get

[PATCH][RFC][2/2] Bitfield lowering

2011-06-16 Thread Richard Guenther
This implements lowering a subset of COMPONENT_REFs with DECL_BIT_FIELD FIELD_DECLs and BIT_FIELD_REFs - thus bitfield operations in general. It lowers those to memory loads/stores that the (non-strict-align) target is able to carry out, adjusting for the bit-field-ness by inserting proper shiftin

Re: [Patch, Fortran, OOP] PR 49417: [4.6/4.7 Regression] ICE on invalid CLASS component declaration

2011-06-16 Thread Janus Weil
>>> here is the fix for an OOP-regression reported today by Andrew Benson >>> >>> The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk? >> >> The patch is OK - thanks for the quick fix. > > Thanks, will commit soon. The patch has been applied to trunk as r175101. Will commit to the 4.

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Denis Chertykov
2011/6/16 Denis Chertykov : > 2011/6/16 Richard Henderson : >> On 06/15/2011 02:58 PM, Richard Henderson wrote: >>> Indeed, I can work around this particular crash by either >>> hacking Z to be call-saved, or hacking the frame pointer to >>> not be required.  The former of course changes the abi, a

Re: [PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR

2011-06-16 Thread Jay Foad
> BIT_FIELD_EXPR is equivalent to computing > a & ~((1 << C1 - 1) << C2) | ((b << C2) & (1 << C1 = 1)), a & ~(((1 << C1) - 1) << C2) | ((b & ((1 << C1) - 1)) << C2) ? Jay. thus > inserting b of width C1 at the bitfield position C2 in a, returning > the new value.  This allows translating >  B

Re: Turn on -pie on darwin11 and later

2011-06-16 Thread Pedro Alves
On Thursday 16 June 2011 02:33:50, Mike Stump wrote: > BOOT_CFLAGS += -mdynamic-no-pic > + > +# Ensure we don't try and use -pie, as it is incompatible with pch. > +BOOT_LDFLAGS=`case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;` Shouldn't this use += like BOOT_CFLAGS? -- Pedro Alv

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

2011-06-16 Thread Tom de Vries
On 06/16/2011 09:24 AM, Zdenek Dvorak wrote: > Hi, > >> Consider the following example. >> >> extern unsigned int foo (int*) __attribute__((pure)); >> unsigned int >> tr (int array[], int n) >> { >> unsigned int i; >> unsigned int sum = 0; >> for (i = 0; i < n; i++) >> sum += foo (&array

[libjava] Fix signal handling on IRIX, Tru64 UNIX (PR libgcj/49315)

2011-06-16 Thread Rainer Orth
While looking at the remaining libjava testsuite failures on IRIX 6.5 and Tru64 UNIX V5.1B, I noticed that both ports used default-signal.h and can_unwind_signal is no, although both have implementations of MD_UNWIND_FRAME_STATE_FOR. The following patch corrects this. Instead of introducing yet a

Re: [Patch, Fortra, Coarray] Free allocated memory for static coarrays.

2011-06-16 Thread Tobias Burnus
Hi Daniel, Daniel Carrera wrote: > This patch adds a linked list to keep track of the allocated > memory of all static coarrays and ensures that at the end of > the program the memory is freed. +_gfortran_caf_register (ptrdiff_t size,caf_register_t type, void **tok

Add __builtin_clrsb, similar to clz/ctz

2011-06-16 Thread Bernd Schmidt
Several processors have a "count redundant sign bits" instruction: * SIGNBITS on Blackfin * NORM on C6X * SBC, apparently, on picochip and probably others. For example, for a value of 0 or -1, it returns 31, while e.g. an input 0xc000 produces 1. Other compilers tend to define builtin functi

Re: unwinding fallback for mips-irix6 n32

2011-06-16 Thread Olivier Hainque
Hi Rainer, 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 suppo

Re: Add __builtin_clrsb, similar to clz/ctz

2011-06-16 Thread Georg-Johann Lay
Bernd Schmidt schrieb: > Several processors have a "count redundant sign bits" instruction: > > * SIGNBITS on Blackfin > * NORM on C6X > * SBC, apparently, on picochip > > and probably others. For example, for a value of 0 or -1, it returns 31, > while e.g. an input 0xc000 produces 1. > > Ot

[PATCH][RFC] Regularize sizetypes

2011-06-16 Thread Richard Guenther
For some reason I split out sanitizing sizetypes from the no-undefined-overflow-branch. In fact the following patch tries to only fix one thing - make unsigned sizetypes no longer sign-extended. This has (unfortunately) interesting side-effects, and some of them have been mitigated by already c

Re: Add __builtin_clrsb, similar to clz/ctz

2011-06-16 Thread Laurent Desnogues
On Thu, Jun 16, 2011 at 2:44 PM, Bernd Schmidt wrote: > Several processors have a "count redundant sign bits" instruction: > > * SIGNBITS on Blackfin > * NORM on C6X > * SBC, apparently, on picochip picoChip defines __builtin_sbc. Wouldn't that make it redundant with your __builtin_clrsb? > and

Re: Add __builtin_clrsb, similar to clz/ctz

2011-06-16 Thread Bernd Schmidt
On 06/16/2011 03:10 PM, Laurent Desnogues wrote: > On Thu, Jun 16, 2011 at 2:44 PM, Bernd Schmidt > wrote: >> Several processors have a "count redundant sign bits" instruction: >> >> * SIGNBITS on Blackfin >> * NORM on C6X >> * SBC, apparently, on picochip > > picoChip defines __builtin_sbc. Wo

Re: [PATCH][RFC] Regularize sizetypes

2011-06-16 Thread H.J. Lu
On Thu, Jun 16, 2011 at 6:09 AM, Richard Guenther wrote: > > For some reason I split out sanitizing sizetypes from the > no-undefined-overflow-branch.  In fact the following patch tries > to only fix one thing - make unsigned sizetypes no longer sign-extended. > > This has (unfortunately) interest

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Richard Henderson
On 06/16/2011 04:46 AM, Denis Chertykov wrote: > I forgot to said that suggestion from Bernd Schmidt about > HARD_FRAME_POINTER_REGNUM seems very useful: >> Maybe it would help for your port to define a separate >> FRAME_POINTER_REGNUM, able to hold an HImode value, which then gets >> eliminated to

Re: [PATCH][RFC] Regularize sizetypes

2011-06-16 Thread Richard Guenther
On Thu, 16 Jun 2011, H.J. Lu wrote: > On Thu, Jun 16, 2011 at 6:09 AM, Richard Guenther wrote: > > > > For some reason I split out sanitizing sizetypes from the > > no-undefined-overflow-branch.  In fact the following patch tries > > to only fix one thing - make unsigned sizetypes no longer sign-

[Patch ARM] Fix PR target/49398

2011-06-16 Thread Ramana Radhakrishnan
Hi, I spent some time trying to fix PR target/49398 but have run out of time to fix it properly beyond the original patch in the bug report. It probably needs the fix from the bug report and maybe some more but since I've not heard in 48 hours after the original bug report (it is thumb2 v7-a and t

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Richard Henderson
On 06/16/2011 04:34 AM, Denis Chertykov wrote: > @rth (while you are diving into AVR microworld ;-) > May be you can give a suggestion to change the AVR abi. > I have tuned the abi for code size almost 13 years ago. > The register pressure to r18-r31 are very high. As far as I can see, the ABI is

regrename: don't update REG_DEAD notes

2011-06-16 Thread Bernd Schmidt
We're updating REG_DEAD notes in regrename.c, but it seems this is for historical reasons only. As far as I can tell, every pass that needs such notes recomputes them with df_note_add_problem/df_analyze, and the following patch bootstrapped and tested successfully on i686-linux (some random libmudf

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Bernd Schmidt
On 06/16/2011 04:25 PM, Richard Henderson wrote: > That last point probably depends on Bernd Schmidt's work in > dwarf2out for shrink-wrapping... Did you have a chance to look at the ia64 unwind code? I probably won't be able to get back to it for a while yet since I'm working on C6X tuning... B

Fail entire blocks less often in regrename.c

2011-06-16 Thread Bernd Schmidt
Regrename tends to fall on its face if multiword registers are accessed both in their full width and in subparts. However, there's one case where it's relatively easy to improve the current situation - when tracking a wide register, and it's written to in a narrower mode, we can just close the chai

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Richard Henderson
On 06/16/2011 07:35 AM, Bernd Schmidt wrote: > Did you have a chance to look at the ia64 unwind code? I probably won't > be able to get back to it for a while yet since I'm working on C6X tuning... I was looking at it before I moved house a month ago, and then totally forgot about it until today.

Re: [Patch, Fortra, Coarray] Free allocated memory for static coarrays.

2011-06-16 Thread Daniel Carrera
Hi Tobias, New patch attached. In addition to the fixes you listed I also had to fix the call to MPI_Allgather. More below: Between "size," and "caf_register_t" is a instead of a simple " ". Fixed. As you mentioned yourself (in a private mail, commenting on my code): There is a "*" mis

Re: regrename: don't update REG_DEAD notes

2011-06-16 Thread Richard Henderson
On 06/16/2011 07:33 AM, Bernd Schmidt wrote: > * regrename.c (do_replace): Don't update notes. Ok. r~

Re: Fail entire blocks less often in regrename.c

2011-06-16 Thread Bernd Schmidt
On 06/16/2011 04:39 PM, Bernd Schmidt wrote: > + if (subset) > + head->cannot_rename = 1; I confused myself here by having too many trees, and tested & posted an old version the patch. This (and another instance) needs to read (subset && !superset) since these aren't strict super-/su

Re: Fail entire blocks less often in regrename.c

2011-06-16 Thread Richard Henderson
On 06/16/2011 07:39 AM, Bernd Schmidt wrote: > * regrename.c (scan_rtx_reg): Handle the case where we write to an > open chain in a smaller mode without failing the entire block. Ok. r~

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

2011-06-16 Thread Zdenek Dvorak
Hi, > diff -u gcc/tree-ssa-loop-niter.c (working copy) gcc/tree-ssa-loop-niter.c > (working copy) > --- gcc/tree-ssa-loop-niter.c (working copy) > +++ gcc/tree-ssa-loop-niter.c (working copy) > @@ -2875,6 +2875,16 @@ >low = lower_bound_in_type (type, type); >high = upper_bound_in_type (ty

Re: regrename: don't update REG_DEAD notes

2011-06-16 Thread Hans-Peter Nilsson
On Thu, 16 Jun 2011, Bernd Schmidt wrote: > We're updating REG_DEAD notes in regrename.c, but it seems this is for > historical reasons only. As far as I can tell, every pass that needs > such notes recomputes them with df_note_add_problem/df_analyze, and the > following patch bootstrapped and test

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

2011-06-16 Thread Richard Guenther
On Thu, Jun 16, 2011 at 5:24 PM, Zdenek Dvorak wrote: > Hi, > >> diff -u gcc/tree-ssa-loop-niter.c (working copy) gcc/tree-ssa-loop-niter.c >> (working copy) >> --- gcc/tree-ssa-loop-niter.c (working copy) >> +++ gcc/tree-ssa-loop-niter.c (working copy) >> @@ -2875,6 +2875,16 @@ >>    low = lower

Re: regrename: don't update REG_DEAD notes

2011-06-16 Thread Bernd Schmidt
On 06/16/2011 05:25 PM, Hans-Peter Nilsson wrote: > On Thu, 16 Jun 2011, Bernd Schmidt wrote: >> We're updating REG_DEAD notes in regrename.c, but it seems this is for >> historical reasons only. As far as I can tell, every pass that needs >> such notes recomputes them with df_note_add_problem/df_a

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

2011-06-16 Thread Zdenek Dvorak
> >> diff -u gcc/tree-ssa-loop-niter.c (working copy) gcc/tree-ssa-loop-niter.c > >> (working copy) > >> --- gcc/tree-ssa-loop-niter.c (working copy) > >> +++ gcc/tree-ssa-loop-niter.c (working copy) > >> @@ -2875,6 +2875,16 @@ > >>    low = lower_bound_in_type (type, type); > >>    high = upper_b

Re: Fix comdat unsharing

2011-06-16 Thread H.J. Lu
On Tue, Jun 14, 2011 at 7:27 AM, Jan Hubicka wrote: > Hi, > cgraph_address_taken_from_non_vtable_p was written with asumption that all > references to functions > take addresses.  This is not true for aliases. > > Bootstrapped/regtested x86_64-linux, comitted. > > Honza > > Index: ChangeLog > ===

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

2011-06-16 Thread Georg-Johann Lay
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 out of a mood, I wrote a builtin for 1

Re: regrename: don't update REG_DEAD notes

2011-06-16 Thread Richard Henderson
On 06/16/2011 08:25 AM, Hans-Peter Nilsson wrote: >> +++ gcc/config/i386/i386.c (working copy) > > (Not a dbr target...) > >> Ok? > > NO! They're still used by reorg.c+resource.c Already handled: rest_of_pass_free_cfg (void) { #ifdef DELAY_SLOTS /* The resource.c machinery uses DF but the

Add AVG and UAVG rtx codes

2011-06-16 Thread Bernd Schmidt
Another operation that exists on a number of processors is an "average" operation, which computes "(ext (A) + ext (B) + 1) >> 1" from two input operands. Some of our backends try to represnt this with complex RTL expressions, others use unspec. This patch adds two new rtx codes. Bootstrapped and t

Re: [patch, testsuite] Fix vectorizer testsuite failures on ARM

2011-06-16 Thread Steve Ellcey
On Thu, 2011-06-16 at 08:48 +0300, Ira Rosen wrote: > > I am not sure what we want to do to make this test work on both > platforms. > > Do you have any ideas? > > I don't think it is related to endianess. > Could you please send me the dump files (created with > -fdump-tree-vect-details)? > > T

Re: Add AVG and UAVG rtx codes

2011-06-16 Thread Jakub Jelinek
On Thu, Jun 16, 2011 at 06:08:17PM +0200, Bernd Schmidt wrote: > Another operation that exists on a number of processors is an "average" > operation, which computes "(ext (A) + ext (B) + 1) >> 1" from two input > operands. Some of our backends try to represnt this with complex RTL > expressions, ot

Re: Add __builtin_clrsb, similar to clz/ctz

2011-06-16 Thread Richard Henderson
On 06/16/2011 05:44 AM, Bernd Schmidt wrote: > +@deftypefn {Built-in Function} int __builtin_clrsb (unsigned int x) > +Returns the number of leading redundant sign bits in @var{x}, starting > +at the most significant bit position. > +@end deftypefn Do we want a signed argument, since we're talking

[testsuite] dg-final object-size: fail if file does not exist

2011-06-16 Thread Janis Johnson
Currently the dg-final check "object-size" results in ERROR if the assemble failed and the object file does not exist. This patch fails the test instead. OK for trunk? Janis 2011-06-16 Janis Johnson * lib/scanasm.exp (object-size): Fail if object file does not exist. Index: lib/scan

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

2011-06-16 Thread Joseph S. Myers
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 out of a mood, I wrote a builtin f

Re: [PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR

2011-06-16 Thread Richard Henderson
On 06/16/2011 04:35 AM, Richard Guenther wrote: > > This is a (possible) pre-requesite for the bitfield lowering patch, > taken from the old mem-ref branch. It introduces BIT_FIELD_EXPR > which can be used to do bitfield composition. > BIT_FIELD_EXPR is equivalent to computing > a & ~((1 << C1 -

Re: [testsuite] dg-final object-size: fail if file does not exist

2011-06-16 Thread Joseph S. Myers
On Thu, 16 Jun 2011, Janis Johnson wrote: > Currently the dg-final check "object-size" results in ERROR if the > assemble failed and the object file does not exist. This patch fails > the test instead. OK for trunk? The set of testcase names - the things after "PASS: " or "FAIL: " or other sta

Re: PATCH [5/n]: Prepare x32: PR middle-end/48016: Inconsistency in non-local goto save area

2011-06-16 Thread H.J. Lu
On Thu, Jun 16, 2011 at 12:56 AM, Richard Guenther wrote: > On Wed, Jun 15, 2011 at 9:55 PM, H.J. Lu wrote: >> On Wed, Jun 15, 2011 at 8:16 AM, Michael Matz wrote: >>> Hi, >>> >>> On Wed, 15 Jun 2011, H.J. Lu wrote: >>> >> +  /* FIXME: update_nonlocal_goto_save_area may pass SA in the wrong

Re: [PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR

2011-06-16 Thread Eric Botcazou
> I think this would be clearer with a name like DEPOSIT_EXPR, > similar to the ia64 deposit instruction. ia64's demise wasn't entirely undeserved then. IMO the descriptive power of DEPOSIT_EXPR is almost null. BIT_FIELD_MODIFY_EXPR or something like this. -- Eric Botcazou

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

2011-06-16 Thread Tom de Vries
On 06/16/2011 05:42 PM, Zdenek Dvorak wrote: diff -u gcc/tree-ssa-loop-niter.c (working copy) gcc/tree-ssa-loop-niter.c (working copy) --- gcc/tree-ssa-loop-niter.c (working copy) +++ gcc/tree-ssa-loop-niter.c (working copy) @@ -2875,6 +2875,16 @@ low = lower_bound

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Denis Chertykov
2011/6/16 Richard Henderson : > On 06/16/2011 04:46 AM, Denis Chertykov wrote: >> I forgot to said that suggestion from Bernd Schmidt about >> HARD_FRAME_POINTER_REGNUM seems very useful: >>> Maybe it would help for your port to define a separate >>> FRAME_POINTER_REGNUM, able to hold an HImode val

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Denis Chertykov
2011/6/16 Richard Henderson : > On 06/16/2011 04:34 AM, Denis Chertykov wrote: >> @rth (while you are diving into AVR microworld ;-) >> May be you can give a suggestion to change the AVR abi. >> I have tuned the abi for code size almost 13 years ago. >> The register pressure to r18-r31 are very hig

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Richard Henderson
On 06/16/2011 11:09 AM, Denis Chertykov wrote: > Only one question why you removed avr_legitimize_address ? It doesn't actually do anything useful. All it does is, for a subset of inputs, force the address into a register. This is the same as the fallback action. That is, any non-legitimate add

[pph] Fix cxx_binding streaming logic (issue4646041)

2011-06-16 Thread Gabriel Charette
We were losing bindings when reassigning prev bindings with the current streaming logic. This doesn't fix any currently exposed bugs, but again helps me as part of fixing the bigger bug I'm on. Tested with bootstrap build and pph regression testing. At the end of pph_out_cxx_binding I could also

[testsuite] Ignore mips-tfile warning in gcc.dg/debug/pr49032.c

2011-06-16 Thread Rainer Orth
The recent gcc.dg/debug/pr49032.c FAILs on Tru64 UNIX in a couple of cases: FAIL: gcc.dg/debug/pr49032.c -gcoff1 -O (test for excess errors) FAIL: gcc.dg/debug/pr49032.c -gcoff1 -O3 (test for excess errors) FAIL: gcc.dg/debug/pr49032.c -gcoff -O (test for excess errors) FAIL: gcc.dg/debug/pr49032.

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

2011-06-16 Thread Richard Henderson
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" in its name? The actual implementatio

Re: [PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR

2011-06-16 Thread Richard Guenther
On Thu, Jun 16, 2011 at 7:24 PM, Eric Botcazou wrote: >> I think this would be clearer with a name like DEPOSIT_EXPR, >> similar to the ia64 deposit instruction. > > ia64's demise wasn't entirely undeserved then.  IMO the descriptive power of > DEPOSIT_EXPR is almost null.  BIT_FIELD_MODIFY_EXPR o

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Denis Chertykov
2011/6/16 Richard Henderson : > On 06/16/2011 11:09 AM, Denis Chertykov wrote: >> Only one question why you removed avr_legitimize_address ? > > It doesn't actually do anything useful. > > All it does is, for a subset of inputs, force the address into > a register.  This is the same as the fallback

Re: Turn on -pie on darwin11 and later

2011-06-16 Thread Mike Stump
On Jun 16, 2011, at 5:01 AM, Pedro Alves wrote: > On Thursday 16 June 2011 02:33:50, Mike Stump wrote: >> BOOT_CFLAGS += -mdynamic-no-pic >> + >> +# Ensure we don't try and use -pie, as it is incompatible with pch. >> +BOOT_LDFLAGS=`case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; >> esac;

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Richard Henderson
On 06/16/2011 12:17 PM, Denis Chertykov wrote: > Are you working in public git repository ? > Can I chekout it ? > > If not then may be you can drop a full patch against svn. I've pushed it to git://gcc.gnu.org/git/gcc.git rth/avr-addressing As I said yesterday, there's still a crash in libg

fix darwin boostrap breakage

2011-06-16 Thread Mike Stump
RIght now darwin doesn't build for me (something for goolge to find): Undefined symbols: "LPR2", referenced from: ___mulsc3 in _mulsc3_s.o ___muldc3 in _muldc3_s.o ___mulxc3 in _mulxc3_s.o I think it is due to a updated macports bit that I've not tracked down. :-( I've not

Re: [PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR

2011-06-16 Thread Richard Henderson
On 06/16/2011 12:14 PM, Richard Guenther wrote: > On Thu, Jun 16, 2011 at 7:24 PM, Eric Botcazou wrote: >>> I think this would be clearer with a name like DEPOSIT_EXPR, >>> similar to the ia64 deposit instruction. >> >> ia64's demise wasn't entirely undeserved then. IMO the descriptive power of >

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Denis Chertykov
2011/6/16 Richard Henderson : > On 06/16/2011 12:17 PM, Denis Chertykov wrote: >> Are you working in public git repository ? >> Can I chekout it ? >> >> If not then may be you can drop a full patch against svn. > > I've pushed it to > >  git://gcc.gnu.org/git/gcc.git rth/avr-addressing Thank you.

Re: fix darwin boostrap breakage

2011-06-16 Thread Jack Howarth
On Thu, Jun 16, 2011 at 12:39:44PM -0700, Mike Stump wrote: > RIght now darwin doesn't build for me (something for goolge to find): > > Undefined symbols: > "LPR2", referenced from: > ___mulsc3 in _mulsc3_s.o > ___muldc3 in _muldc3_s.o > ___mulxc3 in _mulxc3_s.o > > > I think

Re: [testsuite] dg-final object-size: fail if file does not exist

2011-06-16 Thread Mike Stump
On Jun 16, 2011, at 9:31 AM, Janis Johnson wrote: > Currently the dg-final check "object-size" results in ERROR if the > assemble failed and the object file does not exist. This patch fails > the test instead. If you can arrange for call fail on only those things that later would have called pas

Re: [PATCH] Fix ICEs with -mxop __builtin_ia32_vpermil2p[sd]{,256} and __builtin_ia32_vprot[bwdq]i intrinsics (PR target/49411)

2011-06-16 Thread Quentin Neill
On Wed, Jun 15, 2011 at 11:40 AM, Quentin Neill wrote: > On Wed, Jun 15, 2011 at 4:54 AM, Jakub Jelinek wrote: >> Hi! >> >> All of these _mm{,256}_permute2_p[sd] and _mm_roti_epi{8,16,32,64} >> intrinsics ICE if the last argument is constant integer, but not in the >> expected range. >> >> I coul

Re: [patch, testsuite] Fix g++.dg/opt/devirt2.C scanning, PR 48727

2011-06-16 Thread Steve Ellcey
On Wed, 2011-06-15 at 12:51 -0400, Hans-Peter Nilsson wrote: > On Fri, 10 Jun 2011, Steve Ellcey wrote: > > > I will check in this testsuite fix as obvious if there are no objections. > > But... :) > JFTR, if you want this to be really right, you should not xfail > this part of the test but rath

Re: C6X port 10/11: The port

2011-06-16 Thread Joseph S. Myers
On Mon, 16 May 2011, Bernd Schmidt wrote: > +#if 0 /* FIXME: Reenable when TI's tools are fixed. */ > + /* ??? Ideally we'd check flag_short_wchar somehow. */ Ideally you'd check wchar_type_node, the front-end tree node instead of the front-end flag used initializing that node. See what ARM

Re: fix darwin boostrap breakage

2011-06-16 Thread Mike Stump
On Jun 16, 2011, at 12:39 PM, Mike Stump wrote: > RIght now darwin doesn't build for me (something for goolge to find): > > Undefined symbols: > "LPR2", referenced from: > ___mulsc3 in _mulsc3_s.o > ___muldc3 in _muldc3_s.o > ___mulxc3 in _mulxc3_s.o Found it, rm -rf `find . -name

C++ PATCH for c++/49420 (ICE printing variadic error context)

2011-06-16 Thread Jason Merrill
With ENABLE_CHECKING we want to make sure that we're tracking the number of non-default template arguments, but that doesn't apply to argument packs. Tested x86_64-pc-linux-gnu, applying to trunk. commit 8ed2e06bbc3925a1c8d86641938f83e9bbd15bda Author: Jason Merrill Date: Wed Jun 15 12:24:17

C++ PATCH for c++/49251 (bogus unused warning with empty argument pack)

2011-06-16 Thread Jason Merrill
We normally mark variables as used in finish_id_expression, but we weren't doing that for variables with dependent type. They're still used even if we don't know what type they will have when instantiated. Tested x86_64-pc-linux-gnu, applying to trunk. commit b2f47a386f7f605829f4f1f30d2c1d8e25

[Patch, Fortran, committed] PR 49074: [OOP] Defined assignment w/ CLASS arrays: Incomplete error message

2011-06-16 Thread Janus Weil
Hi all, I just committed an obvious one-line patch for a minor diagnostic problem with type-bound assignments and (yet unsupported) CLASS arrays: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175113 Cheers, Janus

C++ PATCH for c++/49229 (ICE with substitution failure)

2011-06-16 Thread Jason Merrill
Another missing check for error_mark_node in SFINAE. Tested x86_64-pc-linux-gnu, applying to trunk. commit 2451aadf094bf8e65bf5a5fa28bbe3829c5a399e Author: Jason Merrill Date: Wed Jun 15 13:39:42 2011 -0400 PR c++/49229 * pt.c (tsubst_decl) [FUNCTION_DECL]: Handle substitution fail

libcpp PATCH for c++/45399 (undesired NUL warning in raw strings)

2011-06-16 Thread Jason Merrill
People want to use raw strings for embedding binary data in source files, so we don't want to complain about \0 in the middle. Tested x86_64-pc-linux-gnu, applying to trunk. commit 35ebd948dd567743ed6b31deb063b5ef948304a9 Author: Jason Merrill Date: Wed Jun 15 14:16:43 2011 -0400 PR c++

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

2011-06-16 Thread Jeff Law
-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) > { > unsigned int i; > unsigned int sum = 0; > for (i = 0; i <

C++ PATCH for c++/45378 (missed narrowing error)

2011-06-16 Thread Jason Merrill
Here, reshape_init throws away the CONSTRUCTOR, so we need to call check_narrowing before we forget about it. Tested x86_64-pc-linux-gnu, applying to trunk. commit 25767f0e366840ff8d1c334830785c2cba9c09cc Author: Jason Merrill Date: Wed Jun 15 15:20:18 2011 -0400 PR c++/45378 * dec

C++ PATCH for c++/44160 (__func__ and lambda)

2011-06-16 Thread Jason Merrill
Here since we hadn't called begin_compound_stmt yet for the simple return case, __func__ couldn't find a block scope to push into. So we open-code cp_parser_function_body and share the code between the two cases. Tested x86_64-pc-linux-gnu, applying to trunk. commit c748e82bb981d63bb24926fdd0f

  1   2   >