[PATCH][PR 67328] Improve bitfield testing

2017-01-25 Thread Yuri Gribov
Hi all, This fixes inefficient bitfield code reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67328 Bootstrapped and regtested on x86_64. Ok for trunk? -I pr67328-2.patch Description: Binary data

Re: [PATCH] Add --with-gcc-major-version-only support to libhsail-rt

2017-01-25 Thread Jakub Jelinek
On Tue, Jan 24, 2017 at 11:59:36PM +0100, Jakub Jelinek wrote: > Though, I wonder why configure.ac/Makefile.am have been based on one of the > only 2 that aren't GPL licensed, there are over dozen other libraries that > have very simple GPL configure.ac and Makefile.am, can't we just rewrite > thos

[PATCH] Fix PR78363

2017-01-25 Thread Richard Biener
The following patch fixes PR78363, debug confused by early debug emitted from inconsistent IL which happens after OMP outlining wrecks parts of the BLOCK tree (outlined TYPE_DECLs have wrong context). Bootstrapped and tested on x86_64-unknown-linux-gnu, ok for trunk? Thanks, Richard. 2017-01-25

Re: Improve things for PR71724, in combine/if_then_else_cond

2017-01-25 Thread Christophe Lyon
On 24 January 2017 at 18:15, Bernd Schmidt wrote: > On 01/24/2017 06:03 PM, Christophe Lyon wrote: >> >> Ha... the regression occurred between r 244818 and r 244816, >> and I read r 244816 ChangeLog too quickly and did not notice >> it was modifying ifcvt.c in addition to x86-only files. >> >> So

Re: [PATCH] Fix PR78363

