[patch] Prevent memory explosion for big discriminated types

2014-04-14 Thread Eric Botcazou
Hi, in Ada types can be very dynamic: not only can their shape depend on variables but it can also depend on the object itself (these are called self-referential types). This raises interesting compile-time issues when you have dozens of dynamic fields in a record type, or dozens of nested dyn

Re: Hurd port for gcc go PATCH 0-3 (9)

2014-04-14 Thread Svante Signell
On Fri, 2014-04-11 at 22:52 +0200, Samuel Thibault wrote: > Svante Signell, le Fri 11 Apr 2014 14:47:21 +0200, a écrit : > > #ifdef TARGET_LIBC_PROVIDES_SSP > > +/* i386 glibc provides __stack_chk_guard in %gs:0x14. */ > > +#define TARGET_THREAD_SSP_OFFSET 0x14 > > Err, not the Hurd variant, n

Re: Hurd port for gcc go PATCH 7-9 (9)

2014-04-14 Thread Svante Signell
On Fri, 2014-04-11 at 22:55 +0200, Samuel Thibault wrote: > Svante Signell, le Fri 11 Apr 2014 14:57:35 +0200, a écrit : > > --- a/src/libgo/mksysinfo.sh > > +++ b/src/libgo/mksysinfo.sh > > Err, these seem to get applied to all systems, not just GNU/Hurd, isn't > that a concern? > > > @@ -210,6

[patch] Rename force_vect into force_vectorize

2014-04-14 Thread Eric Botcazou
Hi, the 'loop' structure in cfgloop.h contains two consecutive fields: /* True if we should try harder to vectorize this loop. */ bool force_vect; /* True if this loop should never be vectorized. */ bool dont_vectorize; Not clear why someone thought that the name discrepancy woul

[PATCH] Fix variant of PR60819

2014-04-14 Thread Richard Biener
While digging in PR60819 (and thinking whether the original testcase is valid) we figured that a clearly valid testcase is miscompiled as well. That's because of the C/C++ frontends implementation of vector indexing by decaying the vector to a element pointer. The helper for that fails to apply

Re: Hurd port for gcc go PATCH 7-9 (9)

2014-04-14 Thread Samuel Thibault
Svante Signell, le Mon 14 Apr 2014 09:59:03 +0200, a écrit : > > > @@ -528,6 +538,8 @@ > > > > > > # The stat type. > > > # Prefer largefile variant if available. > > > +# Special treatment of st_dev for GNU/Hurd > > > +# /usr/include/i386-gnu/bits/stat.h: #define st_dev st_fsid > > > stat=`gr

[PATCH] Avoid optimize_insns_for_speed_p () in gimple opts

2014-04-14 Thread Richard Biener
When code was moved from RTL to GIMPLE those predicates slipped into GIMPLE code which can have weird effects (crtl->maybe_hot_insn_p is certainly not meaningful here and AFAICS initialized by gimplification only and to the default behavior on function granularity). So it's better to use BB predi

Re: Hurd port for gcc go PATCH 7-9 (9)

2014-04-14 Thread Svante Signell
On Mon, 2014-04-14 at 11:03 +0200, Samuel Thibault wrote: > Svante Signell, le Mon 14 Apr 2014 09:59:03 +0200, a écrit : > > > > @@ -528,6 +538,8 @@ > > > > > > > > # The stat type. > > > > # Prefer largefile variant if available. > > > > +# Special treatment of st_dev for GNU/Hurd > > > > +# /

Re: [PING] [PATCH, DOC] Mention -free enabled by default for -O2 and above on AArch64

2014-04-14 Thread Richard Earnshaw
On 13/04/14 15:30, Gerald Pfeifer wrote: > On Fri, 11 Apr 2014, Yufeng Zhang wrote: >> Ping~ >> >> Originally posted here: >> http://gcc.gnu.org/ml/gcc-patches/2014-03/msg01282.html > > Looks okay to me, that I'd prefer it to be approved by a target > maintainer -- AArch64 here. > > Gerald > Th

version typeinfo for 128bit types

2014-04-14 Thread Marc Glisse
Hello, this is a follow-up for this patch: http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00618.html once committed, g++ will generate typeinfo for __float128, and it needs versioning. While there, I noticed that __int128 has "typeinfo" but not "typeinfo name", so I am adding it. I manually chec

Re: [PATCH] Fix variant of PR60819

2014-04-14 Thread Richard Biener
On Mon, 14 Apr 2014, Richard Biener wrote: > While digging in PR60819 (and thinking whether the original testcase > is valid) we figured that a clearly valid testcase is miscompiled > as well. That's because of the C/C++ frontends implementation of > vector indexing by decaying the vector to a el

