Re: [PATCH, rs6000] Fix PR target/80246, DFP builtins using the wrong types

2017-03-29 Thread Peter Bergner
On 3/29/17 5:28 PM, Segher Boessenkool wrote: > Typo ("argument"). Oops! :-) >> +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ >> +/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */ >> +/* { dg-require-effective-target dfp } */ > > You can leave off the default argumen

Re: [PATCH] have chkp skip flexible member arrays (PR #79986)

2017-03-29 Thread Martin Sebor
On 03/21/2017 01:33 PM, Jason Merrill wrote: On Tue, Mar 21, 2017 at 11:08 AM, Martin Sebor wrote: On 03/20/2017 10:27 PM, Jason Merrill wrote: On Mon, Mar 20, 2017 at 7:58 PM, Martin Sebor wrote: On 03/20/2017 05:51 PM, Jason Merrill wrote: On Mon, Mar 20, 2017 at 7:04 PM, Martin Sebor

[PATCH] Fix various avx512 extraction issues (PR target/80206)

2017-03-29 Thread Jakub Jelinek
Hi! As the testcase shows, we ICE with -mavx512f -ffloat-store, because at -O0 during expansion the destination is MEM, and the corresponding dup operand is some pseudo. There are *_mask patterns that have just register_operand / =v for the desination and vector_move_operand / 0C for the correspo

Re: [PATCH, rs6000] Document location of ELF V2 ABI specification

2017-03-29 Thread Segher Boessenkool
On Wed, Mar 29, 2017 at 04:27:28PM -0500, Bill Schmidt wrote: > There is finally a permanent link to the OpenPOWER ELF V2 ABI Specification > document. This patch adds a paragraph to the PowerPC Built-Ins section of > the GCC documentation to describe its value and provide a link to it. Woohoo!

Re: [PATCH, rs6000] Fix PR target/80246, DFP builtins using the wrong types

2017-03-29 Thread Segher Boessenkool
Hi! On Wed, Mar 29, 2017 at 04:11:19PM -0500, Peter Bergner wrote: > This passed bootstrap and regtesting on powerpc64le-linux and > powerpc64-linux (testsuite in both 32-bit and 64-bit). Ok for mainline? > Ok for the open release branches too? Okay. A few nits below. Thanks! > gcc/testsuite

Re: [PATCH] Real fix for AIX exception handling

2017-03-29 Thread Jeff Law
On 03/29/2017 03:22 PM, David Edelsohn wrote: On Wed, Mar 29, 2017 at 5:20 PM, Jeff Law wrote: On 03/29/2017 02:56 PM, David Edelsohn wrote: On Wed, Mar 29, 2017 at 4:48 PM, Jeff Law wrote: On 03/29/2017 02:21 PM, David Edelsohn wrote: The problem is GCC EH tables and static linking.

Re: C++ PATCH for c++/80095, ICE with this pointer in NSDMI

2017-03-29 Thread Marek Polacek
On Wed, Mar 29, 2017 at 02:56:51PM -0400, Jason Merrill wrote: > On Wed, Mar 29, 2017 at 12:38 PM, Marek Polacek wrote: > > Here we have a reference initialization with NSDMI and *this. We are > > crashing > > because a PLACEHOLDER_EXPR crept into the gimplifier. > > > > This happens since r2186

[PATCH, rs6000] Document location of ELF V2 ABI specification

2017-03-29 Thread Bill Schmidt
Hi, There is finally a permanent link to the OpenPOWER ELF V2 ABI Specification document. This patch adds a paragraph to the PowerPC Built-Ins section of the GCC documentation to describe its value and provide a link to it. I've generated and verified the PDF, and it looks ok. I am very open to

Re: [PATCH] Real fix for AIX exception handling

2017-03-29 Thread David Edelsohn
On Wed, Mar 29, 2017 at 5:20 PM, Jeff Law wrote: > On 03/29/2017 02:56 PM, David Edelsohn wrote: >> >> On Wed, Mar 29, 2017 at 4:48 PM, Jeff Law wrote: >>> >>> On 03/29/2017 02:21 PM, David Edelsohn wrote: The problem is GCC EH tables and static linking. libstdc++ and the >>>

Re: [PATCH] Real fix for AIX exception handling

2017-03-29 Thread Jeff Law
On 03/29/2017 02:56 PM, David Edelsohn wrote: On Wed, Mar 29, 2017 at 4:48 PM, Jeff Law wrote: On 03/29/2017 02:21 PM, David Edelsohn wrote: The problem is GCC EH tables and static linking. libstdc++ and the main application are ending up with two separate copies of the tables to register E

[PATCH, rs6000] Fix PR target/80246, DFP builtins using the wrong types

2017-03-29 Thread Peter Bergner
PR80246 shows a problem with the dxex, dxexq, diex and diexq insn patterns, that shows up when calling their associated builtins. The dxex and dxexq instructions are defined to return 64-bit signed integers (in a FP register), but the output mode of their patterns is _Decimal64/_Decimal128. This l

Re: [PATCH] Real fix for AIX exception handling

2017-03-29 Thread David Edelsohn
On Wed, Mar 29, 2017 at 4:48 PM, Jeff Law wrote: > On 03/29/2017 02:21 PM, David Edelsohn wrote: >> >> >> The problem is GCC EH tables and static linking. libstdc++ and the >> main application are ending up with two separate copies of the tables >> to register EH frames. >> >> Static linking work

Re: [PATCH] combine: Fix PR80233

2017-03-29 Thread Segher Boessenkool
On Wed, Mar 29, 2017 at 02:35:32PM -0600, Jeff Law wrote: > ps. Never in a million years would I have expected isolation of > division by zero to have exposed as many latent issues as it has. Sigh. The trap insns weren't handled very well before, but we didn't generate many either. They still

Re: [PATCH] combine: Fix PR80233

2017-03-29 Thread Jeff Law
On 03/29/2017 02:44 PM, Jakub Jelinek wrote: On Wed, Mar 29, 2017 at 02:35:32PM -0600, Jeff Law wrote: On 03/29/2017 12:23 PM, Segher Boessenkool wrote: If combine has added an unconditional trap there will be a new basic block as well. It will then end up considering the NOTE_INSN_BASIC_BLOCK

Re: [PATCH] Real fix for AIX exception handling

2017-03-29 Thread Jeff Law
On 03/29/2017 02:21 PM, David Edelsohn wrote: The problem is GCC EH tables and static linking. libstdc++ and the main application are ending up with two separate copies of the tables to register EH frames. Static linking worked in GCC 4.8, but not in GCC 4.9. I have been trying to understand

Re: [PATCH] combine: Fix PR80233

2017-03-29 Thread Jakub Jelinek
On Wed, Mar 29, 2017 at 02:35:32PM -0600, Jeff Law wrote: > On 03/29/2017 12:23 PM, Segher Boessenkool wrote: > > If combine has added an unconditional trap there will be a new basic > > block as well. It will then end up considering the NOTE_INSN_BASIC_BLOCK > > as the last_combined_insn, but the

Re: [PATCH] combine: Fix PR80233

2017-03-29 Thread Jeff Law
On 03/29/2017 12:23 PM, Segher Boessenkool wrote: If combine has added an unconditional trap there will be a new basic block as well. It will then end up considering the NOTE_INSN_BASIC_BLOCK as the last_combined_insn, but then it tries to take the DF_INSN_LUID of that and that dereferences a NU

[Patch, Fortran, F03] PR 80046: Explicit interface required: pointer argument

2017-03-29 Thread Janus Weil
Hi all, here is a patch that enhances the diagnostics for procedure-pointer assignments, so that procedure-pointer components that need an explicit interface are correctly rejected. Regtests cleanly on x86_64-linux-gnu. Ok for trunk? Cheers, Janus 2017-03-29 Janus Weil PR fortran/80046

[PING][PATCH][PR sanitizer/77631] Support separate debug info in libbacktrace

2017-03-29 Thread Denis Khalikov
Hello everyone, can someone please review that patch https://gcc.gnu.org/ml/gcc-patches/2017-03/msg01171.html Thanks.

Re: [PATCH] Real fix for AIX exception handling

2017-03-29 Thread David Edelsohn
On Wed, Mar 29, 2017 at 3:50 PM, Jeff Law wrote: > On 03/27/2017 09:41 AM, David Edelsohn wrote: >>> >>> As far as I have discovered, the real problem with AIX exception handling >>> is >>> that the exception landing pads are symbols that must not (but still are) >>> exported from shared libraries

Re: [PATCH] Real fix for AIX exception handling

2017-03-29 Thread Jeff Law
On 03/27/2017 09:41 AM, David Edelsohn wrote: As far as I have discovered, the real problem with AIX exception handling is that the exception landing pads are symbols that must not (but still are) exported from shared libraries - even libstdc++. I'm wondering if attached libtool(!)-patch would f

[PATCH] Fix dwarf2out ICE with C++17 inline static data members with redundant redeclaration (PR debug/80234)

2017-03-29 Thread Jakub Jelinek
Hi! When a C++17 inline static data member has a redundant out-of-class deprecated redeclaration, we can end up with 2 DW_TAG_variable in DW_TAG_compile_unit, one DW_AT_declaration and one with DW_AT_specification pointing to it (the latter emitted for the redeclaration), before gen_member_die can

Re: [PATCH] For broken exception handling in GDB on AIX platform

2017-03-29 Thread Jeff Law
On 03/26/2017 06:05 PM, Joel Brobecker wrote: Hello, I got some review comment from Bernhard Reutner-Fischer, and I have updated the patch accordingly. This patch is for bug opened here:https://sourceware.org/bugzilla/show_bug.cgi?id=21187 This patch has been identified as one of the desirabl

[C++ PATCH] Disable VLA initialization? (PR sanitizer/79993)

2017-03-29 Thread Jakub Jelinek
Hi! GCC 4.8 and earlier didn't allow in C++ initialization of VLA and C doesn't allow it in any GCC release. This has changed when the support for C++1y VLA has been added, then reverted, but apparently only partially. The question is, do we want to support VLA initialization, if yes, with what

Re: [PATCH] For broken exception handling in GDB on AIX platform

2017-03-29 Thread Jeff Law
On 03/26/2017 06:54 PM, David Edelsohn wrote: Nitish works for IBM and I can stand in as the contributor. The patch would be very helpful to work around an AIX exception handling problem. Because the patch is a generic option and not target-specific, it needs a build machinery maintainer or Glo

Re: C PATCH for c/79730, ICE on invalid with DECL_HARD_REGISTER

2017-03-29 Thread Jeff Law
On 03/29/2017 12:07 PM, Marek Polacek wrote: DECL_HARD_REGISTER only expects a VAR_DECL, so check for that first (C++'s make_rtl_for_nonlocal_decl does that, too). Bootstrapped/regtested on x86_64-linux, ok for trunk? 2017-03-29 Marek Polacek PR c/79730 * c-decl.c (finish_de

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-29 Thread Jeff Law
On 03/29/2017 04:05 AM, Richard Biener wrote: After quite some pondering over this and other related bugs I propose the following for GCC 7 which tames down PRE a bit (back to levels of GCC 6). Technically it's the wrong place to fix this, we do have measures in place during elimination but the

Re: C++ PATCH for c++/80095, ICE with this pointer in NSDMI

2017-03-29 Thread Jason Merrill
On Wed, Mar 29, 2017 at 12:38 PM, Marek Polacek wrote: > Here we have a reference initialization with NSDMI and *this. We are crashing > because a PLACEHOLDER_EXPR crept into the gimplifier. > > This happens since r218653 where set_up_extended_ref_temp was changed to > use split_nonconstant_init.

New French PO file for 'gcc' (version 7.1-b20170226)

2017-03-29 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the French team of translators. The file is available at: http://translationproject.org/latest/gcc/fr.po (This file, 'gcc-7.1-b20170226.fr.po', h

[PATCH] combine: Fix PR80233

2017-03-29 Thread Segher Boessenkool
If combine has added an unconditional trap there will be a new basic block as well. It will then end up considering the NOTE_INSN_BASIC_BLOCK as the last_combined_insn, but then it tries to take the DF_INSN_LUID of that and that dereferences a NULL pointer (since such a note is not an INSN_P). Th

C PATCH for c/79730, ICE on invalid with DECL_HARD_REGISTER

2017-03-29 Thread Marek Polacek
DECL_HARD_REGISTER only expects a VAR_DECL, so check for that first (C++'s make_rtl_for_nonlocal_decl does that, too). Bootstrapped/regtested on x86_64-linux, ok for trunk? 2017-03-29 Marek Polacek PR c/79730 * c-decl.c (finish_decl): Check VAR_P. * gcc.dg/pr79730.c:

[PATCH] PR80101: Fix ICE in store_data_bypass_p

2017-03-29 Thread Kelvin Nilsen
This problem reports an assertion error when certain rtl expressions which are not eligible as producers or consumers of a store bypass optimization are passed as arguments to the store_data_bypass_p function. The proposed patch returns false from store_data_bypass_p rather than terminating with

C++ PATCH for c++/80095, ICE with this pointer in NSDMI

2017-03-29 Thread Marek Polacek
Here we have a reference initialization with NSDMI and *this. We are crashing because a PLACEHOLDER_EXPR crept into the gimplifier. This happens since r218653 where set_up_extended_ref_temp was changed to use split_nonconstant_init. As a consequence, cp_gimplify_init_expr might now be receiving

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-29 Thread Bin.Cheng
On Wed, Mar 29, 2017 at 11:05 AM, Richard Biener wrote: > > After quite some pondering over this and other related bugs I propose > the following for GCC 7 which tames down PRE a bit (back to levels > of GCC 6). Technically it's the wrong place to fix this, we do > have measures in place during e

Re: [PR 77333] Fix fntypes of calls calling clones

2017-03-29 Thread Martin Jambor
Hi, On Thu, Mar 16, 2017 at 05:57:51PM +0100, Martin Jambor wrote: > Hi, > > On Mon, Mar 13, 2017 at 01:46:47PM +0100, Richard Biener wrote: > > On Fri, 10 Mar 2017, Martin Jambor wrote: > > > > > Hi, > > > > > > PR 77333 is a i686-windows target bug, which however has its root in > > > our gen

Re: [PATCH PR80153]Always generate folded type conversion in tree-affine

2017-03-29 Thread Bin.Cheng
On Tue, Mar 28, 2017 at 1:34 PM, Richard Biener wrote: > On Tue, Mar 28, 2017 at 2:01 PM, Bin Cheng wrote: >> Hi, >> This patch is to fix PR80153. As analyzed in the PR, root cause is >> tree_affine lacks >> ability differentiating (unsigned)(ptr + offset) and (unsigned)ptr + >> (unsigned)offs

Re: [PATCH v2] S/390: Optimize atomic_compare_exchange and atomic_compare builtins.

2017-03-29 Thread Dominik Vogt
On Mon, Mar 27, 2017 at 09:27:35PM +0100, Dominik Vogt wrote: > The attached patch optimizes the atomic_exchange and > atomic_compare patterns on s390 and s390x (mostly limited to > SImode and DImode). Among general optimizaation, the changes fix > most of the problems reported in PR 80080: > http

Re: [patch v2] Get rid of stack trampolines for nested functions (1/4)

2017-03-29 Thread Andreas Schwab
On Mär 29 2017, Eric Botcazou wrote: >> But I still see some ICEs while running the testsuite, >> which I haven't investigated yet. And the original comment before this >> hunk doesn't make sense at this point. > > The hunk in the 'else' arm of the big surrounding conditional? Yes. It talks ab

Re: [patch v2] Get rid of stack trampolines for nested functions (1/4)

2017-03-29 Thread Eric Botcazou
> Thanks, this gets me further, the ada library now compiles with > -mabi=ilp32. Great, I think that you can apply it as obvious then, it's code which is only exercised in Ada and on ILP32 64-bit platforms so the risk is very low... > But I still see some ICEs while running the testsuite, > whic

[PATCH, committed] PR80158 cleanup (alternate interpretations)

2017-03-29 Thread Bill Schmidt
Hi, The fix for PR80158 is technically correct, but not "future-proof" in the sense that someday we may implement more than one alternate interpretation for a strength reduction candidate. This patch cleans that up. Bootstrapped on powerpc64le-unknown-linux-gnu with no regressions, committed. T

Re: [v3 PATCH] Adjust optional's pretty printer for LWG 2900.

2017-03-29 Thread Jonathan Wakely
On 29/03/17 14:51 +0300, Ville Voutilainen wrote: Tested on Linux-x64. 2017-03-29 Ville Voutilainen Adjust optional's pretty printer for LWG 2900. * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter::__init__): Look at the nested payload in case of non-experimental optional.

[v3 PATCH] Adjust optional's pretty printer for LWG 2900.

2017-03-29 Thread Ville Voutilainen
Tested on Linux-x64. 2017-03-29 Ville Voutilainen Adjust optional's pretty printer for LWG 2900. * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter::__init__): Look at the nested payload in case of non-experimental optional. diff --git a/libstdc++-v3/python/libstdcxx/v6/print

[PATCH] [gcc, testsuite] Don't xfail on s390.

2017-03-29 Thread Dominik Vogt
The attached patch removes the XFAIL in attr-alloc_size-11.c on s390. (PR 79356). https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79356 Untested. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany gcc/testsuite/ChangeLog-attr-alloc-size-11 PR testsuite/79356 * gcc.dg/attr-alloc_

[PATCH][AArch64] Fix missing optimization for CMP+AND

2017-03-29 Thread Sudi Das
Hi all During combine GCC tries to merge CMP (with zero) and AND into a TST. However, in cases where an ANDS operand is not compatible, this was being missed. Adding a define_split where this operand was moved to a register seems to help out. For example for a test : int f (unsigned char *p)

[PATCH][RFC] Fix P1 PR77498

2017-03-29 Thread Richard Biener
After quite some pondering over this and other related bugs I propose the following for GCC 7 which tames down PRE a bit (back to levels of GCC 6). Technically it's the wrong place to fix this, we do have measures in place during elimination but they are not in effect at -O2. For GCC 8 I'd like

Re: [patch v2] Get rid of stack trampolines for nested functions (1/4)

2017-03-29 Thread Andreas Schwab
On Mär 28 2017, Eric Botcazou wrote: >> That needs to use ptr_mode, not Pmode. > > I don't think so, the whole computation is in Pmode. Could you try something > similar to what is done in the 'else' arm of the big surrounding conditional? Thanks, this gets me further, the ada library now comp