Re: [PATCH] Handle GIMPLE_ASSIGNs with different vuse in gimple_equal_p

2013-11-10 Thread Bernhard Reutner-Fischer
On Sat, Nov 09, 2013 at 05:30:00PM +0100, Tom de Vries wrote: >Richard, > >Consider the test-case test.c: >... >int z; >int x; > >void >f (int c, int d) >{ > if (c) >z = 5; > else >{ > if (d) > x = 4; > z = 5; >} >} >... > >Atm, we don't tail-merge the 'z = 5' blocks,

[C++ Patch] Fixes for duplicate warnings regressions [1/2]

2013-11-10 Thread Paolo Carlini
Hi, this is the issue with -Waddress caused by the fix for c++/56930. I'm handling it as already described, that is by adding a bool parameter to c_common_truthvalue_conversion. Tested x86_64-linux. Thanks! Paolo. // /c-family 2013-11-11 Paolo Carlini * c-com

[C++ Patch] Fixes for duplicate warnings regressions [2/2]

2013-11-10 Thread Paolo Carlini
Hi, this is another issue, with -Wzero-as-null-pointer-constant, caused (or, better, exposed) by the fix for c++/54170: the problem is that build_ptrmemfunc, called by cp_convert_to_pointer, itself eventually calls cp_convert_to_pointer. The build_ptrmemfunc bit isn't essential: using the cp

Re: [C++ PATCH] Refactor implicit function template implementation and fix 58534, 58536, 58548, 58549 and 58637.

2013-11-10 Thread Adam Butcher
On 2013-11-10 6:10, Jason Merrill wrote: Hmm, actually I think messing with the non-pack's decl is dangerous, and we should come up with a new decl for the pack instead. I think you can use reduce_template_parm_level with a "levels" argument of 0 to build a new decl and parm index. I actually

Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)

2013-11-10 Thread Richard Sandiford
Andrew MacLeod writes: > 2 - I really believe gimple needs a type system different from front end > trees, that is my primary motivation. I'm tired of jumping through > hoops to do anything slightly different, and I got fed up with it. With > a separate type system for gimple, we can rid ours

Re: [PATCH, libatomic]: Add config/x86/fenv.c

2013-11-10 Thread Uros Bizjak
On Fri, Nov 8, 2013 at 10:32 PM, Joseph S. Myers wrote: >> >> Can we introduce a target-dependant source here, in the same way as >> > >> > Sure, that seems a reasonable thing to do. I think putting a file fenv.c >> > in an appropriate subdirectory of libatomic/config will result in it being >>

Re: [PATCH] decide edge's hotness when there is profile info

2013-11-10 Thread Eric Botcazou
> > + > > + profile_status_for_function (fn) > > + = (flag_guess_branch_prob ? PROFILE_GUESSED : PROFILE_ABSENT); > > + node->frequency > > + = hot ? NODE_FREQUENCY_HOT : NODE_FREQUENCY_NORMAL; > > In GCC code style the = goes at the end of the line: > > profile_status_for_function

Re: [RFA][PATCH] Isolate erroneous paths optimization

2013-11-10 Thread Eric Botcazou
> > But I think that you cannot transform > > > > foo () > > { > > > > *0 = 1; > > > > } > > > > to __builtin_trap as you can catch the trap via an exception handler > > in a caller of foo, no? > > That is true. OK, I can see an argument that when using > -fnon-call-exceptions that kind of

[patch gcc]: Add executable-extension for exported-symbol-test in configure.ac

2013-11-10 Thread Kai Tietz
Hi, this patch adds exeext to -rdynamic and exported symbol-check within configure.ac. By this this test will be preformed as intended on targets with executable-extensions (nevertheless -rdynamics will still fail for pe-coff targets). ChangeLog 2013-11-10 Karlson2k Kai Tietz

Re: Update soft-fp from glibc

2013-11-10 Thread Uros Bizjak
On Fri, Nov 8, 2013 at 10:26 PM, Joseph S. Myers wrote: >> > I've applied this patch to update libgcc's copy of soft-fp from >> > glibc. There are lots of coding standards fixes, but also various bug >> > fixes; I've added testcases for various of the fixed bugs illustrating >> > them for __floa

Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)

