[C++ Patch] Fix some simple location issues​ (2)

2016-06-10 Thread Paolo Carlini
Hi, yesterday I noticed a case, a variant of testcase array43.C which I had just committed, where using EXPR_LOR_OR_LOC (init, input_location) actually made a difference because init had an usable location. The patchlet represents also a nano clean-up/fix-up: elsewhere in the same function

Re: [PATCH] fold-const: Don't access bit fields with too big mode (PR71310)

2016-06-10 Thread Segher Boessenkool
On Fri, Jun 10, 2016 at 01:14:16PM -0600, Jeff Law wrote: > The change itself is fine, and it's approved with a testcase or at least > an explanation of why you can't turn either of the tests from the BZ > into a testcase in our framework. This is what I committed: 2016-06-11 Segher

[PATCH, AARCH64] add qdf24xx tuning structure

2016-06-10 Thread Jim Wilson
This adds a tuning structure for qdf24xx. This was tested with an aarch64-linux bootstrap and a make check, with no regressions. I also tested it with an x86_64-linux C make check to verify that I didn't break the testsuite for non aarch64 targets. I had to change one testcase because it

Re: [PATCH, i386]: Implement PR 71246, Missing built-in functions for float128 NaNs

2016-06-10 Thread Joseph Myers
On Fri, 10 Jun 2016, Uros Bizjak wrote: > Joseph, does it look OK to you? Richi, I hope I got tree stuff > implemented correctly. It's plausible, but really needs testcases (which could examine the bit-patterns of __float128 objects initialized using these built-in functions, to make sure

Re: [PATCH] C: fixits for misspelled named initializers

2016-06-10 Thread Joseph Myers
On Fri, 10 Jun 2016, David Malcolm wrote: > On Mon, 2016-06-06 at 15:17 +, Joseph Myers wrote: > > On Tue, 31 May 2016, David Malcolm wrote: > > > > > Ping: > > > https://gcc.gnu.org/ml/gcc-patches/2016-04/msg01834.html > > > > OK. What about field names in designated initializers (both

Re: [patch] FreeBSD armv6 unaligned access

2016-06-10 Thread Andreas Tobler
Hi Gerald, On 10.06.16 22:26, Gerald Pfeifer wrote: On Fri, 10 Jun 2016, Andreas Tobler wrote: FreeBSD 11 will bring unaligned access support for armv6 and up. This patch enables it. If no objection I'll commit it to trunk, gcc-6 branch and gcc-5 branch in the next days. As FreeBSD

Re: [C++ RFC / Patch] Again about PR 70202

