RFA (layout): PATCH for c++/48029 (ICE-on-valid with templates and arrays)

2011-03-09 Thread Jason Merrill
In this testcase, when we first declare the myvectypes and mytype3, vector has not been instantiated, so we mark the array, and the pointer to the array, for structural equality comparison. When we actually go to instantiate mytype3, we complete vector and rebuild the array and pointer types,

Re: [4.7] Avoid global state in score_handle_option

2011-03-09 Thread Liqin Chen
Hi Joseph, Joseph Myers 写于 2011-03-10 08:59:52: > Tested building cc1 and xgcc for cross to score-elf. Will commit to > trunk for 4.7 in the absence of target maintainer objections. Thanks Joseph, please commit. We will merge it in our new update. Cheers --liqin

[pph] Buffer overrun in preprocessor symbol replay

2011-03-09 Thread Lawrence Crowl
In my last PPH change, I eliminated the redundancy in the preprocessor identifier lookaside table by removing the name of the identifier from the head of the macro value. This later led to a buffer overrun in libcpp/symtab.c cpp_lt_replay. The buffer was allocated based on the value string size,

Re: [4.7] Avoid global state in mep_handle_option

2011-03-09 Thread DJ Delorie
> Tested building cc1 and xgcc for cross to mep-elf. Will commit to > trunk for 4.7 in the absence of target maintainer objections. No objections from me.

Re: [4.7] Make SPARC use PROCESSOR_NIAGARA2 for "niagara2"

2011-03-09 Thread David Miller
From: "Joseph S. Myers" Date: Thu, 10 Mar 2011 01:01:12 + (UTC) > In the course of preparing target changes to avoid global state in > option handlers (and use more .opt facilities to simplify those > handlers) I found that SPARC has a PROCESSOR_NIAGARA2 enumeration > value but maps "niagara2

[4.7] Make SPARC use PROCESSOR_NIAGARA2 for "niagara2"

2011-03-09 Thread Joseph S. Myers
In the course of preparing target changes to avoid global state in option handlers (and use more .opt facilities to simplify those handlers) I found that SPARC has a PROCESSOR_NIAGARA2 enumeration value but maps "niagara2" in command-line options to PROCESSOR_NIAGARA for no apparent reason (at leas

[4.7] Avoid global state in score_handle_option

2011-03-09 Thread Joseph S. Myers
This patch, for 4.7 and relative to a tree with applied, stops the SCORE handle_option hook from using global state. The -march= option is converted to use enumerated arguments. The existing handling of this option maps arguments to bits i

[4.7] Avoid global state in mep_handle_option

2011-03-09 Thread Joseph S. Myers
This patch, for 4.7 and relative to a tree with applied, stops the MEP handle_option hook from using global state. The variable option_mtiny_specified is replaced by the automatic setting of x_mep_tiny_cutoff in the opts_set structure. Set

libgo patch committed: Pass -v to nm in gotest

2011-03-09 Thread Ian Lance Taylor
This libgo patch passes -v to nm in the gotest script. That has no effect on GNU nm (it's overridden by the -p option), and will tell Solaris nm to sort by value. With luck that will make the functions apear in the order in which they appear in the source file, which is what some of the tests exp

libgo patch committed: Solaris specific syslog support

2011-03-09 Thread Ian Lance Taylor
This libgo patch implements Solaris specific syslog support. On Solaris we call the libc function rather than worrying about STREAMS. This should fix PR go/48018. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r 08dcb2e2c1d2 libgo/Makefile.am -

4.5 backport request...

2011-03-09 Thread DJ Delorie
May I backport this change to 4.5 ? rx-elf can use this for a performance boost (a separate 4.5 target patch would be needed for that) 2010-10-19 DJ Delorie * doc/tm.texi.in (TARGET_ASM_JUMP_ALIGN_MAX_SKIP): New. (TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Change to hook

Re: [c++ demangle, trans-mem, pr47952] Demangle cdtor group names

2011-03-09 Thread Jason Merrill
OK. Jason

[c++ demangle, trans-mem, pr47952] Demangle cdtor group names

2011-03-09 Thread Richard Henderson
The ELF group name for cdtors is mangled differently from the actual constructors, so that both the complete object ctor and the base object ctor are both taken from the same object file when duplicate link-once sections are discarded. Bizzarely, one can't actually dump full group names, so one ca

Re: Fix pr48032, powerpc64 -mcmodel=medium invalid ld offset

2011-03-09 Thread David Edelsohn
On Wed, Mar 9, 2011 at 1:07 AM, Alan Modra wrote: > This patch > a) Moves the offsettable_ok_by_alignment call from rs6000_emit_move to >   legitimate_constant_pool_address_p, and > b) teaches offsettable_ok_by_alignment how to handle -fsection-anchors >   addresses, and > c) teaches offsettable_o

