Re: empty range in pop_heap

2011-12-04 Thread Markus Trippelsdorf
On 2011.12.03 at 15:35 +, Jonathan Wakely wrote: On 12 November 2011 15:14, Jonathan Wakely wrote: On 12 November 2011 15:04, Marc Glisse wrote: Debug-mode seems to check that first,last is a valid range, is a heap, but not that it is not empty. Maybe it could? Good idea, thanks.  

Ping: Shrink-wrapping vs. EXIT_IGNORE_STACK

2011-12-04 Thread Richard Sandiford
Ping for: http://gcc.gnu.org/ml/gcc-patches/2011-11/msg02449.html which fixes a wrong-code bug in reorg.c for MIPS. Richard

Fix ICE in call to out-of-line __sync_lock_test_and_set

2011-12-04 Thread Richard Sandiford
I think I must have messed up my previous testing of MIPS16 __sync stuff. This patch fixes one bit of fallout, as seen in ia64-sync-1.c. If the result of sync_lock_test_and_set is unused, the optab helper routine maybe_emit_sync_lock_test_and_set gets called with a target of const0_rtx. If the

[committed] PR51351: misnamed ior sync routines

2011-12-04 Thread Richard Sandiford
[Sorry Kaz, there might be some overlapping work here. I wrote the patch before realising there was a PR about it.] This patch fixes link failures in various atomic tests on MIPS16. The internal optab names use ior to be consistent with the GCC rtl convention, but the external names use or

[testsuite] Adding missing dg-require-profiling directives

2011-12-04 Thread Richard Sandiford
Several profiling tests fail for MIPS16. The problem is that MIPS has native TLS support, but the ABI has not yet been extended to MIPS16. MIPS16 is supposed to be link-compatible with non-MIPS16, so we can't use emultls, and must simply say sorry(). This patch adds dg-require-profiling to the

Re: [Patch] Increase array sizes in vect-tests to enable 256-bit vectorization

2011-12-04 Thread Richard Guenther
On Sat, Dec 3, 2011 at 5:54 PM, Michael Zolotukhin michael.v.zolotuk...@gmail.com wrote: I mean, that, when 256-bit vectorization is enabled we still use 128bit vectorization if the arrays are too short for 256bit vectorization.  You'll lose this test coverage when you change the array sizes.

Add a prepare_pch_save target hook

2011-12-04 Thread Richard Sandiford
A while back I added the target_globals structure, to allow a backend to switch between two very different ISA modes without paying the full target_reinit penalty each time. This made a huge difference to compile time, but had a drawback: the target_globals structure contained both GGC and

Re: Find more shrink-wrapping opportunities

2011-12-04 Thread Richard Sandiford
Richard Sandiford rdsandif...@googlemail.com writes: Richard Sandiford rdsandif...@googlemail.com writes: Bernd Schmidt ber...@codesourcery.com writes: The reason I'm suddenly reviewing the code now is that it doesn't prevent shrink-wrapping, because nothing adds register 2 to the liveness

Re: [PATCH] Remove dead labels to increase superblock scope

2011-12-04 Thread Richard Sandiford
Tom de Vries tom_devr...@mentor.com writes: OK, factored out delete_label now. Bootstrapped and reg-tested on x86_64. Ok for next stage1? Looks good codewise. I'm just a bit worried about the name delete_label. delete_insn (label) should always do the right thing for a pure deletion; the

[patch] ARM: Fix miscompilation in arm.md:*minmax_arithsi. (PR target/51408)

2011-12-04 Thread Kazu_Hirata
Hi, Attached is a patch to fix miscompilation in arm.md:*minmax_arithsi. The following testcase, reduced from efgcvt_r.c:fcvt_r in glibc, gets miscompiled: extern void abort (void); int __attribute__((noinline)) foo (int a, int b) { int max = (b 0) ? b : 0; return max - a; } int main

[patch] Fix exit phi nodes creation for double reduction - PR 51285