2013-11-10 Thread Richard Biener
Richard Sandiford wrote: >Andrew MacLeod writes: >> 2 - I really believe gimple needs a type system different from front >end >> trees, that is my primary motivation. I'm tired of jumping through >> hoops to do anything slightly different, and I got fed up with it. >With >> a separate type s

Re: [C++ PATCH] Refactor implicit function template implementation and fix 58534, 58536, 58548, 58549 and 58637.

2013-11-10 Thread Adam Butcher
On 2013-11-10 10:38, Adam Butcher wrote: On 2013-11-10 6:10, Jason Merrill wrote: Hmm, actually I think messing with the non-pack's decl is dangerous, and we should come up with a new decl for the pack instead. I think you can use reduce_template_parm_level with a "levels" argument of 0 to bui

Re: [patch][RFC] make lra.c:check_rtl set maybe_hot_insn_p

2013-11-10 Thread Richard Biener
Steven Bosscher wrote: >Hello, > >This patch is necessary to make ARM pass the test suite with LRA >enabled. The symptom is recog failing to recognize a store_minmaxsi >insn, see: > http://gcc.gnu.org/ml/gcc-patches/2013-11/msg00725.html > >But I am not sure if that's also the root cause of the pr

[RFC] replace malloc with a decl on the stack

2013-11-10 Thread Marc Glisse
Hello, I am posting this patch to get some feedback on the approach. The goal is to replace malloc+free with a stack allocation (a decl actually) when the size is a small constant. For testing, I highjacked the "leaf" attribute, but it isn't right, I'll remove it from the list (not sure what

[PATCH, i386] Fix -mpreferred-stack-boundary

2013-11-10 Thread Bernd Edlinger
Currently on trunk the option -mpreferred-stack-boundary does not work together with #pragma GCC target("sse") or __attribute__((target("sse"))). There is already a test case that detects this: gcc.target/i386/fastcall-sseregparm.c The attached patch fixes this test case under i686-pc-linux-gnu.

PATCH: other/59039: Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-10 Thread H.J. Lu
Hi, This patch documents __builtin_setjmp and __builtin_longjmp. OK to install? Thanks. H.J. --- 2013-11-10 H.J. Lu PR other/59039 * doc/extend.texi: Document __builtin_setjmp and __builtin_longjmp. diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 0d7281

Re: [PATCH] decide edge's hotness when there is profile info

2013-11-10 Thread Steven Bosscher
On Sun, Nov 10, 2013 at 1:08 PM, Eric Botcazou wrote: >> > + >> > + profile_status_for_function (fn) >> > + = (flag_guess_branch_prob ? PROFILE_GUESSED : PROFILE_ABSENT); >> > + node->frequency >> > + = hot ? NODE_FREQUENCY_HOT : NODE_FREQUENCY_NORMAL; >> >> In GCC code style the = goes

Re: [PATCH, rtl]: Mode-switching: Mark block as nontransparent if its exiting mode != no_mode

2013-11-10 Thread Eric Botcazou
> Attached patch fixes an oversight in mode-switching. For blocks > without ANY mode requirements, we have to consider instructions with > MODE_AFTER mode changes. If the exiting mode from the block is > different that no_mode (the mode we start), we have to mark the block > as nontransparent. > >

Re: some prep work to make JUMP_TABLE_DATA a non-active_insn_p object

2013-11-10 Thread Eric Botcazou
> This is the first patch of what I think will be four to fix those few > places. > > Bootstrapped&tested on powerpc64-unknown-linux-gnu. Also built SH to be > sure. > > OK for trunk? The generic part is OK (modulo the additional space after ! in the 3rd hunk of the haifa-sched.c patch). -- E

Re: [Patch, libgfortran] Set close-on-exec flag when opening files

2013-11-10 Thread Tobias Burnus
Janne Blomqvist wrote: the attached patch sets the close-on-exec flag when opening files, as is usually considered good practice these days. See e.g. http://www.python.org/dev/peps/pep-0446/ and links therein for more information. + int flags = O_RDWR|O_CREAT|O_EXCL; I'd add spaces around "

Improve diagnostics for invalid std::allocator specializations

2013-11-10 Thread Jonathan Wakely
For PR libstdc++/55963 I said I'd improve the diagnostics when you try to use std::vector, which is invalid because the C++ Allocator requirements require the value_type to be a non-const object type. I tried adding static assertions to the primary std::allocator template, but the diagnostics are

Re: [PATCH, rtl]: Mode-switching: Mark block as nontransparent if its exiting mode != no_mode

2013-11-10 Thread Uros Bizjak
On Sun, Nov 10, 2013 at 5:45 PM, Eric Botcazou wrote: >> Attached patch fixes an oversight in mode-switching. For blocks >> without ANY mode requirements, we have to consider instructions with >> MODE_AFTER mode changes. If the exiting mode from the block is >> different that no_mode (the mode we

Re: [PATCH, rtl]: Mode-switching: Mark block as nontransparent if its exiting mode != no_mode

2013-11-10 Thread Uros Bizjak
On Sun, Nov 10, 2013 at 7:40 PM, Uros Bizjak wrote: > On Sun, Nov 10, 2013 at 5:45 PM, Eric Botcazou wrote: >>> Attached patch fixes an oversight in mode-switching. For blocks >>> without ANY mode requirements, we have to consider instructions with >>> MODE_AFTER mode changes. If the exiting mode

Re: [patch gcc]: Add executable-extension for exported-symbol-test in configure.ac

2013-11-10 Thread Bernhard Reutner-Fischer
On 10 November 2013 13:49:37 Kai Tietz wrote: Hi, this patch adds exeext to -rdynamic and exported symbol-check within configure.ac. By this this test will be preformed as intended on targets with executable-extensions (nevertheless -rdynamics will still fail for pe-coff targets). ChangeLog

Re: [C++ PATCH] Refactor implicit function template implementation and fix 58534, 58536, 58548, 58549 and 58637.

2013-11-10 Thread Jason Merrill
On 11/10/2013 08:10 AM, Adam Butcher wrote: With the convert function in pt.c, PATCH 2/3 now looks as follows: I like this direction. + /* Build up a tree vec of empty tree vecs up to the inner substitution +args built above. */ I think we want to copy the enclosing args; see

Re: [C++ Patch] Fixes for duplicate warnings regressions [2/2]

2013-11-10 Thread Jason Merrill
OK. Jason

Re: [C++ PATCH] Refactor implicit function template implementation and fix 58534, 58536, 58548, 58549 and 58637.

2013-11-10 Thread Adam Butcher
On 2013-11-10 18:49, Jason Merrill wrote: On 11/10/2013 08:10 AM, Adam Butcher wrote: + /* Build up a tree vec of empty tree vecs up to the inner substitution +args built above. */ I think we want to copy the enclosing args; see existing uses of add_outermost_template_args. O

Re: OpenBSD cilkrts portability patch

2013-11-10 Thread Andi Kleen
John Carr writes: > I am trying to build the trunk version of gcc to have Cilk on OpenBSD. > > I attach three changes to libcilkrts. Two changes treat OpenBSD like > FreeBSD. One change is needed because OpenBSD defines PTHREAD_MUTEX_* as > enumerations rather than preprocessor constants. That

Re: [Patch, RTL] Eliminate redundant vec_select moves.

2013-11-10 Thread Richard Sandiford
Tejas Belagod writes: >> The problem is that one reg rtx can span several hard registers. >> E.g. (reg:V4SI 32) might represent one 64-bit register (no. 32), >> but it might instead represent two 32-bit registers (nos. 32 and 33). >> Obviously the latter's not very likely for vectors this small, >

Re: [wwwdocs] [C++14] Library and front-end additions

2013-11-10 Thread Ed Smith-Rowland
On 11/10/2013 11:54 AM, Jonathan Wakely wrote: On 10 November 2013 16:52, Jonathan Wakely wrote: I thought I'd already made similar changes to gcc-4.9/changes.html for the C++14 changes but I never committed it. The only comment I have is that "chrono" isn't a type, but the change is fine as f

Re: [Patch, libgfortran] Set close-on-exec flag when opening files

2013-11-10 Thread Janne Blomqvist
On Sun, Nov 10, 2013 at 7:16 PM, Tobias Burnus wrote: > Janne Blomqvist wrote: >> >> the attached patch sets the close-on-exec flag when opening files, as >> is usually considered good practice these days. See e.g. >> http://www.python.org/dev/peps/pep-0446/ and links therein for more >> informat

Re: [wwwdocs] [C++14] Library and front-end additions

2013-11-10 Thread Jonathan Wakely
On 10 November 2013 20:28, Ed Smith-Rowland wrote: > > OK, I folded our versions together. Thank you. I also fixed up my code > examples. > > OK? That looks good, thanks very much for updating it.

Re: [RFC] replace malloc with a decl on the stack

2013-11-10 Thread Marc Glisse
On Sun, 10 Nov 2013, Marc Glisse wrote: I am posting this patch to get some feedback on the approach. The goal is to replace malloc+free with a stack allocation (a decl actually) when the size is a small constant. A slightly updated version that handles abort and if(VAR==0) where VAR is the

Re: [C++ PATCH] Refactor implicit function template implementation and fix 58534, 58536, 58548, 58549 and 58637.

2013-11-10 Thread Jason Merrill
On 11/10/2013 02:39 PM, Adam Butcher wrote: I assumed that tsubst simply doesn't do anything with a null tree substitution (i.e. it is an identity op). Substituting NULL_TREE for a template parameter gives a template parameter with a reduced level; this happens during partial instantiation.

Re: [PATCH] make has_gate and has_execute useless

2013-11-10 Thread Trevor Saunders
On Fri, Nov 08, 2013 at 10:37:00AM +0100, Richard Biener wrote: > On Thu, Nov 7, 2013 at 5:00 PM, wrote: > > From: Trevor Saunders > > > > Hi, > > > > This is the result of seeing what it would take to get rid of the has_gate > > and > > has_execute flags on pass_data. It turns out not much,

[PATCH, PING] -fstrict-volatile-bitfields followup

2013-11-10 Thread Sandra Loosemore
Can someone please review this patch? http://gcc.gnu.org/ml/gcc-patches/2013-10/msg02637.html I would like to commit the already-approved -fstrict-volatile-bitfields patch once we also have an approved fix for the infinite recursion problem I discovered while testing a backport of the patch se

Re: [wwwdocs] [C++14] Library and front-end additions

2013-11-10 Thread Ed Smith-Rowland
On 11/10/2013 03:59 PM, Jonathan Wakely wrote: On 10 November 2013 20:28, Ed Smith-Rowland wrote: OK, I folded our versions together. Thank you. I also fixed up my code examples. OK? That looks good, thanks very much for updating it. OK, I got gcc-4.9/changes.html checked in (after some tr

[PATCH] Fix code generation problem with jump threading

2013-11-10 Thread Jeff Law
If we have a jump threading request through a joiner block which has two successors S1 and S2. If the threading request goes through S1 and ultimately reaches S2, then we have to ensure that any PHI nodes in S2 have the same arguments for edges J->S2 and J->S1...->S2. The SSA/CFG updating c

Re: [RFA][PATCH] Isolate erroneous paths optimization

2013-11-10 Thread Jeff Law
On 11/10/13 05:34, Eric Botcazou wrote: But I think that you cannot transform foo () { *0 = 1; } to __builtin_trap as you can catch the trap via an exception handler in a caller of foo, no? That is true. OK, I can see an argument that when using -fnon-call-exceptions that kind of code s

Re: [PATCH GCC]Refactor force_expr_to_var_cost and handle type conversion

2013-11-10 Thread Bin.Cheng
On Fri, Nov 8, 2013 at 10:06 PM, Richard Biener wrote: > On Fri, Nov 8, 2013 at 2:41 PM, bin.cheng wrote: >> Hi, >> This patch refactors force_expr_to_var_cost and handles type conversion >> along with other tree nodes. It is split from the patch posted at >> http://gcc.gnu.org/ml/gcc-patches/20