libgo patch committed: Mention GCCGO_RUN_ALL_TESTS in README.gcc

2011-03-09 Thread Ian Lance Taylor
Rainer pointed out that the GCCGO_RUN_ALL_TESTS environment variable should really be documented. This patch adds a note to libgo/README.gcc. Committed to mainline. Ian diff -r 5d83cac5a1c5 libgo/README.gcc --- a/libgo/README.gcc Tue Mar 08 22:54:43 2011 -0800 +++ b/libgo/README.gcc Wed Mar 09

[v3] libstdc++/48038

2011-03-09 Thread Paolo Carlini
Hi, tested x86_64-linux multilib + debug-mode, committed to mainline (see Audit trail for details) Thanks, Paolo. 2011-03-09 Paolo Carlini * testsuite/util/testsuite_rvalref.h: Minor tweaks. 2011-03-09 Jonathan Wakely Chris Jefferson

Re: fix for pr47837

2011-03-09 Thread Xinliang David Li
Ok. Regarding this particular patch, I hope it can be checked in to make the test clean. It is a simple enhancement to a wheel that is already there. It also serves as a case that can be referenced in the future when the more general mechanism is available. Thanks, David On Wed, Mar 9, 2011 at

C++ PATCH for c++/44629 (ICE with function template as non-type template argument)

2011-03-09 Thread Jason Merrill
In this testcase, we have a function template used as an argument for a function pointer template parameter. This causes unify to abort because an OVERLOAD doesn't satisfy EXPR_P. 14.8.2.5 lists an overloaded function given as a function argument as a non-deduced context, so it seems reasonab

Re: fix for pr47837

2011-03-09 Thread Richard Guenther
On Wed, Mar 9, 2011 at 6:34 PM, Xinliang David Li wrote: > On Wed, Mar 9, 2011 at 8:29 AM, Richard Guenther > wrote: >> On Wed, Mar 9, 2011 at 5:24 PM, Xinliang David Li wrote: >>> On Wed, Mar 9, 2011 at 6:03 AM, Jeff Law wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1

Re: fix for pr47837

2011-03-09 Thread Xinliang David Li
On Wed, Mar 9, 2011 at 8:29 AM, Richard Guenther wrote: > On Wed, Mar 9, 2011 at 5:24 PM, Xinliang David Li wrote: >> On Wed, Mar 9, 2011 at 6:03 AM, Jeff Law wrote: >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>> On 03/09/11 02:45, Richard Guenther wrote: On Tue, Mar 8, 2011

Re: fix for pr47837

2011-03-09 Thread Xinliang David Li
On Wed, Mar 9, 2011 at 6:03 AM, Jeff Law wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 03/09/11 02:45, Richard Guenther wrote: >> On Tue, Mar 8, 2011 at 11:04 PM, Jeff Law wrote: > >> True.  I've been repeatedly thinking of building some on-the-side CFG >> with value-numbered pr

Re: fix for pr47837

