Re: [4.7][google] Adding a new option -fstack-protector-strong. (issue5461043)

2011-12-08 Thread Richard Guenther
On Thu, Dec 8, 2011 at 2:19 AM, Andrew Pinski wrote: > On Wed, Dec 7, 2011 at 5:07 PM, Han Shen wrote: >> +  /* Examine each basic block for address taking of local variables. */ > > I don't think you need to look at the basic blocks to figure out if a > local variable has its address taken.  You

Re: [PATCH][LTO] Fix PR48437

2011-12-08 Thread Richard Guenther
On Wed, 7 Dec 2011, Diego Novillo wrote: > On Wed, Dec 7, 2011 at 11:16, Richard Guenther wrote: > > > I'm going to apply it tomorrow, when full testing hopefully finished > > Sure. But remember the zombie kitties! I have applied the fix for PR48437, the fix for PR49945 required adjustment as

Re: [v3] RFC: rename __calculate_memory_order

2011-12-08 Thread Jonathan Wakely
On 7 December 2011 23:58, Benjamin Kosnik wrote: > >>         * include/bits/atomic_base.h (__calculate_memory_order): >> Rename to... (__cmpexch_failure_order): This, and rewrite as >> constexpr function. (compare_exchange_strong, compare_exchange_weak): >> Use it. >>         * include/std/atomic

[C++ Patch] PR 51464

2011-12-08 Thread Paolo Carlini
Hi, here I'm just handling error_mark_nodes after the error messages: I think the robustification is sensible because begin_class_definition can certainly return error_mark_node in general and sooner or later Volker will find testcases producing more ;) However, from the user point of view,

[PATCH] Fix PR50747

2011-12-08 Thread Richard Guenther
The asserts added in rev. 179429 are too strict as shown by the testcases in PR50747 (triggering both asserts individually). The following patch simply removes them instead of trying to massage it. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2011-12-08 Richard Guent

[PATCH] Do not stop inlining when seen_errors ()

2011-12-08 Thread Richard Guenther
When we stop inlining in the middle of applying inline transform we can end up with a bogus callgraph (some inline clones not inlined) which confuses later simple IPA passes. Don't to that - IPA passes should only guard themselves against errors at the IPA level (so either apply to all or to no f

[testsuite,committed]: Fix wrong sizeof(int)==4 assumption (yet another time)

2011-12-08 Thread Georg-Johann Lay
as I remember that place is deprecated and the preferred place for new C tests like this is gcc.dg? Johann Index: gcc.c-torture/execute/20111208-1.c === --- gcc.c-torture/execute/20111208-1.c (revision 182106) +++ gcc.c-torture/exe

[patch] Fix cygwin ada install [was Re: Yet another issue with gcc current trunk with ada on cygwin]

2011-12-08 Thread Dave Korn
Hi again guys, After the previous patch, there's still another bug remaining in the Ada makefile, relating to how it builds and installs the gnat/gnarl shared libraries. Windows doesn't have any concept of an rpath in executables, nor of LD_LIBRARY_PATH; all required DLLs must be found

Re: [testsuite,committed]: Fix wrong sizeof(int)==4 assumption (yet another time)

2011-12-08 Thread Jakub Jelinek
On Thu, Dec 08, 2011 at 01:54:17PM +0100, Georg-Johann Lay wrote: The test should be using typedef __INT16_TYPE__ int16_t; typedef __INT32_TYPE__ int32_t; instead of what you are proposing. > Index: gcc.c-torture/execute/20111208-

Re: [4.7][google] Adding a new option -fstack-protector-strong. (issue5461043)

2011-12-08 Thread Diego Novillo
On Wed, Dec 7, 2011 at 20:07, Han Shen wrote: > Status - implemented internally, to be up-streamed or merged to google branch > only. Why would you not consider sending this for trunk at the next stage 1? (patch review in progress) Diego.

[PATCH] Do not mark address-taking stmts of volatile objects as volatile

2011-12-08 Thread Richard Guenther
During an IRC discussion I noticed that we mark p = &a[i] as volatile p_2 ={v} &a[i_1(D)]; in the operand scanner even though that is not necessary. The following patch properly guards setting the volatile flag on that we are not processing the operands of an ADDR_EXPR currently. Bootstrap a

[committed] 4 backports from trunk to 4.6 branch

2011-12-08 Thread Jakub Jelinek
Hi! Bootstrapped/regtested on x86_64-linux and i686-linux, committed to 4.6 branch: Jakub 2011-12-08 Jakub Jelinek Backport from mainline 2011-11-30 Jakub Jelinek PR rtl-optimization/48721 * sched-deps.c (sched_analyze_insn): For SIBLING_CALL_P set

Re: [testsuite,committed]: Fix wrong sizeof(int)==4 assumption (yet another time)

2011-12-08 Thread Georg-Johann Lay
Jakub Jelinek wrote: > On Thu, Dec 08, 2011 at 01:54:17PM +0100, Georg-Johann Lay wrote: > The test should be using > typedef __INT16_TYPE__ int16_t; > typedef __INT32_TYPE__ int32_t; > instead of what you are proposing. Ah, thanks for the hint! Looks way better now. Johann

Re: [PATCH] Fix PR middle-end/39976, 200.sixtrack degradation

