[patch] Fix PR 49087 (was Re: Fix crash in vect_is_slp_reduction)

2011-05-22 Thread Ira Rosen
> > > > No, we shouldn't arrive with a NULL use_stmt here. > > I think a proper fix will be to fail if there are no uses. > I'll prepare a patch on Sunday. > Here is the patch. It bails out if LHS has no uses. Bootstrapped and tested on powerpc64-suse-linux. Committed. Ira ChangeLog:

[google]: test case fixes (issue4553055)

2011-05-22 Thread David Li
Due to the inliner change (in google/main), a couple of test cases under gcc.dg/matrix starts to fail (ICE in matrix reorg). The problem can be reproduced in gcc46 with increases inline limit (but not in trunk -- the problem is either fixed or inline behavior is still different). The following work

Re: [PATCH] Fix extract_fixed_bit_field (PR middle-end/49029)

2011-05-22 Thread Eric Botcazou
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux > and tested with a cross to arm-linux on the testcase, ok for trunk/4.6? > > 2011-05-18 Jakub Jelinek > > PR middle-end/49029 > * expmed.c (extract_fixed_bit_field): Test whether target can be used > only af

Re: Remove separate tarballs (was: Re: objc patch (was Re: Problem to install GCC 4.6.0 with Objective-C language))

2011-05-22 Thread Richard Guenther
On Sat, May 21, 2011 at 6:33 PM, Joseph S. Myers wrote: > On Sat, 21 May 2011, Nicola Pero wrote: > >> As a consequence, GTFILES is different depending on whether >> ${srcdir}/gcc/cp/ exists or not.  If it exists, usually the cp gtfiles >> come before the objc ones (due to alphabetical ordering by

Re: [patch, fortran] Some more function elimination tweaks

2011-05-22 Thread Thomas Koenig
Hi Steve, * frontend-passes.c (cfe_register_funcs): Also register character functions if their charlens are known and constant. Also register allocatable functions. 2011-05-18 Thomas Koenig * gfortran.dg/function_optimize_8.f90: New test case. OK. Wai

Re: [PATCH, MELT] add dominance functions

2011-05-22 Thread Gerald Pfeifer
On Fri, 20 May 2011, Basile Starynkevitch wrote: > By the way, I am quite happy of Pierre patches to the MELT branch. Is > this enough to get him a write access to GCC SVN (all legalese is done)? > I fear that to really get that write access, Pierre would also need to > have accepted patches to

Re: C6X port 13/11: MAINTAINERS

2011-05-22 Thread Gerald Pfeifer
On Fri, 13 May 2011, Bernd Schmidt wrote: > Patch appended. Just raised on the steering committee. Gerald

Commit: XStormy16: Fix xstormy16_init_builtins()

2011-05-22 Thread Nick Clifton
Hi Guys, I am checking in the patch below to fix a couple of bugs in the xstormy16_init_builtins function. The first was that the code was initialising the args[2] array element, which does not exist. The second was that the arguments are constructed in the "args" array, but the build_

Re: [PATCH, MELT] add dominance functions

2011-05-22 Thread Basile Starynkevitch
On Sun, 22 May 2011 15:24:30 +0200 (CEST) Gerald Pfeifer wrote: > On Fri, 20 May 2011, Basile Starynkevitch wrote: > > By the way, I am quite happy of Pierre patches to the MELT branch. Is > > this enough to get him a write access to GCC SVN (all legalese is done)? > > I fear that to really get

[patch, fortran] [4.6/4.7 Regression] Fix PR 48955

2011-05-22 Thread Thomas Koenig
Hello world, the attached patch fixes PR 48955, a wrong-code regression for 4.6 and 4.7, including the test case from http://gcc.gnu.org/ml/fortran/2011-05/msg00093.html . It follows the outline from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48955#c7 . Regression-tested. OK for trunk?

[Patch, Fortran] -fcoarray=lib - add registering calls for nonallocatable coarrays

2011-05-22 Thread Tobias Burnus
The following applies to -fcoarray=lib; for -fcoarray=single there should be no change. The coarray communication library needs to know about the coarrays even before the function containing them has been invoked. Thus, the coarrays (of all translation units) need to be registered at start up.

Re: [PATCH PR45098, 9/10] Cheap shift-add.

2011-05-22 Thread Tom de Vries
On 05/21/2011 09:40 AM, Eric Botcazou wrote: >> 2011-05-05 Tom de Vries >> >> PR target/45098 >> * tree-ssa-loop-ivopts.c: Include expmed.h. >> (get_shiftadd_cost): New function. >> (force_expr_to_var_cost): Declare forward. Use get_shiftadd_cost. > > This breaks the Ada co

[PATCH PR48689] ICE in fold-const.c:13798 with fold checking

2011-05-22 Thread Tom de Vries
Hi, I also ran into this assert: ... :0:0: internal compiler error: tree check: expected tree that contains 'common' structure, have 'integer_cst' in fold_checksum_tree, at fold-const.c:13798 ... With a recent change in r172386, using a TREE_CHAIN on an INTEGER_CST has become illegal: ...

[Patch, Fortran] Add RANK intrinsic of TR 29113

2011-05-22 Thread Tobias Burnus
This patch adds the rank intrinsic of the TR 29113 draft. It is a bit boring until gfortran supports DIMENSION(..) ;-) Build and regtested on x86-64-linux. OK for the trunk? Tobias PS: The current draft of TR 29113 is available at http://j3-fortran.org/pipermail/interop-tr/2011-May/000710.htm

