[committed] Fix one issue reported by valgrind (PR other/58712)

2014-01-15 Thread Jakub Jelinek
Hi! When memcpy has constant length, we leave probable_max_size uninitialized and later on create a CONST_INT out of it. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2014-01-15 Jakub Jelinek PR other/58712 * builtins.c (d

Re: [PATCH] Fix PR49718 : allow no_instrument_function attribute in class member definition/declaration

2014-01-15 Thread Laurent Alfonsi
Ping ? Ok for trunk ? On 01/09/14 15:17, Laurent Alfonsi wrote: On 01/09/14 06:02, Jeff Law wrote: On 01/08/14 02:05, Laurent Alfonsi wrote: All, I was looking at PR49718. I have enclosed a simple fix for this bug report. 2014-01-07 Laurent Alfonsi * c-family/c-common.c (ha

Re: [PATCH/AARCH64] Fix register cost for moving to/from stack registers

2014-01-15 Thread Marcus Shawcroft
On 15 January 2014 00:09, Andrew Pinski wrote: > ChangeLog: > * config/aarch64/aarch64.c (aarch64_register_move_cost): Correct cost > of moving from/to the STACK_REG register class. + /* Moving between GPR and stack cost is the same as GP2GP. */ Don't forget the double space after period. Oth

Re: [C PATCH] Disallow subtracting pointers to empty structs (PR c/58346)

2014-01-15 Thread Marek Polacek
On Tue, Jan 14, 2014 at 06:52:00PM +0100, Florian Weimer wrote: > On 01/13/2014 09:48 PM, Marek Polacek wrote: > >+bool > >+pointer_to_zero_sized_aggr_p (tree t) > >+{ > >+ t = strip_pointer_operator (t); > >+ if (RECORD_OR_UNION_TYPE_P (t) > >+ && TYPE_SIZE (t) > >+ && integer_zerop (T

[GCC, ARM] Backport trunk fix to 4.8 branch to properly handle rtx of ARM PLD instruction

2014-01-15 Thread Terry Guo
Hi there, With trunk enhancement at http://gcc.gnu.org/ml/gcc-patches/2013-11/msg00533.html, gcc can properly handle PLD rtx. Otherwise the PLD rtx will be treated as SET rtx and gcc will end up with ICE. The attached patch intends to back port this enhancement to 4.8 branch. Tested with gcc regre

[RFC] Move ehcleanup pass to before early SRA

2014-01-15 Thread Eric Botcazou
Hi, we have run into optimization regressions in Ada caused by the interaction between the GIMPLE clobbers and SRA: on the one hand GIMPLE clobbers create artificial EH handlers for aggregate variables, on the other hand SRA refuses to scalarize objects that appear in a statement that can throw

[Committed] S/390: Fix BZ 59803.

2014-01-15 Thread Andreas Krebbel
Hi, fix for BZ59803. For more details please see the comment in the patch. Bootstrapped and regtested on s390x with 4.8 and mainline. Committed to 4.8 and mainline. Bye, -Andreas- 2014-01-15 Andreas Krebbel * config/s390/s390.c (s390_preferred_reload_class): Don't return

Re: [GCC, ARM] Backport trunk fix to 4.8 branch to properly handle rtx of ARM PLD instruction

2014-01-15 Thread Richard Earnshaw
On 15/01/14 09:23, Terry Guo wrote: > Hi there, > > With trunk enhancement at > http://gcc.gnu.org/ml/gcc-patches/2013-11/msg00533.html, gcc can properly > handle PLD rtx. Otherwise the PLD rtx will be treated as SET rtx and gcc > will end up with ICE. The attached patch intends to back port this

[PATCH, ARM] ICE when building kernel raid6 neon code

2014-01-15 Thread Zhenqiang Chen
Hi, The patch fixes ICE when building kernel raid6 neon code. lib/raid6/neon4.c: In function 'raid6_ neon4_gen_syndrome_real': lib/raid6/neon4.c:113:1: internal compiler error: in dwarf2out_frame_debug_adjust_cfa, at dwarf2cfi.c:1090 } https://bugs.launchpad.net/gcc-linaro/+bug/1268893 Root c

Re: [C PATCH] Disallow subtracting pointers to empty structs (PR c/58346)

2014-01-15 Thread Marek Polacek
On Tue, Jan 14, 2014 at 09:42:37PM +, Joseph S. Myers wrote: > On Mon, 13 Jan 2014, Marek Polacek wrote: > > > +/* Return true if T is a pointer to a zero-sized struct/union. */ > > + > > +bool > > +pointer_to_zero_sized_aggr_p (tree t) > > +{ > > + t = strip_pointer_operator (t); > > + if

Re: [C PATCH] Disallow subtracting pointers to empty structs (PR c/58346)

2014-01-15 Thread Jakub Jelinek
On Wed, Jan 15, 2014 at 11:27:37AM +0100, Marek Polacek wrote: > Perhaps, but I don't think we can do it easily. Consider > > int > foo (int *p, int *q) > { > return p - q; > } That is not a difference of pointers to zero sized arrays though, that is pointers to int, and there is no division b

Re: [AARCH64][PATCH] PR59695

2014-01-15 Thread Kugan
On 13/01/14 21:05, Richard Earnshaw wrote: > On 11/01/14 23:42, Kugan wrote: >> Hi, >> >> aarch64_build_constant incorrectly truncates the immediate when >> constants are generated with MOVN. This causes coinor-osi tests to fail >> (tracked also in https://bugs.launchpad.net/gcc-linaro/+bug/1263576

RE: [GCC, ARM] Backport trunk fix to 4.8 branch to properly handle rtx of ARM PLD instruction

2014-01-15 Thread Terry Guo
> -Original Message- > From: Richard Earnshaw > Sent: Wednesday, January 15, 2014 5:54 PM > To: Terry Guo > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [GCC, ARM] Backport trunk fix to 4.8 branch to properly handle > rtx of ARM PLD instruction > > On 15/01/14 09:23, Terry Guo wrote: > > H

[PATCH][RFC] Fix DF sub-CFG analysis slowness (PR39326)

2014-01-15 Thread Richard Biener
This improves compile time of the testcase in PR39326 at -O3 from loop invariant motion : 24.41 (32%) usr 0.03 ( 4%) sys 24.43 (32%) wall 148 kB ( 0%) ggc loop unswitching: 15.16 (20%) usr 0.02 ( 3%) sys 15.30 (20%) wall 0 kB ( 0%) ggc TOTAL : 76.

Re: PR 54168: Unnecessary narrowing in tree-ssa-forwprop pass?

2014-01-15 Thread Richard Biener
On Tue, Jan 14, 2014 at 3:49 PM, Richard Earnshaw wrote: > On 14/01/14 14:32, Jakub Jelinek wrote: >> Anyway, the above is really a simple case, and I'd call it a >> backend bug if it isn't able to generate good code out of that. > > Exactly which back-end pass are you expecting to simplify > > (s

Re: [RFC] Move ehcleanup pass to before early SRA

2014-01-15 Thread Richard Biener
On Wed, Jan 15, 2014 at 10:24 AM, Eric Botcazou wrote: > Hi, > > we have run into optimization regressions in Ada caused by the interaction > between the GIMPLE clobbers and SRA: on the one hand GIMPLE clobbers create > artificial EH handlers for aggregate variables, on the other hand SRA refuses

Re: [GCC, ARM] Backport trunk fix to 4.8 branch to properly handle rtx of ARM PLD instruction

2014-01-15 Thread Richard Earnshaw
On 15/01/14 10:45, Terry Guo wrote: > > >> -Original Message- >> From: Richard Earnshaw >> Sent: Wednesday, January 15, 2014 5:54 PM >> To: Terry Guo >> Cc: gcc-patches@gcc.gnu.org >> Subject: Re: [GCC, ARM] Backport trunk fix to 4.8 branch to properly > handle >> rtx of ARM PLD instructi

Re: [AARCH64][PATCH] PR59695

2014-01-15 Thread Richard Earnshaw
On 15/01/14 10:38, Kugan wrote: > On 13/01/14 21:05, Richard Earnshaw wrote: >> On 11/01/14 23:42, Kugan wrote: >>> Hi, >>> >>> aarch64_build_constant incorrectly truncates the immediate when >>> constants are generated with MOVN. This causes coinor-osi tests to fail >>> (tracked also in https://bu

Re: PR 59712 patch

2014-01-15 Thread Jonathan Wakely
On 14 January 2014 14:44, Jonathan Wakely wrote: > On 9 January 2014 21:55, François Dumont wrote: >> Hi >> >> Here is a patch for this small problem with clang. It is not a blocking >> issue for the 4.9 release but at the same time it is a rather safe fix so >> just tell me if I can commit it.

Re: [PATCH, ARM] ICE when building kernel raid6 neon code

2014-01-15 Thread Richard Earnshaw
On 15/01/14 10:04, Zhenqiang Chen wrote: > Hi, > > The patch fixes ICE when building kernel raid6 neon code. > > lib/raid6/neon4.c: In function 'raid6_ > > neon4_gen_syndrome_real': > lib/raid6/neon4.c:113:1: internal compiler error: in > dwarf2out_frame_debug_adjust_cfa, at dwarf2cfi.c:1090 >

Re: [RFC] Move ehcleanup pass to before early SRA

2014-01-15 Thread Eric Botcazou
> What you want is tree-eh.c:optimize_clobbers, right? Can't we > do this optimization during EH refactoring / lowering as well? We need the SSA form for sink_clobbers. > Also why does SRA refuse to scalarize here? Because of the EH handler and the following predicate: /* Disqualify LHS and RH

RE: [GCC, ARM] Backport trunk fix to 4.8 branch to properly handle rtx of ARM PLD instruction

2014-01-15 Thread Terry Guo
> > Preferably, particularly since you haven't supplied a testcase. > > R. Bug is reported at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59826. I shall update the patch to include the test case. BR, Terry

RE: [GCC, ARM] Backport trunk fix to 4.8 branch to properly handle rtx of ARM PLD instruction

2014-01-15 Thread Terry Guo
> -Original Message- > From: Terry Guo [mailto:terry@arm.com] > Sent: Wednesday, January 15, 2014 8:21 PM > To: Richard Earnshaw > Cc: gcc-patches@gcc.gnu.org > Subject: RE: [GCC, ARM] Backport trunk fix to 4.8 branch to properly handle > rtx of ARM PLD instruction > > > > > Preferab

Re: [PATCH][RFC] Fix DF sub-CFG analysis slowness (PR39326)

2014-01-15 Thread Steven Bosscher
On Wed, Jan 15, 2014 at 11:52 AM, Richard Biener wrote: > I can split off a df_analyze_1 and have a df_analyze () doing what > it does now and a df_analyze_loop () combining df_set_blocks () > and df_analyze () for example. df_analyze_loop sounds good to me. But shouldn't it be possible to avoid

Re: [PATCH][RFC] Fix DF sub-CFG analysis slowness (PR39326)

2014-01-15 Thread Richard Biener
On Wed, 15 Jan 2014, Steven Bosscher wrote: > On Wed, Jan 15, 2014 at 11:52 AM, Richard Biener wrote: > > I can split off a df_analyze_1 and have a df_analyze () doing what > > it does now and a df_analyze_loop () combining df_set_blocks () > > and df_analyze () for example. > > df_analyze_loop s

[C++ Patch] PR 59270

2014-01-15 Thread Paolo Carlini
Hi, this is a 4.9 Regression, but just an ICE on invalid. It's a little tricky to fix, because, eg, in mainline (vs 4_8-branch) we want to produce somewhat more concise diagnostic in this area (eg, a single error for init/array26.C). It seems Ok to me, and passes testing, to return NULL_TREE

[PATCH] Fix PR59822

2014-01-15 Thread Richard Biener
This should fix PR59822, us creating in valid SSA form when hoisting a[i_2] out of a loop where i_2 is defined inside the loop. Bootstrap / regtest running on x86_64-unknown-linux-gnu. Richard. 2014-01-15 Richard Biener PR tree-optimization/59822 * tree-vect-stmts.c (hoist_d

Re:: [PATCH, reginfo.c, i386.c] Backport fix for PR58139 to 4.8

2014-01-15 Thread Peter Bergner
Oops, forgot to CC the x86 maintainers. Is the i386.c change ok for 4.8? Peter Forwarded Message From: Peter Bergner To: gcc-patches@gcc.gnu.org Cc: Richard Biener , Jakub Jelinek , Vladimir Makarov Subject: [PATCH, reginfo.c, i386.c] Backport fix for PR58139 to 4.8 Date:

Re: [C PATCH] Preevaluate rhs for lhs op= rhs in C (PR c/58943)

2014-01-15 Thread H.J. Lu
On Mon, Jan 13, 2014 at 11:11 AM, Jakub Jelinek wrote: > Hi! > > This patch fixes the following testcase by preevaluating rhs if it has > (can have) side-effects in lhs op= rhs expressions. Bootstrapped/regtested > on x86_64-linux and i686-linux, ok for trunk? > C++ already does a similar thing (

Re: [C PATCH] Disallow subtracting pointers to empty structs (PR c/58346)

2014-01-15 Thread Marek Polacek
On Wed, Jan 15, 2014 at 11:35:40AM +0100, Jakub Jelinek wrote: > On Wed, Jan 15, 2014 at 11:27:37AM +0100, Marek Polacek wrote: > > Perhaps, but I don't think we can do it easily. Consider > > > > int > > foo (int *p, int *q) > > { > > return p - q; > > } > > That is not a difference of pointe

[PATCH] Fix DF sub-CFG analysis slowness (PR39326)

2014-01-15 Thread Richard Biener
On Wed, 15 Jan 2014, Steven Bosscher wrote: > On Wed, Jan 15, 2014 at 11:52 AM, Richard Biener wrote: > > I can split off a df_analyze_1 and have a df_analyze () doing what > > it does now and a df_analyze_loop () combining df_set_blocks () > > and df_analyze () for example. > > df_analyze_loop s

Re: [Patch,avr]: Fix wrong warning PR59396

2014-01-15 Thread Georg-Johann Lay
Am 12/18/2013 12:37 PM, schrieb Richard Biener: On Tue, Dec 17, 2013 at 2:05 PM, Georg-Johann Lay wrote: Am 12/05/2013 04:09 PM, schrieb Richard Biener: On Thu, Dec 5, 2013 at 3:53 PM, Georg-Johann Lay wrote: This is a fix of a wrong warning for a bas ISR name. The assumption was that if

Re: [GCC, ARM] Backport trunk fix to 4.8 branch to properly handle rtx of ARM PLD instruction

2014-01-15 Thread Richard Earnshaw
On 15/01/14 12:37, Terry Guo wrote: > > >> -Original Message- >> From: Terry Guo [mailto:terry@arm.com] >> Sent: Wednesday, January 15, 2014 8:21 PM >> To: Richard Earnshaw >> Cc: gcc-patches@gcc.gnu.org >> Subject: RE: [GCC, ARM] Backport trunk fix to 4.8 branch to properly > handle

Re: [RFC] Move ehcleanup pass to before early SRA

2014-01-15 Thread Richard Biener
On Wed, Jan 15, 2014 at 1:06 PM, Eric Botcazou wrote: >> What you want is tree-eh.c:optimize_clobbers, right? Can't we >> do this optimization during EH refactoring / lowering as well? > > We need the SSA form for sink_clobbers. I know, I'm saying it may be possible to implement an equivalent op

Re: [RFC][gomp4] Offloading: Add device initialization and host->target function mapping

2014-01-15 Thread Ilya Verbin
Ping.

Re: libgo patch committed: Recognize arm64

2014-01-15 Thread Matthias Klose
Am 06.01.2014 20:24, schrieb Ian Lance Taylor: > This libgo patch from Michael Hudson-Doyle recognizes arm64 as the Go > name for the AArch64 architecture. Bootstrapped and ran Go testsuite on > x86_64-unknown-linux-gnu. Committed to mainline. this missed the one reference to the goarch in the g

Re: libgo patch committed: Recognize arm64

2014-01-15 Thread Ian Lance Taylor
On Wed, Jan 15, 2014 at 7:24 AM, Matthias Klose wrote: > Am 06.01.2014 20:24, schrieb Ian Lance Taylor: >> This libgo patch from Michael Hudson-Doyle recognizes arm64 as the Go >> name for the AArch64 architecture. Bootstrapped and ran Go testsuite on >> x86_64-unknown-linux-gnu. Committed to ma

[PATCH] Don't ICE on invalid array types (PR middle-end/59827)

2014-01-15 Thread Marek Polacek
We ICE on the following (invalid) testcase, because the DECL_ARG_TYPE is error_mark_node and useless_type_conversion_p doesn't check that it operates on a type. Regtested/bootstrapped on x86_64-linux, ok for trunk/4.8/4.7? 2014-01-15 Marek Polacek PR middle-end/59827 * cgraph.

RE: [GCC, ARM] Backport trunk fix to 4.8 branch to properly handle rtx of ARM PLD instruction

2014-01-15 Thread Terry Guo
> -Original Message- > From: Richard Earnshaw > Sent: Wednesday, January 15, 2014 10:30 PM > To: Terry Guo > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [GCC, ARM] Backport trunk fix to 4.8 branch to properly handle > rtx of ARM PLD instruction > > On 15/01/14 12:37, Terry Guo wrote: > >

[PATCH][buildrobot] vax: Fix unused variable warning

2014-01-15 Thread Jan-Benedict Glaw
Hi! Since started, the VAX backend doesn't compile with config-list.mk because one of VAX's macros doesn't use its argument: g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissin

Re: [PATCH] Diagnose pr54694

2014-01-15 Thread Jakub Jelinek
On Wed, Jan 15, 2014 at 08:23:45AM -0800, Richard Henderson wrote: > --- a/gcc/reginfo.c > +++ b/gcc/reginfo.c > @@ -86,7 +86,7 @@ static const char initial_call_really_used_regs[] = > CALL_REALLY_USED_REGISTERS; > char global_regs[FIRST_PSEUDO_REGISTER]; > > /* Declaration for the global regi

[PATCH] Diagnose pr54694

2014-01-15 Thread Richard Henderson
IMO the test case is invalid, but as always an ICE is unacceptable. I can imagine there are some legitimate uses for absconding with the hard frame pointer, under -fomit-frame-pointer plus knowledge that the code is simple enough. Previously when we got into this situation, we'd silently smash th

Re: [PATCH] Diagnose pr54694

2014-01-15 Thread H.J. Lu
On Wed, Jan 15, 2014 at 8:23 AM, Richard Henderson wrote: > IMO the test case is invalid, but as always an ICE is unacceptable. > > I can imagine there are some legitimate uses for absconding with > the hard frame pointer, under -fomit-frame-pointer plus knowledge > that the code is simple enough.

Re: [RFC] Move ehcleanup pass to before early SRA

2014-01-15 Thread Martin Jambor
Hi, On Wed, Jan 15, 2014 at 03:39:09PM +0100, Richard Biener wrote: > On Wed, Jan 15, 2014 at 1:06 PM, Eric Botcazou wrote: > > Yes, it's scalarized during SRA but not ESRA because there is an ehcleanup > > pass in-between. It used to be scalarized during ESRA up to 4.6.x. > > I'm saying even E

Re: [GCC, ARM] Backport trunk fix to 4.8 branch to properly handle rtx of ARM PLD instruction

2014-01-15 Thread Richard Earnshaw
On 15/01/14 15:59, Terry Guo wrote: > > >> -Original Message- >> From: Richard Earnshaw >> Sent: Wednesday, January 15, 2014 10:30 PM >> To: Terry Guo >> Cc: gcc-patches@gcc.gnu.org >> Subject: Re: [GCC, ARM] Backport trunk fix to 4.8 branch to properly > handle >> rtx of ARM PLD instruct

[PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-01-15 Thread Tom de Vries
Eric, This patch adds scanning of clobbers in CALL_INSN_FUNCTION_USAGE to find_all_hard_reg_sets. For MIPS, calls are split at some point. After the split, one of the resulting insns may clobber $6. But before the split, that's not explicit in the rtl representation of the unsplit call. Fo

experimental testsuite patch

2014-01-15 Thread François Dumont
Hi Here is a patch to partially fix 2 string_view tests. It looks like we can't use 2 dg-options into the same source, one override the over, the dg-options directives have been merged into 1. I also update a script to make the experimental folder part of the folders to look for tests. I

Tree containers profile mode fix

2014-01-15 Thread François Dumont
Hi Here is a patch to fix profile mode compilation errors. It makes tree based containers C++11 allocator aware in profile mode as they are in normal mode. I also try to use default implementation as much as possible to benefit from the normal mode noexcept qualifications on the defaulted

Re: PATCH: PR target/59794: [4.7/4.8/4.9 Regression] i386 backend fails to detect MMX/SSE/AVX ABI changes

2014-01-15 Thread H.J. Lu
On Tue, Jan 14, 2014 at 11:09 PM, Jakub Jelinek wrote: > On Tue, Jan 14, 2014 at 06:18:22AM -0800, H.J. Lu wrote: >> 2014-01-14 H.J. Lu >> >> PR target/59794 >> * config/i386/i386.c (type_natural_mode): Add a bool parameter >> to indicate if type is used for function return va

[PATCH] Fix segfault in FRE during SCC value numbering

2014-01-15 Thread Teresa Johnson
Handle NULL vdef for call in the case where we have a matching vnresult that has a vdef (it already handles the NULL vdef case when !vnresult). This can happen for promoted indirect calls if the fallback indirect call (which has a vdef) can be proven equivalent to the promoted direct call (which mi

[GOOGLE] Handle integer overflow in unroller code size limit computation

2014-01-15 Thread Teresa Johnson
Regression tested, ok for google/4_8? Thanks, Teresa 2014-01-15 Teresa Johnson * loop-unroll.c (code_size_limit_factor): Handle int overflow. Index: loop-unroll.c === --- loop-unroll.c (revision 206601) +++ loop-un

Re: Tree containers profile mode fix

2014-01-15 Thread Jonathan Wakely
On 15 January 2014 16:59, François Dumont wrote: > Hi > > Here is a patch to fix profile mode compilation errors. It makes tree > based containers C++11 allocator aware in profile mode as they are in normal > mode. I also try to use default implementation as much as possible to > benefit from t

Re: [GOOGLE] Handle integer overflow in unroller code size limit computation

2014-01-15 Thread Xinliang David Li
ok. David On Wed, Jan 15, 2014 at 9:10 AM, Teresa Johnson wrote: > Regression tested, ok for google/4_8? > > Thanks, > Teresa > > 2014-01-15 Teresa Johnson > > * loop-unroll.c (code_size_limit_factor): Handle int overflow. > > Index: loop-unroll.c > ===

Re: experimental testsuite patch

2014-01-15 Thread Jonathan Wakely
On 15 January 2014 16:56, François Dumont wrote: > Hi > > Here is a patch to partially fix 2 string_view tests. It looks like we > can't use 2 dg-options into the same source, one override the over, the > dg-options directives have been merged into 1. I also update a script to > make the experi

Re: experimental testsuite patch

2014-01-15 Thread Paolo Carlini
On 01/15/2014 06:17 PM, Jonathan Wakely wrote: I think we decided we want functions to be constexpr in debug mode if they are constexpr in normal mode. I think std::array has solved the same problem without losing the constexpr qualifier. Yes, I think the only complete solution we know of is tha

Re: [PATCH] Fix PR59822

2014-01-15 Thread Jakub Jelinek
On Wed, Jan 15, 2014 at 02:06:24PM +0100, Richard Biener wrote: > > This should fix PR59822, us creating in valid SSA form when > hoisting a[i_2] out of a loop where i_2 is defined inside the loop. > > Bootstrap / regtest running on x86_64-unknown-linux-gnu. Unfortunately with my patch on top of

patch to fix PR59511

2014-01-15 Thread Vladimir Makarov
The following patch fixes: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59511 Register move cost calculations were too conservative for some cases and it resulted into overflows. The patch fixes also some wrong frequencies usage I found. The patch has very small affect on SPEC2000. Only 7 prog

Re: [RFC] Move ehcleanup pass to before early SRA

2014-01-15 Thread Eric Botcazou
> I know, I'm saying it may be possible to implement an equivalent > optimization without SSA form. Sure, but what would be the point of this duplication exactly? > I'm saying even ESRA should be able to scalarize it just fine. It just > needs to be careful where to insert the loads from the agg

Re: experimental testsuite patch

2014-01-15 Thread Jonathan Wakely
On 15 January 2014 17:22, Paolo Carlini wrote: > On 01/15/2014 06:17 PM, Jonathan Wakely wrote: >> >> I think we decided we want functions to be constexpr in debug mode if >> they are constexpr in normal mode. >> >> I think std::array has solved the same problem without losing the >> constexpr qual

Re: [PATCH v2] RTEMS: Generalize t-rtems usage

2014-01-15 Thread Joel Sherrill
This patch is now committed. --joel On 1/7/2014 10:58 AM, Sebastian Huber wrote: > v2: Do not override an existing tmake_file in (arm*-*-uclinux*eabi*). > > The ARM changes are already approved: > > http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00254.html > > The rest is RTEMS specific. > > gcc/Cha

[PATCH, committed] error in target-supports function for Cilk keywords test

2014-01-15 Thread Iyer, Balaji V
Hello Everyone, I noticed that there was an error in the testcode in "check_libcilkrts_available" target-supports function for C++. It was working fine in C but needed an extern "C" along with a prototype for C++. This patch below should fix that. This patch is committed as obvious (..m

Re: [RFA] [PATCH][PR tree-optimization/59749] Fix recently introduced ree bug

2014-01-15 Thread Jeff Law
On 01/13/14 00:34, Jakub Jelinek wrote: On Sun, Jan 12, 2014 at 11:21:59PM -0700, Jeff Law wrote: --- a/gcc/ree.c +++ b/gcc/ree.c @@ -297,6 +297,13 @@ combine_set_extension (ext_cand *cand, rtx curr_insn, rtx *orig_set) else new_reg = gen_rtx_REG (cand->mode, REGNO (SET_DEST (*orig_se

Re: [RFA] [PATCH][PR tree-optimization/59749] Fix recently introduced ree bug

2014-01-15 Thread Jakub Jelinek
On Wed, Jan 15, 2014 at 10:56:35AM -0700, Jeff Law wrote: > On 01/13/14 00:34, Jakub Jelinek wrote: > >On Sun, Jan 12, 2014 at 11:21:59PM -0700, Jeff Law wrote: > >>--- a/gcc/ree.c > >>+++ b/gcc/ree.c > >>@@ -297,6 +297,13 @@ combine_set_extension (ext_cand *cand, rtx curr_insn, > >>rtx *orig_set)

Re: [RFC] Move ehcleanup pass to before early SRA

2014-01-15 Thread Martin Jambor
Hi, On Wed, Jan 15, 2014 at 06:37:30PM +0100, Eric Botcazou wrote: > > I know, I'm saying it may be possible to implement an equivalent > > optimization without SSA form. > > Sure, but what would be the point of this duplication exactly? > > > I'm saying even ESRA should be able to scalarize it

Re: RFA: Fix assembler data directives emitted for variable length structures

2014-01-15 Thread Richard Henderson
On 01/14/2014 08:37 AM, Nick Clifton wrote: > gcc/ChangeLog > 2014-01-13 Nick Clifton > > PR middle-end/28865 > * varasm.c (output_constant): Return the number of bytes actually > emitted. > (output_constructor_array_range): Update the field size with the > number

Re: [google gcc-4_8] backport libgcov re-factoring patches from trunk

2014-01-15 Thread Xinliang David Li
In libgcov-driver.c, 1) there are couple of places with trailing white spaces (e.g, in gcov_sort_n_vals body), please remove 2) gcov_exit_write_gcda in trunk takes eof_pos as an arg, and check it before writing the header. I think this is more correct than in your patch 3) It would be better to ke

Re: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-01-15 Thread Richard Sandiford
Tom de Vries writes: > This patch adds scanning of clobbers in CALL_INSN_FUNCTION_USAGE to > find_all_hard_reg_sets. > > For MIPS, calls are split at some point. After the split, one of the > resulting insns may clobber $6. But before the split, that's not > explicit in the rtl representation of

Re: [PATCH] Fix segfault in FRE during SCC value numbering

2014-01-15 Thread Jeff Law
On 01/15/14 10:07, Teresa Johnson wrote: Handle NULL vdef for call in the case where we have a matching vnresult that has a vdef (it already handles the NULL vdef case when !vnresult). This can happen for promoted indirect calls if the fallback indirect call (which has a vdef) can be proven equiv

[Patch, cilk, C++] Fix cilk testsuite failure

2014-01-15 Thread Steve Ellcey
The test c-c++-common/cilk-plus/AN/builtin_func_double2.c is failing on MIPS when compiled with C++ but not when compiled with C because GCC is generating an illegal assembly language instruction during the C++ compilation. The reason this works in C but fails for C++ is because the __sec_reduce_a

Re: [google gcc-4_8] backport libgcov re-factoring patches from trunk

2014-01-15 Thread Rong Xu
On Wed, Jan 15, 2014 at 10:40 AM, Xinliang David Li wrote: > In libgcov-driver.c, > > 1) there are couple of places with trailing white spaces (e.g, in > gcov_sort_n_vals body), please remove They are from the existing code. But I'll fix them. > 2) gcov_exit_write_gcda in trunk takes eof_pos as a

C++ PATCH for c++/59659 (compile-hog with list-initialization of member array)

2014-01-15 Thread Jason Merrill
In the original testcase, the user found that a large std::array of std::atomics was taking forever to compile. There were two issues involved here: 1) Because atomics do have user-provided constructors, we were going down the constructor path and not realizing that it just gave us zero-init

Re: [PATCH] Fix PR49718 : allow no_instrument_function attribute in class member definition/declaration

2014-01-15 Thread Jeff Law
On 01/09/14 07:17, Laurent Alfonsi wrote: On 01/09/14 06:02, Jeff Law wrote: On 01/08/14 02:05, Laurent Alfonsi wrote: All, I was looking at PR49718. I have enclosed a simple fix for this bug report. 2014-01-07 Laurent Alfonsi * c-family/c-common.c (handle_no_instrument_functio

Fix a dbr_schedule vs. delete_related_insns liveness bug

2014-01-15 Thread Richard Sandiford
Two patches in a week about dbr_schedule and redundant insns. This one fixes a miscompilation of libgcov-driver.c for n32 and n64 MIPS. It's independent of (and predates) the 59137 patch. We had: barrier L1: C: $r1 = ... D: $r2 = ... ... A: if ... goto L1 B: if

[MIPS] Tweak options for umips-branch-4.c

2014-01-15 Thread Richard Sandiford
umips-branch-4.c relies on direct JALs being possible, so add addressing=absolute to force that. Tested on mips64-linux-gnu and applied. Thanks, Richard gcc/testsuite/ * gcc.target/mips/umips-branch-4.c: Add addressing=absolute. Index: gcc/testsuite/gcc.target/mips/umips-branch-4.c ===

Re: [C++ Patch] PR 59270

2014-01-15 Thread Jason Merrill
On 01/15/2014 07:54 AM, Paolo Carlini wrote: It seems Ok to me, and passes testing, to return NULL_TREE from build_value_init. Alternately, more conservatively, we could change build_value_init_noctor to not call build_value_init at all when ftype == error_mark_node. I think I would prefer that

Re: [PATCH i386 11/8] [AVX512] Add missing packed PF gathers/scatters, rename load/store.

2014-01-15 Thread Uros Bizjak
On Tue, Jan 14, 2014 at 7:13 AM, Kirill Yukhin wrote: > Hello, > This patch introduces missing AVX-512PF intrinsics and tests. > It also renames store/load intrinsics according to EAS. > > gcc/ > * config/i386/avx512fintrin.h (_mm512_loadu_si512): Rename. > (_mm512_storeu_si512): D

Re: [PATCH] Fix segfault in FRE during SCC value numbering

2014-01-15 Thread Teresa Johnson
On Wed, Jan 15, 2014 at 10:46 AM, Jeff Law wrote: > On 01/15/14 10:07, Teresa Johnson wrote: >> >> Handle NULL vdef for call in the case where we have a matching vnresult >> that has a vdef (it already handles the NULL vdef case when !vnresult). >> This >> can happen for promoted indirect calls if

Re: [ARM 1/5 big.LITTLE] Add driver support for rewriting -mcpu names

2014-01-15 Thread Charles Baylis
Hi James, This commit (SVN r206045) seems to have introduced a problem when compiling multiple source files if a -mcpu option is also present on the command line. This can be reproduced in a arm-unknown-linux-gnueabihf build with any source file which use floating point arguments/results. For exa

Re: [C++ Patch] PR 59270

2014-01-15 Thread Paolo Carlini
Hi, On 01/15/2014 08:45 PM, Jason Merrill wrote: On 01/15/2014 07:54 AM, Paolo Carlini wrote: It seems Ok to me, and passes testing, to return NULL_TREE from build_value_init. Alternately, more conservatively, we could change build_value_init_noctor to not call build_value_init at all when ftyp

Re: [PATCH] Fix segfault in FRE during SCC value numbering

2014-01-15 Thread Teresa Johnson
On Wed, Jan 15, 2014 at 12:00 PM, Teresa Johnson wrote: > On Wed, Jan 15, 2014 at 10:46 AM, Jeff Law wrote: >> On 01/15/14 10:07, Teresa Johnson wrote: >>> >>> Handle NULL vdef for call in the case where we have a matching vnresult >>> that has a vdef (it already handles the NULL vdef case when !

PR ipa/59775 (get_binfo_at_offset not handling virtual inheritance well)

2014-01-15 Thread Jan Hubicka
Hi, this patch fixes ICE in ipa-devirt that is caused by get_binfo_at_offset reporting NULL for a valid query. This is because how virtual inheritance is represented. Here we have chain A<-B<-C where A is a virtual base. We look for A within C that is there at offset 64. On this query get_binfo

Re: [PATCH] Fix segfault in FRE during SCC value numbering

2014-01-15 Thread Xinliang David Li
There are options you can use to control passes explicitly: -fdisable-... -fenable- To disable early inline: -fdisable-tree-einline David On Wed, Jan 15, 2014 at 1:17 PM, Teresa Johnson wrote: > On Wed, Jan 15, 2014 at 12:00 PM, Teresa Johnson wrote: >> On Wed, Jan 15, 2014 at 10:46 AM, J

Re: [C PATCH] Disallow subtracting pointers to empty structs (PR c/58346)

2014-01-15 Thread Joseph S. Myers
On Wed, 15 Jan 2014, Marek Polacek wrote: > +/* Return true if T is a pointer to a zero-sized struct/union. */ > + > +bool > +pointer_to_zero_sized_aggr_p (tree t) > +{ > + t = strip_pointer_operator (t); > + return ((RECORD_OR_UNION_TYPE_P (t) || TREE_CODE (t) == ARRAY_TYPE) > + && TYPE_

Re: PR ipa/59775 (get_binfo_at_offset not handling virtual inheritance well)

2014-01-15 Thread Jan Hubicka
> Hi, > this patch fixes ICE in ipa-devirt that is caused by get_binfo_at_offset > reporting NULL for a valid query. This is because how virtual inheritance > is represented. > > Here we have chain A<-B<-C where A is a virtual base. We look for A within > C that is there at offset 64. On this q

Re: Fix a dbr_schedule vs. delete_related_insns liveness bug

2014-01-15 Thread Jeff Law
On 01/15/14 12:27, Richard Sandiford wrote: [ snip ] barrier L1: C'': (use ($r1 = ...)) L2: D: $r2 = ... L3: ... A: if ... goto L2 C': $r1 = ... B: if ... goto L3 D': $r2 = ... So far so good. The problem is that redirecting B to L3 makes

Re: [PATCH] Fix segfault in FRE during SCC value numbering

2014-01-15 Thread Teresa Johnson
I did try disabling early inlining and some other things but still didn't have luck. The indirect call promotion is also in a different phase in trunk and google/4_8, which was adding another complication. Teresa On Wed, Jan 15, 2014 at 1:23 PM, Xinliang David Li wrote: > There are options you ca

[RFA][PATCH][PR middle-end/57904][P1 regression] Improve cleanups after copyprop

2014-01-15 Thread Jeff Law
Our SSA copy-prop passes do a pretty pathetic job at cleaning up after themselves when const/copy propagation exposes new trivial copies and constant initializations. This can be seen in the code for pr57904 after copyprop2 for bb2 _2 = 344; ubound.0_3 = _2 & 7; size.1_4 = ubound.0_3 +

Re: [PATCH] Diagnose pr54694

2014-01-15 Thread Richard Henderson
On 01/15/2014 08:28 AM, Jakub Jelinek wrote: >> -static tree GTY(()) global_regs_decl[FIRST_PSEUDO_REGISTER]; >> > +tree GTY(()) global_regs_decl[FIRST_PSEUDO_REGISTER]; > Do you need the GTY(()) marker here when there is GTY(()) already in the > header? > Otherwise looks good to me. > Fixed befo

Re: [PATCH] Diagnose pr54694

2014-01-15 Thread Richard Henderson
On 01/15/2014 08:37 AM, H.J. Lu wrote: > We should add a testcase to verify this. > I included the following testcase with the commit. I couldn't find a way to test this properly generically, so I just went with the obvious i386 test. r~ diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c93bf23

Re: [wide-int] resolve bootstrap issue

2014-01-15 Thread Mike Stump
On Jan 14, 2014, at 7:25 AM, Richard Sandiford wrote: > Mike Stump writes: >> diff --git a/gcc/expmed.c b/gcc/expmed.c >> index ce063eb..720d8c1 100644 >> --- a/gcc/expmed.c >> +++ b/gcc/expmed.c >> @@ -4963,6 +4963,7 @@ make_tree (tree type, rtx x) >> return t; >> >> case CONST_DOUBL

[PATCH] Don't combine across likely spilled hard reg setters (PR rtl-optimization/59477)

2014-01-15 Thread Jakub Jelinek
Hi! As discussed in the PR, when combine combines something across a setter of a likely spilled non-fixed hard register, we may get RA ICE, as the combined insn might need for reload a hard reg that is live at the point where combiner has combined the insn. The following patch attempts to fix tha

Re: [PATCH] Diagnose pr54694

2014-01-15 Thread Jakub Jelinek
On Wed, Jan 15, 2014 at 01:43:18PM -0800, Richard Henderson wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/i386/pr54694.c > @@ -0,0 +1,11 @@ > +/* { dg-do compile } */ > +/* { dg-options "-O" } */ > + > +register void *hfp __asm__("%ebp"); /* { dg-message "note: for" } */ Shouldn't that

Re: [PATCH] Diagnose pr54694

2014-01-15 Thread Marek Polacek
On Wed, Jan 15, 2014 at 01:43:18PM -0800, Richard Henderson wrote: > On 01/15/2014 08:37 AM, H.J. Lu wrote: > > We should add a testcase to verify this. > > > > I included the following testcase with the commit. I couldn't find a way > to test this properly generically, so I just went with the o

Re: [RFA][PATCH][PR middle-end/57904][P1 regression] Improve cleanups after copyprop

2014-01-15 Thread Marek Polacek
-ENOPATCH

[PATCH] fix for PR 59825

2014-01-15 Thread Iyer, Balaji V
Hello Everyone, Attached, please find a patch that will fix PR 59825. The main issue was array notations occurring in COMPOUND_EXPR. This patch should fix that and fix the rank_mismatch2.c test-case ICE. Ok for trunk? Thanks, Balaji V. Iyer. diff --git a/gcc/c/ChangeLog

Re: patch to fix PR59511

2014-01-15 Thread H.J. Lu
On Wed, Jan 15, 2014 at 9:34 AM, Vladimir Makarov wrote: > The following patch fixes: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59511 > > Register move cost calculations were too conservative for some cases > and it resulted into overflows. The patch fixes also some wrong > frequencies usag

Re: [PATCH] fix for PR 59825

2014-01-15 Thread Jakub Jelinek
On Wed, Jan 15, 2014 at 10:37:04PM +, Iyer, Balaji V wrote: > Hello Everyone, > Attached, please find a patch that will fix PR 59825. The main issue was > array notations occurring in COMPOUND_EXPR. This patch should fix that > and fix the rank_mismatch2.c test-case ICE. > --- a/gcc/c/c-arr

Re: [PATCH] fix for PR 59825

2014-01-15 Thread Marek Polacek
On Wed, Jan 15, 2014 at 10:37:04PM +, Iyer, Balaji V wrote: > +2014-01-15 Balaji V. Iyer > + > + PR c/59825 > + * c-array-notation.c (expand_array_notation_exprs): Added COMPOUND_EXPR > + case. > + "Add" > --- a/gcc/c/c-array-notation.c > +++ b/gcc/c/c-array-notation.c > @@ -12

Re: [google gcc-4_8] backport libgcov re-factoring patches from trunk

2014-01-15 Thread Xinliang David Li
ok for google branch. David On Wed, Jan 15, 2014 at 2:58 PM, Rong Xu wrote: > attached is the updated patch. > > On Wed, Jan 15, 2014 at 10:51 AM, Rong Xu wrote: >> On Wed, Jan 15, 2014 at 10:40 AM, Xinliang David Li >> wrote: >>> In libgcov-driver.c, >>> >>> 1) there are couple of places wit

Re: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-01-15 Thread Tom de Vries
On 15-01-14 19:40, Richard Sandiford wrote: Tom de Vries writes: This patch adds scanning of clobbers in CALL_INSN_FUNCTION_USAGE to find_all_hard_reg_sets. For MIPS, calls are split at some point. After the split, one of the resulting insns may clobber $6. But before the split, that's not exp

  1   2   >