Re: [PATCH] Fix variant of PR60819

2014-04-14 Thread Jakub Jelinek
On Mon, Apr 14, 2014 at 11:41:39AM +0200, Richard Biener wrote: > Bootstrap/regtest pending on x86_64-unknown-linux-gnu, ok for trunk > and branches (after 4.9.0)? > > Thanks, > Richard. > > 2014-04-14 Richard Biener > Marc Glisse > > PR c/60819 > c-family/ > * c-com

Re: C++ PATCH for DR 1338 (operator new aliasing)

2014-04-14 Thread Richard Biener
On Mon, Apr 14, 2014 at 8:46 AM, Jan Hubicka wrote: >> At the last C++ meeting I got the committee to accept wording that >> ought to allow us to set DECL_IS_MALLOC on the built-in operator >> new: >> >> Furthermore, for the library allocation functions in 18.6.1.1 >> [new.delete.single] and 18.6.

Re: [patch] Prevent memory explosion for big discriminated types

2014-04-14 Thread Richard Biener
On Mon, Apr 14, 2014 at 9:44 AM, Eric Botcazou wrote: > Hi, > > in Ada types can be very dynamic: not only can their shape depend on variables > but it can also depend on the object itself (these are called self-referential > types). This raises interesting compile-time issues when you have dozen

Re: [patch] Rename force_vect into force_vectorize

2014-04-14 Thread Richard Biener
On Mon, Apr 14, 2014 at 10:18 AM, Eric Botcazou wrote: > Hi, > > the 'loop' structure in cfgloop.h contains two consecutive fields: > >/* True if we should try harder to vectorize this loop. */ >bool force_vect; > >/* True if this loop should never be vectorized. */ >bool dont_ve

Re: [PATCH 2/3] libstdc++-v3: ::tmpnam depends on uClibc SUSV4_LEGACY

2014-04-14 Thread Bernhard Reutner-Fischer
Jonathan, I see that you filed LWG 2249 (gets() removal), may i ask you to take care of the tmpnam removal, too? The reasoning would be exactly the same as for gets(). TIA && cheers, http://wg21.cmeerw.net/lwg/issue2249

Re: [Patch]Simplify SUBREG with operand whose target bits are cleared by AND operation