2017-01-25 Thread Jakub Jelinek
On Wed, Jan 25, 2017 at 09:52:41AM +0100, Richard Biener wrote: > 2017-01-25 Richard Biener > > PR debug/78363 > * omp-expand.c: Include debug.h. > (expand_omp_taskreg): Make sure to generate early debug before > outlining anything from a function. > (expand_omp_ta

Re: Improve things for PR71724, in combine/if_then_else_cond

2017-01-25 Thread Kyrill Tkachov
On 25/01/17 08:53, Christophe Lyon wrote: On 24 January 2017 at 18:15, Bernd Schmidt wrote: On 01/24/2017 06:03 PM, Christophe Lyon wrote: Ha... the regression occurred between r 244818 and r 244816, and I read r 244816 ChangeLog too quickly and did not notice it was modifying ifcvt.c in add

Re: [PATCH] [AArch64] Enable AES and cmp_branch fusion for Thunderx2t99

2017-01-25 Thread Kyrill Tkachov
Hi Naveen, On 25/01/17 06:16, Hurugalawadi, Naveen wrote: Hi, Please find attached the patch that adds AES and CMP_BRANCH fusion for Thunderx2t99. Bootstrapped and Regression tested on aarch64-thunderx2t99. Please review the patch and let us know if its okay? Code looks ok (it's quite simple

Re: Improve things for PR71724, in combine/if_then_else_cond

2017-01-25 Thread Christophe Lyon
On 25 January 2017 at 10:18, Kyrill Tkachov wrote: > > On 25/01/17 08:53, Christophe Lyon wrote: >> >> On 24 January 2017 at 18:15, Bernd Schmidt wrote: >>> >>> On 01/24/2017 06:03 PM, Christophe Lyon wrote: Ha... the regression occurred between r 244818 and r 244816, and I read r

Re: [PATCH] BRIG frontend: request for a global review

2017-01-25 Thread Thomas Schwinge
Hi! On Tue, 24 Jan 2017 13:52:10 +0100, Martin Jambor wrote: > [BRIG front end] "contrib/gcc_update" needs to be updated for "libhsail-rt". Here is a patch to fix some Autotools issues in libhsail-rt (currently testing); OK for trunk? commit 00d64708323f74191ce5a39b223bca92295fc606 Author: Th

Re: [PATCH][wwwdocs] Mention new store merging pass for GCC 7

2017-01-25 Thread Kyrill Tkachov
On 24/01/17 13:44, Richard Earnshaw (lists) wrote: On 23/01/17 16:45, Gerald Pfeifer wrote: Hi Kyrill, On Mon, 23 Jan 2017, Kyrill Tkachov wrote: This patch adds a short entry for the store merging pass in GCC 7 to the "General Optimizer Improvements" section. + A new store merging pass has

Re: [PATCH][doc] Correct optimisation levels documentation for -fstore-merging

2017-01-25 Thread Kyrill Tkachov
On 23/01/17 23:39, Jeff Law wrote: On 01/23/2017 10:28 AM, Kyrill Tkachov wrote: Hi all, I had forgotten to update the -fstore-merging documentation from a previous iteration of the pass and it says that it's enabled at -O and higher. The option is in fact enabled at -O2 and higher, as well as

[PATCH] Fix PR69264

2017-01-25 Thread Richard Biener
This fixes PR69264, reverting an earlier change that was trying to bypass the broken/unclear vector_alignment_reachable hook. x86 doesn't define this hook and thus inherits the default implementation. Now - the args we feed to the hook changed over time, esp. the is_packed arg now (correctly) te

Re: [PATCH] Fix PR78189

2017-01-25 Thread Kyrill Tkachov
On 23/01/17 19:26, Christophe Lyon wrote: Hi Nick, On 23 January 2017 at 10:04, Richard Biener wrote: On Fri, 20 Jan 2017, Nick Clifton wrote: Hi Guys, [I have been asked to look at this PR in the hopes that it can be fixed soon and so no longer act as a blocker for the gcc 7 branch]

RFA: Patch for ARM PR77770

2017-01-25 Thread Nick Clifton
Hi Richard, Hi Ramana, The patch below is a simple fix for PR0. I am not really expecting you to agree with it, but I thought that it was worth posting so that this PR could be looked at again and maybe a better patch found. (Plus I am trying to close PRs so that the gcc 7 branch w

Re: Improve things for PR71724, in combine/if_then_else_cond

2017-01-25 Thread Richard Earnshaw (lists)
On 25/01/17 09:29, Christophe Lyon wrote: > On 25 January 2017 at 10:18, Kyrill Tkachov > wrote: >> >> On 25/01/17 08:53, Christophe Lyon wrote: >>> >>> On 24 January 2017 at 18:15, Bernd Schmidt wrote: On 01/24/2017 06:03 PM, Christophe Lyon wrote: > > Ha... the regression occ

Re: A + B CMP A -> A CMP' CST' match.pd patterns [was [PATCH] avoid calling memset et al. with excessively large sizes (PR 79095)]

2017-01-25 Thread Richard Biener
On Tue, Jan 24, 2017 at 4:05 PM, Jeff Law wrote: > On 01/24/2017 07:29 AM, Marc Glisse wrote: >> >> On Tue, 24 Jan 2017, Richard Biener wrote: >> That was my thought as well, but AFAICT we only call into match.pd from VRP if we changed the insn. >>> >>> >>> Yes - there was thoughts to ch

Re: [PATCH TEST]Remove xfail for gcc.dg/vect/vect-24.c on ARM targets

2017-01-25 Thread Richard Earnshaw (lists)
On 24/01/17 17:22, Bin Cheng wrote: > Hi, > Test gcc.dg/vect/vect-24.c starts passing after my vectorizer changes, but > not on all targets. For x86_64, looks like other passes still mess up the IR > and prevent it from being vectorized. This patch removes xfail for ARM > targets. > Test resul

Re: [PATCH][PR 67328] Improve bitfield testing

2017-01-25 Thread Richard Biener
On Wed, 25 Jan 2017, Yuri Gribov wrote: > Hi all, > > This fixes inefficient bitfield code reported in > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67328 > > Bootstrapped and regtested on x86_64. > > Ok for trunk? This isn't a regression fix and thus not appropriate at this stage. Some comm

[PATCH][ARM] PR target/79145 Fix xordi3 expander for immediate operands in iWMMXt

2017-01-25 Thread Kyrill Tkachov
Hi all, We're hitting an ICE when expanding a DImode xor with an immediate on TARGET_IWMMXT: (insn 6 5 7 2 (set (reg:DI 111 [ t1.1_3 ]) (xor:DI (reg:DI 110 [ t1.0_2 ]) (const_int 85 [0x55]))) ./z32.c:13 -1 (nil)) The problem is that the general xordi3 expander accepts s

Re: RFA: Patch for ARM PR77770

2017-01-25 Thread Richard Earnshaw (lists)
On 25/01/17 10:28, Nick Clifton wrote: > Hi Richard, Hi Ramana, > > The patch below is a simple fix for PR0. I am not really > expecting you to agree with it, but I thought that it was worth > posting so that this PR could be looked at again and maybe a better > patch found. (Plus I

Re: [PATCH][ARM] PR target/79145 Fix xordi3 expander for immediate operands in iWMMXt

2017-01-25 Thread Richard Earnshaw (lists)
On 25/01/17 10:58, Kyrill Tkachov wrote: > Hi all, > > We're hitting an ICE when expanding a DImode xor with an immediate on > TARGET_IWMMXT: > (insn 6 5 7 2 (set (reg:DI 111 [ t1.1_3 ]) > (xor:DI (reg:DI 110 [ t1.0_2 ]) > (const_int 85 [0x55]))) ./z32.c:13 -1 > (nil)) >

Re: [PATCH][PR 67328] Improve bitfield testing

2017-01-25 Thread Yuri Gribov
On Wed, Jan 25, 2017 at 10:49 AM, Richard Biener wrote: > On Wed, 25 Jan 2017, Yuri Gribov wrote: > >> Hi all, >> >> This fixes inefficient bitfield code reported in >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67328 >> >> Bootstrapped and regtested on x86_64. >> >> Ok for trunk? > > This isn't

Re: [PATCH] Add --with-gcc-major-version-only support to libhsail-rt

2017-01-25 Thread Richard Biener
On Tue, Jan 24, 2017 at 11:59 PM, Jakub Jelinek wrote: > Hi! > > Apparently the configury of this library has been copied over before the > PR79046 changes were done, the following patch updates it. Ok for trunk? Ok. Richard. > Though, I wonder why configure.ac/Makefile.am have been based on o

Re: [PATCH v2] aarch64: Add split-stack initial support

2017-01-25 Thread Jiong Wang
On 24/01/17 18:05, Adhemerval Zanella wrote: On 03/01/2017 13:13, Wilco Dijkstra wrote: + /* If function uses stacked arguments save the old stack value so morestack + can return it. */ + reg11 = gen_rtx_REG (Pmode, R11_REGNUM); + if (cfun->machine->frame.saved_regs_size + || cfun

Re: [PATCH] BRIG frontend: request for a global review

2017-01-25 Thread Jakub Jelinek
On Wed, Jan 25, 2017 at 11:00:50AM +0100, Thomas Schwinge wrote: > Hi! > > On Tue, 24 Jan 2017 13:52:10 +0100, Martin Jambor wrote: > > [BRIG front end] > > "contrib/gcc_update" needs to be updated for "libhsail-rt". > > > Here is a patch to fix some Autotools issues in libhsail-rt (currently

[PATCH][ARM][PR target/78945] Fix libatomic on armv7-m

2017-01-25 Thread Szabolcs Nagy
ARM libatomic inline asm uses sel, uadd8, uadd16 instructions which are only available if __ARM_FEATURE_SIMD32 is defined. libatomic/ 2017-01-25 Szabolcs Nagy PR target/78945 * config/arm/exch_n.c (libat_exchange): Check __ARM_FEATURE_SIMD32. diff --git a/libatomic/config/arm/e

[PATCH] Fix PR72850

2017-01-25 Thread Richard Biener
This changes the testcase back to its original form, it had been adjusted for the new threading passes but those were tamed down by a cost change later. Tested on x86_64-unknwon-linux-gnu, applied. Richard. 2017-01-25 Richard Biener PR testsuite/72850 * gcc.dg/tree-ssa/pr692

Re: [PATCH], PR 79212: Fix ICE when compiling fortran test with openmp

2017-01-25 Thread Jakub Jelinek
On Tue, Jan 24, 2017 at 05:27:26PM +, David Sherwood wrote: > I have a patch to fix the following openmp issue: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79212 > > Writing openmp directives in a certain way in fortran programs can lead to > the following assert: > > internal compiler

[wwwdocs] changes.html - Fortran changes

2017-01-25 Thread Martin Liška
Hello. Following patch documents DO loop changes which were done for upcoming GCC 7.1. Thanks for feedback, Martin Index: htdocs/gcc-7/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-7/changes.html,v retrieving revision 1.40 d

[wwwdocs] changes.html - PGO and GCOV changes

2017-01-25 Thread Martin Liška
Hello. Following patch documents changes in PGO and GCOV which were done for upcoming GCC 7.1. Thanks for feedback, Martin --- /tmp/wwwdocs/htdocs/gcc-7/changes.html 2017-01-25 11:10:56.0 +0100 +++ htdocs/gcc-7/changes.html 2017-01-25 14:48:56.257587082 +0100 @@ -630,6 +630,18 @@ GC

[wwwdocs] changes.html - document -fsanitize-address-use-after-scope

2017-01-25 Thread Martin Liška
Hello. Following patch documents new option -fsanitize-address-use-after-scope which was done for upcoming GCC 7.1. Thanks for feedback, Martin --- /tmp/wwwdocs/htdocs/gcc-7/changes.html 2017-01-25 11:10:56.0 +0100 +++ htdocs/gcc-7/changes.html 2017-01-25 15:44:54.441943930 +0100 @@ -47,

Re: Improve things for PR71724, in combine/if_then_else_cond

2017-01-25 Thread Bernd Schmidt
On 01/25/2017 10:18 AM, Kyrill Tkachov wrote: The test is supposed to test the generation of the vsel instruction. I believe adding an -mcpu=cortex-a57 to the testcases would be best, as VSEL isn't actually available on Cortex-A5, it's just enabled by the -mfpu=fp-armv8 option. A more realistic c

Re: [PATCH, rs6000] Fix for entries in table of overloaded built-in functions

2017-01-25 Thread Bill Schmidt
On Tue, 2017-01-24 at 10:09 -0800, Carl E. Love wrote: > On Tue, 2017-01-24 at 11:08 -0600, Segher Boessenkool wrote: > > On Tue, Jan 24, 2017 at 08:28:37AM -0800, Carl E. Love wrote: > > > The following patch fixes an issue with the entries in the table of > > > built-in functions. All of the ent

Re: [wwwdocs] changes.html - document -fsanitize-address-use-after-scope

2017-01-25 Thread Kyrill Tkachov
Hi Martin, On 25/01/17 14:54, Martin Liška wrote: Hello. Following patch documents new option -fsanitize-address-use-after-scope which was done for upcoming GCC 7.1. Thanks for feedback, Martin + Using -O2 optimization level (and above) rewrites variables of a GIMPLE + type that

Re: [wwwdocs] changes.html - document -fsanitize-address-use-after-scope

2017-01-25 Thread Jakub Jelinek
On Wed, Jan 25, 2017 at 03:00:19PM +, Kyrill Tkachov wrote: > Hi Martin, > > On 25/01/17 14:54, Martin Liška wrote: > > Hello. > > > > Following patch documents new option -fsanitize-address-use-after-scope > > which was done for upcoming GCC 7.1. > > > > Thanks for feedback, > > Martin >

[PATCH] PR libstdc++/70607 make proj(T) and conj(T) return complex

2017-01-25 Thread Jonathan Wakely
We implemented DR 1137 which changed the return types of proj and conj on scalars, but then before the final C++11 standard DR 1522 reverted that change, and we never implemented it. That means since GCC 4.5.0 we've been shipping non-conforming proj and conj functions. This fixes the return types

[PATCH] Fix "classe" typo in C++ Dialect Options docs

2017-01-25 Thread Jonathan Wakely
* doc/invoke.texi (C++ Dialect Options): Fix typo. Committed as obvious. commit 8d4ebdf7bfffefb077a28174aed5cb13e89cb90e Author: Jonathan Wakely Date: Wed Jan 25 14:30:12 2017 + Fix "classe" typo in C++ Dialect Options docs * doc/invoke.texi (C++ Dialect Options)

Re: [PATCH] Fix "classe" typo in C++ Dialect Options docs

2017-01-25 Thread Jonathan Wakely
On 25/01/17 15:07 +, Jonathan Wakely wrote: * doc/invoke.texi (C++ Dialect Options): Fix typo. Committed as obvious. Oops, this was only meant for gcc-patches, not the libstdc++ list, sorry.

Re: Improve things for PR71724, in combine/if_then_else_cond

2017-01-25 Thread Christophe Lyon
On 25 January 2017 at 15:55, Bernd Schmidt wrote: > On 01/25/2017 10:18 AM, Kyrill Tkachov wrote: >> >> The test is supposed to test the generation of the vsel instruction. >> I believe adding an -mcpu=cortex-a57 to the testcases would be best, as >> VSEL isn't actually available on Cortex-A5, it'

Re: Improve things for PR71724, in combine/if_then_else_cond

2017-01-25 Thread Kyrill Tkachov
On 25/01/17 15:20, Christophe Lyon wrote: On 25 January 2017 at 15:55, Bernd Schmidt wrote: On 01/25/2017 10:18 AM, Kyrill Tkachov wrote: The test is supposed to test the generation of the vsel instruction. I believe adding an -mcpu=cortex-a57 to the testcases would be best, as VSEL isn't act

Re: [wwwdocs] changes.html - PGO and GCOV changes

2017-01-25 Thread Martin Liška
Hello. Following patch adds what was said in the changes file to our documentation. Thanks, Martin >From 0da7f4d9a2a895e63271e9dc870814c6c7e3f419 Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 25 Jan 2017 16:41:23 +0100 Subject: [PATCH] Enhance doc for -fprofile-arcs gcc/ChangeLog: 2017-01-2

Re: [PATCH PR78559][RFC]Proposed fix

2017-01-25 Thread Segher Boessenkool
Hi! I was worried this patch would prevent too many other optimisations, so I looked into better options. I didn't find any. I tested the effects of the patch on 31 architectures (building GCC and then Linux with it; 6 errored out building the kernel). There were exactly zero differences in gen

Re: [PATCH] BRIG frontend: request for a global review

2017-01-25 Thread Thomas Schwinge
Hi! On Wed, 25 Jan 2017 13:21:13 +0100, Jakub Jelinek wrote: > On Wed, Jan 25, 2017 at 11:00:50AM +0100, Thomas Schwinge wrote: > > On Tue, 24 Jan 2017 13:52:10 +0100, Martin Jambor wrote: > > > [BRIG front end] $ git grep --cached libbrig gcc/brig/config-lang.in:target_libs="target-lib

Re: [PATCH PR78559][RFC]Proposed fix

2017-01-25 Thread Bin.Cheng
On Wed, Jan 25, 2017 at 3:56 PM, Segher Boessenkool wrote: > Hi! > > I was worried this patch would prevent too many other optimisations, > so I looked into better options. I didn't find any. I tested the > effects of the patch on 31 architectures (building GCC and then Linux Thanks very much fo

Re: [PATCH PR78559][RFC]Proposed fix

2017-01-25 Thread Segher Boessenkool
On Wed, Jan 25, 2017 at 04:08:54PM +, Bin.Cheng wrote: > > I was worried this patch would prevent too many other optimisations, > > so I looked into better options. I didn't find any. I tested the > > effects of the patch on 31 architectures (building GCC and then Linux > Thanks very much for

[PATCH PR71437]Prefer symbolic range bound if the var doesn't have useful range.

2017-01-25 Thread Bin Cheng
Hi, As analyzed in PR71437, it's a missed PRE issue due to missed jump threading, and then due to inaccurate VRP information. In function extract_range_for_var_from_comparison_expr, we compute range for variable "a" under condition that comparison like "a <= limit" is true. It extracts limit's

[PATCH AARCH64]XFAIL gcc.target/aarch64/ldp_vec_64_1.c

2017-01-25 Thread Bin Cheng
Hi, Test gcc.target/aarch64/ldp_vec_64_1.c because we don't choose [base+offset] addressing mode in IVOPT on AArch64. Given auto-increment addressing mode is disabled in IVOPT on AArch64, we can't really test the addressing mode. I may try to enable it only for small loops in GCC8, so this pa

[PATCH] restore pedantic warning on flexible array members (c++/71290)

2017-01-25 Thread Martin Sebor
The improvements to the handling of flexible array members in C++ in GCC 6 inadvertently removed the pedantic warnings GCC used to issue for their declarations. The attached patch restores it. Martin PR c++/71290 - [6/7 Regression] Flexible array member is not diagnosed with -pedantic gcc/cp/Ch

Re: A + B CMP A -> A CMP' CST' match.pd patterns [was [PATCH] avoid calling memset et al. with excessively large sizes (PR 79095)]

2017-01-25 Thread Jeff Law
On 01/25/2017 03:34 AM, Richard Biener wrote: On Tue, Jan 24, 2017 at 4:05 PM, Jeff Law wrote: On 01/24/2017 07:29 AM, Marc Glisse wrote: On Tue, 24 Jan 2017, Richard Biener wrote: That was my thought as well, but AFAICT we only call into match.pd from VRP if we changed the insn. Yes - t

Re: [PATCH] restore pedantic warning on flexible array members (c++/71290)

2017-01-25 Thread Jason Merrill
OK. On Wed, Jan 25, 2017 at 12:02 PM, Martin Sebor wrote: > The improvements to the handling of flexible array members in > C++ in GCC 6 inadvertently removed the pedantic warnings GCC > used to issue for their declarations. The attached patch > restores it. > > Martin

Re: [PATCH AARCH64]XFAIL gcc.target/aarch64/ldp_vec_64_1.c

2017-01-25 Thread Richard Earnshaw (lists)
On 25/01/17 16:49, Bin Cheng wrote: > Hi, > Test gcc.target/aarch64/ldp_vec_64_1.c because we don't choose [base+offset] > addressing mode in IVOPT > on AArch64. Given auto-increment addressing mode is disabled in IVOPT on > AArch64, we can't really test > the addressing mode. I may try to ena

Enable jump threading on maths meeting hot paths

2017-01-25 Thread Jan Hubicka
Hi, this patch modifies profitable_jump_thread_path heuristics by enabling code expansion when the threaded path contains at least one hot path. The basic idea is that while we do not decrease instruction count on the non-duplicated path, we reduce number of entry edges and by this path separation

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-25 Thread Alexander Monakov
Hi, Here's a different approach that doesn't introduce indirection for privatized variables at all, and keeps dependencies obvious in the IR, but, on the flip side, requires mentioning all subfields of privatized structures in a few places. For each privatized variable, add it to the list of outp

Re: [PATCH, rs6000] Fix for entries in table of overloaded built-in functions

2017-01-25 Thread Carl E. Love
Bill: > > > > I don't see any tests for the two built-in entries in rs6000-c.c which the > > patch moves, i.e. > > > > { P8V_BUILTIN_VEC_VGBBD, P8V_BUILTIN_VGBBD, > > > > RS6000_BT

Re: Improve things for PR71724, in combine/if_then_else_cond

2017-01-25 Thread Segher Boessenkool
On Fri, Jan 20, 2017 at 01:24:15PM -0600, Segher Boessenkool wrote: > On Fri, Jan 20, 2017 at 01:33:59PM +0100, Bernd Schmidt wrote: > > So, when looking for situations where we have only one condition, we can > > try to undo the conversion of a plain REG into a condition, on the > > grounds that

[committed] pedwarn on lambda templates (PR c++/77914)

2017-01-25 Thread Jakub Jelinek
Hi! As mentioned in the PR, lambda templates are something that in the end didn't end up in C++14 nor C++17 (only generic lambdas with auto arguments made it). This patch pedwarns on them if -pedantic{,-errors}. Bootstrapped/regtested on x86_64-linux and i686-linux, acked by Jason in the PR, com

[PATCH] Use fld b; fld a; instead of fld a; fld b; fxch %st(1) in reg-stack (PR target/70465)

2017-01-25 Thread Jakub Jelinek
Hi! This patch adds a little optimization, if %st and %st(1) are results of memory loads and we need to exchange them, it is shorter (and on older machines probably also cheaper) to swap the two loads. This triggers 26783 in x86_64-linux and i686-linux bootstraps+regtests. Bootstrapped/regtested

[C++ PATCH] Reject lambda closure types in decompositions (PR c++/78896)

2017-01-25 Thread Jakub Jelinek
Hi! As discussed in the PR, while lambda closure types are class types, it is implementation dependent on what those class types actually contain, allowing that to be decomposed is just weird. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2017-01-25 Jakub Jelinek

[PATCH] prevent -Wno-system-headers from suppressing -Wstringop-overflow (PR 79214)

2017-01-25 Thread Martin Sebor
While putting together examples for the GCC 7 changes document I noticed that a few of the buffer overflow warnings issued by -Wstringop-overflow are defeated by Glibc's macros for string manipulation functions like strncat and strncpy. While testing my fix I also noticed that I had missed a coup

Re: [PATCH] Use fld b; fld a; instead of fld a; fld b; fxch %st(1) in reg-stack (PR target/70465)

2017-01-25 Thread Jeff Law
On 01/25/2017 02:06 PM, Jakub Jelinek wrote: Hi! This patch adds a little optimization, if %st and %st(1) are results of memory loads and we need to exchange them, it is shorter (and on older machines probably also cheaper) to swap the two loads. This triggers 26783 in x86_64-linux and i686-lin

[PATCH,rs6000] Remove invalid P8V_BUILTIN_VEC_VGBBD entries

2017-01-25 Thread Carl E. Love
GCC Maintainers: After further discussion of the two P8V_BUILTIN_VGBBD built-ins that do not take any arguments, it was determined they should just be removed as they are not valid. The patch has been tested on powerpc64le-unknown-linux-gnu (Power 8 LE) with no regressions. Is the patch OK for t

Re: [PATCH] Use fld b; fld a; instead of fld a; fld b; fxch %st(1) in reg-stack (PR target/70465)

2017-01-25 Thread Jakub Jelinek
On Wed, Jan 25, 2017 at 02:43:34PM -0700, Jeff Law wrote: > > 2017-01-25 Jakub Jelinek > > > > PR target/70465 > > * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1); > > emit fld b; fld a; if possible. > > > > * gcc.target/i386/pr70465.c: New test. > So plea

Merge from trunk to gccgo branch

2017-01-25 Thread Ian Lance Taylor
I merged trunk revision 244906 to the gccgo branch. Ian

Re: [PATCH] c++/78771 ICE with inheriting ctor

2017-01-25 Thread Jason Merrill
On Wed, Jan 11, 2017 at 10:53 AM, Nathan Sidwell wrote: > On 01/04/2017 12:53 AM, Jason Merrill wrote: > >> Hmm, that seems like where the problem is. We shouldn't try to >> instantiate the inheriting constructor until we've already chosen the >> base constructor; in the new model the inheriting

Re: [C++ PATCH] Reject lambda closure types in decompositions (PR c++/78896)

2017-01-25 Thread Jason Merrill
OK. On Wed, Jan 25, 2017 at 4:07 PM, Jakub Jelinek wrote: > Hi! > > As discussed in the PR, while lambda closure types are class types, it > is implementation dependent on what those class types actually contain, > allowing that to be decomposed is just weird. > > Bootstrapped/regtested on x86_64

[PATCH, rs6000] Fix PR79160 (vsx-elemrev-4.c)

2017-01-25 Thread Bill Schmidt
Hi, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79160 records that gcc.target/powerpc/vsx-elemrev-4.c fails on powerpc64 big-endian. The test was developed just prior to the introduction of D-form memory access instructions lxv and stxv, so it relied on output of X-form instructions lxvx and stx

Re: [PATCH 4/5] distinguish likely and unlikely results (PR 78703)

2017-01-25 Thread Jeff Law
On 01/22/2017 04:53 PM, Martin Sebor wrote: The attached patch adds the concept of likely and unlikely results of formatted functions to improve the quality of diagnostics (reduce false positives and negatives) while at the same time allowing for rare cases such as a multibyte decimal point in fl

Re: [PATCH] restore pedantic warning on flexible array members (c++/71290)

2017-01-25 Thread Jakub Jelinek
On Wed, Jan 25, 2017 at 10:02:23AM -0700, Martin Sebor wrote: > --- gcc/cp/decl.c (revision 244844) > +++ gcc/cp/decl.c (working copy) > @@ -11798,6 +11798,17 @@ grokdeclarator (const cp_declarator *declarator, > } > else > { > + /* Array is a

Re: [PATCH] restore pedantic warning on flexible array members (c++/71290)

2017-01-25 Thread Martin Sebor
On 01/25/2017 04:53 PM, Jakub Jelinek wrote: On Wed, Jan 25, 2017 at 10:02:23AM -0700, Martin Sebor wrote: --- gcc/cp/decl.c (revision 244844) +++ gcc/cp/decl.c (working copy) @@ -11798,6 +11798,17 @@ grokdeclarator (const cp_declarator *declarator, } else

Re: [PATCH] PR libstdc++/79190 add fallback aligned_alloc implementation

2017-01-25 Thread Jakub Jelinek
On Tue, Jan 24, 2017 at 06:33:51PM +, Jonathan Wakely wrote: > --- a/libstdc++-v3/libsupc++/new_opa.cc > +++ b/libstdc++-v3/libsupc++/new_opa.cc > @@ -55,9 +55,30 @@ extern "C" void *memalign(std::size_t boundary, > std::size_t size); > #endif > #define aligned_alloc memalign > #else > -//

[PATCH][RFA][PR tree-optimization/79095] Improve overflow test optimization and avoid invalid warnings

2017-01-25 Thread Jeff Law
As has been discussed extensively, we're not doing a good job at simplifying overflow tests, particularly those which collapse down to an EQ/NE test. x + -1 > x -> x == 0 x + -1 < x -> x != 0 x + 1 < x -> x == -1U x + 1 > x -> x != -1U The simplifications allow us to propagate a constant

[PATCH], Fix PR target/79179, wrong constraint for power9

2017-01-25 Thread Michael Meissner
This patch fixes the wrong constraint (o instead of wY) for a STXSD instruction on a vector extract operation that is optimizd to do a store if the element being extracted is in the right position. I have built a compiler with/with out the patch on a little endian power8 system. The runs finished

Re: [PATCH,rs6000] Remove invalid P8V_BUILTIN_VEC_VGBBD entries

2017-01-25 Thread Segher Boessenkool
On Wed, Jan 25, 2017 at 01:52:34PM -0800, Carl E. Love wrote: > After further discussion of the two P8V_BUILTIN_VGBBD built-ins that do > not take any arguments, it was determined they should just be removed as > they are not valid. > > The patch has been tested on powerpc64le-unknown-linux-gnu (P

Re: [PATCH, rs6000] Fix PR79160 (vsx-elemrev-4.c)

2017-01-25 Thread Segher Boessenkool
On Wed, Jan 25, 2017 at 04:41:06PM -0600, Bill Schmidt wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79160 records that > gcc.target/powerpc/vsx-elemrev-4.c fails on powerpc64 big-endian. The > test was developed just prior to the introduction of D-form memory > access instructions lxv and

Re: [PATCH] Use fld b; fld a; instead of fld a; fld b; fxch %st(1) in reg-stack (PR target/70465)

2017-01-25 Thread Jeff Law
On 01/25/2017 03:01 PM, Jakub Jelinek wrote: On Wed, Jan 25, 2017 at 02:43:34PM -0700, Jeff Law wrote: 2017-01-25 Jakub Jelinek PR target/70465 * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1); emit fld b; fld a; if possible. * gcc.target

Re: [PATCH], Fix PR target/79179, wrong constraint for power9

2017-01-25 Thread Segher Boessenkool
On Wed, Jan 25, 2017 at 08:03:04PM -0500, Michael Meissner wrote: > This patch fixes the wrong constraint (o instead of wY) for a STXSD > instruction > on a vector extract operation that is optimizd to do a store if the element > being extracted is in the right position. > > I have built a compil

Re: [PATCH][RFA][PR tree-optimization/79095] Improve overflow test optimization and avoid invalid warnings

2017-01-25 Thread Marc Glisse
On Wed, 25 Jan 2017, Jeff Law wrote: As has been discussed extensively, we're not doing a good job at simplifying overflow tests, particularly those which collapse down to an EQ/NE test. x + -1 > x -> x == 0 x + -1 < x -> x != 0 x + 1 < x -> x == -1U x + 1 > x -> x != -1U The simplifica

Re: [PATCH] BRIG frontend: request for a global review

2017-01-25 Thread Pekka Jääskeläinen
On Wed, Jan 25, 2017 at 6:07 PM, Thomas Schwinge wrote: > Hi! > > On Wed, 25 Jan 2017 13:21:13 +0100, Jakub Jelinek wrote: >> On Wed, Jan 25, 2017 at 11:00:50AM +0100, Thomas Schwinge wrote: >> > On Tue, 24 Jan 2017 13:52:10 +0100, Martin Jambor wrote: >> > > [BRIG front end] > > $ git grep