2011-03-09 Thread Richard Guenther
On Wed, Mar 9, 2011 at 5:24 PM, Xinliang David Li wrote: > On Wed, Mar 9, 2011 at 6:03 AM, Jeff Law wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On 03/09/11 02:45, Richard Guenther wrote: >>> On Tue, Mar 8, 2011 at 11:04 PM, Jeff Law wrote: >> >>> True.  I've been repeatedly

Re: fix for pr47837

2011-03-09 Thread Xinliang David Li
Sounds interesting. Do you have examples to illustrate your idea? Thanks, David On Wed, Mar 9, 2011 at 1:45 AM, Richard Guenther wrote: > On Tue, Mar 8, 2011 at 11:04 PM, Jeff Law wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On 03/08/11 11:55, Diego Novillo wrote: >>> On 03

[Committed] S/390: Fix literal pool with -falign-labels

2011-03-09 Thread Andreas Krebbel
Hi, on s390 (31 bit code with -mesa) the literal pool does not work when using -falign-labels= We rely on the literal pool base label being exact after the instruction setting up the literal pool base pointer. Using -falign-labels an ".align" command is emitted between the instruction and the lab

Re: [PATCH][ARM] Fix RVCT interoperation issue

2011-03-09 Thread Ramana Radhakrishnan
On Fri, 2011-03-04 at 11:23 +, Andrew Stubbs wrote: > The attached patch, submitted on behalf of Dan Jacobowitz, fixes an > unwind bug when using RealView and libgcc. > > It's an old patch that has been in CodeSourcery and Linaro toolchains > for sometime, but somehow escaped being posted h

Re: libgo patch committed: Only run net tests if GCCGO_RUN_ALL_TESTS

2011-03-09 Thread Rainer Orth
Ian Lance Taylor writes: > This patch to libgo only runs the networking dependent tests if > GCCGO_RUN_ALL_TESTS is set in the environment. This is PR 48017. In > that PR Rainer suggests having the tests drop back to UNSUPPORTED or > UNRESOLVED if they fail to open a network connection. That i

[PATCH][4.7] Fix the issue in PR13954

2011-03-09 Thread Richard Guenther
This fixes PR13954, not by doing SRA as requested but instead by looking through memcpy during value-numbering (similar to what we do for aggregate copies). On its own it isn't that useful as we still do not optimize the memcpy away itself (PR16427), but that issue can be fixed in DCE with the re

Re: [PATCH][4.7][RFC] Fix store-sinking, make returns have a VUSE

2011-03-09 Thread Diego Novillo
On Wed, Mar 9, 2011 at 10:26, Richard Guenther wrote: > I have just forward ported this patch to trunk and don't remember > whether it caused any problems back when I originally worked on this > (IIRC it was during stage3 of 4.5).  So, this is just a heads-up > in case you have any issues with ha

[PATCH][4.7][RFC] Fix store-sinking, make returns have a VUSE

2011-03-09 Thread Richard Guenther
This old patch of mine makes the return statement of a function have a VUSE even if it does not return a value (or does not reference memory). This is to have a virtual operand chain for values that escape the function via returns. This allows to fix store-sinking to do its job again by simply u

Re: Build regression [Re: [patch libiberty include]: Add additional helper functions for directory-separator searching]

2011-03-09 Thread Jan Kratochvil
On Wed, 09 Mar 2011 16:02:36 +0100, Pedro Alves wrote: > Thanks, had forgotten --enable-targets=all. Sorry about that. It builds now OK. Thanks, Jan

Re: Build regression [Re: [patch libiberty include]: Add additional helper functions for directory-separator searching]

2011-03-09 Thread Pedro Alves
On Wednesday 09 March 2011 14:37:15, Jan Kratochvil wrote: > On Wed, 09 Mar 2011 13:58:38 +0100, Pedro Alves wrote: > > Thanks. I've applied it. > > nto-tdep.c:130:8: error: assignment discards ‘const’ qualifier from pointer > target type [-Werror] Thanks, had forgotten --enable-targets=all. S

Build regression [Re: [patch libiberty include]: Add additional helper functions for directory-separator searching]

