[PATCH] Improve SCEV for array element

2012-01-17 Thread Jiangning Liu
This code change intends to improve scev for array element and reduce the common sub-expressions in loop, which may be introduced by multiple reference of expression like &a[i]. With this optimization the register pressure can be reduced in loops. The problem is originally from a real benchmark,

Re: Go patch committed: Recognize more test lines

2012-01-17 Thread Uros Bizjak
Hello! > This patch to the Go testsuite driver recognizes a few more test lines > in Go tests. I somehow failed to notice these the last time I updated > the Go testsuite. This patch includes a couple of changes to make the > newly recognized tests pass. Ran Go testsuite on > x86_64-unknown-lin

Go patch committed: Recognize more test lines

2012-01-17 Thread Ian Lance Taylor
This patch to the Go testsuite driver recognizes a few more test lines in Go tests. I somehow failed to notice these the last time I updated the Go testsuite. This patch includes a couple of changes to make the newly recognized tests pass. Ran Go testsuite on x86_64-unknown-linux-gnu. Committed

Cross-build breakage with libstdc++-v3 doc changes

2012-01-17 Thread Hans-Peter Nilsson
> From: Benjamin Kosnik > Date: Wed, 18 Jan 2012 00:41:59 +0100 > This updates the support for generating epub docs to EPUB3. Using the > EPUB3 stylesheets allows the removal of ruby and other tool checks from > configure, and generates a much better documentation file. ...or for cross-targets,

[pph] Rebuild identifier bindings. (issue5557045)

2012-01-17 Thread Lawrence Crowl
Instead of emitting identifiers with binding information, emit them without and then patch up that information later. We switch to this technique because the cycles in binding info were causing no end of troubles. This change requires handling namespaces differently from before. In particular, w

[v3] doc updates

2012-01-17 Thread Benjamin Kosnik
Regerate the html docs included in the source distribution. -benjamin 20120117-2.patch.bz2 Description: application/bzip

Re: [PATCH] PR debug/45682 - wrong struct DIE nesting with -fdebug-types-section

