Re: [PATCH] FMA_EXPR can cause -fnon-call-exceptions with floating point args (PR middle-end/79396)

2017-02-24 Thread Richard Biener
On February 24, 2017 9:56:25 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >On the following testcase we replace a PLUS_EXPR (which is considered >throwing with -fnon-call-exceptions when it has floating point >arguments >and FP exceptions or sNaNs are enabled) with a FMA_EXPR; I believe it >can thro

Re: [PATCH] PR79584, lra ICE in base_to_reg

2017-02-24 Thread Vladimir Makarov
On 02/24/2017 12:07 AM, Alan Modra wrote: I'm going to wait for Vlad's opinion. I've written a couple of replies and erased them, since I figure whatever I have to say doesn't carry much weight. I would prefer not to touch simplify_subreg_operand, especially a code related to subreg of mem

[Patch, fortran] PRs 79597 and 79601.

2017-02-24 Thread Dominique d'Humières
Dear All, These trivial bugs have been fixed in revision 245729. 2017-02-25 Dominique d'Humieres PR fortran/79597 * interface.c (gfc_match_end_interface): Remove spurious comma and space, replace 'got %s' with 'got %qs'. 2017-02-25 Dominique d'Humieres PR

Re: [PATCH] Fix regressions caused by early debug (DW_OP_GNU_variable_value extension 161109.2; PR debug/77589)

2017-02-24 Thread Jakub Jelinek
On Fri, Feb 24, 2017 at 02:27:46PM -0800, Jason Merrill wrote: > Makes sense. The patch is OK with the above refactoring. Thanks. Here is what I'll bootstrap/regtest and commit if it passes (first incremental diff, attached full patch): --- gcc/dwarf2out.c 2017-02-24 10:01:22.538447008 +010

Re: [PATCH 3/6] microblaze: Fixes for RTL checking

2017-02-24 Thread Segher Boessenkool
On Tue, Feb 21, 2017 at 01:02:30PM -0800, Michael Eager wrote: > >>Why generate an unnecessary NOP? > > > >Why not? It will be optimised away anyway, and the code to get at the > >subregs is hairy... But could optimise away the useless move here > >already if both ops are a reg and both are the s

Re: [PATCH 4/6] nios2: Fixes for RTL checking

2017-02-24 Thread Sandra Loosemore
On 02/21/2017 12:41 PM, Sandra Loosemore wrote: On 02/21/2017 07:48 AM, Segher Boessenkool wrote: You cannot call REGNO on something that isn't a REG, and you cannot call INTVAL on something that isn't a CONST_INT. The way I fixed nios2_alternate_compare_const is admittedly a bit lame. Yeah.

Re: [PATCH] Fix regressions caused by early debug (DW_OP_GNU_variable_value extension 161109.2; PR debug/77589)

2017-02-24 Thread Jason Merrill
On Fri, Feb 24, 2017 at 1:57 PM, Jakub Jelinek wrote: > On Fri, Feb 24, 2017 at 01:40:37PM -0800, Jason Merrill wrote: >> On Fri, Feb 24, 2017 at 3:58 AM, Jakub Jelinek wrote: >> > + copy = ggc_alloc (); >> > + memcpy (copy, ref, sizeof (dw_loc_descr_node)); >> > + list->expr = cop

Re: [PATCH] Fix -Wformat -Werror=format-security -Wformat (PR c/79677)

2017-02-24 Thread Joseph Myers
On Fri, 24 Feb 2017, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, -Wformat -Werror=format-security -Wformat > surprisingly means -Wno-format-security in the end (same effect > e.g. with -Wall at the end), while > -Wformat -Wformat-security -Wformat (or -Wall) is -Wformat-security. > >

Re: [PATCH] Fix regressions caused by early debug (DW_OP_GNU_variable_value extension 161109.2; PR debug/77589)

2017-02-24 Thread Jakub Jelinek
On Fri, Feb 24, 2017 at 01:40:37PM -0800, Jason Merrill wrote: > On Fri, Feb 24, 2017 at 3:58 AM, Jakub Jelinek wrote: > > + copy = ggc_alloc (); > > + memcpy (copy, ref, sizeof (dw_loc_descr_node)); > > + list->expr = copy; > > + while (copy->dw_loc_next != ref_end) > > +