2011-12-08 Thread Richard Guenther
On Mon, Dec 5, 2011 at 3:52 PM, William J. Schmidt wrote: > > > On Mon, 2011-12-05 at 08:36 -0600, William J. Schmidt wrote: >> >> On Mon, 2011-12-05 at 14:59 +0100, Michael Matz wrote: >> > Hi, >> > >> > On Fri, 2 Dec 2011, William J. Schmidt wrote: >> > >> > > > on top of your current version.  

Re: [PATCH] Fix PR middle-end/39976, 200.sixtrack degradation

2011-12-08 Thread Jakub Jelinek
On Thu, Dec 08, 2011 at 03:11:44PM +0100, Richard Guenther wrote: > >> > Another nit (sorry I didn't see this before :-/) : > >> > > >> > > +      expr->ops.phi.args = (tree *) xcalloc (nargs, sizeof (tree)); > >> > > >> > This leaks, because you missed to add freeing to free_expr_hash_elt. > >> >

Re: [Patch, i386] [4.6] Backport movd*_internal_rex64 fix from trunk and [4.6/4.7] add testcase

2011-12-08 Thread Teresa Johnson
Sounds good. I will fix the 4.7 version to use the fpie target selector. The other thing I noticed is that you had removed the -Wwrite-strings option, but I needed to keep that as it was the combination of -fPIE and -Wwrite-strings that triggered the bug. Thanks, Teresa On Wed, Dec 7, 2011 at 10:

[Committed] PR50395 S/390: Emit jump over literal pool as jump_insn

2011-12-08 Thread Andreas Krebbel
Hi, so far we emitted the jump over the literal pool as normal insn: (insn 8094 5448 8483 (parallel [ (set (reg:SI 13 %r13) (unspec [ (label_ref 8095) ] UNSPEC_MAIN_BASE)) (set (pc) (label_ref 8097

Re: [PATCH] Fix PR middle-end/39976, 200.sixtrack degradation

2011-12-08 Thread William J. Schmidt
On Thu, 2011-12-08 at 15:18 +0100, Jakub Jelinek wrote: > On Thu, Dec 08, 2011 at 03:11:44PM +0100, Richard Guenther wrote: > > >> > Another nit (sorry I didn't see this before :-/) : > > >> > > > >> > > + expr->ops.phi.args = (tree *) xcalloc (nargs, sizeof (tree)); > > >> > > > >> > This l

Re: [PATCH, PR43814] Assume function arguments of pointer type are aligned.

2011-12-08 Thread Tom de Vries
On 26/10/11 12:19, Richard Guenther wrote: > On Tue, Oct 25, 2011 at 2:22 PM, Tom de Vries wrote: >> On 09/24/2011 01:42 PM, Richard Guenther wrote: >>> On Sat, Sep 24, 2011 at 11:40 AM, Jakub Jelinek wrote: On Sat, Sep 24, 2011 at 11:31:25AM +0200, Richard Guenther wrote: > In the end I

[PATCH] use -fno-pie on darwin in boehm-gc.exp

2011-12-08 Thread Jack Howarth
Currently the boehm-gc testsuite fails... FAIL: boehm-gc.c/gctest.c -O2 execution test FAIL: boehm-gc.c/leak_test.c -O2 execution test FAIL: boehm-gc.c/thread_leak_test.c -O2 execution test FAIL: boehm-gc.lib/staticrootstest.c -O2 execution test on x86_64-apple-darwin11 due to the -pie linker def

[Path,AVR]: Implement __muldi3 in asm

2011-12-08 Thread Georg-Johann Lay
This are assembler implementations for Dimode multiplication. Tested without regressions, the only change in the test suite I get is for gcc.c-torture/execute/arith-rand-ll.c execution, -O0 UNTESTED -> PASS because the former vanilla C implementation ran into timeout. Ok for trunk? Johann

Re: [PATCH] use -fno-pie on darwin in boehm-gc.exp

2011-12-08 Thread Iain Sandoe
On 8 Dec 2011, at 15:38, Jack Howarth wrote: Currently the boehm-gc testsuite fails... FAIL: boehm-gc.c/gctest.c -O2 execution test FAIL: boehm-gc.c/leak_test.c -O2 execution test FAIL: boehm-gc.c/thread_leak_test.c -O2 execution test FAIL: boehm-gc.lib/staticrootstest.c -O2 execution test y

Re: [Patch, i386] [4.6] Backport movd*_internal_rex64 fix from trunk and [4.6/4.7] add testcase

2011-12-08 Thread Uros Bizjak
On Thu, Dec 8, 2011 at 3:23 PM, Teresa Johnson wrote: > Sounds good. I will fix the 4.7 version to use the fpie target > selector. The other thing I noticed is that you had removed the > -Wwrite-strings option, but I needed to keep that as it was the > combination of -fPIE and -Wwrite-strings that

Re: [PATCH] use -fno-pie on darwin in boehm-gc.exp

2011-12-08 Thread Mike Stump
On Dec 8, 2011, at 7:38 AM, Jack Howarth wrote: > Currently the boehm-gc testsuite fails... > > FAIL: boehm-gc.c/gctest.c -O2 execution test > FAIL: boehm-gc.c/leak_test.c -O2 execution test > FAIL: boehm-gc.c/thread_leak_test.c -O2 execution test > FAIL: boehm-gc.lib/staticrootstest.c -O2 execut

Re: [PATCH] use -fno-pie on darwin in boehm-gc.exp

2011-12-08 Thread Rainer Orth
Iain Sandoe writes: > On 8 Dec 2011, at 15:38, Jack Howarth wrote: > >> Currently the boehm-gc testsuite fails... >> >> FAIL: boehm-gc.c/gctest.c -O2 execution test >> FAIL: boehm-gc.c/leak_test.c -O2 execution test >> FAIL: boehm-gc.c/thread_leak_test.c -O2 execution test >> FAIL: boehm-gc.lib/s

Re: [Patch, i386] [4.6] Backport movd*_internal_rex64 fix from trunk and [4.6/4.7] add testcase

2011-12-08 Thread Teresa Johnson
Interesting - with our internal compiler version it only triggered with the 2 options combined, not sure why. But I just verified that on the gcc 4.6 branch it only needed the -fPIE option. Sorry about that, I will remove the -W option from the test case. Teresa On Thu, Dec 8, 2011 at 8:23 AM, Ur

[PATCH v2] _GCC_PICFLAG: use -fPIC for s390x targets

2011-12-08 Thread Mike Frysinger
Building newer libiberty for s390x targets fails with relocation errors: libiberty/pic/libiberty.a(hashtab.o): In function 'htab_create': libiberty/hashtab.c:408:(.text+0x5e4): relocation truncated to fit: R_390_GOT12 against symbol 'xcalloc' defined in .text section

Re: [Patch, i386] [4.6] Backport movd*_internal_rex64 fix from trunk and [4.6/4.7] add testcase

2011-12-08 Thread Uros Bizjak
On Thu, Dec 8, 2011 at 5:30 PM, Teresa Johnson wrote: > Interesting - with our internal compiler version it only triggered > with the 2 options combined, not sure why. But I just verified that on > the gcc 4.6 branch it only needed the -fPIE option. Sorry about that, > I will remove the -W option

Re: [PATCH v2] _GCC_PICFLAG: use -fPIC for s390x targets

2011-12-08 Thread Rainer Orth
Mike Frysinger writes: > Building newer libiberty for s390x targets fails with relocation errors: > libiberty/pic/libiberty.a(hashtab.o): In function 'htab_create': > libiberty/hashtab.c:408:(.text+0x5e4): relocation truncated to fit: > R_390_GOT12 against symbol 'xcallo

Re: [PATCH] use -fno-pie on darwin in boehm-gc.exp

2011-12-08 Thread Jack Howarth
On Thu, Dec 08, 2011 at 03:54:35PM +, Iain Sandoe wrote: > > On 8 Dec 2011, at 15:38, Jack Howarth wrote: > >> Currently the boehm-gc testsuite fails... >> >> FAIL: boehm-gc.c/gctest.c -O2 execution test >> FAIL: boehm-gc.c/leak_test.c -O2 execution test >> FAIL: boehm-gc.c/thread_leak_test.c -

Re: [Patch, i386] [4.6] Backport movd*_internal_rex64 fix from trunk and [4.6/4.7] add testcase

2011-12-08 Thread Teresa Johnson
Verified and changed. Thanks! Teresa On Thu, Dec 8, 2011 at 8:43 AM, Uros Bizjak wrote: > On Thu, Dec 8, 2011 at 5:30 PM, Teresa Johnson wrote: >> Interesting - with our internal compiler version it only triggered >> with the 2 options combined, not sure why. But I just verified that on >> the

Re: [PATCH] use -fno-pie on darwin in boehm-gc.exp

2011-12-08 Thread Iain Sandoe
On 8 Dec 2011, at 16:58, Jack Howarth wrote: On Thu, Dec 08, 2011 at 03:54:35PM +, Iain Sandoe wrote: On 8 Dec 2011, at 15:38, Jack Howarth wrote: Currently the boehm-gc testsuite fails... FAIL: boehm-gc.c/gctest.c -O2 execution test FAIL: boehm-gc.c/leak_test.c -O2 execution test FAIL

Re: Add __stpncpy_chk builtin support

2011-12-08 Thread Romain Geissler
Le 28 nov. 2011 à 12:16, Romain Geissler a écrit : > Hi, > > The current trunk have no support for the __stpncpy_chk function. As the > latest > OS X (10.7 aka Lion) now defines stpncpy as a call to builtin__stpncpy_chk for > GNUC compliant compiler, the following code won't link: > > #include

Re: [PATCH] use -fno-pie on darwin in boehm-gc.exp

2011-12-08 Thread Jack Howarth
On Thu, Dec 08, 2011 at 05:05:12PM +, Iain Sandoe wrote: > > On 8 Dec 2011, at 16:58, Jack Howarth wrote: > >> On Thu, Dec 08, 2011 at 03:54:35PM +, Iain Sandoe wrote: >>> >>> On 8 Dec 2011, at 15:38, Jack Howarth wrote: >>> Currently the boehm-gc testsuite fails... FAIL: boe

Re: [PATCH] use -fno-pie on darwin in boehm-gc.exp

2011-12-08 Thread Iain Sandoe
On 8 Dec 2011, at 17:24, Jack Howarth wrote: On Thu, Dec 08, 2011 at 05:05:12PM +, Iain Sandoe wrote: On 8 Dec 2011, at 16:58, Jack Howarth wrote: On Thu, Dec 08, 2011 at 03:54:35PM +, Iain Sandoe wrote: On 8 Dec 2011, at 15:38, Jack Howarth wrote: Currently the boehm-gc testsui

Re: Add __stpncpy_chk builtin support

2011-12-08 Thread Jakub Jelinek
On Mon, Nov 28, 2011 at 12:16:52PM +0100, Romain Geissler wrote: > 2011-11-28 Romain Geissler > > * builtins.def (BUILT_IN_STPNCPY_CHK): New definition. > * builtins.c (expand_builtin, fold_builtin_4, maybe_emit_chk_warning): > Add BUILT_IN_STPNCPY_CHK case. > * gimple-f

[Patch,AVR]: Fix PR51425

2011-12-08 Thread Georg-Johann Lay
This is obvious patch for PR51425: SBIC/SBRC instructions are generated by insn combine, but insn combine tries zero_extract:QI not zero_extract:HI as in good old times. Thus, use QIHI iterator. Besides fixing this optimization flaw, it enables other developers to reproduce PR51374: If the patt

Re: [PATCH] Implement stap probe on ARM's unwinder

2011-12-08 Thread Sergio Durigan Junior
Sergio Durigan Junior writes: > Bernd Schmidt writes: > >> On 12/01/11 13:01, Ramana Radhakrishnan wrote: >>> Sergio: Other than a few minor tweaks to the Changelog it largely >>> looks obvious to me. >>> >>> Bernd, could you take another look at this since this is now shared >>> with the c6x b

Re: [4.7][google] Adding a new option -fstack-protector-strong. (issue5461043)

2011-12-08 Thread 沈涵
Hi, Andrew and Richard, check via referenced vars is much easier, thanks! Updated patches attached at EOM, also uploaded to http://codereview.appspot.com/5461043 Hi, Diego, that's good suggestion. I'm glad to send this for trunk at the next stage 1. -Han Updated patches diff --

Re: [4.7][google] Adding a new option -fstack-protector-strong. (issue5461043)

2011-12-08 Thread Jakub Jelinek
On Thu, Dec 08, 2011 at 11:05:42AM -0800, Han Shen(沈涵) wrote: > --- a/gcc/cfgexpand.c > +++ b/gcc/cfgexpand.c > @@ -1507,15 +1507,34 @@ estimated_stack_frame_size (struct cgraph_node *node) >return size; > } > > +/* Helper routine to check if a record or union contains an array field. */ > +

[patch PR libstdc++/51135]: Fix [4.7 Regression] SIGSEGV during exception cleanup on win32

2011-12-08 Thread Kai Tietz
Hi, this bug was caused by change of default-calling-convention of __thiscall for class-member-functions on 32-bit IA windows target. Issue is that that destructor pointer used default __cdecl calling-convention instead. This patch fix that. As currently trunk is still broken for all SjLj targets

[patch, fortran] Fix PR 50690

2011-12-08 Thread Thomas Koenig
Hello world, this is what I hope is the final round of the OMP front-end optimization patch. This one ignores outer workshares when doing function elimination within omp do and similar blocks. Regression-tested. OK for trunk? Thomas 2011-12-02 Thomas Koenig PR fortran/50

[committed] Copy TREE_SIDE_EFFECTS alongside with TREE_THIS_VOLATILE in forwprop (PR tree-optimization/51466)

2011-12-08 Thread Jakub Jelinek
Hi! As documented in tree.h for TREE_THIS_VOLATILE: If this bit is set in an expression, so is TREE_SIDE_EFFECTS. so copying just TREE_THIS_VOLATILE is not sufficient. On 4.6 branch this resulted in ICEs in gimple_rhs_has_side_effects. Bootstrapped/regtested on x86_64-linux and i686-linux, commit

[PATCH] Optimize away unnecessary clobbers (PR tree-optimization/51117)

2011-12-08 Thread Jakub Jelinek
Hi! This patch optimizes away clobber stmts that immediately precede GIMPLE_RETURN or GIMPLE_RESX that throws externally, which allows doing EH cleanups. For both libstdc++.so.6 and go1 this results in slight reduction of .gcc_except_table size: $ readelf -WS obj96[24]/x86*/libstdc*/src/.libs/li

Re: [patch, fortran] Fix PR 50690

2011-12-08 Thread Jakub Jelinek
On Thu, Dec 08, 2011 at 08:48:31PM +0100, Thomas Koenig wrote: > /* Entry point - run all passes for a namespace. So far, only an > optimization pass is run. */ > > @@ -76,12 +83,15 @@ gfc_run_passes (gfc_namespace *ns) > { >expr_size = 20; >expr_array = XNEWVEC(gfc_ex

Re: [PATCH] use -fno-pie on darwin in boehm-gc.exp

2011-12-08 Thread Jack Howarth
On Thu, Dec 08, 2011 at 05:55:37PM +, Iain Sandoe wrote: > > On 8 Dec 2011, at 17:24, Jack Howarth wrote: > >> On Thu, Dec 08, 2011 at 05:05:12PM +, Iain Sandoe wrote: >>> >>> On 8 Dec 2011, at 16:58, Jack Howarth wrote: >>> On Thu, Dec 08, 2011 at 03:54:35PM +, Iain Sandoe wrote:

Re: [PATCH] use -fno-pie on darwin in boehm-gc.exp

2011-12-08 Thread Jack Howarth
On Thu, Dec 08, 2011 at 05:55:37PM +, Iain Sandoe wrote: > > On 8 Dec 2011, at 17:24, Jack Howarth wrote: > >> On Thu, Dec 08, 2011 at 05:05:12PM +, Iain Sandoe wrote: >>> >>> On 8 Dec 2011, at 16:58, Jack Howarth wrote: >>> On Thu, Dec 08, 2011 at 03:54:35PM +, Iain Sandoe wrote:

[PATCH] Fix dg-function-on-line for MIPS64-linux-gnu

2011-12-08 Thread Andrew Pinski
Hi, The problem here is mips64-linux-gnu produces similar output like IRIX does except there might be some .cfi_startproc there. This patch fixes it by allow an optional .cfi_startproc and by always using that format for mips*-*-* . OK? Tested on mips64-linux-gnu. Thanks, Andrew Pinski tests

Re: [patch PR libstdc++/51135]: Fix [4.7 Regression] SIGSEGV during exception cleanup on win32

2011-12-08 Thread Jonathan Wakely
On Dec 8, 2011 7:16 PM, "Kai Tietz" wrote: > >        * unwind-cxx.h (__cxa_exception): Use for member >        exceptionDestructor the _GLIBCXX_DESTRUCTOR_CALLCONVENTION macro. I think "Use the _GLIBCXX_DESTRUCTOR_CALLCONVENTION macro for the exceptionDestructor member" would make more sense. Ho

Re: [patch, fortran] Fix PR 50690

2011-12-08 Thread Thomas Koenig
Hi Jakub, Both of these arrays should be really vec.h vectors, it doesn't make any sense to handcode the same thing everywhere. You can then start with NULL vectors and push something using VEC_safe_push only when needed and let it handle reallocation etc. I tried that originally, but could no

Re: [patch PR libstdc++/51135]: Fix [4.7 Regression] SIGSEGV during exception cleanup on win32

2011-12-08 Thread Kai Tietz
2011/12/8 Jonathan Wakely : > On Dec 8, 2011 7:16 PM, "Kai Tietz" wrote: >> >>        * unwind-cxx.h (__cxa_exception): Use for member >>        exceptionDestructor the _GLIBCXX_DESTRUCTOR_CALLCONVENTION macro. > > I think "Use the _GLIBCXX_DESTRUCTOR_CALLCONVENTION macro for the > exceptionDestruc

Re: [PATCH] [MIPS] Add -march=octeon+ support for GCC

2011-12-08 Thread Richard Sandiford
Andrew Pinski writes: >> gcc/ChangeLog: >> * mips/mips-cpus.def (octeon+): New CPU. config/mips/mips-cpus.def >> testsuite/ChangeLog: >> * gcc.target/mips/mult-1.c: Forbit all Octeon processors. Forbid. > @@ -1,6 +1,6 @@ > /* For SI->DI widening multiplication we should use DINS to combine th

Re: [PATCH] use -fno-pie on darwin in boehm-gc.exp

2011-12-08 Thread Iain Sandoe
On 8 Dec 2011, at 20:15, Jack Howarth wrote: At present, you pass it when "no-pic, no-pie" etc. are - perhaps it should just be the default and *only* switched on for -pie something like %{!fpie: %{!PIE: %:version-compare(>= 10.7 mmacosx-version-min= - no_pie) } } Otherwise, D11 is behavi

Re: Update to Fortran "invoke" documentation about the features -finit- *really* provides.

2011-12-08 Thread Toon Moene
On 12/07/2011 07:58 PM, Toon Moene wrote: On 12/06/2011 08:32 PM, Steve Kargl wrote: Looks good to me. You can apply it to the 4.6 branch if you have time. And then shortly before applying it, I realized that the proper documentation of the limitations might be dependent on the -fno-au

Re: [patch, fortran] Fix PR 50690

2011-12-08 Thread Jakub Jelinek
On Thu, Dec 08, 2011 at 09:36:13PM +0100, Thomas Koenig wrote: > >Both of these arrays should be really vec.h vectors, it doesn't > >make any sense to handcode the same thing everywhere. > >You can then start with NULL vectors and push something using VEC_safe_push > >only when needed and let it ha

[PATCH 0/6] Implement vec_perm_const consistently

2011-12-08 Thread Richard Henderson
We've previously discussed eliminating VEC_INTERLEAVE_*_EXPR, and VEC_EXTRACT_{EVEN,ODD}_EXPR, as both have different semantics depending on target endianness. The replacement, VEC_PERM_EXPR, does not have this ambiguity. In order for this to not introduce regressions in the various targets that

[PATCH 2/6] rs6000: Implement vec_perm_constv16qi for altivec.

2011-12-08 Thread Richard Henderson
From: Richard Henderson --- gcc/config/rs6000/altivec.md | 13 ++ gcc/config/rs6000/rs6000-protos.h |1 + gcc/config/rs6000/rs6000.c| 175 + gcc/testsuite/gcc.target/powerpc/altivec-perm-1.c | 76 +

[PATCH 1/6] Delete VEC_INTERLEAVE_*_EXPR.

2011-12-08 Thread Richard Henderson
Slightly modified version of a patch Jakub posted earlier. * tree.def (VEC_INTERLEAVE_HIGH_EXPR, VEC_INTERLEAVE_LOW_EXPR): Remove. * gimple-pretty-print.c (dump_binary_rhs): Don't handle VEC_INTERLEAVE_HIGH_EXPR and VEC_INTERLEAVE_LOW_EXPR. * expr.c (expand_expr_re

[PATCH 3/6] ia64: Implement vec_perm_const.

2011-12-08 Thread Richard Henderson
--- gcc/config/ia64/ia64-protos.h |4 + gcc/config/ia64/ia64.c| 424 +++-- gcc/config/ia64/vect.md | 183 +++--- 3 files changed, 441 insertions(+), 170 deletions(-) diff --git a/gcc/config/ia64/ia64-protos.h b/gcc/config/ia64/ia

[PATCH 6/6] arm: Implement vec_perm and vec_perm_const for NEON.

2011-12-08 Thread Richard Henderson
--- gcc/config/arm/arm-protos.h |3 + gcc/config/arm/arm.c | 527 - gcc/config/arm/neon.md| 59 gcc/config/arm/vec-common.md | 26 ++ gcc/testsuite/lib/target-supports.exp |9 +- 5 files changed,

[PATCH 5/6] mips: Implement vec_perm_const.

2011-12-08 Thread Richard Henderson
--- gcc/config/mips/loongson.md| 24 +++- gcc/config/mips/mips-modes.def |1 + gcc/config/mips/mips-protos.h |1 + gcc/config/mips/mips-ps-3d.md | 145 ++ gcc/config/mips/mips.c | 266 ++-- gcc/config/mips/predicates

[PATCH 4/6] rs6000: Cleanup interleave/even_odd/vec_perm.

2011-12-08 Thread Richard Henderson
Put merge-type insns in standard (vec_select (vec_concat)) form. Delete vec_extract_{even,odd} patterns. Delete or rename vec_interleave_{high,low} patterns. Add vec_perm_const patterns for SPE, VSX, and Paired-Single. --- gcc/config/rs6000/altivec.md | 368 +++

Re: [PATCH] use -fno-pie on darwin in boehm-gc.exp

2011-12-08 Thread Jack Howarth
On Thu, Dec 08, 2011 at 08:55:17PM +, Iain Sandoe wrote: > > On 8 Dec 2011, at 20:15, Jack Howarth wrote: >>> >>> At present, you pass it when "no-pic, no-pie" etc. are - perhaps it >>> should just be the default and *only* switched on for -pie something >>> like >>> >>> %{!fpie: %{!PIE: %:

[pph] Fix references to external PPH files (issue5476043)

2011-12-08 Thread Diego Novillo
This fixes a bug in the creation of external references to PPH images. We save references to external PPH files when we save the line table for the parent header. Sometimes we were not saving a proper reference because the path names of the header as found in the line map could not be matched wit

[PATCH] Make #pragma GCC target properly change macros and fix recip-5 failures

2011-12-08 Thread Michael Meissner
These patches add support for #pragma GCC target("...") on the powerpc to change the default macros defined like tha x86 does (and the powerpc did for the target attribute). When adding support for changing macros on the target attribute, I forgot to enable the code for #pragma as well. Also, the

Re: [testsuite,committed]: Fix wrong sizeof(int)==4 assumption (yet another time)

2011-12-08 Thread Eric Botcazou
> I allowed me to apply the following change: > > http://gcc.gnu.org/viewcvs?view=revision&revision=182109 Then you need to do the same on the 4.6 branch. > Besides that: Why are there new test cases in gcc.c-torture? > > As far as I remember that place is deprecated and the preferred place for >

Re: [PATCH] Fix PR middle-end/45416, missing opt for (a&(1<

2011-12-08 Thread Richard Henderson
On 12/06/2011 08:17 PM, Andrew Pinski wrote: > + if (a & (long long) 0x400) > + return 1; > + return 0; > +} > + > +/* { dg-final { scan-assembler "andl" { target i?86-*-linux* x86_64-*-linux* > } } } " */ > +/* { dg-final { scan-assembler "setne" { target i?86-*-linux* > x86_64-*-linux*

Re: [PATCH, PR43814] Assume function arguments of pointer type are aligned.

2011-12-08 Thread Eric Botcazou
> * expr.c (get_object_or_type_alignment): Remove static. > * expr.h (get_object_or_type_alignment): Declare. I did that this morning (and also added an assertion in the function). -- Eric Botcazou

[PATCH] Make #pragma GCC target properly change macros and fix recip-5 failures

2011-12-08 Thread Michael Meissner
On Thu, Dec 08, 2011 at 04:26:07PM -0500, Michael Meissner wrote: > These patches add support for #pragma GCC target("...") on the powerpc to > change the default macros defined like tha x86 does (and the powerpc did for > the target attribute). When adding support for changing macros on the targe

Re: [patch, fortran] Fix PR 50690

2011-12-08 Thread Jakub Jelinek
On Thu, Dec 08, 2011 at 08:48:31PM +0100, Thomas Koenig wrote: > this is what I hope is the final round of the OMP front-end optimization > patch. This one ignores outer workshares when doing function > elimination within omp do and similar blocks. Sorry, stopped reading the patch details once no

Re: [4.7][google] Adding a new option -fstack-protector-strong. (issue5461043)

2011-12-08 Thread 沈涵
Hi, Jakub, thanks! Patches modified according to gnu coding standards. -Han Patches (also on http://codereview.appspot.com/5461043) diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 8684721..e584cae 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c

Re: [PATCH] Fix PR middle-end/45416, missing opt for (a&(1<

2011-12-08 Thread Andrew Pinski
On Thu, Dec 8, 2011 at 1:32 PM, Richard Henderson wrote: > On 12/06/2011 08:17 PM, Andrew Pinski wrote: >> +   if (a & (long long) 0x400) >> +      return 1; >> +   return 0; >> +} >> + >> +/* { dg-final { scan-assembler "andl" { target i?86-*-linux* >> x86_64-*-linux* } } } " */ >> +/* { dg-fina

Re: [4.7][google] Adding a new option -fstack-protector-strong. (issue5461043)

2011-12-08 Thread Jakub Jelinek
On Thu, Dec 08, 2011 at 02:02:23PM -0800, Han Shen(沈涵) wrote: > Hi, Jakub, thanks! Patches modified according to gnu coding standards. -Han Not completely: > +/* Helper routine to check if a record or union contains an array field. */ > + > +static int record_or_union_type_has_array(tree tree_type

C++ PATCH for c++/51459 (wrong code with lambda in template)

2011-12-08 Thread Jason Merrill
Here the problem was that we ended up inappropriately calling cp_finish_decl on the capture proxies at instantiation time. Fixed by handling them specially. Tested x86_64-pc-linux-gnu, applying to trunk. commit ec77b5bed80dde351ee2086386f0c2282fdffa14 Author: Jason Merrill Date: Thu Dec 8 1

C++ PATCH for c++/51318 (confusion with rvalue ?: in template)

2011-12-08 Thread Jason Merrill
This was an unfortunate interaction between the two hunks of my patch for 50835; lvalue_kind started assuming lvalue in C++98 templates, and then build_x_conditional_expr saw that and tried to play reference games as a result. Fixed by only playing reference games in C++11 mode. Tested x86_64

[PATCH] PR 51469, Make gnu indirect functions always non-local

2011-12-08 Thread Michael Meissner
I noticed that most of the attr-ifunc tests were failing on the PowerPC. I tracked it down to the fact that in varasm.c the indirect function is considered a local function. On the powerpc in 64-bit mode or 32-bit mode under AIX, a local function uses the same TOC value in r2 as the caller, so th

Re: [4.7][google] Adding a new option -fstack-protector-strong. (issue5461043)

2011-12-08 Thread Andrew Pinski
On Thu, Dec 8, 2011 at 2:02 PM, Han Shen(沈涵) wrote: > +  FOR_EACH_REFERENCED_VAR(cfun, var, rvi) > +    if (!is_global_var(var) && TREE_ADDRESSABLE(var)) > +      ++gen_stack_protect_signal; > + > +  /* Examine local variable declaration. */ > +  if (!gen_stack_protect_signal) > +    FOR_EACH_LOCA

Re: [4.7][google] Adding a new option -fstack-protector-strong. (issue5461043)

2011-12-08 Thread Andrew Pinski
On Thu, Dec 8, 2011 at 2:02 PM, Han Shen(沈涵) wrote: > +/* Address taken on struct. */ > +int foo10() > +{ > +  struct BB bb; > +  int i; > +  memset(&bb, 5, sizeof bb); > +  for (i = 0; i < 10; ++i) > +    { > +      bb.one = i; > +      bb.two = bb.one + bb.two; > +      bb.three = bb.one + bb.tw

Re: [PATCH] PR 51469, Make gnu indirect functions always non-local

2011-12-08 Thread Richard Henderson
On 12/08/2011 02:29 PM, Michael Meissner wrote: > 2011-12-08 Michael Meissner > > PR rtl-optimization/51469 > * varasm.c (default_binds_local_p_1): If the symbol is a gnu > indirect function, mark the symbol as non-local. Ok everywhere. r~

Go patch committed: Don't check for hidden fields on struct assignment

2011-12-08 Thread Ian Lance Taylor
The Go language has changed to permit structs with hidden fields to be assigned. This patch implements that in the gccgo frontend. Because the change is somewhat experimental, I did not remove the old code, I merely stopped executing it. I will remove it later if the change sticks. This change

Re: [PATCH] Optimize away unnecessary clobbers (PR tree-optimization/51117)

2011-12-08 Thread Richard Henderson
On 12/08/2011 11:57 AM, Jakub Jelinek wrote: > + else if (gimple_code (last) == GIMPLE_RETURN > +|| (gimple_code (last) == GIMPLE_RESX > +&& stmt_can_throw_external (last))) > + optimize_clobbers (bb); If you need to do this for returns as well as resx, then th

Re: RFA: Fix PR middle-end/40154

2011-12-08 Thread Richard Henderson
On 12/07/2011 06:10 AM, Joern Rennecke wrote: > PR middle-end/40154 > * emit-rtl.c (set_dst_reg_note): New function. > * rtl.h (set_dst_reg_note): Declare. > * optabs.c (expand_binop, expand_absneg_bit): Use set_dst_reg_note. > (emit_libcall_block, expand_fix): Likewis

Re: [PATCH] Optimize away unnecessary clobbers (PR tree-optimization/51117)

2011-12-08 Thread Jakub Jelinek
On Thu, Dec 08, 2011 at 03:53:40PM -0800, Richard Henderson wrote: > On 12/08/2011 11:57 AM, Jakub Jelinek wrote: > > + else if (gimple_code (last) == GIMPLE_RETURN > > + || (gimple_code (last) == GIMPLE_RESX > > + && stmt_can_throw_external (last))) > > + optimize_clob

Go patch committed: Fix hidden field code

2011-12-08 Thread Ian Lance Taylor
Further testing revealed that I goofed on the hidden field patch I just committed, and was too aggressive on testing for assignments to hidden fields in composite literals. It is OK to assign to a type which itself contains hidden fields in a composite literal; that is just an example of assignmen

Re: [PATCH] Optimize away unnecessary clobbers (PR tree-optimization/51117)

2011-12-08 Thread Richard Henderson
On 12/08/2011 04:00 PM, Jakub Jelinek wrote: > On Thu, Dec 08, 2011 at 03:53:40PM -0800, Richard Henderson wrote: >> On 12/08/2011 11:57 AM, Jakub Jelinek wrote: >>> + else if (gimple_code (last) == GIMPLE_RETURN >>> + || (gimple_code (last) == GIMPLE_RESX >>> + && stmt_c

Re: [PATCH] Make #pragma GCC target properly change macros and fix recip-5 failures

2011-12-08 Thread David Edelsohn
On Thu, Dec 8, 2011 at 4:26 PM, Michael Meissner wrote: > These patches add support for #pragma GCC target("...") on the powerpc to > change the default macros defined like tha x86 does (and the powerpc did for > the target attribute).  When adding support for changing macros on the target > attri

Re: [4.7][google] Adding a new option -fstack-protector-strong. (issue5461043)

2011-12-08 Thread 沈涵
Hi, Jakub, thanks! Fixed! Hi, Andrew, it's good suggestion. Done. Also modified foo10. A small c++ test case was added also. Patches (also on http://codereview.appspot.com/5461043) diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 8684721..0a7a9f7

Re: PR libgomp/51376 fix

2011-12-08 Thread Alan Modra
On Fri, Dec 02, 2011 at 08:10:11PM +1030, Alan Modra wrote: > PR libgomp/51376 > * task.c (GOMP_taskwait): Don't access task->children outside of > task_lock mutex region. > (GOMP_task): Likewise. Committed revision 182151 on rth's irc OK. -- Alan Modra Australia Developm

Re: [PATCH] [MIPS] Add -march=octeon+ support for GCC

2011-12-08 Thread Andrew Pinski
On Thu, Dec 8, 2011 at 12:43 PM, Richard Sandiford wrote: > Andrew Pinski writes: >>> gcc/ChangeLog: >>> * mips/mips-cpus.def (octeon+): New CPU. > > config/mips/mips-cpus.def > >>> testsuite/ChangeLog: >>> * gcc.target/mips/mult-1.c: Forbit all Octeon processors. > > Forbid. > >> @@ -1,6 +1,6 @@

Re: [patch] ARM: Fix miscompilation in arm.md:*minmax_arithsi. (PR target/51408)

2011-12-08 Thread Kazu Hirata
Hi Richard, BTW, I would expect this to also exist in all the release branches. Could you back-port it where needed please. I just backported to 4.4, 4.5, and 4.6 branches. Kazu Hirata

Go patch committed: Another hidden fields correction

2011-12-08 Thread Ian Lance Taylor
This is another correction to the recent Go frontend patch for hidden fields. This treats both the case of a composite literal with field names and one without the same way. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r 2567b69456fe go/expres

Re: [PATCH 5/6] mips: Implement vec_perm_const.

2011-12-08 Thread Hans-Peter Nilsson
On Thu, 8 Dec 2011, Richard Henderson wrote: > diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c > index d3fd709..f1c3665 100644 > --- a/gcc/config/mips/mips.c > +++ b/gcc/config/mips/mips.c > @@ -13021,8 +13015,8 @@ static const struct mips_builtin_description > mips_builtins[] = { >

Re: [Path,AVR]: Implement __muldi3 in asm

2011-12-08 Thread Denis Chertykov
2011/12/8 Georg-Johann Lay : > This are assembler implementations for Dimode multiplication. > > Tested without regressions, the only change in the test suite I get is for > > gcc.c-torture/execute/arith-rand-ll.c execution,  -O0 > > UNTESTED -> PASS > > because the former vanilla C implementation

Re: [Patch,AVR]: Fix PR51425

2011-12-08 Thread Denis Chertykov
2011/12/8 Georg-Johann Lay : > This is obvious patch for PR51425: SBIC/SBRC instructions are generated by > insn > combine, but insn combine tries zero_extract:QI not zero_extract:HI as  in > good > old times. > > Thus, use QIHI iterator. > > Besides fixing this optimization flaw, it enables othe

Re: RFA: Avoid unnecessary clearing in union initialisers

2011-12-08 Thread Carrot Wei
Since it also affects 4.6 branch, can this and r176270 also be ported to gcc4.6? thanks Carrot On Wed, Jul 13, 2011 at 12:34 AM, Richard Sandiford wrote: > PR 48183 is caused by the fact that we don't really support integers > (or least integer constants) wider than 2*HOST_BITS_PER_WIDE_INT: > >

PATCH: PR bootstrap/51479: Missing dependency on errors.o causes bootstrap failure

2011-12-08 Thread H.J. Lu
gcc/Makefile.in has gengtype$(exeext) : gengtype.o gengtype-lex.o gengtype-parse.o \ gengtype-state.o version.o errors.o $(LIBDEPS) +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ $(filter-out ($LIBDEPS), $^) $(LIBS) However, there is no errors.o dependency, whi