Re: [PATCH PR48689] ICE in fold-const.c:13798 with fold checking

2011-05-22 Thread Richard Guenther
On Sun, May 22, 2011 at 6:26 PM, Tom de Vries wrote: > Hi, > > I also ran into this assert: > ... > :0:0: internal compiler error: tree check: expected tree that > contains 'common' structure, have 'integer_cst' in fold_checksum_tree, at > fold-const.c:13798 > ... > > With a recent change in r1723

Re: [PATCH PR45098, 9/10] Cheap shift-add.

2011-05-22 Thread Richard Guenther
On Sun, May 22, 2011 at 6:06 PM, Tom de Vries wrote: > On 05/21/2011 09:40 AM, Eric Botcazou wrote: >>> 2011-05-05  Tom de Vries   >>> >>>      PR target/45098 >>>      * tree-ssa-loop-ivopts.c: Include expmed.h. >>>      (get_shiftadd_cost): New function. >>>      (force_expr_to_var_cost): Declar

Re: [PATCH] split tree_type, a.k.a. "tuplifying types"

2011-05-22 Thread Tom de Vries
Hi, Now that struct tree_type does not exist anymore, 'sizeof (struct tree_type)' generates an error in the following assert in fold_checksum_tree: ... gcc_assert ((sizeof (struct tree_exp) + 5 * sizeof (tree) <= sizeof (struct tree_function_decl)) && sizeof (struct

C++ PATCH for c++/48647 (wrong common pointer type in SFINAE)

2011-05-22 Thread Jason Merrill
The SFINAE code in composite_pointer_type_r correctly avoids giving an error in SFINAE context, but then it just uses the permissive fallback without indicating to the caller that there was an error, so we get wrong results. This patch fixes it to return error_mark_node when we see an error.

Re: [patch, fortran] [4.6/4.7 Regression] Fix PR 48955

2011-05-22 Thread Paul Richard Thomas
Dear Thomas, I am sorry for the long silence on this PR. I have been up to my eyeballs in daytime work. I have posted a simpler alternative on the PR that uses your suggestion that forward and backward dependences need to to be recorded to get this right. I believe that it's OK but have only no

Re: [PATCH PR45098, 9/10] Cheap shift-add.

2011-05-22 Thread Eric Botcazou
> I didn't manage to reproduce the breakage, but I think this patch will fix > it. You need a 32-bit host. > The patch makes sure cst_and_fits_in_hwi is tested before using > int_cst_value. This should be sufficient indeed, thanks. > 2011-05-22 Tom de Vries > > PR target/45098 >

[PATCH, i386]: Fix PR 49104 - bootstrap failure on AMD K6-2 with illegal instruction (cmove) in stage2

2011-05-22 Thread Uros Bizjak
Hello! The problem is in optimized search_line_mmx function in libcpp/lex.c. This function is compiled for SSE target, so cmove instructions are automatically enabled. In addition, "pmovmskb" instruction is part of "AMD extensions to MMX" instruction set, marked by bit 22 in register %edx from cp

Re: [PATCH][4.6] detect C++ errors to fix 2288 and 18770

2011-05-22 Thread Jack Howarth
On Thu, Mar 18, 2010 at 01:50:54PM -0700, Janis Johnson wrote: > The ISO C++ standard says, in Section 3.3.2 sentence 4, that a name > declared in the for-init-statement or in the condition of an if, for > while, or switch statement can't be redeclared in the outermost block > of the controlled sta

[Patch, Fortran, committed] Minor libgfortran/runtime/stop.c cleanup

2011-05-22 Thread Tobias Burnus
Committed as Rev. 174039 Tobias Index: libgfortran/runtime/stop.c === --- libgfortran/runtime/stop.c (Revision 174038) +++ libgfortran/runtime/stop.c (Arbeitskopie) @@ -67,8 +67,7 @@ stop_string (const char *string, GFC_INTEGER_4 len

[SPARC] Re-enable crti.o crtn.o compilation for some targets

2011-05-22 Thread Eric Botcazou
This re-enables the compilation of crti.o crtn.o for sparc-elf and sparc-rtems that was disabled in 4.6.0 but turned out to be disturbing. This also enables it for sparc64-elf and sparc64-rtems and removes obsolete EXTRA_MULTILIB_PARTS settings in a couple of files. Bootstrapped/regtested on S

[SPARC] Add another pattern to sparc_delegitimize_address

2011-05-22 Thread Eric Botcazou
In preparation for another change. Bootstrapped/regtested on SPARC/Solaris and SPARC64/Solaris, applied on the mainline. 2011-05-22 Eric Botcazou * config/sparc/sparc.c (sparc_delegitimize_address): Handle UNSPEC_MOVE_PIC pattern. -- Eric Botcazou Index: config/sparc/spar

Re: [Patch, libfortran] PR 48931 Async-signal-safety of backtrace signal handler

2011-05-22 Thread FX
Dear Janne, Sorry I'm a bit late on this, but since async-signal-safe code is so hard to get right (at least for me), I wanted to help review your new code. It's very nice to have this instead of my initial ugly implementation, and I have only spotted on issue: AFAICT, execvp() is not safe to u

[Solaris] Fix profiling

2011-05-22 Thread Eric Botcazou
Hi, after http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02139.html profiling uses TLS support where available. This breaks on SPARC/Solaris 8 and 9 (at least) because the associated libraries aren't linked in. Tested on SPARC/Solaris 8 and SPARC64/Solaris 9 (the Solaris 10 machine isn't in ver

[patch] Fix var-tracking with dynamic stack realignment on x86

2011-05-22 Thread Eric Botcazou
var-tracking doesn't fully work with dynamic stack realignment on x86 when a DRAP register is used for a function: the value of the incoming parameters is very quickly wrong (as soon as the DRAP register is clobbered), in particular in backtraces. The reason is that var-tracking doesn't track pa

Re: [BACKPORT] Fix PR rtl-optimization/45593

2011-05-22 Thread John David Anglin
On Sat, 14 May 2011, John David Anglin wrote: > > OK, thanks. Note that another delay slot bug was fixed around the same > > time: > > > > 2010-09-20 Eric Botcazou > > > > PR rtl-optimization/42775 > > * cfgrtl.c (rest_of_pass_free_cfg): Recompute notes if delay slot > > schedul

[patch] fix c++/18016 - warn about self-initialization in constructor init-list

2011-05-22 Thread Jonathan Wakely
I didn't get this reviewed previously so I'll try again for 4.7 ... -- Forwarded message -- Here's my attempt to fix PR c++/18016 so that we get a warning from struct S {  int i;  S() : i(i) { } }; As I said in the audit trail, -Winit-self is broken for C++ (PR c++/34772) so I

PR 48826: NOTE_INSN_CALL_ARG_LOCATION vs. define_split

2011-05-22 Thread Richard Sandiford
In PR 44826, we split a pre-reload call into another call followed by a load of GP. The problem is that we're running the split pass after var-tracking, and the original call had a NOTE_INSN_CALL_ARG_LOCATION attached to it. We need to move the note to the new call, just like we already move othe

Re: Use Enum for MIPS -march=, -mtune=, -mips options

2011-05-22 Thread Richard Sandiford
"Joseph S. Myers" writes: > The processing of MIPS_CPU_STRING_DEFAULT is replaced by much simpler > use of strcmp to find a matching entry; the "from-abi" default > definition of that macro is replaced by code in mips_default_arch if > that macro is not defined. (Previously it would always have b

Re: [PATCH][4.6] detect C++ errors to fix 2288 and 18770

2011-05-22 Thread Gerald Pfeifer
On Sun, 22 May 2011, Jack Howarth wrote: >> 2010-03-18 Janis Johnson >> >> gcc/cp >> PR c++/2288 >> PR c++/18770 >> * name-lookup.h (enum scope_kind): Add sk_cond. >> * name-lookup.c (pushdecl_maybe_friend): Get scope of shadowed local. >> Detect and report error for re

Minor adjustment to try_forward_edges

2011-05-22 Thread Eric Botcazou
After processing each outgoing edge of a basic block, try_forward_edges tests whether the block is a forwarder block. This doesn't make much sense since, if there are still more than one outgoing edge, then this cannot be a forwarder block. The attached patch arranges for the test to be done o

[committed] Make -fno-delayed-branch imply -Wa,-O1 on MIPS

2011-05-22 Thread Richard Sandiford
Following the discussion here: http://gcc.gnu.org/ml/gcc/2011-05/msg00216.html this patch makes -fno-delayed-branch imply -Wa,-O1. It also makes sure that we explicitly assemble with -O0 by default. (Previously, we'd assemble with -O0 if the user specified -O0, but assemble with the default

Re: [committed] Make -fno-delayed-branch imply -Wa,-O1 on MIPS

2011-05-22 Thread Richard Sandiford
Richard Sandiford writes: > this patch makes -fno-delayed-branch imply -Wa,-O1. It also makes > sure that we explicitly assemble with -O0 by default. Um, I meant -O1. The point is that -Wa,-O0 vs -Wa,-O1 isn't really an optimization decision; -O0 just inserts nops that weren't even implied by t

Re: [PATCH][4.6] detect C++ errors to fix 2288 and 18770

2011-05-22 Thread H.J. Lu
On Sun, May 22, 2011 at 2:29 PM, Gerald Pfeifer wrote: > On Sun, 22 May 2011, Jack Howarth wrote: >>> 2010-03-18  Janis Johnson   >>> >>> gcc/cp >>>      PR c++/2288 >>>      PR c++/18770 >>>      * name-lookup.h (enum scope_kind): Add sk_cond. >>>      * name-lookup.c (pushdecl_maybe_friend): Get

Fix for PR 48988

2011-05-22 Thread Xinliang David Li
Hi, the following trial patch fixed PR 48988 which is a regression. Bootstrap and tested on x86/linux. Verified the reported failure is fixed. Ok for trunk? David 2011-05-22 David Li PR tree-optimization/48988 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):

Re: New options to disable/enable any pass for any functions (issue4550056)

2011-05-22 Thread Xinliang David Li
Ping. David On Fri, May 20, 2011 at 9:06 AM, Xinliang David Li wrote: > Ok to check in this one? > > Thanks, > > David > > On Wed, May 18, 2011 at 12:30 PM, Joseph S. Myers > wrote: >> On Wed, 18 May 2011, David Li wrote: >> >>> +      error ("Unrecognized option %s", is_enable ? "-fenable" :

[v3] libstdc++/49058

2011-05-22 Thread Paolo Carlini
Hi, see the audit trail for some interesting observations... Tested x86_64-linux, committed mainline and 4_6-branch. Thanks, Paolo. / 2011-05-22 Jonathan Wakely * testsuite/20_util/bind/cv_quals_2.cc: New. 2011-05-22 Paolo Carlini PR libstdc++/4905

Re: [patch] fix c++/18016 - warn about self-initialization in constructor init-list

2011-05-22 Thread Jason Merrill
On 05/22/2011 05:11 PM, Jonathan Wakely wrote: As I said in the audit trail, -Winit-self is broken for C++ (PR c++/34772) Not anymore. :) Even if -Winit-self wasn't broken I don't think it applies here, there's no valid reason to initialize a member with itself, if you really want to leave a

Re: Patch: New GTY ((atomic)) option

2011-05-22 Thread Laurynas Biveinis
2011/5/20 Nicola Pero : > I'd like to show you a testcase, but, as you discuss in your other email, we > can't > really write GTY testcases at this stage.  So here is a walked tour of how to > test > the new atomic option -- [...] > To test that the GC marking actually works, I mostly bootstrap t