[PINGv7][PATCH] ASan on unaligned accesses

2015-05-20 Thread Marat Zakirov
On 05/12/2015 02:16 PM, Marat Zakirov wrote: On 04/07/2015 03:22 PM, Jakub Jelinek wrote: How are the automatic misaligned variables different from say heap allocated ones, or global vars etc.? No difference you are right Jakub. Shadow memory initialization for heap values and globals of cou

Re: [gomp4] bootstrap broken, function enclosing_target_ctx defined but not used

2015-05-20 Thread Thomas Schwinge
Hi! On Tue, 19 May 2015 09:24:51 +0200, Tom de Vries wrote: > On 18-05-15 17:31, Tom de Vries wrote: > > In ran into this bootstrap failure with branch gomp-4_0-branch: > > ... > > src/gcc-gomp-4_0-branch/gcc/omp-low.c:2897:1: error: 'omp_context* > > enclosing_target_ctx(omp_context*)' defined b

Re: [PATCH][Testsuite] Disable tests with dg-require-fork for simulated targets

2015-05-20 Thread Christophe Lyon
On 18 May 2015 at 20:25, Mike Stump wrote: > On May 18, 2015, at 8:01 AM, Alan Lawrence wrote: >> Simulators such as qemu report the presence of fork (it's in glibc) but >> generally do not support synchronization primitives between threads, so any >> tests using fork are unreliable. > > Hum, I

[PR c/52952] More precise locations within format strings

2015-05-20 Thread Manuel López-Ibáñez
This is a new version of the patch submitted here: https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00663.html but handling (some) escape sequences. I could not figure out a way to re-use the code from libcpp for this, thus I implemented a simple function that given a string and offset in bytes, it

Re: [patch,gomp4] error on invalid acc loop clauses

2015-05-20 Thread Thomas Schwinge
Hi! On Fri, 15 May 2015 11:10:21 -0700, Cesar Philippidis wrote: > This patch teaches the c and c++ front ends to error on invalid and > conflicting acc loop clauses. E.g., an acc loop cannot have 'gang seq' > and the worker and vector clauses inside parallel regions cannot have > optional kerne

Re: [Patch, fortran, pr65548, 2nd take, v5] [5/6 Regression] gfc_conv_procedure_call

2015-05-20 Thread Andre Vehreschild
Hi Mikael, when I got you right on IRC, then you proposed this change about the pointer attribute: diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 6d565ae..545f778 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -5361,6 +5361,7 @@ gfc_trans_allocate

Re: [match-and-simplify] fix incorrect code-gen in 'for' pattern

2015-05-20 Thread Richard Biener
On Wed, 20 May 2015, Prathamesh Kulkarni wrote: > On 19 May 2015 at 14:34, Richard Biener wrote: > > On Tue, 19 May 2015, Prathamesh Kulkarni wrote: > > > >> On 18 May 2015 at 20:17, Prathamesh Kulkarni > >> wrote: > >> > On 18 May 2015 at 14:12, Richard Biener wrote: > >> >> On Sat, 16 May 201

[PATCH, CHKP] Clean-up redundant gimple_build_nop calls

2015-05-20 Thread Ilya Enkovich
Hi, This patch removes redundant gimple_build_nop calls from tree-chkp.c. MPX-bootstrapped and regtested for x86_64-unknown-linux-gnu. Applied to trunk. Thanks, Ilya -- 2015-05-20 Ilya Enkovich * tree-chkp.c (chkp_maybe_copy_and_register_bounds): Remove useless gimple_build

Re: [patch,gomp4] error on invalid acc loop clauses

2015-05-20 Thread Jakub Jelinek
On Wed, May 20, 2015 at 10:23:21AM +0200, Thomas Schwinge wrote: > > + if (gwv && auto_clause) > > +c_parser_error (parser, "incompatible use of clause %"); > > + else if (gwv && seq_clause) > > +c_parser_error (parser, "incompatible use of clause %"); > > + else if (auto_clause && seq_c

Re: Cleanup and improve canonical type construction in LTO

2015-05-20 Thread Richard Biener
On Wed, 20 May 2015, Jan Hubicka wrote: > Richard, > this is my attempt to make sense of TYPE_CANONICAL at LTO. My undrestanding > is > that gimple_canonical_types_compatible_p needs to return true for all pairs of > types that are considered compatible across compilation unit for any of > langu

Re: Refactor gimple_expr_type

2015-05-20 Thread Richard Biener
On Tue, May 19, 2015 at 6:50 PM, Aditya K wrote: > > > >> Date: Tue, 19 May 2015 11:33:16 +0200 >> Subject: Re: Refactor gimple_expr_type >> From: richard.guent...@gmail.com >> To: hiradi...@msn.com >> CC: tbsau...@tbsaunde.org; gcc-patches@gcc.gnu.org >> >

RE: [PATCH] Fix PR66168: ICE due to incorrect invariant register info

2015-05-20 Thread Thomas Preud'homme
> From: Steven Bosscher [mailto:stevenb@gmail.com] > Sent: Tuesday, May 19, 2015 7:21 PM > > Not OK. > This will break in move_invariants() when it looks at REGNO (inv->reg). Indeed. I'm even surprised all tests passed. Ok I will just prevent moving in such a case. I'm running the tests now a

Re: ODR merging and implicit typedefs

2015-05-20 Thread Eric Botcazou
> I bootstrapped/regtested on x86_64-linux the patch bellow. If it will work > for Firefox and Chrome I will go ahead with it at least temporarily. Really? This introduced a LTO failure in the gnat.dg testsuite: FAIL: gnat.dg/lto8.adb (internal compiler error) FAIL: gnat.dg/lto8.adb (test for ex

Re: [patch,gomp4] error on invalid acc loop clauses

2015-05-20 Thread Thomas Schwinge
Hi! On Wed, 20 May 2015 10:43:27 +0200, Jakub Jelinek wrote: > On Wed, May 20, 2015 at 10:23:21AM +0200, Thomas Schwinge wrote: > > I see that some checking is also being done gcc/omp-low.c:scan_omp_for: > > »gang, worker and vector may occur only once in a loop nest«, and »gang, > > worker and v

[PATCH GCC]Improve how we handle overflow for type conversion in scev/ivopts, part I

2015-05-20 Thread Bin Cheng
Hi, As we know, GCC is too conservative when checking overflow behavior in SCEV and loop related optimizers. Result is some variable can't be recognized as scalar evolution and thus optimizations are missed. To be specific, optimizers like ivopts and vectorizer are affected. This issue is more se

Re: [patch,gomp4] error on invalid acc loop clauses

2015-05-20 Thread Jakub Jelinek
On Wed, May 20, 2015 at 11:32:20AM +0200, Thomas Schwinge wrote: > Hi! > > On Wed, 20 May 2015 10:43:27 +0200, Jakub Jelinek wrote: > > On Wed, May 20, 2015 at 10:23:21AM +0200, Thomas Schwinge wrote: > > > I see that some checking is also being done gcc/omp-low.c:scan_omp_for: > > > »gang, worke

[C PATCH] Use VAR_OR_FUNCTION_DECL_P

2015-05-20 Thread Marek Polacek
The following patch is an effort to use the macro where appropriate in c/ and c-family/ directories. No functional changes intended. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2015-05-20 Marek Polacek * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout. * c-common.

Re: miter_base simplification

2015-05-20 Thread Jonathan Wakely
On 03/05/15 22:19 +0200, François Dumont wrote: On 30/04/2015 13:18, Jonathan Wakely wrote: On 30/04/15 10:40 +0200, François Dumont wrote: On 27/04/2015 13:55, Jonathan Wakely wrote: (Alternatively, could the same simplification be made for __miter_base? Do we need _Miter_base<> or just two o

Re: [C PATCH] Use VAR_OR_FUNCTION_DECL_P

2015-05-20 Thread Jakub Jelinek
On Wed, May 20, 2015 at 12:01:21PM +0200, Marek Polacek wrote: > The following patch is an effort to use the macro where appropriate > in c/ and c-family/ directories. No functional changes intended. > > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2015-05-20 Marek Polacek > >

RE: [PATCH, MIPS]: Fix internal compiler error: in check_bool_attrs, at recog.c:2218 for micromips attribute

2015-05-20 Thread Matthew Fortune
> > We could add -mflip-micromips complementing -mflip-mips16 and use > > that for testing too. Chances are it'd reveal further issues. > > Looking at how > > -mflip-mips16 has been implemented it does not appear to me adding > > -mflip-micromips would be a lot of effort. > > I'm in favour of ad

Re: Demangle symbols in debug assertion messages

2015-05-20 Thread Jonathan Wakely
On 04/05/15 22:31 +0200, François Dumont wrote: Hi Here is the patch to demangle symbols in debug messages. I have also simplify code in formatter.h. Here is an example of assertion message: /home/fdt/dev/gcc/build/x86_64-unknown-linux-gnu/libstdc++-v3/include/debug/functions.h:213:

Re: Demangle symbols in debug assertion messages

2015-05-20 Thread Jonathan Wakely
On 20/05/15 11:17 +0100, Jonathan Wakely wrote: On 04/05/15 22:31 +0200, François Dumont wrote: Hi Here is the patch to demangle symbols in debug messages. I have also simplify code in formatter.h. Here is an example of assertion message: /home/fdt/dev/gcc/build/x86_64-unknown-linux-gn

RE: [PATCH, MIPS]: Fix internal compiler error: in check_bool_attrs, at recog.c:2218 for micromips attribute

2015-05-20 Thread Robert Suchanek
> > gcc/ > > * config/mips/mips.h (micromips_globals): Declare. > > OK, thanks. > > Matthew Committed as r223438. Robert

[AArch64] Implement -fpic for -mcmodel=small

2015-05-20 Thread Jiong Wang
Currently, AArch64 don't differentiate -fpic and -fPIC. For -mcmodel=small, both allow 4G GOT table size, then we always need two instructions to address GOT entry. This patch implements -fpic for -mcmodel=small which allow 32K GOT table size, smaller than -fPIC, but then we can use one instruct

[match-and-simplify] reject expanding operator-list to implicit 'for'

2015-05-20 Thread Prathamesh Kulkarni
Hi, This patch rejects expanding operator-list to implicit 'for'. OK for trunk after bootstrap+testing ? Thanks, Prathamesh 2015-05-20 Prathamesh Kulkarni * genmatch.c (parser::record_operlist): Remove. (parser::oper_lists_set): Likewise. (parser::oper_lists): Likewise.

[committed] Use DECL_P more

2015-05-20 Thread Marek Polacek
Use DECL_P where appropriate. No functional changes. Bootstrapped/regtested on x86_64-linux, applying to trunk. 2015-05-20 Marek Polacek * gimple-fold.c (fold_const_aggregate_ref_1): Use DECL_P. * gimplify.c (gimplify_modify_expr_rhs): Likewise. * c-ada-spec.c (dump_

[committed] Use COMPARISON_CLASS_P more

2015-05-20 Thread Marek Polacek
Use COMPARISON_CLASS_P where appropriate. No functional changes. Bootstrapped/regtested on x86_64-linux, applying to trunk. 2015-05-20 Marek Polacek * expr.c (expand_cond_expr_using_cmove): Use COMPARISON_CLASS_P. * gimple-expr.c (gimple_cond_get_ops_from_tree): Likewise.

[committed] Use *NARY_CLASS_P more

2015-05-20 Thread Marek Polacek
No functional changes. Bootstrapped/regtested on x86_64-linux, applying to trunk. 2015-05-20 Marek Polacek * cfgexpand.c (expand_debug_expr): Use UNARY_CLASS_P. * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P. diff --git gcc/c-family/c-omp.c gcc/c-family/c-omp.c inde

Re: [match-and-simplify] reject expanding operator-list to implicit 'for'

2015-05-20 Thread Prathamesh Kulkarni
On 20 May 2015 at 16:17, Prathamesh Kulkarni wrote: > Hi, > This patch rejects expanding operator-list to implicit 'for'. On second thoughts, should we reject expansion of operator-list _only_ if it's mixed with 'for' ? We could define multiple operator-lists in simplify to be the same as enclosin

[AArch64][TLSLE][1/N] Rename SYMBOL_SMALL_TPREL to SYMBOL_TLSLE

2015-05-20 Thread Jiong Wang
For AArch64, TLS local-exec mode for all memory model (tiny/small/large) is actually the same. TLS LE Instruction generation depends on how big tls section is instead of the memory model used. The four instruction sequences we can implement based on relocations provided: sequence 1 ==

[AArch64][TLSLE][2/N] Rename "tlsle_small" to "tlsle"

2015-05-20 Thread Jiong Wang
Similar to the rename from SYMBOL_SMALL_TPREL to SYMBOL_TLSLE, this patch rename the rtl pattern name. ok for trunk? 2015-05-19 Jiong Wang gcc/ * config/aarch64/aarch64.md (tlsle_small): Rename to tlsle. (tlsle_small_): Rename to tlsle_. * config/aarc64/aarch64.c (aarch64_load_symref_ap

Re: [match-and-simplify] reject expanding operator-list to implicit 'for'

2015-05-20 Thread Richard Biener
On Wed, 20 May 2015, Prathamesh Kulkarni wrote: > Hi, > This patch rejects expanding operator-list to implicit 'for'. > OK for trunk after bootstrap+testing ? Ok. Thanks, Richard.

Re: [match-and-simplify] reject expanding operator-list to implicit 'for'

2015-05-20 Thread Richard Biener
On Wed, 20 May 2015, Prathamesh Kulkarni wrote: > On 20 May 2015 at 16:17, Prathamesh Kulkarni > wrote: > > Hi, > > This patch rejects expanding operator-list to implicit 'for'. > On second thoughts, should we reject expansion of operator-list _only_ > if it's mixed with 'for' ? At least that, y

[AArch64][TLSLE][3/N] Add UNSPEC_TLSLE

2015-05-20 Thread Jiong Wang
Add new unspec name UNSPEC_TLSLE, use it for all tlsle pattern. ok for trunk? 2015-05-19 Jiong Wang gcc/ * config/aarch64/aarch64.md (UNSPEC_TLSLE): New enumeration. (tlsle): Use new unspec name. (tlsle_): Ditto. -- Regards, Jiong diff --git a/gcc/config/aarch64/aarch64.md b/gcc/c

[PATCH][AArch64][obvious] In aarch64_class_max_nregs use UNITS_PER_VREG and UNITS_PER_WORD

2015-05-20 Thread Kyrill Tkachov
Hi all, This patch replaces 15, 16, 7 and 8 in aarch64_class_max_nregs with the macro that they represent. This should make the logic of that function easier to understand. Bootstrapped and tested on aarch64. Applying as obvious. 2015-05-20 Kyrylo Tkachov * config/aarch64/aarch64.c (aa

[gomp4] New builtins, preparation for oacc vector-single

2015-05-20 Thread Bernd Schmidt
To implement OpenACC vector-single mode, we need to ensure that only one thread out of the group representing a worker executes. The others skip computations but follow along the CFG, so the results of conditional branch decisions must be broadcast to them. The patch below adds a new builtin a

Re: [match-and-simplify] reject expanding operator-list to implicit 'for'

2015-05-20 Thread Prathamesh Kulkarni
On 20 May 2015 at 17:01, Richard Biener wrote: > On Wed, 20 May 2015, Prathamesh Kulkarni wrote: > >> On 20 May 2015 at 16:17, Prathamesh Kulkarni >> wrote: >> > Hi, >> > This patch rejects expanding operator-list to implicit 'for'. >> On second thoughts, should we reject expansion of operator-li

Re: [PATCH i386] Allow sibcalls in no-PLT PIC

2015-05-20 Thread Michael Matz
Hi, On Tue, 19 May 2015, Richard Henderson wrote: > It is. The relaxation that HJ is working on requires that the reads > from the got not be hoisted. I'm not especially convinced that what > he's working on is a win. > > With LTO, the compiler can do the same job that he's attempting in the

Re: [PATCH 3/4] split-stack for powerpc64

2015-05-20 Thread Lynn A. Boger
On 05/19/2015 07:52 PM, Alan Modra wrote: On Tue, May 19, 2015 at 07:40:15AM -0500, Lynn A. Boger wrote: Questions on the use of the options for split stack: - The way this is implemented, split stack is generated if the target platform supports split stack, on ppc64/ppc64le as well as on x86

[gomp4] Unidirectional branches for nvptx

2015-05-20 Thread Bernd Schmidt
This adds functionality to the nvptx backend to emit uni-directional branches. The idea is to recognize the previously introduced warp-broadcast pattern; we know that its result is constant across an entire warp of threads, so any value based on that result has the same property. If a jump cond

Re: [PATCH i386] Allow sibcalls in no-PLT PIC

2015-05-20 Thread H.J. Lu
On Wed, May 20, 2015 at 5:10 AM, Michael Matz wrote: > Hi, > > On Tue, 19 May 2015, Richard Henderson wrote: > >> It is. The relaxation that HJ is working on requires that the reads >> from the got not be hoisted. I'm not especially convinced that what >> he's working on is a win. >> >> With LTO

Re: [gomp4] New builtins, preparation for oacc vector-single

2015-05-20 Thread Jakub Jelinek
On Wed, May 20, 2015 at 02:01:44PM +0200, Bernd Schmidt wrote: > To implement OpenACC vector-single mode, we need to ensure that only one > thread out of the group representing a worker executes. The others skip > computations but follow along the CFG, so the results of conditional branch > decisio

Re: [match-and-simplify] reject expanding operator-list to implicit 'for'

2015-05-20 Thread Richard Biener
On Wed, 20 May 2015, Prathamesh Kulkarni wrote: > On 20 May 2015 at 17:01, Richard Biener wrote: > > On Wed, 20 May 2015, Prathamesh Kulkarni wrote: > > > >> On 20 May 2015 at 16:17, Prathamesh Kulkarni > >> wrote: > >> > Hi, > >> > This patch rejects expanding operator-list to implicit 'for'. >

Re: [PATCH 3/4] split-stack for powerpc64

2015-05-20 Thread David Edelsohn
On Wed, May 20, 2015 at 8:13 AM, Lynn A. Boger wrote: > > > On 05/19/2015 07:52 PM, Alan Modra wrote: >> >> On Tue, May 19, 2015 at 07:40:15AM -0500, Lynn A. Boger wrote: >>> >>> Questions on the use of the options for split stack: >>> >>> - The way this is implemented, split stack is generated if

[AArch64] PR 63521. define REG_ALLOC_ORDER/HONOR_REG_ALLOC_ORDER

2015-05-20 Thread Jiong Wang
Current IRA still use both target macros in a few places. Tell IRA to use the order we defined rather than with it's own cost calculation. Allocate caller saved first, then callee saved. This is especially useful for LR/x30, as it's free to allocate and is pure caller saved when used in leaf func

Re: [PATCH 1/4] rs6000_stack_info changes for -fsplit-stack

2015-05-20 Thread David Edelsohn
On Tue, May 19, 2015 at 9:09 PM, Alan Modra wrote: > On Mon, May 18, 2015 at 02:05:59PM -0400, David Edelsohn wrote: >> On Sun, May 17, 2015 at 10:54 PM, Alan Modra wrote: >> > This patch changes rs6000_stack_info to keep save areas offsets even >> > when not used. I need lr_save_offset valid fo

Re: [PATCH, C, ARM] PING c-family builtin export + attribute target (thumb,arm) [2.1/6] respin (5th)

2015-05-20 Thread Jeff Law
On 05/20/2015 01:19 AM, Christian Bruel wrote: Hi, Could a global reviewer have a look at the c-family part ?, this is blocking for the TARGET_CPU_CPP_BUILTINS macro redefinition in C (arm but probably others) https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01185.html The c-family bits are OK. S

Re: [match-and-simplify] reject expanding operator-list to implicit 'for'

2015-05-20 Thread Prathamesh Kulkarni
On 20 May 2015 at 18:18, Richard Biener wrote: > On Wed, 20 May 2015, Prathamesh Kulkarni wrote: > >> On 20 May 2015 at 17:01, Richard Biener wrote: >> > On Wed, 20 May 2015, Prathamesh Kulkarni wrote: >> > >> >> On 20 May 2015 at 16:17, Prathamesh Kulkarni >> >> wrote: >> >> > Hi, >> >> > This

Re: [Patch, fortran, pr65548, 2nd take, v5] [5/6 Regression] gfc_conv_procedure_call

2015-05-20 Thread Mikael Morin
Le 20/05/2015 10:24, Andre Vehreschild a écrit : > Hi Mikael, > > when I got you right on IRC, then you proposed this change about the pointer > attribute: > > diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c > index 6d565ae..545f778 100644 > --- a/gcc/fortran/trans-stmt.c > +++ b

Re: [PATCH 1/4] rs6000_stack_info changes for -fsplit-stack

2015-05-20 Thread Alan Modra
On Wed, May 20, 2015 at 09:02:40AM -0400, David Edelsohn wrote: > On Tue, May 19, 2015 at 9:09 PM, Alan Modra wrote: > > On Mon, May 18, 2015 at 02:05:59PM -0400, David Edelsohn wrote: > >> On Sun, May 17, 2015 at 10:54 PM, Alan Modra wrote: > >> > This patch changes rs6000_stack_info to keep sav

RE: Refactor gimple_expr_type

2015-05-20 Thread Aditya K
> Date: Wed, 20 May 2015 11:11:52 +0200 > Subject: Re: Refactor gimple_expr_type > From: richard.guent...@gmail.com > To: hiradi...@msn.com > CC: tbsau...@tbsaunde.org; gcc-patches@gcc.gnu.org > > On Tue, May 19, 2015 at 6:50 PM, Aditya K wrote: >> >> >>

Re: [PR c/52952] More precise locations within format strings

2015-05-20 Thread Jeff Law
On 05/20/2015 02:15 AM, Manuel López-Ibáñez wrote: This is a new version of the patch submitted here: https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00663.html but handling (some) escape sequences. I could not figure out a way to re-use the code from libcpp for this, thus I implemented a simple

Re: [PATCH][tree-ssa-math-opts] Expand pow (x, CONST) using square roots when possible

2015-05-20 Thread Kyrill Tkachov
On 18/05/15 11:32, Richard Biener wrote: On Wed, May 13, 2015 at 5:33 PM, Kyrill Tkachov wrote: Hi Richard, On 13/05/15 12:27, Richard Biener wrote: I notice that we don't have a testuite check that the target has a hw sqrt instructions. Would you like me to add one? Or can I make the testc

Re: [gomp4] New builtins, preparation for oacc vector-single

2015-05-20 Thread Bernd Schmidt
On 05/20/2015 02:39 PM, Jakub Jelinek wrote: On Wed, May 20, 2015 at 02:01:44PM +0200, Bernd Schmidt wrote: To implement OpenACC vector-single mode, we need to ensure that only one thread out of the group representing a worker executes. The others skip computations but follow along the CFG, so t

Re: [PATCH] Simple optimization for MASK_STORE.

2015-05-20 Thread Yuri Rumyantsev
Hi All, Here is updated patch to optimize mask stores. The main goal of it is to avoid execution of mask store if its mask is zero vector since loads that follow it can be blocked. The following changes were done: 1. A test on sink legality was added - it simply prohibits to cross statements wi

[Patch AArch64] PR target/66200 - gcc / libstdc++ TLC for weak memory models.

2015-05-20 Thread Ramana Radhakrishnan
Hi, Someone privately pointed out that the ARM and AArch64 ports do not define TARGET_RELAXED_ORDERING given that the architecture(s) mandates a weak memory model. This patch fixes it for AArch64, the ARM patch follows in due course after appropriate testing. I will also note that we can de

Re: [PATCH i386] Allow sibcalls in no-PLT PIC

2015-05-20 Thread Rich Felker
On Wed, May 20, 2015 at 02:10:41PM +0200, Michael Matz wrote: > Hi, > > On Tue, 19 May 2015, Richard Henderson wrote: > > > It is. The relaxation that HJ is working on requires that the reads > > from the got not be hoisted. I'm not especially convinced that what > > he's working on is a win.

Re: [patch,gomp4] error on invalid acc loop clauses

2015-05-20 Thread Cesar Philippidis
On 05/20/2015 01:23 AM, Thomas Schwinge wrote: >> I included two new test cases in this patch. They are mostly identical >> but, unfortunately, the c and c++ front ends emit slightly different >> error messages. > > The preference is to keep these as single files (so that C and C++ can > easily b

Re: [PATCH i386] Allow sibcalls in no-PLT PIC

2015-05-20 Thread Michael Matz
Hi, On Wed, 20 May 2015, Rich Felker wrote: > > of a win that often, outside toy examples. Sure, the compiler can hoist > > function addresses trivially, but I think it will lead to spilling more > > often than not, or alternatively the hoisting will be undone by the > > register allocators r

Re: [patch,gomp4] error on invalid acc loop clauses

2015-05-20 Thread Jakub Jelinek
On Wed, May 20, 2015 at 07:17:35AM -0700, Cesar Philippidis wrote: > > ..., and this: why not do such nesting checking in > > gcc/omp-low.c:check_omp_nesting_restrictions? Currently (changed by > > Bernd in internal r442824, 2014-11-29) we're allowing all > > OpenACC-inside-OpenACC nesting -- shou

Re: ODR merging and implicit typedefs

2015-05-20 Thread Jan Hubicka
> > I bootstrapped/regtested on x86_64-linux the patch bellow. If it will work > > for Firefox and Chrome I will go ahead with it at least temporarily. > > Really? This introduced a LTO failure in the gnat.dg testsuite: > > FAIL: gnat.dg/lto8.adb (internal compiler error) > FAIL: gnat.dg/lto8.ad

Re: [PATCH] Fix memory leak in C++ pretty printer

2015-05-20 Thread Jason Merrill
On 05/11/2015 02:01 PM, Jason Merrill wrote: On 05/11/2015 12:57 PM, Jason Merrill wrote: On 05/11/2015 08:03 AM, Manuel López-Ibáñez wrote: My preference would be to replace the static with a pointer and placement-new with proper new and delete Actually, on second thought, there really doesn

Re: [Patch, fortran, pr65548, 2nd take, v5] [5/6 Regression] gfc_conv_procedure_call

2015-05-20 Thread Andre Vehreschild
Hi all, Mikael, thanks for the review. Committed as r223445 (without the else-branch). Regards, Andre -- Andre Vehreschild * Email: vehre ad gmx dot de Index: gcc/fortran/ChangeLog === --- gcc/fortran/ChangeLog (Revision 22

Re: [C++17] Implement N3928 - Extending static_assert

2015-05-20 Thread Jason Merrill
On 05/02/2015 04:16 PM, Ed Smith-Rowland wrote: This extends' static assert to not require a message string. I elected to make this work also for C++11 and C++14 and warn only with -pedantic. I think many people just write static_assert(thing, ""); . I took the path of building an empty strin

[PATCH] -Wmisleading-indentation: Increase test coverage

2015-05-20 Thread David Malcolm
Add various new tests to Wmisleading-indentation.c: * Ensure that users can use pragma to turn off -Wmisleading-indentation for a range of code. * Add functions demonstrating a variety of indentation styles seen: (a) on http://en.wikipedia.org/wiki/Indent_style (b) via t

Re: [PATCH] -Wmisleading-indentation: Increase test coverage

2015-05-20 Thread Jeff Law
On 05/20/2015 09:43 AM, David Malcolm wrote: Add various new tests to Wmisleading-indentation.c: * Ensure that users can use pragma to turn off -Wmisleading-indentation for a range of code. * Add functions demonstrating a variety of indentation styles seen: (a) on http:/

Re: [PATCH 3/4] split-stack for powerpc64

2015-05-20 Thread Lynn A. Boger
Anytime go code built with gccgo is linked against libraries built with gcc (without split stack) there could be mixing of split stack and non split stack code. I think that will be a common case. My understanding is that if you don't use the gold linker in these cases, it is possible that the a

[obvious fix] fix off-by-one error when printing the caret character

2015-05-20 Thread Manuel López-Ibáñez
It seems I made an off-by-one error in my last patch for multiple locations. This only affected the position of the caret character, which we don't test (since the testsuite uses -fno-diagnostics-show-caret). Fixed thusly and added a comment to remind me and others that locations start at 1, but we

Re: [PATCH] 65479 - sanitizer stack trace missing frames past #0 on powerpc64

2015-05-20 Thread Jeff Law
On 04/20/2015 04:32 PM, Martin Sebor wrote: I also wonder if other targets need -fasynchronous-unwind-tables and whether or not we should just add it unconditionally. I initially only tested powerpc64* and x86_64. I had tried s370 but asan doesn't appear to be built there (is it not supported?)

Re: [PR c/52952] More precise locations within format strings

2015-05-20 Thread Manuel López-Ibáñez
On 20 May 2015 at 15:33, Jeff Law wrote: > So if I'm understanding the situation correctly, with this new version > behaviour for non-concatenated tokens is preserved which was the only > behaviour regression in the prior patch, right? The new version will also handle most escape sequences correc

Re: [PR c/52952] More precise locations within format strings

2015-05-20 Thread Jeff Law
On 05/20/2015 10:08 AM, Manuel López-Ibáñez wrote: I don't particularly like file scoped "offset_is_invalid" variable. It appears that it's only set within check_format_arg, but it's used from a variety of other locations via location_from_offset. Given the current structure of the code, alte

Re: [PATCH v2 6/6] i386: Implement asm flag outputs

2015-05-20 Thread Jeff Law
On 05/15/2015 09:37 AM, Richard Henderson wrote: Version 2 includes proper test cases and documentation. Hopefully the documentation even makes sense. Suggestions and improvements there gratefully appreciated. r~ --- gcc/config/i386/constraints.md | 5 ++ gcc/config/i386/i386.

Re: [PATCH v2 6/6] i386: Implement asm flag outputs

2015-05-20 Thread H. Peter Anvin
Well, these kinds of asm are inherently target specific, but I did already ask for a cpp symbol to indicate this faculty us available. On May 20, 2015 9:21:07 AM PDT, Jeff Law wrote: >On 05/15/2015 09:37 AM, Richard Henderson wrote: >> Version 2 includes proper test cases and documentation. >> H

Re: [PATCH] Fix PR target/65730

2015-05-20 Thread augustine.sterl...@gmail.com
On Tue, May 19, 2015 at 8:31 PM, Max Filippov wrote: > 2015-05-20 Max Filippov > gcc/ > * config/xtensa/xtensa.c (init_alignment_context): Replace MULT > by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_PER_UNIT). Approved, please apply.

Fix two more memory leaks in threader

2015-05-20 Thread Jeff Law
These fix the remaining leaks in the threader that I'm aware of. We failed to properly clean-up when we had to cancel certain jump threading opportunities. So thankfully this wasn't a big leak. Bootstrapped and regression tested on x86_64-unknown-linux-gnu. Installed on the trunk. Jeff d

Re: Fix two more memory leaks in threader

2015-05-20 Thread Jakub Jelinek
On Wed, May 20, 2015 at 10:36:25AM -0600, Jeff Law wrote: > > These fix the remaining leaks in the threader that I'm aware of. We failed > to properly clean-up when we had to cancel certain jump threading > opportunities. So thankfully this wasn't a big leak. > > Bootstrapped and regression tes

[PATCH] PR c/66220: Fix false positive from -Wmisleading-indentation

2015-05-20 Thread David Malcolm
This patch fixes the false positive seen from -Wmisleading-indentation on this code: if (v == 2) { res = 27; } else { res = 18; } return res; ^ FALSE POSITIVE HERE along with similar code seen when I tested it with linux-4.0.3. The patch adds a reject

[patch] testsuite enable PIE tests on FreeBSD

2015-05-20 Thread Andreas Tobler
Hi, the attached patch enables some PIE tests on FreeBSD. Ok for trunk? Thanks, Andreas 2015-05-20 Andreas Tobler * gcc.target/i386/pr32219-1.c: Enable test on FreeBSD. * gcc.target/i386/pr32219-2.c: Likewise. * gcc.target/i386/pr32219-3.c: Likewise. * gcc.t

[patch] libstdc++/66078 __make_move_if_noexcept_iterator should return a constant iterator or a move iterator

2015-05-20 Thread Jonathan Wakely
As discussed in the thread starting at https://gcc.gnu.org/ml/libstdc++/2014-05/msg00027.html when __make_move_if_noexcept_iterator decides not to move it returns a mutable iterator, which can then result in the wrong constructor being used. This ensures that when not moving we will get a pointer-

RFA: PATCH to use -std=c++98 in stage 1 of bootstrap

2015-05-20 Thread Jason Merrill
I want to explicitly pass -std=c++98 to the compiler used in building stage 1. Does this seem like the right way to do that? Tested x86_64-pc-linux-gnu. commit 97e77ef17e558cdb6d26d440e691fea710e2a2dc Author: Jason Merrill Date: Mon May 18 23:58:41 2015 -0400 * configure.ac: Add -std=c

Re: [PATCH v2 6/6] i386: Implement asm flag outputs

2015-05-20 Thread Richard Henderson
On 05/20/2015 09:21 AM, Jeff Law wrote: > What I don't see is any way to know if the target supports asm flag outputs. > Are we expecting the kernel folks to do some kind of test then enable/disable > based on the result? I'd forgotten that we'd talked about a cpp symbol. I'll add that. r~

Re: [v3 patch] Fix some Filesystem TS operations

2015-05-20 Thread Jonathan Wakely
On 15/05/15 19:37 +0100, Jonathan Wakely wrote: Testing revealed a few bugs in how I handled paths that don't exist. The new __gnu_test::nonexistent_path() function is a bit hacky but should be good enough for the testsuite. This makes it even hackier but avoids linker warnings for using the ev

[PATCH] [PATCH][ARM] Fix sibcall testcases.

2015-05-20 Thread Alex Velenko
Hi, This patch prevents arm_thumb1_ok XPASS in sibcall-3.c and sibcall-4.c testcases. Sibcalls are not ok for Thumb1 and testcases need to be fixed. Is patch ok? gcc/testsuite 2015-05-20 Alex Velenko * gcc.dg/sibcall-3.c (dg-skip-if): Skip if arm_thumb1_ok. * gcc.dg/sibcall-

Re: [PATCH/libiberty] fix build of gdb/binutils with clang.

2015-05-20 Thread Yunlian Jiang
I have the following change to make libiberty compile with _GNU_SOURCE defined and remove the declaration of asprintf in libiberty.h if HAVE_DECL_ASPRINTF is not defined. diff --git a/include/libiberty.h b/include/libiberty.h index b33dd65..8e096a0 100644 --- a/include/libiberty.h +++ b/include/li

[PATCH] [PATCH][ARM] Fix split-live-ranges-for-shrink-wrap.c testcase.

2015-05-20 Thread Alex Velenko
Hi, This patch limits testcase split-live-ranges-for-shrink-wrap.c runs to supported achitecture versions. Object size with -march=armv4t check fails because pop pc is not interworking safe on armv4t. This test is not supported for -march=armv7 as this test is for thumb1. Is patch ok? gcc/testsu

[PATCH] PR target/66224 _GLIBC_READ_MEM_BARRIER

2015-05-20 Thread David Edelsohn
The current definition of _GLIBC_READ_MEM_BARRIER in libstdc++ is too weak for an ACQUIRE FENCE, which is what it is intended to be. The original code emitted an "isync" instead of "lwsync". All of the guard acquire and set code needs to be cleaned up to use GCC atomic intrinsics, but this is nece

Re: [PATCH] Fix PR target/65730

2015-05-20 Thread Max Filippov
On Wed, May 20, 2015 at 7:36 PM, augustine.sterl...@gmail.com wrote: > On Tue, May 19, 2015 at 8:31 PM, Max Filippov wrote: >> 2015-05-20 Max Filippov >> gcc/ >> * config/xtensa/xtensa.c (init_alignment_context): Replace MULT >> by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_

Re: [patch 3/10] debug-early merge: C++ front-end

2015-05-20 Thread Jason Merrill
On 05/08/2015 09:14 PM, Aldy Hernandez wrote: + if (!flag_syntax_only) +c_parse_final_cleanups (); The condition is a significant change of behavior for the C++ front end; doing final instantiation and such even with -fsyntax-only was a deliberate choice. Can we drop the condition? +

Re: Demangle symbols in debug assertion messages

2015-05-20 Thread François Dumont
On 20/05/2015 12:19, Jonathan Wakely wrote: On 20/05/15 11:17 +0100, Jonathan Wakely wrote: On 04/05/15 22:31 +0200, François Dumont wrote: Hi Here is the patch to demangle symbols in debug messages. I have also simplify code in formatter.h. Here is an example of assertion message: /h

Re: Fwd: Re: [PATCH, RFC]: Next stage1, refactoring: propagating rtx subclasses

2015-05-20 Thread Mikhail Maltsev
On 05/20/2015 12:28 AM, Jeff Law wrote: > Yes, this is OK for the trunk. Please commit. > > jeff Applied to trunk (revision 223454). -- Regards, Mikhail Maltsev

[PATCH] Contribute FreeBSD unwind support (x86_64 and x86)

2015-05-20 Thread John Marino
I have maintained unwind support for FreeBSD i386 and x86_64 in my "gnat-aux" repository for many years (I created it). I've always intended on contributing it back to GCC, but I never got around to "proving" it worked until now. The version I've been using actually has two flavors: FreeBSD 8 and

Re: [PATCH/libiberty] fix build of gdb/binutils with clang.

2015-05-20 Thread Ian Lance Taylor
This is OK if GCC bootstraps. Thanks. Ian On Wed, May 20, 2015 at 11:25 AM, Yunlian Jiang wrote: > I have the following change to make libiberty compile with _GNU_SOURCE defined > and remove the declaration of asprintf in libiberty.h if > HAVE_DECL_ASPRINTF is not > defined. > > diff --git a/in

Re: [PATCH] [PATCH][ARM] Fix sibcall testcases.

2015-05-20 Thread Joseph Myers
On Wed, 20 May 2015, Alex Velenko wrote: > Hi, > > This patch prevents arm_thumb1_ok XPASS in sibcall-3.c and sibcall-4.c > testcases. Sibcalls are not ok for Thumb1 and testcases need to be fixed. arm_thumb1_ok means "this is an ARM target where -mthumb causes Thumb-1 to be used". It only eve

Re: [PATCH] [PATCH][ARM] Fix split-live-ranges-for-shrink-wrap.c testcase.

2015-05-20 Thread Joseph Myers
On Wed, 20 May 2015, Alex Velenko wrote: > Hi, > > This patch limits testcase split-live-ranges-for-shrink-wrap.c runs to > supported achitecture versions. > Object size with -march=armv4t check fails because pop pc is not interworking > safe on armv4t. > This test is not supported for -march=arm

Re: [PATCH] Contribute FreeBSD unwind support (x86_64 and x86)

2015-05-20 Thread Andreas Tobler
On 20.05.15 21:49, John Marino wrote: I have maintained unwind support for FreeBSD i386 and x86_64 in my "gnat-aux" repository for many years (I created it). I've always intended on contributing it back to GCC, but I never got around to "proving" it worked until now. The version I've been using

Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-20 Thread Jeff Law
On 05/20/2015 11:04 AM, Andreas Tobler wrote: Hi, the attached patch enables some PIE tests on FreeBSD. Ok for trunk? Thanks, Andreas 2015-05-20 Andreas Tobler * gcc.target/i386/pr32219-1.c: Enable test on FreeBSD. * gcc.target/i386/pr32219-2.c: Likewise. * gcc.target/i386/

Re: [PATCH] PR c/66220: Fix false positive from -Wmisleading-indentation

2015-05-20 Thread Jeff Law
On 05/20/2015 11:05 AM, David Malcolm wrote: This patch fixes the false positive seen from -Wmisleading-indentation on this code: if (v == 2) { res = 27; } else { res = 18; } return res; ^ FALSE POSITIVE HERE along with similar code seen when

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

2015-05-20 Thread Aldy Hernandez
How does this version, which has been committed to the debug-early branch, look? One more thing Richi. I merged trunk into the branch once again, and Go broke. I tracked it down to a temporary that was being created late that IMO shouldn't even get debug info. The fact that it gets creat

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

2015-05-20 Thread Jan Hubicka
> > commit 8824b5ecba26cef065e47b34609c72677c3c36fc > Author: Aldy Hernandez > Date: Wed May 20 16:31:14 2015 -0400 > > Set DECL_IGNORED_P on temporary arrays created in the switch > conversion pass. > > diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c > index

Re: PING^3: [PATCH]: New configure options that make the compiler use -fPIE and -pie as default option

2015-05-20 Thread Joseph Myers
On Tue, 19 May 2015, H.J. Lu wrote: > Here is the complete patch. Tested on Linux/x86-64. It is also > available on hjl/pie/master branch in git mirror. OK a week after you CC all relevant target maintainers on the patch, in the absence of objections from those target maintainers. -- Joseph

  1   2   >