Re: [PATCH rs6000] Fix PR79544

2017-02-24 Thread Segher Boessenkool
On Fri, Feb 24, 2017 at 11:44:29AM -0600, Pat Haugen wrote: > The following patch fixes the problem of generating a logical shift for > vec_sra of an unsigned v2di vector. > > Bootstrap/regtest on powerpc64le-unknown-linux-gnu with no new > regressions. Ok for trunk? Ok for backport to 5/6 branche

Re: [PATCH] Fix regressions caused by early debug (DW_OP_GNU_variable_value extension 161109.2; PR debug/77589)

2017-02-24 Thread Jason Merrill
On Fri, Feb 24, 2017 at 3:58 AM, Jakub Jelinek wrote: > + copy = ggc_alloc (); > + memcpy (copy, ref, sizeof (dw_loc_descr_node)); > + list->expr = copy; > + while (copy->dw_loc_next != ref_end) > + { > + dw_loc_descr_ref new_copy = ggc_alloc (); > + memcp

[PATCH] FMA_EXPR can cause -fnon-call-exceptions with floating point args (PR middle-end/79396)

2017-02-24 Thread Jakub Jelinek
Hi! On the following testcase we replace a PLUS_EXPR (which is considered throwing with -fnon-call-exceptions when it has floating point arguments and FP exceptions or sNaNs are enabled) with a FMA_EXPR; I believe it can throw the same, but stmt_could_throw_1_p doesn't think so (as it is not unary

[PATCH] Fix -Wformat -Werror=format-security -Wformat (PR c/79677)

2017-02-24 Thread Jakub Jelinek
Hi! As mentioned in the PR, -Wformat -Werror=format-security -Wformat surprisingly means -Wno-format-security in the end (same effect e.g. with -Wall at the end), while -Wformat -Wformat-security -Wformat (or -Wall) is -Wformat-security. The problem is that all the EnabledBy and LangEnabledBy opt

[PATCH] Two small translation related tweaks

2017-02-24 Thread Jakub Jelinek
Hi! After hinting Marek to use const char *const in his G_ addition patch, I've grepped for other similar cases. The number_of_iterations_exit code doesn't make sense after we ended up (change from 6.x) with only a single wording, and in the C++ FE the addition of const allows -Wformat to see tho

Re: [PATCH] Move -Wrestrict warning later in the FEs and fix some issues in it (PR c++/79588)

2017-02-24 Thread Jakub Jelinek
On Thu, Feb 23, 2017 at 03:09:47PM -0700, Jeff Law wrote: > Please refactor the restrict warning bits into their own function, then > calling that from check_function_arguments. That's the style already used > there. > > OK with that change. Here is what I've committed after another bootstrap/r

Re: [PATCH][x86_64] Enable AVX512 VPOPCNTD/VPOPCNTQ instructions

2017-02-24 Thread Andrew Senkevich
2017-01-10 13:58 GMT+01:00 Kirill Yukhin : > On 10 Jan 15:00, Andrew Senkevich wrote: >> 2017-01-10 13:31 GMT+03:00 Uros Bizjak : >> > On Tue, Jan 10, 2017 at 11:21 AM, Andrew Senkevich >> > wrote: >> >> 2017-01-10 13:04 GMT+03:00 Kirill Yukhin : >> >>> Hi, >> >>> In addition to Uroš's inputs: >>

Re: ARC options documentation questions

2017-02-24 Thread Claudiu Zissulescu
Hi, Indeed, we are not up to speed regarding updating and cleaning the documentation. On 12/02/2017 05:18, Sandra Loosemore wrote: I noticed a bunch of copy-editing issues in the "ARC Options" section of invoke.texi. I'm willing to take a stab at fixing them, but I need some technical assist

Re: [PATCH] arc: Fixes for RTL checking

2017-02-24 Thread Claudiu Zissulescu
Thank you for ur contribution, Claudiu

Re: C++ PATCH to fix wrong-code with pointer-to-data-members (PR c++/79687)

2017-02-24 Thread Jason Merrill
On Fri, Feb 24, 2017 at 8:22 AM, Marek Polacek wrote: > I had an interesting time tracking down some of the problems with this code. > Hopefully I've sussed out now how this stuff works. > > We've got > > struct A { char c; }; > char A::*p = &A::c; > static char A::*const q = p; > and then > &(a.*

Re: C++ PATCH to make a message translatable (PR translation/79705)

2017-02-24 Thread Jason Merrill
OK. On Fri, Feb 24, 2017 at 7:33 AM, Marek Polacek wrote: > This PR complains that a message is not marked for translation. Also make > the pointer const for the benefit of -Wformat. > > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2017-02-24 Marek Polacek > > PR translat

Re: [PATCH, doc]: Mention that -mfpmath=sse is the default on 32bit x86 w/ SSE2 and -ffast-math

2017-02-24 Thread Uros Bizjak
On Thu, Feb 23, 2017 at 11:13 PM, Martin Sebor wrote: >>> A minor grammatical nit: >>> >>> +This is the default choice for most of x86-32 targets. >>> >>> "for most x86-32 targets" is correct unless the targets are some >>> specific subset, in which case "most of the [previously mentioned] >>>

Re: enable -Wformat-truncation with -Og (PR 79691)

2017-02-24 Thread Martin Sebor
On 02/24/2017 03:10 AM, Richard Biener wrote: On Fri, Feb 24, 2017 at 1:35 AM, Martin Sebor wrote: Bug 79691 - -Wformat-truncation suppressed by (and only by) -Og points out that the gimple-ssa-sprintf pass doesn't run when this optimization option is used. That's because I forgot to add it to

[PATCH rs6000] Fix PR79544

2017-02-24 Thread Pat Haugen
The following patch fixes the problem of generating a logical shift for vec_sra of an unsigned v2di vector. Bootstrap/regtest on powerpc64le-unknown-linux-gnu with no new regressions. Ok for trunk? Ok for backport to 5/6 branches after testing? -Pat 2017-02-24 Pat Haugen PR target/7

RE: [PATCH,MIPS] Handle paired single test changes

2017-02-24 Thread Moore, Catherine
> -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Matthew Fortune > Sent: Thursday, February 23, 2017 5:21 PM > To: Moore, Catherine > Cc: 'gcc-patches@gcc.gnu.org' (gcc-patches@gcc.gnu.org) patc...@gcc.gnu.org> > Subject:

C++ PATCH to fix wrong-code with pointer-to-data-members (PR c++/79687)

2017-02-24 Thread Marek Polacek
I had an interesting time tracking down some of the problems with this code. Hopefully I've sussed out now how this stuff works. We've got struct A { char c; }; char A::*p = &A::c; static char A::*const q = p; and then &(a.*q) - &a.c which should evaluate to 0. Here "p" will be 0, that's the of

RE: [PATCH,MIPS] Document -mload-store-pairs

2017-02-24 Thread Matthew Fortune
Moore, Catherine writes: > > -Original Message- > > From: Matthew Fortune [mailto:matthew.fort...@imgtec.com] > > Sent: Friday, February 24, 2017 8:58 AM > > To: Moore, Catherine > > Cc: 'gcc-patches@gcc.gnu.org' (gcc-patches@gcc.gnu.org) > patc...@gcc.gnu.org> > > Subject: [PATCH,MIPS]

RE: [PATCH,MIPS] Document -mload-store-pairs

2017-02-24 Thread Moore, Catherine
> -Original Message- > From: Matthew Fortune [mailto:matthew.fort...@imgtec.com] > Sent: Friday, February 24, 2017 8:58 AM > To: Moore, Catherine > Cc: 'gcc-patches@gcc.gnu.org' (gcc-patches@gcc.gnu.org) patc...@gcc.gnu.org> > Subject: [PATCH,MIPS] Document -mload-store-pairs > > Hi Ca

[PATCH][ PR rtl-optimization/79286] Drop may_trap_p exception to testing dominance in update_equiv_regs

2017-02-24 Thread Jeff Law
Per a discussion with Alan... update_equiv_regs now tests that the insn which creates an equivalence dominates its uses. With one exception, if may_trap_p returns false, we don't require dominance. may_trap_p unfortunately returns false for PIC references in cases where they can clearly tr

C++ PATCH to make a message translatable (PR translation/79705)

2017-02-24 Thread Marek Polacek
This PR complains that a message is not marked for translation. Also make the pointer const for the benefit of -Wformat. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2017-02-24 Marek Polacek PR translation/79705 * decl.c (check_redeclaration_exception_specification):

[PATCH,MIPS] Document -mload-store-pairs

2017-02-24 Thread Matthew Fortune
Hi Catherine, Can you review the description for -mload-store-pairs please? Thanks, Matthew gcc/ PR target/79473 * doc/invoke.texi: Document -mload-store-pairs. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 6e5fa56..f1fc449 100644 --- a/gcc/doc/invoke.texi +++ b/g

Re: [PATCH PR69564]Improve vectorizer's runtime alias check for wrapping type

2017-02-24 Thread Richard Biener
On Fri, Feb 24, 2017 at 11:53 AM, Bin Cheng wrote: > Hi, > As analyzed in PR69564, inefficient code for runtime alias check is generated > in benchmark > scimark2. It is suspected vectorized loop doesn't run enough iterations to > cover the loss > of the inefficient code. This patch improves r

[PATCH] Fix regressions caused by early debug (DW_OP_GNU_variable_value extension 161109.2; PR debug/77589)

2017-02-24 Thread Jakub Jelinek
Hi! As mentioned in the PR (and other PRs related to DW_AT_string_length, for which a partial workaround has been committed already), the early debug approach regresses the debug info for VLAs and other dynamic properties of the types; when trying to emit DIEs for such types early, we don't have R

[PATCH] Fix PR79690

2017-02-24 Thread Richard Biener
The following fixes PR79690. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2017-02-24 Richard Biener PR tree-optimization/79690 * tree-vect-stmts.c (vectorizable_store): Use vector type built from the DR with address-space. * gcc.target

RE: [PATCH,testsuite] Use logical_op_short_circuit to skip targets in ssa-thread-14.c.

2017-02-24 Thread Toma Tabacu
> From: Jeff Law > > I don't think using !logical_op_short_circuit is too heavy handed here. > > We get good coverage from the x86 target, so I don't mind losing > coverage from avr/s390 as the target selector is a lot more likely to be > correct after your change for the various targets now and

[Ada] Add another check for SSO compatibility

2017-02-24 Thread Eric Botcazou
When removing the wrapper around a justified modular type used to implement a packed array type. This shouldn't make any difference because the front-end is supposed to filter out this case so it's for the sake of robustness. Tested on x86_64-suse-linux, applied on mainline and 6 branch. 2017

[committed] fix a few typos in tree-ssa-loop-niter.c

2017-02-24 Thread Aldy Hernandez
Found this while working on a PR. Committed as obvious. gcc/ * tree-ssa-loop-niter.c (number_of_iterations_exit): Update function comment to reflect reality. (loop_exits_before_overflow): Fix typo in function description. diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree

[PATCH PR69564]Improve vectorizer's runtime alias check for wrapping type

2017-02-24 Thread Bin Cheng
Hi, As analyzed in PR69564, inefficient code for runtime alias check is generated in benchmark scimark2. It is suspected vectorized loop doesn't run enough iterations to cover the loss of the inefficient code. This patch improves runtime alias check for (unsigned) wrapping types. Originally,

[Ada] Fix wrong debug info for variant record

2017-02-24 Thread Eric Botcazou
This is a regression present on the mainline and 6 branch whereby the compiler generates an incorrect GNAT encoding in the debug info for a variant record. Tested on x86_64-suse-linux, applied on mainline and 6 branch. 2017-02-24 Eric Botcazou * gcc-interface/utils.c (fold_bit_posit

[Ada] Fix segfault in NRV on pathological case

2017-02-24 Thread Eric Botcazou
This is a regression present on all active branches where the NRV pass implemented in gigi segfaults on a pathological case. Tested on x86_64-suse-linux, applied on all active branches. 2017-02-24 Eric Botcazou * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check

[PATCH] Fix PR45397

2017-02-24 Thread Richard Biener
The following fixes the missing staturating op pattern detection by teaching FRE to CSE a narrower (or sign-changed) add/sub/mul with a wider one and compensating with a cast (for sign-changing) or a bit-and (for narrowing and zero-extending). This is a bit awkward (and it doesn't handle all of t

Re: [PATCH] PR79389, path-splitting

2017-02-24 Thread Richard Biener
On Thu, 23 Feb 2017, Richard Biener wrote: > > This PR shows another defect in path-splittings cost model which the > following patch tries to improve further. > > Bootstrap and regtest running on x86_64-unknown-linux-gnu. It has been pointed out this causes compare-debug issues. Whoops. Fixe

[Ada] Fix calling convention mistmatch with C++ on Windows

2017-02-24 Thread Eric Botcazou
This is a long-standing regression present on 32-bit Windows when you try to interface a C++ class which contains both virtual and non-virtual methods. In both cases the C++ side uses the 'thiscall' calling convention, whereas the Ada side only uses it for the former methods in this case. Tested

Re: enable -Wformat-truncation with -Og (PR 79691)

2017-02-24 Thread Jakub Jelinek
On Fri, Feb 24, 2017 at 11:10:51AM +0100, Richard Biener wrote: > On Fri, Feb 24, 2017 at 1:35 AM, Martin Sebor wrote: > > Bug 79691 - -Wformat-truncation suppressed by (and only by) -Og > > points out that the gimple-ssa-sprintf pass doesn't run when > > this optimization option is used. That's

Re: enable -Wformat-truncation with -Og (PR 79691)

2017-02-24 Thread Richard Biener
On Fri, Feb 24, 2017 at 1:35 AM, Martin Sebor wrote: > Bug 79691 - -Wformat-truncation suppressed by (and only by) -Og > points out that the gimple-ssa-sprintf pass doesn't run when > this optimization option is used. That's because I forgot to > add it to the set of optimization passes that run

[Ada] Fix back-and-forth issue in debugger

2017-02-24 Thread Eric Botcazou
This is a small regression present on the mainline: under some circumstances, the debugger may go back and forth when stepping over a call, if the arguments contain string concatenations. Tested on x86_64-suse-linux, applied on the mainline. 2017-02-24 Eric Botcazou * gcc-interface

Re: fwprop fix for PR79405

2017-02-24 Thread Richard Biener
On Thu, Feb 23, 2017 at 11:17 PM, Jeff Law wrote: > On 02/23/2017 01:57 AM, Richard Biener wrote: >> >> On Wed, Feb 22, 2017 at 6:19 PM, Jeff Law wrote: >>> >>> On 02/16/2017 12:41 PM, Bernd Schmidt wrote: We have two registers being assigned to each other: (set (reg 213

Re: [PATCH][PR tree-optimization/79578] Use operand_equal_p rather than pointer equality for base test

2017-02-24 Thread Richard Biener
On Thu, Feb 23, 2017 at 10:06 PM, Jeff Law wrote: > On 02/23/2017 02:02 AM, Richard Biener wrote: > >>> diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c >>> index 84c0b11..a82e164 100644 >>> --- a/gcc/tree-ssa-dse.c >>> +++ b/gcc/tree-ssa-dse.c >>> @@ -176,7 +176,7 @@ clear_bytes_written_by (s

[Ada] Fix wrong size computation with boolean discriminant

2017-02-24 Thread Eric Botcazou
This is a regression present on the mainline and caused by the wrong handling of TRUTH_NOT_EXPR by the max_size function. Tested on x86_64-suse-linux, applied on the mainline. 2017-02-24 Eric Botcazou * gcc-interface/utils.c (max_size) : Flip the second argument when recursi