2016-06-10 Thread Paolo Carlini
.. if I disregard that comment, the incomplete type B gets through, gets to check_initializer (which is involved anyway even if there is no initializer in this case for b1) and somewhat comically gets to: else if (!COMPLETE_TYPE_P (type)) { error_at (DECL_SOURCE_LOCATION (decl),

Re: [PING] [PR c/71381] C/C++ OpenACC cache directive rejects valid syntax

2016-06-10 Thread Gerald Pfeifer
On Fri, 10 Jun 2016, Thomas Schwinge wrote: > I filed > "Make OpenACC cache directive less restrictive". This gives "404, This is not the web page you are looking for". Gerald

Re: [C++ RFC / Patch] Again about PR 70202

2016-06-10 Thread Paolo Carlini
. in particular there is this comment in start_decl_1, where the type becomes error_mark_node: 5102 if (type_uses_auto (type)) 5103 error ("declaration of %q#D has no initializer", decl); 5104 else 5105 error ("aggregate %q#D has incomplete type and cannot be

Re: [C++ RFC / Patch] Again about PR 70202

2016-06-10 Thread Paolo Carlini
.. the type of b1 becomes error_mark_node at the end of start_decl as an effect of start_decl_1 (which issues the incomplete type error). Paolo.

Re: [patch] FreeBSD armv6 unaligned access

2016-06-10 Thread Gerald Pfeifer
Hi Andreas, On Fri, 10 Jun 2016, Andreas Tobler wrote: FreeBSD 11 will bring unaligned access support for armv6 and up. This patch enables it. If no objection I'll commit it to trunk, gcc-6 branch and gcc-5 branch in the next days. As FreeBSD maintainer, you don't need to wait, though it is

Re: [C++ RFC / Patch] Again about PR 70202

2016-06-10 Thread Paolo Carlini
Hi, On 10/06/2016 22:08, Jason Merrill wrote: On Thu, Jun 9, 2016 at 9:43 PM, Paolo Carlini wrote: ... and this version passes testing. For real. This seems reasonable, but I still wonder why b1 has error_mark_node type, since it has no initializer at all. Well, we

Re: [C++ RFC / Patch] Again about PR 70202

2016-06-10 Thread Jason Merrill
On Thu, Jun 9, 2016 at 9:43 PM, Paolo Carlini wrote: > ... and this version passes testing. For real. This seems reasonable, but I still wonder why b1 has error_mark_node type, since it has no initializer at all. Jason

RFC (gimplify, openmp): PATCH to is_gimple_reg to check DECL_HAS_VALUE_EXPR_P

2016-06-10 Thread Jason Merrill
While working on another issue I noticed that is_gimple_reg was happily accepting VAR_DECLs with DECL_VALUE_EXPR even when later gimplification would replace them with something that is_gimple_reg doesn't like, leading to trouble. So I've modified is_gimple_reg to check the VALUE_EXPR. But

Re: [PATCH] fold-const: Don't access bit fields with too big mode (PR71310)

2016-06-10 Thread Segher Boessenkool
On Fri, Jun 10, 2016 at 01:14:16PM -0600, Jeff Law wrote: > > PR middle-end/71310 > > * fold-const.c (optimize_bit_field_compare): Don't try to use > > word_mode unconditionally for reading the bit field, look at > > DECL_BIT_FIELD_REPRESENTATIVE instead. > Testcase? It would

Re: [PATCH] Fix handling of computed goto in tree-nested.c (PR middle-end/71494)

2016-06-10 Thread Jeff Law
On 06/10/2016 01:13 PM, Jakub Jelinek wrote: Hi! As can be seen on the following (IMNSHO valid) testcase, we need to walk ops of GIMPLE_GOTO, except when it has (non-local) LABEL_DECL in it. There is code to do this, but it was setting *handled_ops_p to true and thus not actually walking those

Re: [PATCH] Fix handling of computed goto in tree-nested.c (PR middle-end/71494)

2016-06-10 Thread Richard Biener
On June 10, 2016 9:13:09 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >As can be seen on the following (IMNSHO valid) testcase, we need to >walk >ops of GIMPLE_GOTO, except when it has (non-local) LABEL_DECL in it. >There is code to do this, but it was setting *handled_ops_p to

Re: [PATCH] Set Warning flag on Wpsabi (PR c/68657)

2016-06-10 Thread Richard Biener
On June 10, 2016 9:10:48 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >-Wpsabi actually is a warning option, i386 backend (the only user of >it) >uses warning_at, the option is enabled by -Wabi which is Warning, and >if >one uses -Werror and some -Wpsabi warning is printed, then we

Re: [PATCH] Reject boolean/enum types in last arg of __builtin_*_overflow_p

2016-06-10 Thread Martin Sebor
On 06/10/2016 01:08 PM, Jakub Jelinek wrote: Hi! As mentioned in PR71479, for __builtin_*_overflow we right now require the last argument to be pointer to INTEGER_TYPE, not INTEGRAL_TYPE_P, but for __builtin_*_overflow_p we were using INTEGRAL_TYPE_P. For _Bool/bool, I'd think we could make it

Re: [PATCH] fold-const: Don't access bit fields with too big mode (PR71310)

2016-06-10 Thread Jeff Law
On 06/10/2016 12:48 PM, Segher Boessenkool wrote: Currently, optimize_bit_field_compare reads the bitfield in word_mode if it can. If the bit field is normally accessed in a smaller mode, this might be a violation of the memory model, although the "extra" part of the read is not used. But

[PATCH] Fix handling of computed goto in tree-nested.c (PR middle-end/71494)

2016-06-10 Thread Jakub Jelinek
Hi! As can be seen on the following (IMNSHO valid) testcase, we need to walk ops of GIMPLE_GOTO, except when it has (non-local) LABEL_DECL in it. There is code to do this, but it was setting *handled_ops_p to true and thus not actually walking those (therefore tweaks of wi->* were useless).

[PATCH] Set Warning flag on Wpsabi (PR c/68657)

2016-06-10 Thread Jakub Jelinek
Hi! -Wpsabi actually is a warning option, i386 backend (the only user of it) uses warning_at, the option is enabled by -Wabi which is Warning, and if one uses -Werror and some -Wpsabi warning is printed, then we mention there -Werror=psabi, which doesn't work right now. Fixed thusly,

[PATCH] Reject boolean/enum types in last arg of __builtin_*_overflow_p

2016-06-10 Thread Jakub Jelinek
Hi! As mentioned in PR71479, for __builtin_*_overflow we right now require the last argument to be pointer to INTEGER_TYPE, not INTEGRAL_TYPE_P, but for __builtin_*_overflow_p we were using INTEGRAL_TYPE_P. For _Bool/bool, I'd think we could make it well defined if we wanted (check if the

Re: [PING] [PATCH] Fix ICE with x87 asm operands (PR inline-asm/68843)

2016-06-10 Thread Bernd Edlinger
On 06/10/16 20:42, Jakub Jelinek wrote: > > The second testcase FAILs on both x86_64 and i686, because it contains > no dg-options, therefore is compiled with -ansi -pedantic and that doesn't > allow GNU inline asm syntax. While looking at the testcase, I believe you > meant to make it

Re: [PATCH] Fold x/x to 1, 0/x to 0 and 0%x to 0 consistently

2016-06-10 Thread Richard Biener
On June 10, 2016 6:15:25 PM GMT+02:00, Jason Merrill wrote: >On Fri, Jun 10, 2016 at 3:11 AM, Richard Biener >wrote: >> On Thu, 9 Jun 2016, Jason Merrill wrote: >> >>> On Thu, Jun 9, 2016 at 3:39 AM, Richard Biener >wrote: >>> > On Thu, 9

[PATCH] fold-const: Don't access bit fields with too big mode (PR71310)

2016-06-10 Thread Segher Boessenkool
Currently, optimize_bit_field_compare reads the bitfield in word_mode if it can. If the bit field is normally accessed in a smaller mode, this might be a violation of the memory model, although the "extra" part of the read is not used. But also, previous stores to the bit field will have been

Re: [PING] [PATCH] Fix ICE with x87 asm operands (PR inline-asm/68843)

2016-06-10 Thread Jakub Jelinek
On Thu, Jun 09, 2016 at 03:10:44PM -0600, Jeff Law wrote: > On 05/29/2016 08:37 AM, Bernd Edlinger wrote: > > > > > > >gcc: > >2016-05-22 Bernd Edlinger > > > > PR inline-asm/68843 > > * reg-stack.c (check_asm_stack_operands): Explicit input arguments > >

Re: fix middle-end/71476

2016-06-10 Thread Jakub Jelinek
On Fri, Jun 10, 2016 at 06:04:47PM +0200, Marek Polacek wrote: > > Wouldn't it be better to just walk_gimple_seq with NULL callback_op > > and non-NULL callback_stmt that would stop on the first real stmt in there? > > Ok, such as in the following? > > > Also, the above loop looks confusing, I'd

Re: [patch, avr] Fix PR67353

2016-06-10 Thread Georg-Johann Lay
Pitchumani Sivanupandi schrieb: Hi, This patch introduces new flags for warning 'misspelled interrupt/ signal handler'. Flag -Wmisspelled-isr is enabled by default and it will warn user if the interrupt/ signal handler is without '__vector' prefix. Flag -Wno-misspelled-isr shall be enabled by

[patch] FreeBSD armv6 unaligned access

2016-06-10 Thread Andreas Tobler
Hi all, FreeBSD 11 will bring unaligned access support for armv6 and up. This patch enables it. If no objection I'll commit it to trunk, gcc-6 branch and gcc-5 branch in the next days. Thanks, Andreas 2016-06-10 Andreas Tobler * config/arm/freebsd.h: Enable

[PATCH, i386]: Implement PR 71246, Missing built-in functions for float128 NaNs

2016-06-10 Thread Uros Bizjak
Hello! Attached patch implements __builtin_nanq and __builtin_nansq __float128 functions. 2016-06-10 Uros Bizjak PR target/71241 * config/i386/i386.i386-builtin-types.def (CONST_STRING): New primitive type. (FLOAT128_FTYPE_CONST_STRING): New function type.

[PATCH] C: fixits for misspelled named initializers

2016-06-10 Thread David Malcolm
On Mon, 2016-06-06 at 15:17 +, Joseph Myers wrote: > On Tue, 31 May 2016, David Malcolm wrote: > > > Ping: > > https://gcc.gnu.org/ml/gcc-patches/2016-04/msg01834.html > > OK. What about field names in designated initializers (both C99 > -style and > old-style)? This patch adds fixits

[PATCH gfortran] PR 60751 - Extra comma in WRITE statement not diagnosed

2016-06-10 Thread Dominique d'Humières
The attached patch fixes pr60751 by allowing extra comma in WRITE statement for std=legacy only, tested on x86_64-apple-darwin15. Is it OK for trunk, and the gcc-5 and 6 branches? TIA Dominique patch-60751b Description: Binary data

[PATCH 2/2] gcc: Update comment in bb-reorder.c

2016-06-10 Thread Andrew Burgess
Out of date comment ... fixed. gcc/ChangeLog: * gcc/bb-reorder.c (pass_partition_blocks::gate): Update comment. --- gcc/ChangeLog| 4 gcc/bb-reorder.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index

[PATCH 0/2] Remove user_defined_section_attribute global

2016-06-10 Thread Andrew Burgess
The first patch contains the interesting change, the second is just a small comment fix in a related area of code, that I spotted while creating the first patch. I don't have commit access, so if these are reviewed / approved, please could they also be applied. Thanks, Andrew --- Andrew

[PATCH 1/2] gcc: Remove unneeded global flag.

2016-06-10 Thread Andrew Burgess
The global flag `user_defined_section_attribute' is set while parsing C code when the section attribute is encountered. The flag is set when anything has the section attribute applied to it, functions or data. The only place this global was used was within the gate function for partitioning

[PR tree-optimization/71335] Fix thread path management in backwards threader

2016-06-10 Thread Jeff Law
As previously noted, there's a buglet in the handling of the stack-of-blocks representation of the thread path in the backwards threader. In particular there's a case where we can get the same block pushed onto that stack twice. My workaround for that lameness could result in incorrect

[PATCH, rs6000] Fix the vsx-elemrev-[24].c tests in a different way

2016-06-10 Thread Bill Schmidt
Hi, After some discussion with the team, we decided the previous fix for these tests was too draconian. This patch no long requires the tests to be running on Power9 hardware. Thus the tests will still fail on machines that support -mcpu=power9 at the command line, but have a downlevel binutils

Re: [PATCH] Fold x/x to 1, 0/x to 0 and 0%x to 0 consistently

2016-06-10 Thread Jason Merrill
On Fri, Jun 10, 2016 at 3:11 AM, Richard Biener wrote: > On Thu, 9 Jun 2016, Jason Merrill wrote: > >> On Thu, Jun 9, 2016 at 3:39 AM, Richard Biener wrote: >> > On Thu, 9 Jun 2016, Jakub Jelinek wrote: >> > >> >> On Thu, Jun 09, 2016 at 08:50:15AM +0200,

Re: fix middle-end/71476

2016-06-10 Thread Marek Polacek
On Fri, Jun 10, 2016 at 02:52:08PM +0200, Jakub Jelinek wrote: > Won't this just give up on say: > void > foo (int a, int b) > { > switch (a) > { > { int c; } > { int d; } > { int e; } > b++; > case 1: > break; > } > } > > ? Such blocks can also be can

Re: [PATCH, ARM] Remove non-existent extern declarations in arm.h

2016-06-10 Thread Ramana Radhakrishnan
On Fri, Jun 10, 2016 at 4:03 PM, Bernd Edlinger wrote: > Hi, > > this trivial patch removes two unused extern declarations in arm.h. > > Boot-strapped and reg-tested on arm-linux-gnueabihf. > > OK for trunk? > OK. Thanks, Ramana > > Thanks > Bernd.

[PATCH, ARM] Remove non-existent extern declarations in arm.h

2016-06-10 Thread Bernd Edlinger
Hi, this trivial patch removes two unused extern declarations in arm.h. Boot-strapped and reg-tested on arm-linux-gnueabihf. OK for trunk? Thanks Bernd. 2016-06-10 Bernd Edlinger * config/arm/arm.h (pool_vector_label, return_used_this_function): Removed.

[PATCH][ARM] Delete thumb_reload_in_h

2016-06-10 Thread Kyrill Tkachov
Hi all, This function just ICEs and isn't actually called from anywhere. It was introduced back in 2000 as part of a large merge introducing Thumb support and was aborting even then. I don't think having it around is of any benefit. Tested on arm-none-eabi. Ok for trunk? Thanks, Kyrill

Re: [ARM] Fix, add tests for FP16 aapcs.

2016-06-10 Thread Matthew Wahab
On 10/06/16 15:22, Christophe Lyon wrote: On 10 June 2016 at 15:56, Matthew Wahab wrote: On 10/06/16 09:32, Christophe Lyon wrote: On 9 June 2016 at 17:21, Matthew Wahab wrote: It's an improvement, but I'm still seeing a few

Re: [ARM] Fix, add tests for FP16 aapcs.

2016-06-10 Thread Christophe Lyon
On 10 June 2016 at 15:56, Matthew Wahab wrote: > On 10/06/16 09:32, Christophe Lyon wrote: >> >> On 9 June 2016 at 17:21, Matthew Wahab wrote: >>> >>> A number of tests were added to check for FP16 arguments and return >>> values being

Re: [PING] [PATCH] Fix asm X constraint (PR inline-asm/59155)

2016-06-10 Thread Bernd Edlinger
On 06/09/16 18:45, Jakub Jelinek wrote: > On Thu, Jun 09, 2016 at 06:43:04PM +0200, Jakub Jelinek wrote: >> Yes, I'm all in favor in disabling X constraint for inline asm. >> Especially if people actually try to print it as well, rather than make it >> unused. That is a sure path to ICEs. > >

[GCC] Add aarch64 to zero_bits_compound testing

2016-06-10 Thread Andre Vieira (lists)
Hello, This patch adds aarch64*-*-* to the list of supported targets for the recently added zero bits compound tests. Tested for aarch64-none-elf and aarch64_be-none-elf. Is this OK? Cheers, Andre gcc/testsuite/ChangeLog 2016-06-10 Andre Vieira *

Re: [ARM] Fix, add tests for FP16 aapcs.

2016-06-10 Thread Matthew Wahab
On 10/06/16 09:32, Christophe Lyon wrote: On 9 June 2016 at 17:21, Matthew Wahab wrote: A number of tests were added to check for FP16 arguments and return values being passed in registers. These require mfloat-abi=hard to be selected but in some test configurations

Re: [PATCH][3/3][RTL ifcvt] PR middle-end/37780: Conditional expression with __builtin_clz() should be optimized out

2016-06-10 Thread Kyrill Tkachov
On 10/06/16 14:39, Christophe Lyon wrote: On 10 June 2016 at 10:38, Kyrill Tkachov wrote: On 09/06/16 13:14, Christophe Lyon wrote: On 8 June 2016 at 18:40, Kyrill Tkachov wrote: On 07/06/16 20:34, Christophe Lyon wrote: On 26 May

Re: [PATCH][3/3][RTL ifcvt] PR middle-end/37780: Conditional expression with __builtin_clz() should be optimized out

2016-06-10 Thread Christophe Lyon
On 10 June 2016 at 10:38, Kyrill Tkachov wrote: > > On 09/06/16 13:14, Christophe Lyon wrote: >> >> On 8 June 2016 at 18:40, Kyrill Tkachov >> wrote: >>> >>> On 07/06/16 20:34, Christophe Lyon wrote: On 26 May 2016 at 11:53,

Re: [PING] [PR c/71381] C/C++ OpenACC cache directive rejects valid syntax

2016-06-10 Thread Thomas Schwinge
Hi! On Fri, 10 Jun 2016 12:31:48 +0200, I wrote: > On Wed, 8 Jun 2016 16:07:17 +0200, Jakub Jelinek wrote: > > On Wed, Jun 08, 2016 at 03:28:57PM +0200, Thomas Schwinge wrote: > > > > + /* The OpenACC cache directive explicitly only allows > > > > "array > > > > +

Re: Maintain loop iteration count estimates

2016-06-10 Thread Jan Hubicka
> On Fri, 10 Jun 2016, Jan Hubicka wrote: > > > > > I always interpreted the estimated number of iterations to be the same > > > > as > > > > expected number of iterations and to be same as average. So it seems > > > > to be > > > > sane to feed the info from profile. > > > > > > > > I am

Re: fix middle-end/71476

2016-06-10 Thread Jakub Jelinek
On Fri, Jun 10, 2016 at 02:36:23PM +0200, Marek Polacek wrote: > --- gcc/gimplify.c > +++ gcc/gimplify.c > @@ -1559,6 +1559,50 @@ gimplify_statement_list (tree *expr_p, gimple_seq > *pre_p) >return GS_ALL_DONE; > } > > +/* Possibly warn about unreachable statements between switch's

Re: Maintain loop iteration count estimates

2016-06-10 Thread Richard Biener
On Fri, 10 Jun 2016, Jan Hubicka wrote: > > > I always interpreted the estimated number of iterations to be the same as > > > expected number of iterations and to be same as average. So it seems to > > > be > > > sane to feed the info from profile. > > > > > > I am thinking to add the

Re: Maintain loop iteration count estimates

2016-06-10 Thread Jan Hubicka
> > I always interpreted the estimated number of iterations to be the same as > > expected number of iterations and to be same as average. So it seems to be > > sane to feed the info from profile. > > > > I am thinking to add the histograms, yes. It is midly anoying to do so > > becuase > >

Re: Remove match.pd pattern dups in favor of using :c

2016-06-10 Thread Richard Biener
On Fri, 10 Jun 2016, Alexander Monakov wrote: > On Wed, 1 Jun 2016, Richard Biener wrote: > > > On Wed, 1 Jun 2016, Richard Biener wrote: > > > > 2016-06-01 Richard Biener > > > > > > > > * match.pd ((A & B) - (A & ~B) -> B - (A ^ B)): Add missing :c. > > > >

Re: fix middle-end/71476

2016-06-10 Thread Marek Polacek
On Fri, Jun 10, 2016 at 02:36:23PM +0200, Marek Polacek wrote: > While working on something else I discovered this ICE-on-invalid. > The problem is that when looking into the innermost lexical scope, > gimple_bind_body might be null, so check 'seq' first before checking > its gimple_code. > I

fix middle-end/71476

2016-06-10 Thread Marek Polacek
While working on something else I discovered this ICE-on-invalid. The problem is that when looking into the innermost lexical scope, gimple_bind_body might be null, so check 'seq' first before checking its gimple_code. I factored the code to its own function so that I can simply 'return'.

[Patch AArch64] Fixup to fcvt patterns added in r237200

2016-06-10 Thread James Greenhalgh
Hi, My autotester picked up some issues with the vcvt{ds}_n_* intrinsics added in r237200. The iterators in this pattern do not resolve, as they have not been explicitly tied to the mode iterator (rather than the code iterator) used by the pattern. This fixup adds the attribute tags, allowing

Re: Remove match.pd pattern dups in favor of using :c

2016-06-10 Thread Alexander Monakov
On Wed, 1 Jun 2016, Richard Biener wrote: > > On Wed, 1 Jun 2016, Richard Biener wrote: > > > 2016-06-01 Richard Biener > > > > > > * match.pd ((A & B) - (A & ~B) -> B - (A ^ B)): Add missing :c. > > > (relational patterns): Use :c to avoid pattern duplications. > > > >

Re: [PATCH] Use __USER_LABEL_PREFIX__ in asm statement

2016-06-10 Thread H.J. Lu
On Tue, Jun 7, 2016 at 6:57 AM, H.J. Lu wrote: > A target may have a prefix in function symbol. Update interrrupt tests > to use __USER_LABEL_PREFIX__ for function symbol in asm statement. > > Tested on Linux and Darwin. OK for trunk? > > Thanks. > > H.J. > >

[PATCH] Fix PR64516

2016-06-10 Thread Richard Biener
The following fixes another alignment preserving bug in folding. Bootstrap / regtest running on x86_64-unknown-linux-gnu. Richard. 2016-06-10 Richard Biener PR middle-end/64516 * fold-const.c (fold_unary_loc): Preserve alignment when folding a

Re: [PATCH][PR sanitizer/71480] Make ASan align string constants to shadow granularity.

2016-06-10 Thread Jakub Jelinek
On Fri, Jun 10, 2016 at 03:13:32PM +0300, Maxim Ostapenko wrote: > gcc/ChangeLog: > > 2016-06-10 Maxim Ostapenko > > PR sanitizer/71480 > * varasm.c (place_block_symbol): Adjust alignment for asan protected > STRING_CSTs even if

Re: [PATCH][PR sanitizer/71480] Make ASan align string constants to shadow granularity.

2016-06-10 Thread Maxim Ostapenko
On 10/06/16 14:41, Maxim Ostapenko wrote: On 10/06/16 14:18, Jakub Jelinek wrote: On Fri, Jun 10, 2016 at 02:12:37PM +0300, Maxim Ostapenko wrote: gcc/ChangeLog: 2016-06-10 Maxim Ostapenko PR sanitizer/71480 * varasm.c (place_block_symbol): Adjust

Re: JIT patch: add gcc_jit_magic_int

2016-06-10 Thread Basile Starynkevitch
On 06/07/2016 09:19 PM, Andrew Pinski wrote: On Mon, May 23, 2016 at 5:26 AM, Basile Starynkevitch wrote: Hello All, As I explained in https://gcc.gnu.org/ml/jit/2016-q2/msg00042.html it is difficult (or tricky without using dirty tricks involving the GCC plugin

Re: [PATCH][PR sanitizer/71480] Make ASan align string constants to shadow granularity.

2016-06-10 Thread Maxim Ostapenko
On 10/06/16 14:18, Jakub Jelinek wrote: On Fri, Jun 10, 2016 at 02:12:37PM +0300, Maxim Ostapenko wrote: gcc/ChangeLog: 2016-06-10 Maxim Ostapenko PR sanitizer/71480 * varasm.c (place_block_symbol): Adjust alignment for asan protected

[PATCH] Fold RHS when open-coding memcpy

2016-06-10 Thread Richard Biener
I noticed that we fail to fold the source to a constant if possible. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2016-06-10 Richard Biener * gimple-fold.c (gimple_fold_builtin_memory_op): Make sure to fold the RHS to a constant

Re: [PR71478] Fix ICE in tree-ssa-reassoc.c

2016-06-10 Thread Richard Biener
On Fri, Jun 10, 2016 at 4:19 AM, kugan wrote: > Hi, > > In PR71478, for vector negation of ssa produced by call stmt, we add vector > (-1) and ssa to the ops list. However, in the place where we remove the (-1) > from ops list, we failed to do this for vector

Re: [PATCH] PR bootstrap/71481: fix input.c selftest

2016-06-10 Thread Richard Biener
On Thu, Jun 9, 2016 at 11:58 PM, David Malcolm wrote: > input.c's selftest::test_reading_source_line attempted to read from > __FILE__, which doesn't work if the binary is run from a different > location than the build dir. > > Fix it by rewriting the test to write out a

Re: [PATCH][PR sanitizer/71480] Make ASan align string constants to shadow granularity.

2016-06-10 Thread Jakub Jelinek
On Fri, Jun 10, 2016 at 02:12:37PM +0300, Maxim Ostapenko wrote: > gcc/ChangeLog: > > 2016-06-10 Maxim Ostapenko > > PR sanitizer/71480 > * varasm.c (place_block_symbol): Adjust alignment for asan protected > STRING_CSTs even if

Re: move increase_alignment from simple to regular ipa pass

2016-06-10 Thread Richard Biener
On Fri, 10 Jun 2016, Prathamesh Kulkarni wrote: > On 10 June 2016 at 01:53, Jan Hubicka wrote: > >> On 8 June 2016 at 20:38, Jan Hubicka wrote: > >> >> I think it would be nice to work towards transitioning > >> >> flag_section_anchors to a flag on varpool nodes,

[PATCH][PR sanitizer/71480] Make ASan align string constants to shadow granularity.

2016-06-10 Thread Maxim Ostapenko
Hi, this patch (preapproved by Jakub in BZ) fixes an issue with insufficient (4 byte, should be at least 8) alignment of ASan protected string constants. I can reproduce this on arm-linux-gnueabi target, but this may affect powerpc* targets too, so I enabled the testcase for both arm and

Re: [RFC: Patch 0/6] Rewrite the noce-ifcvt cost models

2016-06-10 Thread James Greenhalgh
On Thu, Jun 09, 2016 at 10:58:52AM -0600, Jeff Law wrote: > On 06/02/2016 10:53 AM, James Greenhalgh wrote: > >Hi, > > > >When I was working in the area last year, I promised to revisit the cost > >model for noce if-conversion and see if I could improve the modeling. This > >turned out to be more

Re: [PING] [PR c/71381] C/C++ OpenACC cache directive rejects valid syntax

2016-06-10 Thread Thomas Schwinge
Hi! On Wed, 8 Jun 2016 16:07:17 +0200, Jakub Jelinek wrote: > On Wed, Jun 08, 2016 at 03:28:57PM +0200, Thomas Schwinge wrote: > > > [PR c/71381] C/C++ OpenACC cache directive rejects valid syntax > Ok. > > > case OMP_CLAUSE__CACHE_: > > > + /* The OpenACC

Re: [PATCH] tail merge ICE

2016-06-10 Thread Thomas Schwinge
Hi! On Wed, 4 May 2016 13:25:19 -0400, Nathan Sidwell wrote: > This patch fixes an ICE Thomas observed in tree-ssa-tail-merge.c: [...] I've recently run into the same ICE on gcc-6-branch; committed to gcc-6-branch in r237294, as obvious: commit

Re: [PATCH, OpenACC] Make reduction arguments addressable

2016-06-10 Thread Thomas Schwinge
Hi! I'd still have preferred if that patch described (adding source code comments) why that special handling is required, but oh well... On Fri, 3 Jun 2016 15:13:40 +0800, Chung-Lin Tang wrote: > Tested again with no regressions. Your gomp-4_0-branch commit of this

Re: [patch] cleanup *finish_omp_clauses

2016-06-10 Thread Thomas Schwinge
Hi! On Tue, 3 May 2016 08:35:29 +0200, Marek Polacek wrote: > This patch introduced > > /home/marek/src/gcc/gcc/c-family/c-common.h:1270:58: warning: comma at end of > enumerator list [-Wpedantic] >C_ORT_OMP_DECLARE_SIMD = C_ORT_OMP | C_ORT_DECLARE_SIMD, >

Re: Maintain loop iteration count estimates

2016-06-10 Thread Richard Biener
On Thu, 9 Jun 2016, Jan Hubicka wrote: > > On Thu, 9 Jun 2016, Jan Hubicka wrote: > > > > > Hi, > > > after we read the profile, we know expected number of iterations. > > > > We know the average ;) It may make sense to add some histogram > > value profiling for niter now that we should easily

Re: [PATCH] Fix PR71477

2016-06-10 Thread Jan Hubicka
> > > PR middle-end/71477 > > > * cfgloop.c (alloc_loop): Initialize nb_iterations_likely_upper_bound. > > > > > > Index: gcc/cfgloop.c > > > === > > > --- gcc/cfgloop.c (revision 237286) > > > +++ gcc/cfgloop.c (working copy) > >

Re: move increase_alignment from simple to regular ipa pass

2016-06-10 Thread Prathamesh Kulkarni
On 10 June 2016 at 01:53, Jan Hubicka wrote: >> On 8 June 2016 at 20:38, Jan Hubicka wrote: >> >> I think it would be nice to work towards transitioning >> >> flag_section_anchors to a flag on varpool nodes, thereby removing >> >> the Optimization flag from

Re: [PATCH] Fix PR71477

2016-06-10 Thread Richard Biener
On Fri, 10 Jun 2016, Richard Sandiford wrote: > Richard Biener writes: > > Committed as obvious. > > > > Richard. > > > > 2016-06-10 Richard Biener > > > > PR middle-end/71477 > > * cfgloop.c (alloc_loop): Initialize

Re: [PATCH][ARM] Fix gcc.target/arm/builtin-bswap16-1.c

2016-06-10 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2016-06/msg00249.html Thanks, Kyrill On 03/06/16 09:30, Kyrill Tkachov wrote: Hi all, The test gcc.target/arm/builtin-bswap16-1.c refuses to compile when testing a toolchain configured with --with-mode=thumb --with-float=hard and an architecture that

[PATCH, libmpx] Fix overflow bug

2016-06-10 Thread Ilya Enkovich
Hi, Current bounds copy algorithm has a bug which causes overflow in a specific case when there are no bounds to copy. Patch was regtested and bootstrapped for x86_64-unknown-linux-gnu. I'm going to apply it to trunk and gcc-6-branch. Thanks, Ilya -- libmpx/ 2016-06-10 Ilya Enkovich

[PATCH] Allow fwprop to undo vectorization harm (PR68961)

2016-06-10 Thread Richard Biener
With the proposed cost change for vector construction we will end up vectorizing the testcase in PR68961 again (on x86_64 and likely on ppc64le as well after that target gets adjustments). Currently we can't optimize that away again noticing the direct overlap of argument and return registers.

Re: [ARM] implement division using vrecpe/vrecps with -funsafe-math-optimizations

2016-06-10 Thread Prathamesh Kulkarni
On 7 June 2016 at 14:07, Ramana Radhakrishnan wrote: >>> Please find the updated patch attached. >>> It passes testsuite for arm-none-linux-gnueabi, arm-none-linux-gnueabihf and >>> arm-none-eabi. >>> However the test-case added in the patch (neon-vect-div-1.c) fails to

Re: [PATCH] Fix PR71477

2016-06-10 Thread Richard Sandiford
Richard Biener writes: > Committed as obvious. > > Richard. > > 2016-06-10 Richard Biener > > PR middle-end/71477 > * cfgloop.c (alloc_loop): Initialize nb_iterations_likely_upper_bound. > > Index: gcc/cfgloop.c >

Re: [PATCH][3/3][RTL ifcvt] PR middle-end/37780: Conditional expression with __builtin_clz() should be optimized out

2016-06-10 Thread Kyrill Tkachov
On 09/06/16 13:14, Christophe Lyon wrote: On 8 June 2016 at 18:40, Kyrill Tkachov wrote: On 07/06/16 20:34, Christophe Lyon wrote: On 26 May 2016 at 11:53, Kyrill Tkachov wrote: Hi all, In this PR we want to optimise: int foo (int

Re: [ARM] Fix, add tests for FP16 aapcs.

2016-06-10 Thread Christophe Lyon
On 9 June 2016 at 17:21, Matthew Wahab wrote: > Hello, > > A number of tests were added to check for FP16 arguments and return > values being passed in registers. These require mfloat-abi=hard to be > selected but in some test configurations they were run with >

Re: [AArch64] Give some new costs for Cortex-A57 floating-point operations

2016-06-10 Thread James Greenhalgh
On Fri, Jun 03, 2016 at 09:35:50AM +0100, James Greenhalgh wrote: > > Hi, > > This patch rebases the floating-point cost table for Cortex-A57 to be > relative to the cost of a floating-point move. This in response to this > feedback from Richard Sandiford [2] on Ramana's patch to calls.c [1]

[patch, avr] Fix PR67353

2016-06-10 Thread Pitchumani Sivanupandi
Hi, This patch introduces new flags for warning 'misspelled interrupt/ signal handler'. Flag -Wmisspelled-isr is enabled by default and it will warn user if the interrupt/ signal handler is without '__vector' prefix. Flag -Wno-misspelled-isr shall be enabled by user to allow custom names, i.e.

[PATCH] Fix PR71477

2016-06-10 Thread Richard Biener
Committed as obvious. Richard. 2016-06-10 Richard Biener PR middle-end/71477 * cfgloop.c (alloc_loop): Initialize nb_iterations_likely_upper_bound. Index: gcc/cfgloop.c === --- gcc/cfgloop.c

Re: [PATCH] Fold x/x to 1, 0/x to 0 and 0%x to 0 consistently

2016-06-10 Thread Richard Biener
On Thu, 9 Jun 2016, Jason Merrill wrote: > On Thu, Jun 9, 2016 at 3:39 AM, Richard Biener wrote: > > On Thu, 9 Jun 2016, Jakub Jelinek wrote: > > > >> On Thu, Jun 09, 2016 at 08:50:15AM +0200, Richard Biener wrote: > >> > On Wed, 8 Jun 2016, Jason Merrill wrote: > >> > > >> >

Re: [PATCH] Backport PowerPC complex __float128 compiler support to GCC 6.x

2016-06-10 Thread Richard Biener
On Thu, 9 Jun 2016, Michael Meissner wrote: > I'm including the global reviewers on the list. I just want to be sure that > there is no problem installing these patches on the GCC 6.2 branch. While it > is technically an enchancement, it is needed to be able to install the glibc > support that

Re: [PING] [PATCH] c/71392 - SEGV calling integer overflow built-ins with a null pointer

2016-06-10 Thread Richard Biener
On Thu, 9 Jun 2016, Martin Sebor wrote: > Attached is an updated version of the original patch described > below to annotate with the nonnull attribute the Built-In Functions > to Perform Arithmetic with Overflow Checking. > > Since the machinery that's in place doesn't handle the attribute > on