2011-12-04 Thread Ira Rosen
Hi, This patch adds a missing exit phi node for outer loop in vectorization of double reduction. Bootstrapped and tested on powerpc64-suse-linux. Committed. Ira ChangeLog: PR middle-end/51285 * tree-vect-loop.c (vect_create_epilog_for_reduction): Create exit phi nodes

Re: [Patch, fortran] Fix PR 51338 - ICE with front-end optimization and assumed character lengths

2011-12-04 Thread Tobias Burnus
Thomas Koenig wrote: Regression-tested. OK for trunk? 2011-11-29 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/51338 * dependency.c (are_identical_variables): Handle case where end fields of substring references are NULL. 2011-11-29 Thomas Koenig tkoe...@gcc.gnu.org

Re: [PATCH] Remove dead labels to increase superblock scope

2011-12-04 Thread Eric Botcazou
Looks good codewise. Seconded, modulo the file: the function should be in cfgrtl.c instead. I'm just a bit worried about the name delete_label. delete_insn (label) should always do the right thing for a pure deletion; the point of the new routine is that it also moves instructions. It only

Re: [PATCH, PR 50744] Prevent overflows in IPA-CP

2011-12-04 Thread Eric Botcazou
This introduces host-dependent code generation differences, right? You can simply use int64_t for code that is run on the host only. Well, no, there is an entire file dedicated to this business (hwint.h). -- Eric Botcazou

Re: [PATCH, PR 50744] Prevent overflows in IPA-CP

2011-12-04 Thread Richard Guenther
On Sun, Dec 4, 2011 at 4:31 PM, Eric Botcazou ebotca...@adacore.com wrote: This introduces host-dependent code generation differences, right? You can simply use int64_t for code that is run on the host only. Well, no, there is an entire file dedicated to this business (hwint.h). No to what?

Re: [PATCH, PR 50744] Prevent overflows in IPA-CP

2011-12-04 Thread Richard Guenther
On Sun, Dec 4, 2011 at 4:37 PM, Richard Guenther richard.guent...@gmail.com wrote: On Sun, Dec 4, 2011 at 4:31 PM, Eric Botcazou ebotca...@adacore.com wrote: This introduces host-dependent code generation differences, right? You can simply use int64_t for code that is run on the host only.

Re: [PATCH, PR 50744] Prevent overflows in IPA-CP

2011-12-04 Thread Jan Hubicka
No to what? To the fact that HOST_WIDEST_INT is host-dependent and thus should not be used to drive code generation? Or no to the fact that we can (and do) use int64_t as host integer type? No to the fact that int64_t should be used (and the occurrences in the LTO code are OK).

Re: [Patch,AVR] Fix PR51409: error linking lto1 for target avr

2011-12-04 Thread Denis Chertykov
2011/12/4 Georg-Johann Lay a...@gjlay.de: Georg-Johann Lay wrote: http://gcc.gnu.org/ml/gcc-patches/2011-11/msg02574.html As this is a blocker and I am blocked myself by a collect2 issue: Eric, Denis, could one of you test the patch and apply it if it is okay? It is PR51409. I'm sorry,

Re: Shrink-wrapping vs. EXIT_IGNORE_STACK