2011-03-09 Thread Jan Kratochvil
On Wed, 09 Mar 2011 13:58:38 +0100, Pedro Alves wrote: > Thanks. I've applied it. nto-tdep.c:130:8: error: assignment discards ‘const’ qualifier from pointer target type [-Werror] gcc-4.6.0-0.12.fc15.x86_64 --with-system-zlib --enable-64-bit-bfd --enable-targets=all --enable-static --disable-s

Re: fix for pr47837

2011-03-09 Thread Richard Guenther
On Wed, Mar 9, 2011 at 3:03 PM, Jeff Law wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 03/09/11 02:45, Richard Guenther wrote: >> On Tue, Mar 8, 2011 at 11:04 PM, Jeff Law wrote: > >> True.  I've been repeatedly thinking of building some on-the-side CFG >> with value-numbered pr

Re: fix for pr47837

2011-03-09 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/09/11 02:45, Richard Guenther wrote: > On Tue, Mar 8, 2011 at 11:04 PM, Jeff Law wrote: > True. I've been repeatedly thinking of building some on-the-side CFG > with value-numbered predicates to also catch the CFG vs. scalar-code > predicate c

Re: [patch libiberty include]: Add additional helper functions for directory-separator searching

2011-03-09 Thread Eli Zaretskii
> From: Pedro Alves > Date: Wed, 9 Mar 2011 12:58:38 + > Cc: gdb-patc...@sourceware.org, > d...@redhat.com, > ktiet...@googlemail.com, > binut...@sourceware.org, > gcc-patches@gcc.gnu.org > > > > The one's left are: 1 in a linux-native only file (never cares > > > for other filesystem sem

Re: [patch libiberty include]: Add additional helper functions for directory-separator searching

2011-03-09 Thread Pedro Alves
On Wednesday 09 March 2011 12:35:00, Eli Zaretskii wrote: > > I meant a valid use case in the code bases. > > Sorry for my misunderstanding. NP. > > > Might as well cook up a (gdb) patch. Find it pasted below. Does it > > look good to you? > > Yes, looks fine. Thanks. Thanks. I've applied

Re: [patch libiberty include]: Add additional helper functions for directory-separator searching

2011-03-09 Thread Eli Zaretskii
> From: Pedro Alves > Date: Wed, 9 Mar 2011 11:46:36 + > Cc: gdb-patc...@sourceware.org, > d...@redhat.com, > ktiet...@googlemail.com, > binut...@sourceware.org, > gcc-patches@gcc.gnu.org > > On Wednesday 09 March 2011 05:29:09, Eli Zaretskii wrote: > > > Actually, is there any case where

Re: [c++, PR 47714] Reset the addressable flag of thunk PARM_DECLs

2011-03-09 Thread Eric Botcazou
> 2011-03-08 Martin Jambor > > PR tree-optimization/47714 > * cp/method.c (use_thunk): Clear addressable flag of thunk arguments. This should go in cp/ChangeLog without the cp/ prefix. -- Eric Botcazou

[c++, PR 47714] Reset the addressable flag of thunk PARM_DECLs

2011-03-09 Thread Martin Jambor
Hi, the patch below fixes PR 47714. The problem is that as thunk function declarations are built, their PARM_DECLs are copied from the thunked function together with their TREE_ADDRESSABLE flags. This then means the parameters are not considered gimple registers when they are supposed to be conv

Re: [patch libiberty include]: Add additional helper functions for directory-separator searching

2011-03-09 Thread Pedro Alves
On Wednesday 09 March 2011 05:29:09, Eli Zaretskii wrote: > > Actually, is there any case where lbasename wouldn't > > work instead of filename_dirrchr? > > Almost: lbasename returns a pointer one character after the last > slash. It also skips the drive letter on DOS/Windows (which might be > TR

Re: [PATCH] Fix MEM_IN_STRUCT_P/MEM_SCALAR_P during expansion (PR rtl-optimization/47866)