2012-01-17 Thread Cary Coutant
On Tue, Jan 17, 2012 at 12:41 PM, Jason Merrill wrote: >> +      /* If the original DIE was a specification, we need to put >> +         the skeleton under the parent DIE of the declaration.  */ >> +      if (new_parent != NULL) >> +       { >> +         remove_child_with_prev (child, prev); >> +

[v3] doc-epub rule updates

2012-01-17 Thread Benjamin Kosnik
This updates the support for generating epub docs to EPUB3. Using the EPUB3 stylesheets allows the removal of ruby and other tool checks from configure, and generates a much better documentation file. tested x86/linux -benjamin2012-01-17 Benjamin Kosnik * configure.ac (BUILD_EPUB): Adj

[PATCH][Cilkplus] Array notations for Function Calls and Unary Expressions

2012-01-17 Thread Iyer, Balaji V
Hello Everyone, This patch is for the Cilkplus branch affecting the C++ Compiler. This patch will allow the use of array notations triplets as a function call parameter and for post and pre increment/decrement. Thanking You, Yours Sincerely, Balaji V. Iyer.diff --git a/gcc/cp/ChangeLog.cil

Re: [PATCH] PR debug/45682 - wrong struct DIE nesting with -fdebug-types-section

2012-01-17 Thread Jason Merrill
+ /* If the original DIE was a specification, we need to put + the skeleton under the parent DIE of the declaration. */ + if (new_parent != NULL) + { + remove_child_with_prev (child, prev); + add_child_die (new_parent, skeleton); + } This adds a new

Ping^3: Out-of-order update of new_spill_reg_store[]

2012-01-17 Thread Richard Sandiford
Ping for this reload patch: http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00266.html or perhaps the original: http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00663.html which fixes some wrong-code regressions on mips64-linux-gnu. Richard

Re: [PATCH] PR50325 store_bit_field: Fix for big endian targets

2012-01-17 Thread Richard Sandiford
Richard Sandiford writes: > Iain Sandoe writes: >> On 17 Nov 2011, at 09:25, Andreas Krebbel wrote: >>> On 11/17/2011 03:44 AM, David Edelsohn wrote: Andreas, This patch seems to have introduced a failure for all of the gcc.dg-struct-layout tests on AIX. gcc.dg-struc

Re: [patch c++]: Fix for PR c++/51344 - cc1plus hangs when compiling

2012-01-17 Thread Jason Merrill
On 01/17/2012 02:41 PM, Kai Tietz wrote: Right, but in second call we get for cplus_decl_attributes's late_attrs (as result of splice_template_attributes) the same value as already stored in decl_p's attributes. Right, but why is it already stored there? Jason

Re: RFC: allowing fwprop to propagate subregs

2012-01-17 Thread Richard Kenner
> I tried to implement that suggestion, but interestingly enough I cannot > really test it since I was unable to find any single case where that > SUBREG case in apply_distributive_law actually causes any difference > whatsoever in generated code. > > Do you have any further suggestion of how to f

Go patch committed: Don't use import path for ./ or ../ imports

2012-01-17 Thread Ian Lance Taylor
When importing a path which starts with ./ or ../, we should not use the import path. This patch implements that. This makes gccgo compatible with the other Go compiler in how such paths are handled. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian dif

Re: [patch c++]: Fix for PR c++/51344 - cc1plus hangs when compiling

2012-01-17 Thread Kai Tietz
2012/1/17 Jason Merrill : > On 01/17/2012 02:30 PM, Kai Tietz wrote: >> >> 2012/1/17 Jason Merrill: >>> >>> How does this happen?  Are we setting DECL_ATTRIBUTES twice? >> >> >> Yes, we call it for this example twice.  One time in >> 'begin_class_definition'. and second time in 'do_friend'. > > > S

Re: [patch c++]: Fix for PR c++/51344 - cc1plus hangs when compiling

2012-01-17 Thread Jason Merrill
On 01/17/2012 02:30 PM, Kai Tietz wrote: 2012/1/17 Jason Merrill: How does this happen? Are we setting DECL_ATTRIBUTES twice? Yes, we call it for this example twice. One time in 'begin_class_definition'. and second time in 'do_friend'. Surely the call from begin_class_definition isn't for

Re: [patch c++]: Fix for PR c++/51344 - cc1plus hangs when compiling

2012-01-17 Thread Kai Tietz
2012/1/17 Jason Merrill : > How does this happen?  Are we setting DECL_ATTRIBUTES twice? > > Jason Yes, we call it for this example twice. One time in 'begin_class_definition'. and second time in 'do_friend'. Kai

Re: [patch c++]: Fix for PR c++/51344 - cc1plus hangs when compiling

2012-01-17 Thread Jason Merrill
How does this happen? Are we setting DECL_ATTRIBUTES twice? Jason

Re: RFC: allowing fwprop to propagate subregs

2012-01-17 Thread Ulrich Weigand
Richard Kenner wrote: > > Maybe the best solution would be to remove the SUBREG case from the generic > > apply_distributive_law subroutine, and instead add a special check for the > > distributed subreg case right at the above place in simplify_set; i.e. to > > perform the inverse distribution onl

[patch c++]: Fix for PR c++/51344 - cc1plus hangs when compiling

2012-01-17 Thread Kai Tietz
Hello, this hang is caused by an end-less loop in private_lookup_attribute caused by double-chaining of attributes in decl2.c's save_template_attributes function. In save_template_attributes we need to check that attribute-list isn't equal to late_attrs before chaining them. ChangeLog gcc/cp 20

Re: [PATCH] PR c++/50852 - loose template parameter comparison

2012-01-17 Thread Jason Merrill
On 11/17/2011 04:21 PM, Dodji Seketeli wrote: + parm = TREE_VALUE (parm_desc); + if (TREE_CODE (parm) == TYPE_DECL) + val = iterative_hash_template_parm_index_no_level + (TEMPLATE_TYPE_PARM_INDEX (TREE_TYPE (parm)), val); + else if (TREE_CODE (parm) == TEMPLATE_DECL)

Fix checks for !TARGET_MACHO

2012-01-17 Thread Tijl Coosemans
TARGET_MACHO is always defined (either 0 or 1) so using #ifndef to test for !TARGET_MACHO is incorrect. Introduced here: http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00623.html The i386 case has been tested on i386-freebsd. The compiler now emits calls to __stack_chk_fail_local again when using -f

[pph] Change representation of mutated trees (issue5540070)

2012-01-17 Thread Diego Novillo
This patch changes the representation of mutated trees to avoid creating unnecessary (and ultimately confusing) cache entries. Mutated trees are those that we read initially from an external PPH image and get changed during parsing. The most common case is when the external PPH image has a decla

Re: [PATCH] PR51280 LTO/trans-mem ICE with TM builtins

2012-01-17 Thread Aldy Hernandez
What I have in mind is to abstract out the initialization of TM builtins from gtm-builtins.def (through its inclusion in builtins.def) into a separate function that we can call either in c_define_builtins() from the C-ish front-ends, or from lto_define_builtins (once we encounter a TM builtin an

Re: [Patch, Fortran] PR 51869 - fix realloc on assignment issue

2012-01-17 Thread Paul Richard Thomas
Dear All, > thanks for the review - and for the f95-lang.c patch. I have updated the > patch to use calloc, build & regtested it, and committed it as Rev. 183247. Good - I will go back to array allocation and use calloc there as well. Cheers Paul

Re: PR other/51165: add new adress_escapes predicate

2012-01-17 Thread Patrick Marlier
On 01/17/2012 08:20 AM, Aldy Hernandez wrote: On 01/17/12 03:09, Richard Guenther wrote: On Mon, Jan 16, 2012 at 4:58 PM, Aldy Hernandez wrote: Not really - you handle both ptr and *ptr in the same predicate and call both "address escaped". What I suggested was sth like I think I confused

[pph] Fix in-memory marking (take 2) (issue5540069)

2012-01-17 Thread Diego Novillo
My previous patch moved the in_memory marker to the wrong place. We need to prevent a file from being re-read by an #include from one of its included children images. This is common in system headers. We mark the file as resident in-memory right before we start reading its includes. Before, we

Re: C++ PATCH for c++/51827 (mangling error with PCH and LTO)

2012-01-17 Thread Jason Merrill
On 01/17/2012 09:51 AM, Richard Guenther wrote: Sure it works. PCH is just a stage where LTO is not active yet. That makes sense to me. Jason

Re: [PATCH] PR51280 LTO/trans-mem ICE with TM builtins

2012-01-17 Thread Richard Guenther
On Tue, 17 Jan 2012, Aldy Hernandez wrote: > On 12/20/11 03:43, Richard Guenther wrote: > > On Mon, 19 Dec 2011, Patrick Marlier wrote: > > > > > On 12/16/2011 03:54 AM, Richard Guenther wrote: > > > > On Thu, 15 Dec 2011, Patrick Marlier wrote: > > > > > > > > > In PR51280, LTO does ICE because

Commit: RX: Predicate return pattern

2012-01-17 Thread Nick Clifton
Hi Guys, As pointed out by Richard Henderson the new return pattern in the RX backend should only be used when it is possible to return with just a simple RTS instruction, so I am checking in the patch below to implement this. Cheers Nick gcc/ChangeLog 2012-01-17 Nick Clifton

Re: [PATCH] PR51280 LTO/trans-mem ICE with TM builtins

2012-01-17 Thread Aldy Hernandez
On 12/20/11 03:43, Richard Guenther wrote: On Mon, 19 Dec 2011, Patrick Marlier wrote: On 12/16/2011 03:54 AM, Richard Guenther wrote: On Thu, 15 Dec 2011, Patrick Marlier wrote: In PR51280, LTO does ICE because the object file uses TM builtin but the TM is not enabled. In the patch, it disp

[pph] Fix marking of in-memory streams (issue5544085)

2012-01-17 Thread Diego Novillo
We were marking STREAM in-memory too late. This was causing repeated attempts to open the same PPH stream more than once. Leading to confusion. * pph-in.c (pph_read_file_1): Move in-memory marking for STREAM... * pph-core.c (pph_stream_register): ... here. git-svn-id: svn+ssh://

[pph] Fix C errors for stage 1 bootstrap (issue5549046)

2012-01-17 Thread Diego Novillo
Various fixes to avoid C syntax errors during stage 1. * name-lookup.c (pph_set_global_identifier_bindings): Make parameter list void. * pph.h (pph_set_global_identifier_bindings): Likewise. * pph-core.c (pph_stream_registry_add_name): Fix use of struct pph

[pph] Consult PPH registry when processing LC_ENTER events (issue5539074)

2012-01-17 Thread Diego Novillo
This patch changes pph_out_line_table_and_includes to use the registry when deciding whether an LC_ENTER linemap is entering a PPH image. We used to keep track of entered images by using a "next" index on the table of read PPH files. The problem with this is that this table contains the transitiv

[pph] Add registry for open PPH images (issue5540067)

2012-01-17 Thread Diego Novillo
This patch adds a centralized registry for all open PPH images. This has three different uses: 1- To associate header pathnames (HEADER_NAME field in pph_stream) and images. Used for looking up PPH streams from header names (e.g., pph_out_line_table_and_includes). 2- To assoc

[pph] Fix relocations of included_from indices (issue5549045)

2012-01-17 Thread Diego Novillo
In a line map entry, there is a field 'included_from' which is the index into the line table corresponding to the file that is including the current line map entry. This index is an absolute value, but given that PPH images may be loaded in different order from different TUs, absolute values cann

Go patch committed: fix gccgo -S

2012-01-17 Thread Ian Lance Taylor
Using gccgo -S without -o did not work correctly because it generated BASE.o rather than BASE.s. This happened because the gccgo driver adds an explicit -o option, but did not take -S into account. A cleaner approach here would be some gcc driver interface to set combine_inputs, but this approach

Re: C++ PATCH for c++/51827 (mangling error with PCH and LTO)

2012-01-17 Thread Richard Guenther
On Tue, Jan 17, 2012 at 3:50 PM, Gabriel Dos Reis wrote: > On Tue, Jan 17, 2012 at 8:43 AM, Richard Guenther > wrote: > >>> I think we should issue a diagnostic about the combination of these >>> two flags.  Silent ignorance would lead to false user expectations >>> and supposed "bug" reports, if

Re: [PATCH] Fix powerpc64-linux -mminimal-toc shrink-wrapping bootstrap failure (PR bootstrap/51872)

2012-01-17 Thread Richard Guenther
On Tue, 17 Jan 2012, David Edelsohn wrote: > On Tue, Jan 17, 2012 at 5:16 AM, Jakub Jelinek wrote: > > Hi! > > > > crtbegin.o is miscompiled on powerpc64-linux with -mminimal-toc (and likely > > many other sources).  The problem is that when flag_pic is 0, the > > shrink-wrapping code doesn't con

Re: C++ PATCH for c++/51827 (mangling error with PCH and LTO)

2012-01-17 Thread Gabriel Dos Reis
On Tue, Jan 17, 2012 at 8:43 AM, Richard Guenther wrote: >> I think we should issue a diagnostic about the combination of these >> two flags.  Silent ignorance would lead to false user expectations >> and supposed "bug" reports, if not confusion. > > I'm not sure what "expectation" there would be

Re: [PATCH] Fix powerpc64-linux -mminimal-toc shrink-wrapping bootstrap failure (PR bootstrap/51872)

2012-01-17 Thread David Edelsohn
On Tue, Jan 17, 2012 at 5:16 AM, Jakub Jelinek wrote: > Hi! > > crtbegin.o is miscompiled on powerpc64-linux with -mminimal-toc (and likely > many other sources).  The problem is that when flag_pic is 0, the > shrink-wrapping code doesn't consider register r30 being set up by the > prologue, so in

Re: C++ PATCH for c++/51827 (mangling error with PCH and LTO)

2012-01-17 Thread Richard Guenther
On Tue, Jan 17, 2012 at 2:23 PM, Diego Novillo wrote: > On Tue, Jan 17, 2012 at 04:35, Richard Guenther > wrote: > >> +  /* Disable LTO output when outputting a precompiled header.  */ >> +  if (pch_file && flag_lto) >> +    { >> +      flag_lto = 0; >> +      flag_generate_lto = 0; >> +    } >>

Re: [Patch, Fortran] PR 51869 - fix realloc on assignment issue

2012-01-17 Thread Tobias Burnus
Dear Janne, dear Paul, thanks for the review - and for the f95-lang.c patch. I have updated the patch to use calloc, build & regtested it, and committed it as Rev. 183247. Tobias 2012-01-17 Tobias Burnus Janne Blomqvist PR fortran/51869 * trans-expr.c (alloc_scalar_a

Re: libgo patch committed: Update to weekly.2011-12-22

2012-01-17 Thread Ian Lance Taylor
Rainer Orth writes: > Ian Lance Taylor writes: > >> I have committed a patch to libgo to update it to the weekly.2011-12-22 >> release. As usual I am not including all the changes here, only the >> ones to files which are specific to gccgo. Bootstrapped and ran Go >> testsuite on x86_64-unknow

Re: libgo patch committed: Update to weekly.2011-12-22

2012-01-17 Thread Ian Lance Taylor
Uros Bizjak writes: > The library compiles OK, with following small patch: > > --cut here-- > Index: mksysinfo.sh > === > --- mksysinfo.sh(revision 183192) > +++ mksysinfo.sh(working copy) > @@ -538,7 +538,7 @@ > # W

Re: C++ PATCH for c++/51827 (mangling error with PCH and LTO)

2012-01-17 Thread Diego Novillo
On Tue, Jan 17, 2012 at 04:35, Richard Guenther wrote: > +  /* Disable LTO output when outputting a precompiled header.  */ > +  if (pch_file && flag_lto) > +    { > +      flag_lto = 0; > +      flag_generate_lto = 0; > +    } > + Emit a warning when you do this? Diego.

Re: C++ PATCH for c++/51827 (mangling error with PCH and LTO)

2012-01-17 Thread Gabriel Dos Reis
On Tue, Jan 17, 2012 at 3:35 AM, Richard Guenther wrote: > On Mon, Jan 16, 2012 at 10:29 PM, Jason Merrill wrote: >> When outputting PCH/LTO, the compiler tries to generate mangled names for >> all decls before discarding language-specific data.  But that doesn't make >> sense for templates, and

Re: PR other/51165: add new adress_escapes predicate

2012-01-17 Thread Aldy Hernandez
On 01/17/12 03:09, Richard Guenther wrote: On Mon, Jan 16, 2012 at 4:58 PM, Aldy Hernandez wrote: Not really - you handle both ptr and *ptr in the same predicate and call both "address escaped". What I suggested was sth like I think I confused myself and you by asking the wrong question i

Re: [PATCH] Fix -fdump-rtl-ira segfault

2012-01-17 Thread Richard Guenther
On Tue, Jan 17, 2012 at 1:58 PM, Andreas Krebbel wrote: > Hi, > > -fdump-rtl-ira currently segfaults on s390 if not also a reload dump > is requested.  The problem is that the ira_dump_file variable during > reload still points to the ira dump file although the file has already > been closed by th

Re: [Patch, fortran] PR51634 - [OOP] ICE with polymorphic operators

2012-01-17 Thread Tobias Burnus
On 01/17/2012 01:25 PM, Paul Richard Thomas wrote: The attached is self-explanatory and fixes the last wrinkles with PR51634. In addition, the patch incorporates the requirements of class expressions being used throughout, as reflected in the second testcase. Bootstrapped and regtested on FC9/x8

[PATCH] Fix -fdump-rtl-ira segfault

2012-01-17 Thread Andreas Krebbel
Hi, -fdump-rtl-ira currently segfaults on s390 if not also a reload dump is requested. The problem is that the ira_dump_file variable during reload still points to the ira dump file although the file has already been closed by the pass manager already. Ok for mainline? Bye, -Andreas- 2012-01

Re: [libitm] Skip static_ctor.C test (PR libitm/51173)

2012-01-17 Thread Aldy Hernandez
I'd like to simply disable it if they don't have other preferences. Disabling is fine with me.

Re: [Patch, Fortran] PR 51869 - fix realloc on assignment issue

2012-01-17 Thread Janne Blomqvist
On Tue, Jan 17, 2012 at 14:36, Janne Blomqvist wrote: > On Tue, Jan 17, 2012 at 14:29, Paul Richard Thomas > wrote: >> Dear Tobias and Janne, >> >> I had preparedand was about to submit the identical patch :-) >> >> On Tue, Jan 17, 2012 at 12:45 PM, Janne Blomqvist >> wrote: >>> On Tue, Jan 17,

Re: Support Solaris 11/SPARC in MD_FALLBACK_FRAME_STATE_FOR (PR ada/41929)

2012-01-17 Thread Rainer Orth
Eric Botcazou writes: >> Unfortunately, this version completely breaks Solaris 11. Given that >> your primary (only?) justification for this patch seems to be a 7-year >> old Beta version of Solaris 10 (s10_72) nobody in his right mind should >> be running right now, I suggest simply reverting t

Re: [Patch, Fortran] PR 51869 - fix realloc on assignment issue

2012-01-17 Thread Janne Blomqvist
On Tue, Jan 17, 2012 at 14:29, Paul Richard Thomas wrote: > Dear Tobias and Janne, > > I had preparedand was about to submit the identical patch :-) > > On Tue, Jan 17, 2012 at 12:45 PM, Janne Blomqvist > wrote: >> On Tue, Jan 17, 2012 at 13:24, Tobias Burnus wrote: >>> This patch nullifies (sca

Re: [Patch, Fortran] PR 51869 - fix realloc on assignment issue

2012-01-17 Thread Paul Richard Thomas
Dear Tobias and Janne, I had preparedand was about to submit the identical patch :-) On Tue, Jan 17, 2012 at 12:45 PM, Janne Blomqvist wrote: > On Tue, Jan 17, 2012 at 13:24, Tobias Burnus wrote: >> This patch nullifies (scalar) allocatables after malloc, if (and only if) >> they contain alloca

[Patch, fortran] PR51634 - [OOP] ICE with polymorphic operators

2012-01-17 Thread Paul Richard Thomas
Dear All, The attached is self-explanatory and fixes the last wrinkles with PR51634. In addition, the patch incorporates the requirements of class expressions being used throughout, as reflected in the second testcase. Bootstrapped and regtested on FC9/x86_64 - OK for trunk. Cheers Paul 2012-0

Re: [PATCH] Fix tree_function_versioning with void type DECL_RESULT (PR tree-optimization/51865)

2012-01-17 Thread Eric Botcazou
> The recent changes in tree_function_versioning broke the following > testcase. If DECL_RESULT exists, but has void type, then we used to > remap_decl it before, but now we don't, so in this case the same > RESULT_DECL is used in two different functions, which upsets ipa-pta, but > could upset ot

Re: [RFC] Fixing expansion of misaligned MEM_REFs on strict-alignment targets

2012-01-17 Thread Richard Guenther
On Tue, 17 Jan 2012, Eric Botcazou wrote: > > Eric, do you have any objections in principle of handling > > get_object_or_type_alignment () < GET_MODE_ALIGNMENT (mode) > > stores/loads this way? > > None, extract_bit_field/store_bit_field are the right devices for this > purpose. > What I have o

Re: [RFC] Fixing expansion of misaligned MEM_REFs on strict-alignment targets

2012-01-17 Thread Eric Botcazou
> Eric, do you have any objections in principle of handling > get_object_or_type_alignment () < GET_MODE_ALIGNMENT (mode) > stores/loads this way? None, extract_bit_field/store_bit_field are the right devices for this purpose. What I have objections against is to have types that are less aligned t

Re: [Patch, Fortran] PR 51869 - fix realloc on assignment issue

2012-01-17 Thread Janne Blomqvist
On Tue, Jan 17, 2012 at 13:24, Tobias Burnus wrote: > This patch nullifies (scalar) allocatables after malloc, if (and only if) > they contain allocatable components to make sure that no uninitialized > memory is accessed. > > Build and regtested on x86-64-linux. > OK for the trunk? calloc potent

[Patch, Fortran] PR 51869 - fix realloc on assignment issue

2012-01-17 Thread Tobias Burnus
This patch nullifies (scalar) allocatables after malloc, if (and only if) they contain allocatable components to make sure that no uninitialized memory is accessed. Build and regtested on x86-64-linux. OK for the trunk? Tobias 2012-01-17 Tobias Burnus PR fortran/51869 * trans-expr.c (all

Re: Support Solaris 11/SPARC in MD_FALLBACK_FRAME_STATE_FOR (PR ada/41929)

2012-01-17 Thread Eric Botcazou
> Unfortunately, this version completely breaks Solaris 11. Given that > your primary (only?) justification for this patch seems to be a 7-year > old Beta version of Solaris 10 (s10_72) nobody in his right mind should > be running right now, I suggest simply reverting this patch. I think that we

[PATCH] Fix PR51782(?)

2012-01-17 Thread Richard Guenther
This should fix PR51782 - we need to look at the base address operand of MEM_REF and TARGET_MEM_REF to get at the address-space information as both can have an embedded VIEW_CONVERT_EXPR. This is then consistent with the gimple type system which keeps address-space changing conversions of pointer

Re: [PATCH] Fix tail merging (PR tree-optimization/51877)

2012-01-17 Thread Richard Guenther
On Tue, 17 Jan 2012, Jakub Jelinek wrote: > Hi! > > We tail merge > a = bar (7); > with > *x = bar (7); > completely ignoring the case that the lhs are different. > IMHO we can't merge if one of the calls has lhs and the other doesn't, > or if both calls have non-SSA_NAME lhs and they aren't

[PATCH] Fix tail merging (PR tree-optimization/51877)

2012-01-17 Thread Jakub Jelinek
Hi! We tail merge a = bar (7); with *x = bar (7); completely ignoring the case that the lhs are different. IMHO we can't merge if one of the calls has lhs and the other doesn't, or if both calls have non-SSA_NAME lhs and they aren't equal (this case). If both calls have SSA_NAME lhs, I can see

[PATCH] Fix powerpc64-linux -mminimal-toc shrink-wrapping bootstrap failure (PR bootstrap/51872)

2012-01-17 Thread Jakub Jelinek
Hi! crtbegin.o is miscompiled on powerpc64-linux with -mminimal-toc (and likely many other sources). The problem is that when flag_pic is 0, the shrink-wrapping code doesn't consider register r30 being set up by the prologue, so instructions that use r30 (TOC_REGISTER) can be considered usable ev

[PATCH] Fix ICE with -Wp,-pie (PR driver/47249)

2012-01-17 Thread Jakub Jelinek
Hi! We ICE with -Wp,-pie, as -pie (and -shared/--pie/--shared) are marked as Common options, but aren't handled in the cc1/cc1plus/etc. options handling. Fixed by making those options Driver specific, and for the time being add their help strings to display_help. Bootstrapped/regtested on x86_64

Re: [libitm] Skip static_ctor.C test (PR libitm/51173)

2012-01-17 Thread Rainer Orth
Mike Stump writes: > On Jan 16, 2012, at 9:14 AM, Rainer Orth wrote: >> As suggested in the PR, it would be better to just skip the test to >> avoid noise in mail-report.log: > > Usually we avoid noise in the testing log files by making testcases > pass? I know, this one is kinda inelegant, but

Re: [build] Disable dl_iterate_phdr on Solaris 10

2012-01-17 Thread Rainer Orth
Rainer Orth writes: > 2012-01-15 Rainer Orth > > * configure.ac (gcc_cv_target_dl_iterate_phdr): Only check on > Solaris 11+. > * configure: Regenerate. It helps to actually attach the patch. diff --git a/gcc/configure.ac b/gcc/configure.ac --- a/gcc/configure.ac +++ b/gcc/

[build] Disable dl_iterate_phdr on Solaris 10

2012-01-17 Thread Rainer Orth
Mainline bootstrap is currently failing on Solaris 10 Update 10 with GNU ld. cc1 etc. are failing to link in stage2 like this: /var/gcc/regression/trunk/10-gcc-gas-gld/build/./prev-gcc/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE': /vol/gcc/src/hg/trunk/local/libgcc/unwind-dw2

Re: [PATCH] Fix PR 33512 Folding of x & ((~x) | y) into x & y on the tree level

2012-01-17 Thread Richard Guenther
On Tue, Jan 17, 2012 at 8:06 AM, Andrew Pinski wrote: > Hi, >  This adds the folding of x & ((~x) | y)) into x & y on the tree > level via fold-const.c > There is already partly done on the RTL level but it would be a good > thing for the tree level also. > > > OK for 4.8 (yes I know we have not b

Re: C++ PATCH for c++/51827 (mangling error with PCH and LTO)

2012-01-17 Thread Richard Guenther
On Mon, Jan 16, 2012 at 10:29 PM, Jason Merrill wrote: > When outputting PCH/LTO, the compiler tries to generate mangled names for > all decls before discarding language-specific data.  But that doesn't make > sense for templates, and leads to conflicts in this case. Fixed by refusing > to mangle

Re: PR other/51165: add new adress_escapes predicate

2012-01-17 Thread Richard Guenther
On Mon, Jan 16, 2012 at 4:58 PM, Aldy Hernandez wrote: > >> Not really - you handle both ptr and *ptr in the same predicate and >> call both "address escaped".  What I suggested was sth like > > > I think I confused myself and you by asking the wrong question in the first > place. > > Actually, wh

patch ping: Add static branch predict heuristic of comparing IV to loop_bound variable

2012-01-17 Thread Dehao Chen
http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00377.html Thanks! Dehao