2011-12-04 Thread Eric Botcazou
* resource.c (init_resource_info): Only consider EXIT_IGNORE_STACK if there is in epilogue. OK, but keep the original order of the tests, i.e. EXIT_IGNORE_STACK is tested only after we know there is a frame pointer: if (!(frame_pointer_needed EXIT_IGNORE_STACK

Re: [testsuite] Adding missing dg-require-profiling directives

2011-12-04 Thread Mike Stump
On Dec 4, 2011, at 3:29 AM, Richard Sandiford rdsandif...@googlemail.com wrote: The problem is that MIPS has native TLS support, but the ABI has not yet been extended to MIPS16. MIPS16 is supposed to be link-compatible with non-MIPS16, so we can't use emultls, and must simply say sorry().

[v3] Doxygen improvements for Type Traits and Utilities

2011-12-04 Thread Jonathan Wakely
This patch declares the Type Traits doxygen group in type_traits not in tr1/type_traits *and* tr2/type_traits. It also makes sure doxygen comments are attached to the actual trait such as is_member_pointer, not a helper such as __is_member_pointer_helper. I added brief descriptions for some of

Re: [PATCH] pass -no_pie to LINK_GCC_C_SEQUENCE_SPEC on darwin

2011-12-04 Thread Jack Howarth
On Sat, Dec 03, 2011 at 10:45:18PM -0800, Mike Stump wrote: On Dec 3, 2011, at 7:25 AM, Jack Howarth wrote: FSF gcc currently doesn't handle -fno-pie and friends properly under Lion. The darwin11 linker now defaults to -pie Okay for gcc trunk and backports to

Re: [PATCH] pass -no_pie to LINK_GCC_C_SEQUENCE_SPEC on darwin

2011-12-04 Thread Mike Stump
On Dec 4, 2011, at 9:09 AM, Jack Howarth howa...@bromo.med.uc.edu wrote: On Sat, Dec 03, 2011 at 10:45:18PM -0800, Mike Stump wrote: On Dec 3, 2011, at 7:25 AM, Jack Howarth wrote: FSF gcc currently doesn't handle -fno-pie and friends properly under Lion. The darwin11 linker now defaults to

Re: Yet another issue with gcc current trunk with ada on cygwin: s-tpoaal.adb:60:13: Specific is undefined (more references follow)

2011-12-04 Thread Eric Botcazou
Actually, the real problem is that the Cygwin-targeted version of gnat shouldn't need those definitions in the first place. Cygwin provides a fairly complete Linux/Posix feature-set, and doing an end-run around it by using the underlying winsock API isn't usually a good idea, so I think

[Patch, Fortran] PR51407 - allow BOZ edit descriptors for REAL/COMPLEX

2011-12-04 Thread Tobias Burnus
Hi all, as Dominique has found, Fortran 2008 allows the BOZ edit descriptors now also with REAL and COMPLEX arguments. (See PR for quotes from the standard.) Build and regtested on x86-64-linux. OK for the trunk? Tobias PS: Thank you, Mikael, for reviewing my ASSOCIATE patch! 2011-12-04

Re: Fix ICE in call to out-of-line __sync_lock_test_and_set

2011-12-04 Thread Richard Henderson
On 12/04/2011 03:07 AM, Richard Sandiford wrote: * optabs.c (maybe_emit_sync_lock_test_and_set): Pass a null target to emit_library_call_value. (expand_atomic_compare_and_swap): Likewise. Ok. r~

[C++ Patch] PR 51404

2011-12-04 Thread Paolo Carlini
Hi, for this ice on invalid, 4.7 Regression, the idea is just early returning error_mark_node from build_functional_cast, after the error, like in all the other error conditions explicitly dealt with there, instead of setting type = error_mark_node. The catch is, for testcases like

[coverage] Some restructuring

2011-12-04 Thread Nathan Sidwell
I've committed this patch to break apart the gcov finalization routines, I believe this will make it easier to fix the problem shown up by bug 51113 -- although this patch does not. Notable changes: * rename coverage_begin_output to coverage_begin_function for consistency with

Re: [PATCH] pass -no_pie to LINK_GCC_C_SEQUENCE_SPEC on darwin

2011-12-04 Thread Jack Howarth
On Sun, Dec 04, 2011 at 09:28:55AM -0800, Mike Stump wrote: On Dec 4, 2011, at 9:09 AM, Jack Howarth howa...@bromo.med.uc.edu wrote: On Sat, Dec 03, 2011 at 10:45:18PM -0800, Mike Stump wrote: On Dec 3, 2011, at 7:25 AM, Jack Howarth wrote: FSF gcc currently doesn't handle -fno-pie and

Re: [PATCH] pass -no_pie to LINK_GCC_C_SEQUENCE_SPEC on darwin

2011-12-04 Thread Jakub Jelinek
On Sun, Dec 04, 2011 at 02:00:20PM -0500, Jack Howarth wrote: at -m32/-m64 on x86_64-apple-darwin11 due to the -pie linker default. Iain had wanted to leave these in place to encourage boehm-gc to be fixed but I doubt that is a realistic goal in the near/middle term. Perhaps we

Re: [PATCH] pass -no_pie to LINK_GCC_C_SEQUENCE_SPEC on darwin

2011-12-04 Thread Jack Howarth
On Sun, Dec 04, 2011 at 08:18:32PM +0100, Jakub Jelinek wrote: On Sun, Dec 04, 2011 at 02:00:20PM -0500, Jack Howarth wrote: at -m32/-m64 on x86_64-apple-darwin11 due to the -pie linker default. Iain had wanted to leave these in place to encourage boehm-gc to be fixed but I doubt

Re: [Patch PPC/Darwin] some tidy-ups for save_world (and a prelude to splitting it out of the rs6000 code).

2011-12-04 Thread Iain Sandoe
On 4 Dec 2011, at 06:35, Mike Stump wrote: On Nov 30, 2011, at 6:28 AM, Iain Sandoe wrote: While trying to track down the vector unwind problems on ppc- darwin, I made some tidy-ups for save_world(). In the end, that was not where the main problem, lay - but I did find a few things wrong

Re: [PATCH] pass -no_pie to LINK_GCC_C_SEQUENCE_SPEC on darwin

2011-12-04 Thread Iain Sandoe
On 4 Dec 2011, at 20:19, Jack Howarth wrote: On Sun, Dec 04, 2011 at 08:18:32PM +0100, Jakub Jelinek wrote: On Sun, Dec 04, 2011 at 02:00:20PM -0500, Jack Howarth wrote: at -m32/-m64 on x86_64-apple-darwin11 due to the -pie linker default. Iain had wanted to leave these in place to

Re: [RFC] Port libitm to powerpc

2011-12-04 Thread Richard Henderson
On 12/03/2011 09:20 AM, Iain Sandoe wrote: version 2 is a modification of your original: a) -FRAME+BASE(r1) cannot be guaranteed to be vec-aligned in general (it isn't on m32 darwin) ... so I've taken the liberty of rounding the gtm_buffer object and then pointing r4 at

Re: [PATCH] pass -no_pie to LINK_GCC_C_SEQUENCE_SPEC on darwin

2011-12-04 Thread Jack Howarth
On Sun, Dec 04, 2011 at 08:35:07PM +, Iain Sandoe wrote: On 4 Dec 2011, at 20:19, Jack Howarth wrote: On Sun, Dec 04, 2011 at 08:18:32PM +0100, Jakub Jelinek wrote: On Sun, Dec 04, 2011 at 02:00:20PM -0500, Jack Howarth wrote: at -m32/-m64 on x86_64-apple-darwin11 due to the -pie linker

Re: [PATCH] Make sibcall argument overlap check less pessimistic (PR middle-end/50074, take 2)

2011-12-04 Thread Eric Botcazou
What about this way? I've groupped the two variables into a structure to make it clear it is internal internal_arg_pointer_based_exp* state, scanning is done in a separate function and the SCAN argument is gone, instead the internal_arg_pointer_based_exp_scan function disables scanning

Re: [libstdc++] doc/xml/manual/abi.xml -- fix references to GCC as well as GNU/Linux

2011-12-04 Thread Gerald Pfeifer
Hi Jonathan, On Sat, 3 Dec 2011, Jonathan Wakely wrote: How's this? I think I got all the versions and dates correct, but I must say I find keeping some of this info in the manual to be tedious and unnecessary. I agree, there is (too) much detailed and extra contents there which does not

Re: [PATCH] Make sibcall argument overlap check less pessimistic (PR middle-end/50074, take 2)

2011-12-04 Thread Jakub Jelinek
On Sun, Dec 04, 2011 at 09:53:42PM +0100, Eric Botcazou wrote: What about this way? I've groupped the two variables into a structure to make it clear it is internal internal_arg_pointer_based_exp* state, scanning is done in a separate function and the SCAN argument is gone, instead the

Re: [RFC] Port libitm to powerpc

2011-12-04 Thread Iain Sandoe
Hi Richard, On 4 Dec 2011, at 20:45, Richard Henderson wrote: On 12/03/2011 09:20 AM, Iain Sandoe wrote: version 2 is a modification of your original: a) -FRAME+BASE(r1) cannot be guaranteed to be vec-aligned in general (it isn't on m32 darwin) ... so I've taken the liberty of rounding

Re: [PATCH] Make sibcall argument overlap check less pessimistic (PR middle-end/50074, take 2)

2011-12-04 Thread Eric Botcazou
I think it is. Those called during internal_arg_pointer_based_exp_scan will see scan_start equal to pc_rtx and won't scan, and for the calls after it, while scan_start won't be pc_rtx, as it is after scan, it is either NULL_RTX with no insns in the sequence, or some insn whose NEXT_INSN is

[C++ Patch] for c++/51319

2011-12-04 Thread Fabien Chêne
Hi, The problem here seems to be that we don't perform the enumeration constant resolving in finish_id_expression when the DECL is a USING_DECL. Consequently, I think we shall strip the USING_DECL before checking for a CONST_DECL. Tested x86_64-unknown-linux-gnu without regressions. OK to commit

[patch committed SH] Add atomic patterns

2011-12-04 Thread Kaz Kojima
Hi, The attached patch adds atomic patterns with software atomic sequences. They are enabled when a new option -msoft-atomic is specified and the option is default for sh-linux. Regtested on sh4-unknown-linux-gnu with no new failures and the doc patch is tested with make info dvi pdf. Applied on

Re: [libstdc++] doc/xml/manual/abi.xml -- fix references to GCC as well as GNU/Linux

2011-12-04 Thread Jonathan Wakely
On 4 December 2011 21:08, Gerald Pfeifer wrote: Hi Jonathan, On Sat, 3 Dec 2011, Jonathan Wakely wrote: How's this?  I think I got all the versions and dates correct, but I must say I find keeping some of this info in the manual to be tedious and unnecessary. I agree, there is (too) much

Re: [testsuite] Adding missing dg-require-profiling directives

2011-12-04 Thread Chung-Lin Tang
On 2011/12/5 12:39 AM, Mike Stump wrote: On Dec 4, 2011, at 3:29 AM, Richard Sandiford rdsandif...@googlemail.com wrote: The problem is that MIPS has native TLS support, but the ABI has not yet been extended to MIPS16. MIPS16 is supposed to be link-compatible with non-MIPS16, so we can't

Re: [Patch] Increase array sizes in vect-tests to enable 256-bit vectorization

2011-12-04 Thread Michael Zolotukhin
Ok, will several tests with short arrays be enough for that or should we keep all the original tests plus new ones with longer arrays? Michael On 4 December 2011 15:44, Richard Guenther richard.guent...@gmail.com wrote: On Sat, Dec 3, 2011 at 5:54 PM, Michael Zolotukhin

Re: [Patch, i386] Limit unroll factor for certain loops on Corei7

2011-12-04 Thread Teresa Johnson
On Fri, Dec 2, 2011 at 11:59 AM, Xinliang David Li davi...@google.com wrote: ; +/* Determine whether LOOP contains floating-point computation. */ +bool +loop_has_FP_comp(struct loop *loop) +{ +  rtx set, dest; This probably should be extended to detect other long latency operations in

Re: [Patch, i386] Limit unroll factor for certain loops on Corei7

2011-12-04 Thread Teresa Johnson
Latest patch which improves the efficiency as described below is included here. Boostrapped and checked again with x86_64-unknown-linux-gnu. Could someone review? Thanks, Teresa 2011-12-04 Teresa Johnson tejohn...@google.com * loop-unroll.c (decide_unroll_constant_iterations): Call

Re: [C++ Patch] for c++/51319

2011-12-04 Thread Fabien Chêne
2011/12/5 Jason Merrill ja...@redhat.com: Is there a reason not to just do  decl = strip_using_decl (decl); early in finish_id_expression? Not really, I've already tried it and it works. I wasn't sure it was correct not to return a USING_DECL in aIl cases -- they are numerous in this huge