2011-03-09 Thread Richard Guenther
On Wed, Mar 9, 2011 at 10:58 AM, Jakub Jelinek wrote: > On Wed, Mar 09, 2011 at 10:55:39AM +0100, Richard Guenther wrote: >> On Wed, Mar 9, 2011 at 9:40 AM, Eric Botcazou wrote: >> >> and as t isn't AGGREGATE_TYPE nor COMPLEX_TYPE and is a decl, >> >> it is marked MEM_SCALAR_P and e.g. set_mem_at

Re: [PATCH] Fix MEM_IN_STRUCT_P/MEM_SCALAR_P during expansion (PR rtl-optimization/47866)

2011-03-09 Thread Jakub Jelinek
On Wed, Mar 09, 2011 at 10:55:39AM +0100, Richard Guenther wrote: > On Wed, Mar 9, 2011 at 9:40 AM, Eric Botcazou wrote: > >> and as t isn't AGGREGATE_TYPE nor COMPLEX_TYPE and is a decl, > >> it is marked MEM_SCALAR_P and e.g. set_mem_attributes_minus_bitpos > >> once MEM_SCALAR_P is set doesn't

Re: [PATCH] Fix MEM_IN_STRUCT_P/MEM_SCALAR_P during expansion (PR rtl-optimization/47866)

2011-03-09 Thread Richard Guenther
On Wed, Mar 9, 2011 at 9:40 AM, Eric Botcazou wrote: >> and as t isn't AGGREGATE_TYPE nor COMPLEX_TYPE and is a decl, >> it is marked MEM_SCALAR_P and e.g. set_mem_attributes_minus_bitpos >> once MEM_SCALAR_P is set doesn't change it to MEM_IN_STRUCT_P >> because of BIT_FIELD_REF etc.  The BIT_FIE

Re: [tree-ssa] conversion between dissimilar-sized pointers is not useless

2011-03-09 Thread Richard Guenther
On Wed, Mar 9, 2011 at 10:51 AM, Richard Guenther wrote: > On Wed, Mar 9, 2011 at 4:44 AM, DJ Delorie wrote: >> >> Affects tpf, mips64, and m32c.  Hand-checked tpf by inspection, m32c >> tests running now.  Look OK so far? >> >>        * tree-ssa.c (useless_type_conversion_p): Conversions between

Re: [tree-ssa] conversion between dissimilar-sized pointers is not useless

2011-03-09 Thread Richard Guenther
On Wed, Mar 9, 2011 at 4:44 AM, DJ Delorie wrote: > > Affects tpf, mips64, and m32c.  Hand-checked tpf by inspection, m32c > tests running now.  Look OK so far? > >        * tree-ssa.c (useless_type_conversion_p): Conversions between >        pointers of different modes are not useless. > > Index:

Re: fix for pr47837

2011-03-09 Thread Richard Guenther
On Tue, Mar 8, 2011 at 11:04 PM, Jeff Law wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 03/08/11 11:55, Diego Novillo wrote: >> On 03/08/2011 12:54 PM, Xinliang David Li wrote: >>> Please review the attached patch, it does some simplification of the >>> complicated logical or exp

Re: avoid useless if-before-free tests

2011-03-09 Thread Richard Guenther
On Tue, Mar 8, 2011 at 5:34 PM, Jeff Law wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 03/05/11 07:05, Jim Meyering wrote: >> Hello, >> >> Someone asked me about this yesterday, and since I've been carrying >> this patch series for over a year -- it's not high priority -- >> this

Re: [PATCH] Fix MEM_IN_STRUCT_P/MEM_SCALAR_P during expansion (PR rtl-optimization/47866)

2011-03-09 Thread Eric Botcazou
> and as t isn't AGGREGATE_TYPE nor COMPLEX_TYPE and is a decl, > it is marked MEM_SCALAR_P and e.g. set_mem_attributes_minus_bitpos > once MEM_SCALAR_P is set doesn't change it to MEM_IN_STRUCT_P > because of BIT_FIELD_REF etc. The BIT_FIELD_REF = 1 > stores are done through store_field though,