2014-04-14 Thread Terry Guo
On Thu, Apr 3, 2014 at 10:11 PM, Eric Botcazou wrote: >> I find the GCC function simplify_subreg fails to simplify rtx (subreg:SI >> (and:DI (reg/v:DI 115 [ a ]) (const_int 4294967295 [0x])) 4) to zero >> during the fwprop1 pass, considering the fact that the high 32-bit part of >> (a & 0x

Re: [PATCH 2/3] libstdc++-v3: ::tmpnam depends on uClibc SUSV4_LEGACY

2014-04-14 Thread Jonathan Wakely
On 14 April 2014 11:09, Bernhard Reutner-Fischer wrote: > Jonathan, > > I see that you filed LWG 2249 (gets() removal), may i ask you to take > care of the tmpnam removal, too? > The reasoning would be exactly the same as for gets(). The reason to remove gets() was that it's no longer in the C sta

[testsuite] Fix vect_widen_mult_si_to_di_pattern on non-x86/ia64 targets

2014-04-14 Thread Rainer Orth
The new gcc.dg/vect/pr60656.c test errors out on non-x86/ia64 targets: ERROR: gcc.dg/vect/pr60656.c: error executing dg-final: can't read "et_vect_widen_mult_si_to_di_pattern_saved": no such variable UNRESOLVED: gcc.dg/vect/pr60656.c: error executing dg-final: can't read "et_vect_widen_mult_si_t

Re: version typeinfo for 128bit types

2014-04-14 Thread Jonathan Wakely
On 14 April 2014 10:39, Marc Glisse wrote: > > PR libstdc++/43622 > * config/abi/pre/gnu.ver (CXXABI_1.3.9): New version, new symbols. > * config/abi/pre/gnu-versioned-namespace.ver: New symbols. > * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Likewise. I

Re: [testsuite] Fix vect_widen_mult_si_to_di_pattern on non-x86/ia64 targets

2014-04-14 Thread Jakub Jelinek
On Mon, Apr 14, 2014 at 12:25:15PM +0200, Rainer Orth wrote: > The new gcc.dg/vect/pr60656.c test errors out on non-x86/ia64 targets: > > ERROR: gcc.dg/vect/pr60656.c: error executing dg-final: can't read > "et_vect_widen_mult_si_to_di_pattern_saved": no such variable > UNRESOLVED: gcc.dg/vect/pr

Re: Patch ping

2014-04-14 Thread Jakub Jelinek
On Mon, Jan 13, 2014 at 08:22:47AM -0700, Jeff Law wrote: > On 01/13/14 08:20, Jakub Jelinek wrote: > >On Mon, Jan 13, 2014 at 08:15:11AM -0700, Jeff Law wrote: > >>On 01/13/14 01:07, Jakub Jelinek wrote: > >>>I'd like to ping 2 patches: > >>> > >>>http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00140

Re: Patch ping

2014-04-14 Thread Jakub Jelinek
On Thu, Apr 10, 2014 at 12:01:31PM -0400, DJ Delorie wrote: > > But ubsan is a new feature in 4.9, and it is a bootstrap failure > > with that feature. > > I will leave it up to the release manager to decide if they want this > non-regression patch applied before the branch, then. > > > This is f

RE: [RFC][PATCH][MIPS] Patch to enable LRA for MIPS backend

2014-04-14 Thread Robert Suchanek
> So yeah, I agree this is right after all, sorry. Let's delete the > comment starting at "There are two problems here:" at the same time. Ok. > mips_regno_to_class should then map $sp to the new class, since it's now > the smallest containing class. (We really should set that up automatically

Re: [PATCH] Fix gcc.dg/lto/pr55113_0.c testsuite ICE

2014-04-14 Thread Rainer Orth
Richard Biener writes: > This fixes gcc.dg/lto/pr55113_0.c ICEing on x86_64 with -m32 > (due to implicit -march=x86-64) by dg-skipping for all > x86_64 and the -m64 i?86 variants (untested, not sure what > -march default we use there - this just removes incrementally > more x86_64 multilibs. > >

Re: [Patch] Add TYPE_NAME_IDENTIFIER

2014-04-14 Thread Paolo Carlini
Hi, On 04/14/2014 06:20 AM, Jason Merrill wrote: On 04/13/2014 12:20 PM, Paolo Carlini wrote: this is a small clean-up discussed some time ago with Jason. The basic idea seems pretty straightforward to me. However, at variance with that discussion, I'm not proposing replacing the C++ front-end

Re: [PATCH] Fix gcc.dg/lto/pr55113_0.c testsuite ICE

2014-04-14 Thread Richard Biener
On Mon, 14 Apr 2014, Rainer Orth wrote: > Richard Biener writes: > > > This fixes gcc.dg/lto/pr55113_0.c ICEing on x86_64 with -m32 > > (due to implicit -march=x86-64) by dg-skipping for all > > x86_64 and the -m64 i?86 variants (untested, not sure what > > -march default we use there - this jus

Re: [PATCH] Prevent out of bound access for multilib_options

2014-04-14 Thread Jakub Jelinek
On Wed, Apr 09, 2014 at 10:00:38PM +0800, Kito Cheng wrote: > `q` will out of bound access if `*q` already reach the end of > multilib_options, so check it before increment to prevent condition > check part out of bound access. > > btw, this bug is detected by address sanitizer. > > > 2014-04-09

linaro/gcc-4_9-branch created

2014-04-14 Thread Yvan Roux
All, I have created a distribution branch 'linaro/gcc-4_9-branch'. This branch is already documented on http://gcc.gnu.org/svn.html for the recall : The branch will track the equivalent FSF release branch and also accept backports of patches accepted for trunk which are of interest to the ARM an

Re: [patch] Prevent memory explosion for big discriminated types

2014-04-14 Thread Eric Botcazou
> > The patch plugs the hole by invoking it for DECL_FIELD_OFFSET as well > > (and the effect is spectacular for pathological cases). Tested on > > x86_64-suse-linux, although this will essentially only affect Ada. OK > > for the mainline? > > Ok. Thanks. It turns out that the patch was not com

Re: Optimize n?rotate(x,n):x

2014-04-14 Thread Richard Biener
On Sun, Apr 13, 2014 at 10:58 PM, Marc Glisse wrote: > On Mon, 3 Mar 2014, Richard Biener wrote: > >> On Sat, Mar 1, 2014 at 3:33 PM, Marc Glisse wrote: >>> >>> Hello, >>> >>> again, a stage 1 patch that I will ping then, but early comments are >>> welcome. >>> >>> PR 59100 was asking to transfor

[Ada] Disable symbolic back-annotation of discriminated types

2014-04-14 Thread Eric Botcazou
In the Ada compiler, the layout of types is done by gigi and the middle-end, but the front-end needs the information for various purposes. That's why gigi back-annotates the nodes generated by the front-end with that information. It turns out that this can be quite costly in terms of memory con

Re: r201440 - in /branches/gcc-4_8-branch: gcc/Chan...

2014-04-14 Thread Andreas Krebbel
On Fri, Apr 11, 2014 at 09:53:58PM +0200, Harald van Dijk wrote: > Hi, > > This commit added LIBITM_CHECK_AS_HTM to libitm/configure.ac, but did > not add it to acinclude.m4, so configure complains about an unrecognised > command (4.8 only). I don't know if LIBITM_CHECK_AS_HTM is supposed to > che

RE: [PATCH] [MIPS] Fix operands for microMIPS SW16, SH16 and SB16

2014-04-14 Thread Moore, Catherine
> -Original Message- > From: Richard Sandiford [mailto:rdsandif...@googlemail.com] > Sent: Saturday, April 12, 2014 6:41 AM > To: Matthew Fortune > Cc: Moore, Catherine; gcc-patches@gcc.gnu.org; rguent...@suse.de; > ja...@redhat.com > Subject: Re: [PATCH] [MIPS] Fix operands for microMIPS

RE: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-14 Thread Zamyatin, Igor
> -Original Message- > From: Jason Merrill [mailto:ja...@redhat.com] > Sent: Monday, April 14, 2014 8:13 AM > To: Zamyatin, Igor; Jakub Jelinek > Cc: GCC Patches (gcc-patches@gcc.gnu.org); Iyer, Balaji V > Subject: Re: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync > usage

[Ada] Add support for pragma Loop_Optimize (Ivdep)

2014-04-14 Thread Eric Botcazou
This adds support for a new optimization hint pertaining to loops, namely Ivdep, which, like its counterparts in C/C++/Fortran, tells the compiler that there are no loop-carried dependencies in a given loop, thus making it possible for the compiler to generate better vectorized code. The typical e

An options exception

2014-04-14 Thread Sergey Ostanevich
Hi! I didn't find any precedent of the following before, so this can be a start for discussion. Options are known to be different between compilers and achieve options compatibility is somewhat complex because of this. GCC can be taken as a reference point, but since other comilers still can (and

Re: An options exception

2014-04-14 Thread Eric Botcazou
> I didn't find any precedent of the following before, so this can be a start > for discussion. That's the wrong mailing-list though, you want g...@gcc.gnu.org instead. -- Eric Botcazou

Re: [PATCH] [MIPS] Fix operands for microMIPS SW16, SH16 and SB16

2014-04-14 Thread Richard Sandiford
"Moore, Catherine" writes: >> Adding a new register class is definitely a bit invasive for this >> stage of 4.9. >> OTOH microMIPS is a new feature and it would be good to have it working in >> 4.9.0. Since the testing suggests that the patch really doesn't affect non- >> microMIPS code, I'd like

[patch] Add support for pragma Loop_Optimize ([No_]Vector)

2014-04-14 Thread Eric Botcazou
Hi, this adds support for 2 optimization hints pertaining to loops in Ada, namely Loop_Optimize (No_Vector) and Loop_Optimize (Vector), by reusing the Ivdep approach in the middle-end (ANNOTATE_EXPR node) and directly setting the dont_vectorize and force_vectorize bits of the 'loop' structure.

[PATCH] [CLEANUP] Mark locally-used functions static

2014-04-14 Thread Patrick Palka
Hi everyone, This patch marks "static" a bunch of locally-used, non-debug functions within the GCC sources. Doing so addresses a subset of the warnings emitted when compiling the GCC sources with -Wmissing-declarations. I bootstrapped and regtested this change on x86_64-unknown-linux-gnu. 2014-

[patch] Limit operations on vector::pointer to NullablePointer requirements.

2014-04-14 Thread Jonathan Wakely
This patch makes std::vector work with fancy pointer types that cannot be initialized or assigned from a literal zero. Currently we don't have any tests that fail under such cases, but I'll be adding some later in stage 1 as part of other changes. This fix stands alone and doesn't rely on those la

Re: [PATCH] Fix gcc.dg/lto/pr55113_0.c testsuite ICE

2014-04-14 Thread Rainer Orth
Richard Biener writes: > Interesting. I suppose this config has SSE enabled by default? Thus Right, unlike i386-pc-solaris2.9. > it may apply to i?86-darwin as well. In my Darwin builds there's no LTO support, so it's unaffected. No idea if gld or gold do support that target, though.

[PATCH] [CLEANUP] Wrap locally-used functions in anonymous namespaces

2014-04-14 Thread Patrick Palka
Hi everyone, This patch wraps a bunch of locally-used, non-debug functions in an anonymous namespace. These functions can't simply be marked as "static" because they are used as template arguments to hash_table::traverse, and the C++98 standard does not allow non-extern variables to be used as te

[PATCH] [CLEANUP] Declare global functions before defining them

2014-04-14 Thread Patrick Palka
Hi everyone, Many source files currently define a global function that is not previously declared within that source file because the source file did not include the appropriate header file that declares said function. This patch fixes a number of these occurrences by making sure to include the ap

Re: [PING] [PATCH, DOC] Mention -free enabled by default for -O2 and above on AArch64

2014-04-14 Thread Yufeng Zhang
Thanks. Patch has been committed to the trunk. Is it OK for gcc-4_9-branch? Thanks, Yufeng On 04/14/14 10:36, Richard Earnshaw wrote: On 13/04/14 15:30, Gerald Pfeifer wrote: On Fri, 11 Apr 2014, Yufeng Zhang wrote: Ping~ Originally posted here: http://gcc.gnu.org/ml/gcc-patches/2014-03/m

Re: [PING] [PATCH, DOC] Mention -free enabled by default for -O2 and above on AArch64

2014-04-14 Thread Jakub Jelinek
On Mon, Apr 14, 2014 at 04:00:38PM +0100, Yufeng Zhang wrote: > Thanks. Patch has been committed to the trunk. Is it OK for > gcc-4_9-branch? Ok. Jakub

[C PATCH] Make attributes accept enum values (PR c/50459)

2014-04-14 Thread Marek Polacek
Currently it is not possible to use an enum value (or const int in C++) as an attribute argument (where compiler wants INTEGER_CST). This is because the values are represented by CONST_DECL nodes -- and we don't deal with them. I think it's viable to accept them too, and that is what this patch d

[patch] Add exception specs to allocator equality operators

2014-04-14 Thread Jonathan Wakely
The equality operators for std::allocator were throw() in C++03 and are noexcept in C++11, but we were missing those specs (and the problem wasn't caught by the testsuite because of PR50871). Tested x86_64-linux, committed to trunk. commit 3043f742f7f31504dd881b55eaf6abaf73d79380 Author: Jonathan

Re: [C PATCH] Make attributes accept enum values (PR c/50459)

2014-04-14 Thread Marc Glisse
On Mon, 14 Apr 2014, Marek Polacek wrote: Currently it is not possible to use an enum value (or const int in C++) as an attribute argument (where compiler wants INTEGER_CST). This is because the values are represented by CONST_DECL nodes -- and we don't deal with them. I think it's viable to a

[patch] libstdc++/60497 - Qualify calls to prevent ADL

2014-04-14 Thread Jonathan Wakely
Tested x86_64-linux, committed to trunk. commit a3b70e775c9f1f5f6cab1b8e6307f01c582ce5b3 Author: Jonathan Wakely Date: Mon Apr 14 16:17:03 2014 +0100 PR libstdc++/60497 * include/std/tuple (get): Qualify calls to prevent ADL. * testsuite/20_util/tuple/60497.cc: New.

Re: ping for maintainer - [PATCH] pedantic warning behavior when casting void* to ptr-to-func

2014-04-14 Thread Daniel Gutson
Friendly reminder of maintainer review request. Thanks, Daniel. On Wed, Apr 9, 2014 at 6:50 PM, Daniel Gutson wrote: > Hi, > >please, if at ever possible, consider this patch for 4.8.3: > > http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00026.html > > Thanks, > >Daniel. > > -- > > Dani

Re: PATCH: PR target/60827: Inconsistent optimize_function_for_speed_p in in *fixuns_trunc_1

2014-04-14 Thread Uros Bizjak
On Fri, Apr 11, 2014 at 10:16 PM, H.J. Lu wrote: > Since fixuns_truncsi2 expander checks optimize_insn_for_size_p > before generating *fixuns_trunc_1, we should use > optimize_insn_for_speed_p in *fixuns_trunc_1 for consistency. > OK for trunk? > > Thanks. > > > H.J. > --- > 2014-04-11 H.J. Lu

Re: [PATCH] [MIPS] Fix operands for microMIPS SW16, SH16 and SB16

2014-04-14 Thread Maciej W. Rozycki
On Sat, 12 Apr 2014, Richard Sandiford wrote: > I went ahead and applied the adjusted version of the patch to trunk > as below (because I wanted to add a testcase too). I believe you need to adjust constraints to ensure constant 0 is known to produce a 16-bit instruction encoding where possible

Re: Optimize n?rotate(x,n):x

2014-04-14 Thread Marc Glisse
On Mon, 14 Apr 2014, Richard Biener wrote: + /* If the special case has a high probability, keep it. */ + if (EDGE_PRED (middle_bb, 0)->probability < PROB_EVEN) I suppose Honza has a comment on how to test this properly (not sure if ->probability or ->frequency is always initialized properl

Re: PATCH: PR target/60827: Inconsistent optimize_function_for_speed_p in in *fixuns_trunc_1

2014-04-14 Thread Jan Hubicka
> On Fri, Apr 11, 2014 at 10:16 PM, H.J. Lu wrote: > > Since fixuns_truncsi2 expander checks optimize_insn_for_size_p > > before generating *fixuns_trunc_1, we should use > > optimize_insn_for_speed_p in *fixuns_trunc_1 for consistency. > > OK for trunk? > > > > Thanks. > > > > > > H.J. > > --- >

Re: RFA: Testsuite PATCH to add support for dlopen tests

2014-04-14 Thread Hans-Peter Nilsson
On Mon, 14 Apr 2014, Jakub Jelinek wrote: > On Sun, Apr 13, 2014 at 09:24:28PM -0400, Hans-Peter Nilsson wrote: > > On Fri, 11 Apr 2014, Jakub Jelinek wrote: > > > > > On Thu, Apr 10, 2014 at 02:18:26PM +0100, Ramana Radhakrishnan wrote: > > > > I see failures from last night on aarch64-none-elf an

Re: PATCH: PR target/60827: Inconsistent optimize_function_for_speed_p in in *fixuns_trunc_1

2014-04-14 Thread Uros Bizjak
On Mon, Apr 14, 2014 at 6:49 PM, Jan Hubicka wrote: >> On Fri, Apr 11, 2014 at 10:16 PM, H.J. Lu wrote: >> > Since fixuns_truncsi2 expander checks optimize_insn_for_size_p >> > before generating *fixuns_trunc_1, we should use >> > optimize_insn_for_speed_p in *fixuns_trunc_1 for consistency. >>

Re: [PATCH] Disable IPA-SRA for always_inline functions

2014-04-14 Thread Martin Jambor
Hi, On Wed, Apr 02, 2014 at 02:29:55PM +0200, Richard Biener wrote: > On Wed, 2 Apr 2014, Martin Jambor wrote: > > > Hi, > > > > when dealing with a PR yesterday I have noticed that IPA-SRA was > > modifying an always_inline function which is useless work since the > > function must then be inli

Re: Fix indirect call profiling for COMDAT symbols

2014-04-14 Thread Jan Hubicka
> Hi, > while looking into firefox profiles, I noticed that we miss devirtualizations > to comdat symbols, because we manage to get different profile_id in each > unit. This is easily fixed by the following patch that makes profiled_id > to by crc32 of the symbol name in this case. > > Bootstrapp

Re: Fix indirect call profiling for COMDAT symbols

2014-04-14 Thread Jakub Jelinek
On Mon, Apr 14, 2014 at 07:22:37PM +0200, Jan Hubicka wrote: > > Hi, > > while looking into firefox profiles, I noticed that we miss > > devirtualizations > > to comdat symbols, because we manage to get different profile_id in each > > unit. This is easily fixed by the following patch that makes

Re: [C PATCH] Make attributes accept enum values (PR c/50459)

2014-04-14 Thread Marek Polacek
On Mon, Apr 14, 2014 at 05:26:03PM +0200, Marc Glisse wrote: > If val is NULL, it seems you still end up looking at its TREE_CODE? > (don't know if that can happen) I didn't hit that while testing, but it looks weird, so fixed. > In C++, default_conversion probably handles IDENTIFIER_NODE just >

[PATCH] Do not run IPA transform phases multiple times

2014-04-14 Thread Martin Jambor
Hi, I have noticed that we often run IPA-transformation phases multiple times. The reason is that when a virtual clone is created, it starts with an empty ipa_transforms_to_apply vector and all subsequent IPA passes that see it are pushed onto it. The original node gets these pushed on their ipa

Re: [Patch] Add TYPE_NAME_IDENTIFIER

2014-04-14 Thread Jason Merrill
On 04/14/2014 07:51 AM, Paolo Carlini wrote: #define TYPE_IDENTIFIER(NODE) \ (TYPE_NAME (NODE) && DECL_P (TYPE_NAME (NODE)) \ ? DECL_NAME (TYPE_NAME (NODE)) : TYPE_NAME (NODE)) OK with that change. Jason

Re: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-14 Thread Jason Merrill
Oh, I see where the problem is coming from. Cilk_sync is a statement, but it's being parsed as an expression. Let's move it to cp_parser_statement. Jason

[PATCH, i386]: Some classify_argument and return_in_memory cleanups

2014-04-14 Thread Uros Bizjak
Hello! Attached patch changes return type of classify_argument to bool and merges a couple of called-once functions to their call sites. The later change removes a bunch of functions, declared with ATTRIBUTE_UNUSED. 2014-04-14 Uros Bizjak * config/i386/i386.c (examine_argument): Return bo

Re: [PATCH] Do not run IPA transform phases multiple times

2014-04-14 Thread Jan Hubicka
> Hi, > > I have noticed that we often run IPA-transformation phases multiple > times. The reason is that when a virtual clone is created, it starts > with an empty ipa_transforms_to_apply vector and all subsequent IPA > passes that see it are pushed onto it. The original node gets these > pushe

Fix PR/60820

2014-04-14 Thread Jan Hubicka
Hi, this patch fixes ICE in ctor_for_folding where varpool_remove_node incorrectly clobbers DECL_INITIAL of a variable while removing cgraph during the early LTO merging. This case is special by alowing multiple symtab nodes for a given declaration and we have similar special case in the other rem

Re: [PATCH] [CLEANUP] Mark locally-used functions static

2014-04-14 Thread Bernhard Reutner-Fischer
On 14 April 2014 16:50:51 Patrick Palka wrote: Hi everyone, This patch marks "static" a bunch of locally-used, non-debug functions within the GCC sources. Doing so addresses a subset of the warnings emitted when compiling the GCC sources with -Wmissing-declarations. I bootstrapped and regtes

Ignore cxa_pure_virtual in ipa-devirt's target lists

2014-04-14 Thread Jan Hubicka
Hi, as discussed in February, it is safe for ipa-devirt to skip all cxa_pure_virtual calls from virtual tables. Since cxa_pure_virtual is not a builtin, I simply implemented this by making maybe_record_node to skip everything that is not of METHOD_TYPE. Other drawback of cxa_pure_virtual is that

[PATCH] Fix PR c++/60463, PE c++/60755 Incorrect discard of const qualifier

2014-04-14 Thread Momchil Velikov
#x27;this' is const. This patch makes sure that the captured 'this' is the same as the one used in the overload resolution. Bootstrapped and tested with no regressions relative to version 4.10.0 20140414 (experimental) [master revision 98acb41:a7ec718:cb799f0a61f3adef32474ad4e01ff

Re: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-04-14 Thread Mark Wielaard
On Fri, 2014-04-11 at 11:03 -0700, Cary Coutant wrote: > >> The DWARF bits are fine with me. > > > > Thanks. Who can approve the other bits? > > You should probably get C and C++ front end approval. I'm not really > sure who needs to review patches in c-family/. Since the part in c/ is > so tiny,

Re: [PATCH] Add DW_AT_const_value as unsigned or int depending on type and value used.

2014-04-14 Thread Mark Wielaard
On Sun, 2014-03-23 at 12:17 +0100, Mark Wielaard wrote: > As the comment in the code already indicated DWARF2 does provide > DW_FORM_sdata/DW_FORM_udata to represent signed/unsigned data. > Enumeration constants wider than HOST_WIDE_INT are already handled > separately. Those constant values that d

Re: [PATCH] dwarf2out: Use normal constant values in bound_info if possible.

2014-04-14 Thread Mark Wielaard
Hi, On Sun, 2014-03-23 at 12:15 +0100, Mark Wielaard wrote: > * dwarf2out.c (add_bound_info): If HOST_WIDE_INT is big enough, > then represent the bound as normal constant value. Since stage 1 opened up I would like to request approval again to push this. Patch rebased to current mast

Re: [PATCH] Add DW_AT_const_value as unsigned or int depending on type and value used.

2014-04-14 Thread Cary Coutant
>>* dwarf2out.c (gen_enumeration_type_die): Add DW_AT_const_value >>as unsigned or int depending on type and value used. > > Since stage 1 opened up I would like to request approval again to push > this. Patch rebased to current master attached. The discussion that led to that TODO is here

Re: [PATCH] Add DW_AT_const_value as unsigned or int depending on type and value used.

2014-04-14 Thread Jakub Jelinek
On Mon, Apr 14, 2014 at 02:55:52PM -0700, Cary Coutant wrote: > Also note that size_of_die and value_format will still choose > DW_FORM_data[1248] for dw_val_class_unsigned_const in most cases. > Don't you really want to use DW_FORM_udata? DW_FORM_data[1248] is in many cases smaller than DW_FORM_u

Re: C++ PATCH for c++/51747 (list-initialization from same type)

2014-04-14 Thread Marc Glisse
On Fri, 11 Apr 2014, Jason Merrill wrote: Recent changes to the C++ standard have allowed the use of list-initialization with a single initializer of the same type as the target; this patch updates reshape_init accordingly. Tested x86_64-pc-linux-gnu, applying to trunk. Hello, shouldn't th

Re: [PATCH] Add DW_AT_const_value as unsigned or int depending on type and value used.

2014-04-14 Thread Cary Coutant
>> Also note that size_of_die and value_format will still choose >> DW_FORM_data[1248] for dw_val_class_unsigned_const in most cases. >> Don't you really want to use DW_FORM_udata? > > DW_FORM_data[1248] is in many cases smaller than DW_FORM_udata (though, one > has to take into account possibly la

[patch] more partial int mode precision patches

2014-04-14 Thread DJ Delorie
More cases where a mode's precision should be used instead of its storage size. Ok? gcc/ * expmed.c (init_expmed_one_conv): Assume partial integers have a known precision, but still compensate for those that are whole-int-sized. * expr.c (convert_move): Allow for

[patch] Implement N3887: std::tuple_element_t

2014-04-14 Thread Jonathan Wakely
This adds the std::tuple_element_t alias template for C++14. Tested x86_64-linux, committed to trunk. commit 8aed2fc56f7bbd765e79f6c88e50c19e195e32ac Author: Jonathan Wakely Date: Mon Apr 14 16:36:00 2014 +0100 N3887 Consistent Metafunction Aliases * include/std/tuple (tuple_

Re: LTO / invoke.texi: Add some words about static libraries and LTO

2014-04-14 Thread Gerald Pfeifer
On Sat, 22 Mar 2014, Tobias Burnus wrote: > Mention gcc-ar, gcc-ranlib, gcc-nm in the documentation. > > OK? This looks okay to me, except for In order to make a static library suitable for both LTO optimization and usual linkage, compile its object files with @option{-flto} @code{-ffat-

RE: [PATCH][1/3] Fix PR54733 Optimize endian independent load/store

2014-04-14 Thread Thomas Preud'homme
Since stage1 is in effect now, I'm sending a ping for this patch review. Best regards, Thomas

[patch] Disable if_conversion2 for Og

2014-04-14 Thread Joey Ye
If-converstion is harmful to optimized debugging as it generates conditional execution instructions with line number information, which resulted in a dillusion to developers that both then-else branches are executed. For example: test.c: 1: unsigned oldest_sequence; 2: 3: unsigned foo(unsigned seq

Re: [patch] change specific int128 -> generic intN

2014-04-14 Thread Marc Glisse
On Mon, 14 Apr 2014, DJ Delorie wrote: * rtti.c (emit_support_tinfos): Remove __int128-specific entries. Hello, I wanted to check the interaction with: http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00618.html but I don't see where you moved the __int128 typeinfo generation.

Re: [patch] change specific int128 -> generic intN

2014-04-14 Thread DJ Delorie
I wasn't sure what to do with that array, since it was static and couldn't have "empty" slots in them like the arrays in tree.h. Also, do we need to have *every* type in that list? What's the rule for whether a type gets installed there or not? The comment says "guaranteed to be in the runtime

Re: [PATCH] Add DW_AT_const_value as unsigned or int depending on type and value used.

2014-04-14 Thread Jakub Jelinek
On Mon, Apr 14, 2014 at 03:48:06PM -0700, Cary Coutant wrote: > >> Also note that size_of_die and value_format will still choose > >> DW_FORM_data[1248] for dw_val_class_unsigned_const in most cases. > >> Don't you really want to use DW_FORM_udata? > > > > DW_FORM_data[1248] is in many cases smalle

Re: GCC's -fsplit-stack disturbing Mach's vm_allocate

2014-04-14 Thread Richard Braun
On Fri, Apr 11, 2014 at 11:51:44PM +0200, Samuel Thibault wrote: > It's indeed: > > /* This function is called at program startup time to make sure that >mmap, munmap, and getpagesize are resolved if linking dynamically. >We want to resolve them while we have enough stack for them, rather

[PATCH] Fix sanitizer tests to work under QEMU

2014-04-14 Thread Maxim Ostapenko
Hi all, Some ASan and UBSan pattern match tests fail under QEMU, because libsanitizer adds escape sequences which confuse Dejagnu (because it thinks that it is actually running under a tty). This bug was already fixed for some tests (see http://gcc.gnu.org/ml/gcc-patches/2013-04/msg00235.html

Re: [PATCH] Fix sanitizer tests to work under QEMU

2014-04-14 Thread Jakub Jelinek
On Tue, Apr 15, 2014 at 10:49:48AM +0400, Maxim Ostapenko wrote: > Some ASan and UBSan pattern match tests fail under QEMU, because > libsanitizer adds escape sequences which confuse Dejagnu (because it > thinks that it is actually running under a tty). This bug was > already fixed for some tests (