Re: arm memcpy of aligned data

2015-05-28 Thread Oleg Endo
On 28 May 2015, at 23:15, Mike Stump wrote: > So, the arm memcpy code of aligned data isn’t as good as it can be. > > void *memcpy(void *dest, const void *src, unsigned int n); > > void foo(char *dst, int i) { > memcpy (dst, &i, sizeof (i)); > } > > generates horrible code, but, it we are wi

Re: [PR65768] Check rtx_cost when propagating constant

2015-05-28 Thread Kugan
On 29/05/15 07:31, Jeff Law wrote: > On 05/13/2015 11:46 PM, Kugan wrote: >> ping? >> >> Thanks, >> Kugan >> >> On 15/04/15 17:53, Kugan wrote: >>> As mentioned in PR65768, ARM gcc generates suboptimal code for constant >>> Uses in loop. Part of the reason is cprop is undoing what loop invariant

aarch64 simd index out of range message not correct on 32 bit host

2015-05-28 Thread Shiva Chen
Hi, I notice that aarch64 simd index range message not correct on 32 bit host. The message print by the function aarch64_simd_lane_bounds in aarch64.c. The function print HOST_WIDE_INT variable by %ld which is correct on 64 bit host. However, on 32 bit host HOST_WIDE_INT would be long long. Th

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread Sriraman Tallam
On Thu, May 28, 2015 at 5:05 PM, H.J. Lu wrote: > On Thu, May 28, 2015 at 4:54 PM, Sriraman Tallam wrote: >> On Thu, May 28, 2015 at 2:52 PM, H.J. Lu wrote: >>> On Thu, May 28, 2015 at 2:27 PM, Sriraman Tallam >>> wrote: On Thu, May 28, 2015 at 2:01 PM, H.J. Lu wrote: > On Thu, May 2

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-05-28 Thread Jan Hubicka
> >>> 2015-04-14 Ilya Enkovich > >>> > >>> PR target/65527 > >>> * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Add > >>> redirection for instrumented calls. > >>> * lto-wrapper.c (merge_and_complain): Merge > >>> -fcheck-pointer-bounds. > >>> (a

Re: [CHKP, PATCH] Fix LTO cgraph merge for instrumented functions

2015-05-28 Thread Jan Hubicka
> Ping I am really sorry for ignoring this so long - I would like to reorg the code and replace instrumentaiton thunks by the notion of transparent aliases, but did not have time to do that yet. Have quite busy time now. > >>> > >>> 2015-04-14 Ilya Enkovich > >>> > >>> * ipa.c (symbol_

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jason Merrill
Looks good. Jason

[expmed] Avoid clobbering a yet-to-be-used base/index register.

2015-05-28 Thread DJ Delorie
20040625-1 fails on targets with pointers bigger than WORD_SIZE (rl78, msp430/-mlarge) because the base register is clobbered, partially rebuilt with the new value, then used as a base for the second part of the calculation. Ok? * expmed.c (extract_bit_field_1): Avoid clobbering a

Re: Statically-allocated objects with non-trivial ctors (was Re: [PATCH 33/35] Change use to type-based pool allocator in ira-color.c.)

2015-05-28 Thread Trevor Saunders
On Thu, May 28, 2015 at 06:42:57AM -0400, David Malcolm wrote: > On Wed, 2015-05-27 at 15:56 +0200, mliska wrote: > > gcc/ChangeLog: > > > > 2015-04-30 Martin Liska > > > > * ira-color.c (init_update_cost_records): Use new type-based pool > > allocator. > > (get_update_cost_record): L

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread H.J. Lu
On Thu, May 28, 2015 at 4:54 PM, Sriraman Tallam wrote: > On Thu, May 28, 2015 at 2:52 PM, H.J. Lu wrote: >> On Thu, May 28, 2015 at 2:27 PM, Sriraman Tallam wrote: >>> On Thu, May 28, 2015 at 2:01 PM, H.J. Lu wrote: On Thu, May 28, 2015 at 1:54 PM, Sriraman Tallam wrote: > On T

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread Sriraman Tallam
On Thu, May 28, 2015 at 2:52 PM, H.J. Lu wrote: > On Thu, May 28, 2015 at 2:27 PM, Sriraman Tallam wrote: >> On Thu, May 28, 2015 at 2:01 PM, H.J. Lu wrote: >>> On Thu, May 28, 2015 at 1:54 PM, Sriraman Tallam >>> wrote: On Thu, May 28, 2015 at 12:05 PM, H.J. Lu wrote: > On Thu, May

Re: [PATCH] Extend -fno-plt to normal non-PIC branches on x86

2015-05-28 Thread H.J. Lu
On Thu, May 28, 2015 at 10:37:53AM -0700, H.J. Lu wrote: > This patch extends -fno-plt to normal non-PIC calls on x86. -fno-plt > works in 64-bit mode with the existing binutils. For 32-bit, we need > the updated assembler and linker to support "call/jmp *foo@GOT" with > a new relocation differen

[PATCH] unify -posix/-pthread cpp handling for gnu-user targets

2015-05-28 Thread Mike Frysinger
Many Linux targets duplicate the cpp spec macros for turning -posix/-thread into the right defines. Some Linux targets forget to do this entirely and can be hard to notice. Add common definitions to the gnu headers (since these are really in relation to the C library) and drop the duplications in

[patch] libstdc++/66327 don't pass null pointers to memcmp

2015-05-28 Thread Jonathan Wakely
std::equal((int*)0, (int*)0, p) and std::equal(p, p, (int*)0) are valid for any input iterator p, and must not pass a null pointer to memcpy. Similarly, std::lexicographical_compare((int*)0, (int*)0, p, q) and std::lexicographical_compare(p, q, (int*)0, (int*)0) are valid for any input iterators

Re: [PATCH, PR target/65103, 2/3] Propagate address constants into loops for i386

2015-05-28 Thread Jeff Law
On 05/05/2015 05:05 AM, Ilya Enkovich wrote: 2015-04-21 8:52 GMT+03:00 Jeff Law : On 04/17/2015 02:34 AM, Ilya Enkovich wrote: On 15 Apr 14:07, Ilya Enkovich wrote: 2015-04-14 8:22 GMT+03:00 Jeff Law : On 03/15/2015 02:30 PM, Richard Sandiford wrote: Ilya Enkovich writes: This patch

Re: [patch] fix bootstrap on FreeBSD i386/arm

2015-05-28 Thread Eric Botcazou
> This patch restores bootstrap on i386-*-freebsd*. > The build was failing after the introduction of -std=c++98 > configure/build flag. The -std=c++98 enables strict_ansi and on FreeBSD > the libc function atoll is not defined for this. Solaris (x86 and SPARC) is also broken in various ways: for

Re: [PATCH, FT32] initial support

2015-05-28 Thread Eric Botcazou
> Thanks very much. ChangeLog entry: > > 2015-05-14 James Bowman > > * configure.ac: FT32 target added > * libgcc/config.host: FT32 target added > * gcc/config/ft32/: FT32 target added > * libgcc/config/ft32/: FT32 target added > * gcc/doc/install.texi,

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread H.J. Lu
On Thu, May 28, 2015 at 2:27 PM, Sriraman Tallam wrote: > On Thu, May 28, 2015 at 2:01 PM, H.J. Lu wrote: >> On Thu, May 28, 2015 at 1:54 PM, Sriraman Tallam wrote: >>> On Thu, May 28, 2015 at 12:05 PM, H.J. Lu wrote: On Thu, May 28, 2015 at 11:50 AM, Sriraman Tallam wrote: > On

Re: fix pr65369.c testcase

2015-05-28 Thread DJ Delorie
Done. Thanks!

Re: [PR65768] Check rtx_cost when propagating constant

2015-05-28 Thread Jeff Law
On 05/13/2015 11:46 PM, Kugan wrote: ping? Thanks, Kugan On 15/04/15 17:53, Kugan wrote: As mentioned in PR65768, ARM gcc generates suboptimal code for constant Uses in loop. Part of the reason is cprop is undoing what loop invariant code motion did. Zhenqiang posted a patch at to fix this ba

Re: [PR65768] Check rtx_cost when propagating constant

2015-05-28 Thread Jeff Law
I've CC'd Ilya as he's been looking at related issues in the x86 backend, but from the other direction and I think he ought to be aware of the interactions of this potential change and his work. In particular depending on the costing in the x86 backend we may see fewer propagations of GOTOFF c

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread Sriraman Tallam
On Thu, May 28, 2015 at 2:01 PM, H.J. Lu wrote: > On Thu, May 28, 2015 at 1:54 PM, Sriraman Tallam wrote: >> On Thu, May 28, 2015 at 12:05 PM, H.J. Lu wrote: >>> On Thu, May 28, 2015 at 11:50 AM, Sriraman Tallam >>> wrote: On Thu, May 28, 2015 at 11:42 AM, H.J. Lu wrote: > On Thu, Ma

arm memcpy of aligned data

2015-05-28 Thread Mike Stump
So, the arm memcpy code of aligned data isn’t as good as it can be. void *memcpy(void *dest, const void *src, unsigned int n); void foo(char *dst, int i) { memcpy (dst, &i, sizeof (i)); } generates horrible code, but, it we are willing to notice the src or the destination are aligned, we can

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Aldy Hernandez
On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + determine anscestry later. */ ancestry Fixed. +static bool early_dwarf_dumping; Sorry for the late bikeshedding, but "dumping" suddently strikes me as odd, since there is no output as with

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread H.J. Lu
On Thu, May 28, 2015 at 1:54 PM, Sriraman Tallam wrote: > On Thu, May 28, 2015 at 12:05 PM, H.J. Lu wrote: >> On Thu, May 28, 2015 at 11:50 AM, Sriraman Tallam >> wrote: >>> On Thu, May 28, 2015 at 11:42 AM, H.J. Lu wrote: On Thu, May 28, 2015 at 11:34 AM, Sriraman Tallam wrote: >>

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread Sriraman Tallam
On Thu, May 28, 2015 at 12:05 PM, H.J. Lu wrote: > On Thu, May 28, 2015 at 11:50 AM, Sriraman Tallam wrote: >> On Thu, May 28, 2015 at 11:42 AM, H.J. Lu wrote: >>> On Thu, May 28, 2015 at 11:34 AM, Sriraman Tallam >>> wrote: I have attached a patch that adds the new attribute "noplt". Pl

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jan Hubicka
> On 05/28/2015 04:42 PM, Jan Hubicka wrote: > >As for optimization changing type representation, I suppose one case is when > >function with varray type gets inlined and the array bound happens to be a > >different expression afterwards. We produce a new copy of the original type > >with differen

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jason Merrill
On 05/28/2015 04:42 PM, Jan Hubicka wrote: As for optimization changing type representation, I suppose one case is when function with varray type gets inlined and the array bound happens to be a different expression afterwards. We produce a new copy of the original type with different bounds the

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jan Hubicka
> On 05/28/2015 02:53 PM, Aldy Hernandez wrote: > >On 05/27/2015 08:39 AM, Jason Merrill wrote: > >>On 05/20/2015 11:50 AM, Aldy Hernandez wrote: > > > >>>+ /* Fill in the size of variable-length fields in late dwarf. */ > >>>+ if (TREE_ASM_WRITTEN (type) > >>>+ && !early_dwarf_dumping) > >

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jason Merrill
On 05/28/2015 02:53 PM, Aldy Hernandez wrote: On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + /* Fill in the size of variable-length fields in late dwarf. */ + if (TREE_ASM_WRITTEN (type) + && !early_dwarf_dumping) +{ + tree member

Re: debug mode maintenance patch

2015-05-28 Thread François Dumont
On 25/05/2015 20:41, Jonathan Wakely wrote: On 25/05/15 15:31 +0200, François Dumont wrote: Hi This is a patch to clean the debug mode code. I have introduced a new debug header, assertions.h, so that headers that only need _GLIBCXX_DEBUG_ASSERT do not have to include the big debug.h.

Re: [patch] fix bootstrap on FreeBSD i386/arm

2015-05-28 Thread Jason Merrill
OK, thanks. Jason

Re: Statically-allocated objects with non-trivial ctors (was Re: [PATCH 33/35] Change use to type-based pool allocator in ira-color.c.)

2015-05-28 Thread Trevor Saunders
On Thu, May 28, 2015 at 08:47:16PM +0200, Martin Liška wrote: > On 05/28/2015 08:03 PM, Jakub Jelinek wrote: > >On Thu, May 28, 2015 at 07:57:39PM +0200, Richard Biener wrote: > >>But we've been trying to avoid this. And the jit might not be too happy > >>about it either. > > > >Yeah, we should ce

Re: Do less generous pointer globbing in alias.c

2015-05-28 Thread Jan Hubicka
hello, only providing you the testcase why I need transitive closure of "contains pointer" via the extra child I noticed that there is extra symmetry to handle: struct a {void *ptr;} char **ptr = (char **)&a.ptr; ptr = ... This one doesn't really fly with my extra subset code, beca

Re: [PATCH] Optimize (CST1 << A) == CST2 (PR tree-optimization/66299)

2015-05-28 Thread Marc Glisse
On Thu, 28 May 2015, Marek Polacek wrote: This PR points out that we weren't able to optimize 1 << x == 2 to just x == 1. Side note: if we are looking for extra patterns to simplify, llvm has an almost unlimited supply. Here are a few we don't seem to have (there are more where those came fr

Re: [PATCH][ARM/AArch64 Testsuite] Cleanup advsimd-intrinsics.exp, removing unnecessary loop

2015-05-28 Thread Christophe Lyon
On 28 May 2015 at 18:45, Alan Lawrence wrote: > I've tested this on aarch64, aarch64_be, and arm, and in all cases, the same > tests are executed (whether running the whole advsimd-intrinsics.exp, or > manually specifying a single file). AFAICT the loop, explicit > runtest_file_p, and gcc_set_para

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread H.J. Lu
On Thu, May 28, 2015 at 11:50 AM, Sriraman Tallam wrote: > On Thu, May 28, 2015 at 11:42 AM, H.J. Lu wrote: >> On Thu, May 28, 2015 at 11:34 AM, Sriraman Tallam >> wrote: >>> I have attached a patch that adds the new attribute "noplt". Please review. >>> >>> * config/i386/i386.c (avoid_plt_to_

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Aldy Hernandez
On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + /* Fill in the size of variable-length fields in late dwarf. */ + if (TREE_ASM_WRITTEN (type) + && !early_dwarf_dumping) +{ + tree member; + for (member = TYPE_FIELDS (type); memb

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread Sriraman Tallam
On Thu, May 28, 2015 at 11:42 AM, H.J. Lu wrote: > On Thu, May 28, 2015 at 11:34 AM, Sriraman Tallam wrote: >> I have attached a patch that adds the new attribute "noplt". Please review. >> >> * config/i386/i386.c (avoid_plt_to_call): New function. >> (ix86_output_call_insn): Generate indirect c

Re: Statically-allocated objects with non-trivial ctors (was Re: [PATCH 33/35] Change use to type-based pool allocator in ira-color.c.)

2015-05-28 Thread Martin Liška
On 05/28/2015 08:03 PM, Jakub Jelinek wrote: On Thu, May 28, 2015 at 07:57:39PM +0200, Richard Biener wrote: But we've been trying to avoid this. And the jit might not be too happy about it either. Yeah, we should certainly try to avoid them, especially if it would affect many variables havin

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread H.J. Lu
On Thu, May 28, 2015 at 11:34 AM, Sriraman Tallam wrote: > I have attached a patch that adds the new attribute "noplt". Please review. > > * config/i386/i386.c (avoid_plt_to_call): New function. > (ix86_output_call_insn): Generate indirect call for functions > marked with "noplt" attribute. > (at

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread Sriraman Tallam
I have attached a patch that adds the new attribute "noplt". Please review. * config/i386/i386.c (avoid_plt_to_call): New function. (ix86_output_call_insn): Generate indirect call for functions marked with "noplt" attribute. (attribute_spec ix86_attribute_): Define new attribute "noplt". * doc/ex

Re: [PATCH v3] libiberty: cleanup Makefile.in

2015-05-28 Thread Bernhard Reutner-Fischer
On 28 May 2015 at 17:48, Ian Lance Taylor wrote: > On Thu, May 28, 2015 at 1:57 AM, Bernhard Reutner-Fischer > wrote: >> >> +stamp-pic-ofiles: $(CFILES:%=$(srcdir)/%) > > To the best of my knowledge, in POSIX make variable substitutions of > this form do not recognize % specially. In POSIX make

[patch] fix bootstrap on FreeBSD i386/arm

2015-05-28 Thread Andreas Tobler
All, This patch restores bootstrap on i386-*-freebsd*. The build was failing after the introduction of -std=c++98 configure/build flag. The -std=c++98 enables strict_ansi and on FreeBSD the libc function atoll is not defined for this. But the configure always stated atoll available. A bi

Re: [Patch, fortran, PR44672, v6] [F08] ALLOCATE with SOURCE and no array-spec

2015-05-28 Thread Mikael Morin
Le 28/05/2015 17:29, Andre Vehreschild a écrit : > *** resolve_allocate_expr (gfc_expr *e, gfc_ > *** 7103,7112 > --- 7103,7123 > if (!ref2 || ref2->type != REF_ARRAY || ref2->u.ar.type == AR_FULL > || (dimension && ref2->u.ar.dimen == 0)) > { > + /* F0

Re: Statically-allocated objects with non-trivial ctors (was Re: [PATCH 33/35] Change use to type-based pool allocator in ira-color.c.)

2015-05-28 Thread Jakub Jelinek
On Thu, May 28, 2015 at 07:57:39PM +0200, Richard Biener wrote: > But we've been trying to avoid this. And the jit might not be too happy about > it either. Yeah, we should certainly try to avoid them, especially if it would affect many variables having to be constructed. Jakub

Re: Statically-allocated objects with non-trivial ctors (was Re: [PATCH 33/35] Change use to type-based pool allocator in ira-color.c.)

2015-05-28 Thread Richard Biener
On May 28, 2015 7:06:36 PM GMT+02:00, Jeff Law wrote: >On 05/28/2015 04:42 AM, David Malcolm wrote: >> >> Am I right in thinking that this is a statically-allocated object >with a >> non-trivial constructor? i.e. that this constructor has to run >before >> "main" is entered? >> >> Do our coding g

Re: [PATCH 3/4, libitm, sh]: Change gtm_futex_{wait,wake} to int

2015-05-28 Thread Uros Bizjak
On Thu, May 28, 2015 at 12:52 AM, Kaz Kojima wrote: >> * config/linux/sh/futex_bits.h (sys_futex0) Change operands >> "op" and "val" to int. >> >> Untested. >> >> OK for mainline? > > OK. > > Although it looks obvious, I've confirmed that there is no build > issue/regression on sh4-unknow

[PATCH] Extend -fno-plt to normal non-PIC branches on x86

2015-05-28 Thread H.J. Lu
This patch extends -fno-plt to normal non-PIC calls on x86. -fno-plt works in 64-bit mode with the existing binutils. For 32-bit, we need the updated assembler and linker to support "call/jmp *foo@GOT" with a new relocation different from R_386_GOT32 to indicate that this relocation applies to in

Re: [PATCH 01/35] Introduce new type-based pool allocator.

2015-05-28 Thread Jeff Law
On 05/28/2015 06:49 AM, Martin Liška wrote: . This mechanism has been just adapted. I find it quite useful as we have examples in source code where we allocate same struct/class types from a various pool. For debugging purpose, it helps to identify if release operation is called for a correct po

Re: [PATCH, RFC] New memory usage statistics infrastructure

2015-05-28 Thread Jeff Law
On 05/28/2015 06:29 AM, Martin Liška wrote: Hello. Thank you for pointing about missing copyright. Following patch adds that. Ready for trunk? Yes. jeff

Re: Statically-allocated objects with non-trivial ctors (was Re: [PATCH 33/35] Change use to type-based pool allocator in ira-color.c.)

2015-05-28 Thread Jeff Law
On 05/28/2015 04:42 AM, David Malcolm wrote: Am I right in thinking that this is a statically-allocated object with a non-trivial constructor? i.e. that this constructor has to run before "main" is entered? Do our coding guidelines allow for this? (I've been burned by this before, on a buggy

[PATCH][ARM/AArch64 Testsuite] Cleanup advsimd-intrinsics.exp, removing unnecessary loop

2015-05-28 Thread Alan Lawrence
I've tested this on aarch64, aarch64_be, and arm, and in all cases, the same tests are executed (whether running the whole advsimd-intrinsics.exp, or manually specifying a single file). AFAICT the loop, explicit runtest_file_p, and gcc_set_parallelization_enable, all stem from a point where we w

Re: [PATCH] Simple fix to enhance outer-loop vectorization.

2015-05-28 Thread Yuri Rumyantsev
Richard, First of all, I don't think that it is possible to write out test for outer-loop vectorization with zero-step reference because of possible loop-carried dependencies and run-time aliasing is not supported for outer-loop. If there are no such dependencies pre or pdse does hoisting (sinking

Re: [Ada] Avoid use of secondary stack

2015-05-28 Thread Eric Botcazou
> This patch avoids the use of the secondary stack, and the corresponding > cleanup handlers, in many cases. For example, access discriminants no > longer force functions to return on the secondary stack. This is a speed > improvement. It is particularly relevant to the Ada.Containers. It also unc

Re: [PATCH v3] libiberty: cleanup Makefile.in

2015-05-28 Thread Ian Lance Taylor
On Thu, May 28, 2015 at 1:57 AM, Bernhard Reutner-Fischer wrote: > > +stamp-pic-ofiles: $(CFILES:%=$(srcdir)/%) To the best of my knowledge, in POSIX make variable substitutions of this form do not recognize % specially. In POSIX make this kind of substitution can only be used to change the file

[Ada] Fix bogus Constraint_Error raised for Max_Size_In_Storage_Elements

2015-05-28 Thread Eric Botcazou
We raise bogus Constraint_Error for the Max_Size_In_Storage_Elements attribute applied to unconstrained array types and types derived from them. This very likely was introduced when sizetype was changed to unsigned. Tested on x86_64-suse-linux, applied on the mainline. 2015-05-28 Eric Botcaz

[Ada] Tidy up gnat_pushdecl

2015-05-28 Thread Eric Botcazou
And more precisely the block of code at the end responsible for setting the name of types and creating associated typedefs if necessary. Tested on x86_64-suse-linux, applied on the mainline. 2015-05-28 Eric Botcazou * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of ar

Re: [Patch, fortran, PR44672, v6] [F08] ALLOCATE with SOURCE and no array-spec

2015-05-28 Thread Andre Vehreschild
Hi Mikael, thanks for the comments so far. > I don't understand why one of your previous patches was factoring the > source expression evaluation to a temporary in gfc_trans_allocate, and > now with this patch you do the same thing in gfc_resolve_allocate, not > reusing the part in gfc_trans_allo

[gomp4, committed, PR65419] Add IFN_GOACC_DATA_END_WITH_ARG

2015-05-28 Thread Tom de Vries
Hi, this patch fixes PR65419. Consider this test-case: ... void f (void) { int i; #pragma acc data copyout (i) { } } ... When compiling the oacc data region, the start and end are marked with GOACC_data_start and GOACC_data_end: ... .omp_data_arr.1.i = &i; GOACC_data_start (-1, 1,

[Ada] Fix ICEs with function returning variable-sized type

2015-05-28 Thread Eric Botcazou
This fixes various cases of a common pattern that would result in an ICE in the gimplifier because it is trying to create a temporary of variable size. Tested on x86_64-suse-linux, applied on the mainline. 2015-05-28 Eric Botcazou * gcc-interface/gigi.h (gnat_stabilize_reference): A

Re: [PATCH] Don't combine param and return value copies

2015-05-28 Thread Segher Boessenkool
On Tue, May 26, 2015 at 04:37:46PM +0930, Alan Modra wrote: > On powerpc64le, modifying the way combine treats function parameters > and call arguments results in some regressions. > > For instance, this testcase from varasm.c > > extern int foo3 (void *, ...); > extern void foo4 (void *, const c

Re: [Patch]: libbacktrace - add support of PE/COFF

2015-05-28 Thread Ian Lance Taylor
On Thu, May 28, 2015 at 5:01 AM, Tristan Gingold wrote: > >> On 28 May 2015, at 02:26, Ian Lance Taylor wrote: > >> The #include will break cross-compilers. It's not OK for >> trunk until that is fixed. > > I am confused by this comment, for two reasons: > > - I don’t see how that would break c

Re: [gomp4] Preserve NVPTX "reconvergence" points

2015-05-28 Thread Jakub Jelinek
On Thu, May 28, 2015 at 04:49:43PM +0200, Thomas Schwinge wrote: > > I think much better would be to have a function attribute (or cgraph > > flag) that would be set for functions you want to compile this way > > (plus a targetm flag that the targets want to support it that way), > > plus a flag in

Re: [Patch, fortran] PR66079 - [6 Regression] memory leak with source allocation in internal subprogram

2015-05-28 Thread Andre Vehreschild
On Thu, 28 May 2015 16:58:44 +0200 Mikael Morin wrote: > Le 27/05/2015 23:09, Steve Kargl a écrit : > > On Wed, May 27, 2015 at 06:24:25PM +0200, Mikael Morin wrote: > >> Le 27/05/2015 16:07, Andre Vehreschild a ?crit : > >>> Hi Paul, hi Mikael, > >>> > >>> about renaming the identifier emitted:

Re: [Patch, fortran] PR66079 - [6 Regression] memory leak with source allocation in internal subprogram

2015-05-28 Thread Mikael Morin
Le 27/05/2015 23:09, Steve Kargl a écrit : > On Wed, May 27, 2015 at 06:24:25PM +0200, Mikael Morin wrote: >> Le 27/05/2015 16:07, Andre Vehreschild a ?crit : >>> Hi Paul, hi Mikael, >>> >>> about renaming the identifier emitted: I would like to keep it short. >>> Remember, >>> there is always a n

Re: [gomp4] Preserve NVPTX "reconvergence" points

2015-05-28 Thread Thomas Schwinge
Hi! On Thu, 28 May 2015 16:20:11 +0200, Jakub Jelinek wrote: > On Thu, May 28, 2015 at 03:06:35PM +0100, Julian Brown wrote: > > [...] > I think the lowering of this already at ompexp time is premature Yes, we're aware of this "wart". :-| > I think much better would be to have a function attr

Re: [patch] libstdc++/65352 fix ubsan errors in std::array

2015-05-28 Thread Jonathan Wakely
On 28/05/15 12:53 +0100, Jonathan Wakely wrote: Unsurprisingly ubsan doesn't like referencing a null pointer. With this change __array_traits::_S_ref is only used to access an element, which is invalid for std::array anyway. Tested powerpc64le-linux, committed to trunk. I forgot the debug and

Re: [gomp4] Preserve NVPTX "reconvergence" points

2015-05-28 Thread Richard Biener
On Thu, May 28, 2015 at 4:06 PM, Julian Brown wrote: > For NVPTX, it is vitally important that the divergence of threads > within a warp can be controlled: in particular we must be able to > generate code that we know "reconverges" at a particular point. > Unfortunately GCC's middle-end optimisers

Re: [gomp4] Preserve NVPTX "reconvergence" points

2015-05-28 Thread Jakub Jelinek
On Thu, May 28, 2015 at 03:06:35PM +0100, Julian Brown wrote: > For NVPTX, it is vitally important that the divergence of threads > within a warp can be controlled: in particular we must be able to > generate code that we know "reconverges" at a particular point. > Unfortunately GCC's middle-end op

Re: [patch] libstdc++/65352 fix ubsan errors in std::array

2015-05-28 Thread Jonathan Wakely
On 28/05/15 15:52 +0200, Marc Glisse wrote: On Thu, 28 May 2015, Jonathan Wakely wrote: Would there be a danger of an object compiled with gcc-5.1 that calls array::data() finding the _S_ref from an object compiled with gcc-5.2 and hitting the __builtin_unreachable in vali code? At -O0, maybe

Re: Do less generous pointer globbing in alias.c

2015-05-28 Thread Jan Hubicka
> > +alias_set_entry > > +init_alias_set_entry (alias_set_type set) > > +{ > > + alias_set_entry ase = ggc_cleared_alloc (); > > no need to use cleared_alloc if you also init ->is_pointer to false. OK, will update the patch. > > > + ase->alias_set = set; > > + ase->children > > += hash_map

Re: [PATCH] hppa-linux: add missing cpp specs

2015-05-28 Thread Mike Frysinger
On 27 May 2015 14:20, John David Anglin wrote: > On 2015-05-27 1:50 PM, Mike Frysinger wrote: > > since i'm not looped into gcc development normally, which branches are those > > currently ? naively reading gcc.gnu.org homepage makes me think none since > > they're labled "regression fixes" and af

[gomp4] Preserve NVPTX "reconvergence" points

2015-05-28 Thread Julian Brown
For NVPTX, it is vitally important that the divergence of threads within a warp can be controlled: in particular we must be able to generate code that we know "reconverges" at a particular point. Unfortunately GCC's middle-end optimisers can cause this property to be violated, which causes problems

[PATCH, libgomp, x86]: Optimize i386 futex_wake syscall

2015-05-28 Thread Uros Bizjak
Hello! This patch avoids unnecessary clearing of 4th argument for futex_wake syscall for 32bit targets. 2015-05-28 Uros Bizjak * config/linux/x86/futex.h (sys_futex0) [!__x86_64__]: Remove function. (futex_wait) [!__x86_64__]: Use __asm operand instead of sys_futex0. (futex_wake)

Re: backport the fixes of PR target/64011 and /61749 to 4.9 gcc

2015-05-28 Thread James Greenhalgh
On Wed, May 27, 2015 at 03:49:24AM +0100, weixiangyu wrote: > Hi, Hi, > The first patch backports the fix of PR > target/64011(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64011) to the 4.9 > branch from trunk r219717, I can't approve this patch to be backported, so please do not commit it witho

Re: Do less generous pointer globbing in alias.c

2015-05-28 Thread Richard Biener
On Thu, 28 May 2015, Jan Hubicka wrote: > Hi, > here is updated version of patch. It makes alias_set_subset_of to be > symmetric for > ptr_type_node and other pointer type and moves the logic of creating subsets > to get_alias_set. > > I tested that perlbmk works when built at -O3 x86_64 > >

Re: [patch] libstdc++/65352 fix ubsan errors in std::array

2015-05-28 Thread Marc Glisse
On Thu, 28 May 2015, Jonathan Wakely wrote: Would there be a danger of an object compiled with gcc-5.1 that calls array::data() finding the _S_ref from an object compiled with gcc-5.2 and hitting the __builtin_unreachable in vali code? At -O0, maybe. To be safe you would need to give this _S_r

PATCH: Mention --enable-default-pie in gcc-6/changes.html

2015-05-28 Thread H.J. Lu
OK to install? H.J. --- Index: gcc-6/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/changes.html,v retrieving revision 1.10 diff -u -p -r1.10 changes.html --- gcc-6/changes.html 26 May 2015 10:12:08 - 1.10 +++ gcc-

Re: [PATCH 13/14][ARM/AArch64 testsuite] Use gcc-dg-runtest in advsimd-intrinsics.exp

2015-05-28 Thread Alan Lawrence
Christophe Lyon wrote: So in fact, except for the comment about '-w' it seems you initial patch was mostly OK, right? Well, my removing a bunch of that c-torture-init stuff, was what was causing the "-Og -g" variant to go missing, but apart from that, yes. --Alan

Re: [patch] libstdc++/65352 fix ubsan errors in std::array

2015-05-28 Thread Jonathan Wakely
On 28/05/15 15:26 +0200, Marc Glisse wrote: On Thu, 28 May 2015, Jonathan Wakely wrote: Unsurprisingly ubsan doesn't like referencing a null pointer. With this change __array_traits::_S_ref is only used to access an element, which is invalid for std::array anyway. Should return *static_cast

Re: [patch] libstdc++/65352 fix ubsan errors in std::array

2015-05-28 Thread Jonathan Wakely
On 28/05/15 14:38 +0100, Jonathan Wakely wrote: On 28/05/15 15:26 +0200, Marc Glisse wrote: On Thu, 28 May 2015, Jonathan Wakely wrote: Unsurprisingly ubsan doesn't like referencing a null pointer. With this change __array_traits::_S_ref is only used to access an element, which is invalid for

Re: Do less generous pointer globbing in alias.c

2015-05-28 Thread Jan Hubicka
Hi, here is updated version of patch. It makes alias_set_subset_of to be symmetric for ptr_type_node and other pointer type and moves the logic of creating subsets to get_alias_set. I tested that perlbmk works when built at -O3 x86_64 Bootstrapped/regtested x86_64-linux, OK? Honza *

[PATCH][5/n] Reduction vectorization improvements

2015-05-28 Thread Richard Biener
The following patch fixes loop vectorization of SLP reduction chains that involve patterns. The issue here is that pattern recog runs after reduction detection and this screws things up. Re-ordering this created interesting side-effects so I didn't explore this further (for now) but instead fix

Re: [patch] libstdc++/65352 fix ubsan errors in std::array

2015-05-28 Thread Marc Glisse
On Thu, 28 May 2015, Jonathan Wakely wrote: Unsurprisingly ubsan doesn't like referencing a null pointer. With this change __array_traits::_S_ref is only used to access an element, which is invalid for std::array anyway. Should return *static_cast<_Tp*>(nullptr); be replaced with __builtin

[Ada] Avoid use of secondary stack

2015-05-28 Thread Arnaud Charlet
This patch avoids the use of the secondary stack, and the corresponding cleanup handlers, in many cases. For example, access discriminants no longer force functions to return on the secondary stack. This is a speed improvement. It is particularly relevant to the Ada.Containers. Tested on x86_64-pc

Re: acc_on_device for device_type_host_nonshm

2015-05-28 Thread Julian Brown
On Thu, 28 May 2015 04:48:58 -0700 "H.J. Lu" wrote: > On Thu, May 21, 2015 at 4:10 AM, Jakub Jelinek > wrote: > > On Thu, May 21, 2015 at 01:02:12PM +0200, Thomas Schwinge wrote: > >> Hi! > >> > >> On Thu, 7 May 2015 19:32:26 +0100, Julian Brown > >> wrote: > >> > Here's a new version of the pa

RE: [Patch MIPS] Enable TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS hook

2015-05-28 Thread Robert Suchanek
Hi Matthew, > > + > > +/* Implement TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS. */ > > + > > +static reg_class_t > > +mips_ira_change_pseudo_allocno_class (int regno, reg_class_t > > +allocno_class) { > > + if (FLOAT_MODE_P (PSEUDO_REGNO_MODE (regno)) || allocno_class != > > ALL_REGS) > > +retur

[Ada] Avoid use of secondary stack

2015-05-28 Thread Arnaud Charlet
This patch avoids the use of the secondary stack, and the corresponding cleanup handlers, in many cases. For example, access discriminants no longer force functions to return on the secondary stack. This is a speed improvement. It is particularly relevant to the Ada.Containers. Tested on x86_64-pc

Re: [PATCH 01/35] Introduce new type-based pool allocator.

2015-05-28 Thread Martin Liška
On 05/27/2015 07:44 PM, Jeff Law wrote: On 05/27/2015 07:56 AM, mliska wrote: Hello. Following patch set attempts to replace old-style pool allocator to a type-based one. Moreover, as we utilize classes and structs that are used just by a pool allocator, these types have overwritten ctors and

Re: [PATCH] Optimize (CST1 << A) == CST2 (PR tree-optimization/66299)

2015-05-28 Thread Richard Biener
On Thu, May 28, 2015 at 2:15 PM, Marek Polacek wrote: > This PR points out that we weren't able to optimize 1 << x == 2 to just > x == 1. This is my attempt to fix that: if we see (CST1 << A) == CST2 > and CST2 is a multiple of CST1, use log2 to get rid of the shift, but > only if the result of t

Re: [PATCH] Optimize (CST1 << A) == CST2 (PR tree-optimization/66299)

2015-05-28 Thread Jakub Jelinek
On Thu, May 28, 2015 at 02:15:45PM +0200, Marek Polacek wrote: > This PR points out that we weren't able to optimize 1 << x == 2 to just > x == 1. This is my attempt to fix that: if we see (CST1 << A) == CST2 > and CST2 is a multiple of CST1, use log2 to get rid of the shift, but > only if the res

Re: [patch] Rename template parameter of std::__alloc_rebind

2015-05-28 Thread Jonathan Wakely
On 01/05/15 16:23 +0100, Jonathan Wakely wrote: The name of this alias template is a copy&paste error, it should be _Alloc. Tested powerpc64le-linux, committed to trunk. Also committed to gcc-5-branch. commit a772309ec9fc300e57edd750fa32b8320d68004a Author: Jonathan Wakely Date: Fri May 1

Re: [patch] Make std::string default constructor conditionally noexcept

2015-05-28 Thread Jonathan Wakely
On 13/05/15 14:36 +0100, Jonathan Wakely wrote: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4383.html#2455 Voted into the WP in Lenexa. We already did the right thing for vector, so only basic_string needs to change. Tested powerpc64le-linux, committed to trunk. Also committed t

Re: [patch] libstdc++/65352 fix ubsan errors in std::array

2015-05-28 Thread Jonathan Wakely
On 28/05/15 12:53 +0100, Jonathan Wakely wrote: Unsurprisingly ubsan doesn't like referencing a null pointer. With this change __array_traits::_S_ref is only used to access an element, which is invalid for std::array anyway. Tested powerpc64le-linux, committed to trunk. And gcc-5-branch. co

Re: [PATCH v2] Handle OS X deployment targets correctly

2015-05-28 Thread Mike Stump
On May 20, 2015, at 2:57 PM, Lawrence Velázquez wrote: > 2015-05-15 Lawrence Velázquez > > PR target/63810 > * gcc/config/darwin-c.c (version_components): New global enum. > (parse_version, version_as_legacy_macro) > (version_as_modern_macro, macosx_version_as_macro): N

Re: [PATCH, RFC] New memory usage statistics infrastructure

2015-05-28 Thread Martin Liška
On 05/28/2015 01:15 PM, Thomas Schwinge wrote: Hi! On Fri, 15 May 2015 16:38:40 +0200, Martin Liška wrote: Following patch attempts to rewrite memory reports for GCC's internal allocations [...] (Got commtited to trunk in r223748.) * hash-map-traits.h: New file. In that one you

[PATCH] Optimize (CST1 << A) == CST2 (PR tree-optimization/66299)

2015-05-28 Thread Marek Polacek
This PR points out that we weren't able to optimize 1 << x == 2 to just x == 1. This is my attempt to fix that: if we see (CST1 << A) == CST2 and CST2 is a multiple of CST1, use log2 to get rid of the shift, but only if the result of the shift is a natural number (including zero). If CST2 is not

Re: [PATCH 13/14][ARM/AArch64 testsuite] Use gcc-dg-runtest in advsimd-intrinsics.exp

2015-05-28 Thread Christophe Lyon
On 28 May 2015 at 13:32, Christophe Lyon wrote: > On 28 May 2015 at 12:22, Alan Lawrence wrote: >> Christophe Lyon wrote: >>> >>> On 26 May 2015 at 18:25, Alan Lawrence wrote: I don't see this symptom - I am able to execute such subsets with either my, or Sandra's, advsimd-in

Re: [PATCH, RFC] fortran [was Re: #pragma GCC unroll support]

2015-05-28 Thread Mike Stump
On May 28, 2015, at 2:02 AM, Bernhard Reutner-Fischer wrote: > > Does anybody have a better suggestion? > > directive not at the start of a loop at %C > directive not followed by a loop at %C I prefer either of these. I have a slight preference for the first. > Mike, did you tweak the one or

  1   2   >