[PATCH] Fix PR72488

2017-01-19 Thread Richard Biener
The following fixes PR72488, we forgot to restore SSA info when we aborted VN due to too large SCC size. I've added a verifier that checks that we do not share SSA_NAME_{PTR,RANGE}_INFO. The issue is latent on the GCC 6 branch as well where I will not install the new verifier. Bootstrap and

Re: [PATCH 9e] Update "startwith" logic for pass-skipping to handle __RTL functions

2017-01-19 Thread Richard Biener
On Wed, Jan 18, 2017 at 5:36 PM, Jeff Law wrote: > On 01/17/2017 02:28 AM, Richard Biener wrote: >>> >>> >>> This feels somewhat different, but still a hack. >>> >>> I don't have strong suggestions on how to approach this, but what we've >>> got >>> here feels like a hack and one

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

2017-01-19 Thread Richard Biener
On Wed, Jan 18, 2017 at 5:22 PM, Jakub Jelinek wrote: > On Wed, Jan 18, 2017 at 07:15:34PM +0300, Alexander Monakov wrote: >> On Wed, 18 Jan 2017, Jakub Jelinek wrote: >> > We are talking here about addressable vars, right (so if we turn it into >> > non-addressable, in the SIMT

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-19 Thread Richard Biener
On Wed, Jan 18, 2017 at 4:32 PM, Bin.Cheng wrote: > On Wed, Jan 18, 2017 at 2:54 PM, Richard Biener > wrote: >> On Wed, Jan 18, 2017 at 11:10 AM, Martin Liška wrote: >>> Hello. >>> >>> >>> Patch can bootstrap on

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

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 10:45:08AM +0100, Richard Biener wrote: > > But in the escape analysis we could consider all the specially marked > > "omp simt private" addressable vars to escape and thus confine them into the > > SIMT region that way, right? > > We could. But that doesn't prevent vars

Re: [expand] Fix for PR rtl-optimization/79121 incorrect expansion of extend plus left shift

2017-01-19 Thread Richard Earnshaw (lists)
On 18/01/17 21:07, Jeff Law wrote: > On 01/18/2017 11:08 AM, Richard Earnshaw (lists) wrote: >> PR 79121 is a silent wrong code regression where, when generating a >> shift from an extended value moving from one to two machine registers, >> the type of the right shift is for the most significant

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

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 11:00 AM, Jakub Jelinek wrote: > On Thu, Jan 19, 2017 at 10:45:08AM +0100, Richard Biener wrote: >> > But in the escape analysis we could consider all the specially marked >> > "omp simt private" addressable vars to escape and thus confine them into >> >

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-19 Thread Bin.Cheng
On Thu, Jan 19, 2017 at 9:42 AM, Richard Biener wrote: > On Wed, Jan 18, 2017 at 4:32 PM, Bin.Cheng wrote: >> On Wed, Jan 18, 2017 at 2:54 PM, Richard Biener >> wrote: >>> On Wed, Jan 18, 2017 at 11:10 AM, Martin

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

2017-01-19 Thread Alexander Monakov
On Thu, 19 Jan 2017, Jakub Jelinek wrote: > On Thu, Jan 19, 2017 at 10:45:08AM +0100, Richard Biener wrote: > > > But in the escape analysis we could consider all the specially marked > > > "omp simt private" addressable vars to escape and thus confine them into > > > the > > > SIMT region that

coretypes.h: change class rtx_def to struct

2017-01-19 Thread Gerald Pfeifer
This innocent looking patch shaves 1749 warnings in stage 1 when building with clang (such as on newer versions of FreeBSD). Richi, at one point you indicated such changes would be fine (though usually they go from struct to class)? Gerald 2016-09-28 Gerald Pfeifer

Re: coretypes.h: change class rtx_def to struct

2017-01-19 Thread Richard Biener
On Thu, 19 Jan 2017, Jakub Jelinek wrote: > On Thu, Jan 19, 2017 at 12:23:34PM +0100, Richard Biener wrote: > > On Thu, 19 Jan 2017, Gerald Pfeifer wrote: > > > > > This innocent looking patch shaves 1749 warnings in stage 1 > > > when building with clang (such as on newer versions of FreeBSD).

[Ada] Spurious dimensionality errors in inlined bodies.

2017-01-19 Thread Arnaud Charlet
This patch removes spurious dimensionality errors in programs that are compiled with front-end inlining (as in SPARK mode). The original model of dimensionality checking analyzes only nodes coming from source because the correctness of the dimensioned program only depends on source user code.

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread Tamar Christina
Hi All, This is a slight modification of the earlier patch (Using a different constant in the mask creation.) < + HOST_WIDE_INT_M1 << bits)); --- > + HOST_WIDE_INT_M1U << > bits)); Kind Regards,

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

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 10:37 AM, Jakub Jelinek wrote: > On Thu, Jan 19, 2017 at 10:31:38AM +0100, Richard Biener wrote: >> On Wed, Jan 18, 2017 at 5:22 PM, Jakub Jelinek wrote: >> > On Wed, Jan 18, 2017 at 07:15:34PM +0300, Alexander Monakov wrote: >> >> On

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

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 10:44 AM, Alexander Monakov wrote: > On Thu, 19 Jan 2017, Richard Biener wrote: >> >> What about motion in the other direction, upwards across SIMT_ENTER()? >> > >> > I think this is a question for Richard, whether it can be done in the alias >> >

Fix false positive of symtab_node::equal_address_to

2017-01-19 Thread Jan Hubicka
Hi, this patch fixes false positive of symtab_node::equal_address_to when comparing non-interposable alias with interposable definition. Honza Index: ChangeLog === --- ChangeLog (revision 244611) +++ ChangeLog (working copy) @@

Re: [PATCH] Add AVX512 k-mask intrinsics

2017-01-19 Thread Kirill Yukhin
Hi Andrew, On 18 Jan 15:45, Andrew Senkevich wrote: > 2017-01-17 16:51 GMT+03:00 Jakub Jelinek : > > On Tue, Jan 17, 2017 at 04:03:08PM +0300, Andrew Senkevich wrote: > >> > I've played a bit w/ SDE. And looks like operands are not early clobber: > >> > TID0: INS

Re: coretypes.h: change class rtx_def to struct

2017-01-19 Thread Richard Biener
On Thu, 19 Jan 2017, Gerald Pfeifer wrote: > This innocent looking patch shaves 1749 warnings in stage 1 > when building with clang (such as on newer versions of FreeBSD). > > Richi, at one point you indicated such changes would be fine > (though usually they go from struct to class)? In this

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 11:25 AM, Bin.Cheng wrote: > On Thu, Jan 19, 2017 at 9:42 AM, Richard Biener > wrote: >> On Wed, Jan 18, 2017 at 4:32 PM, Bin.Cheng wrote: >>> On Wed, Jan 18, 2017 at 2:54 PM, Richard Biener >>>

Re: [committed] Implement LANG_HOOKS_TYPE_FOR_SIZE for jit

2017-01-19 Thread Richard Biener
On Wed, Jan 18, 2017 at 10:45 PM, David Malcolm wrote: > The jit testcase test-nested-loops.c was crashing. > > Root cause is that deep inside loop optimization we're now exposing > this call within fold-const.c which wasn't being hit before: > > 4082 /* Compute the mask

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

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 10:31:38AM +0100, Richard Biener wrote: > On Wed, Jan 18, 2017 at 5:22 PM, Jakub Jelinek wrote: > > On Wed, Jan 18, 2017 at 07:15:34PM +0300, Alexander Monakov wrote: > >> On Wed, 18 Jan 2017, Jakub Jelinek wrote: > >> > We are talking here about

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

2017-01-19 Thread Alexander Monakov
On Thu, 19 Jan 2017, Richard Biener wrote: > >> What about motion in the other direction, upwards across SIMT_ENTER()? > > > > I think this is a question for Richard, whether it can be done in the alias > > oracle. If yes, it supposedly can be done for both SIMT_ENTER and > > SIMT_EXIT. > > Code

[PATCH] Fix libgfortran bootstrap error on x86_64-mingw32 (PR target/79127)

2017-01-19 Thread Jakub Jelinek
Hi! Apparently the Windows SEH has problems with the [xyz]mm16 and later registers that were added with AVX512F (usable in 64-bit code only), if any of the zmm16 to zmm31 registers are used in some function compiled with avx512f or later, GCC emits .seh_savexmm %xmm16, ... directive or similar

Re: coretypes.h: change class rtx_def to struct

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 12:23:34PM +0100, Richard Biener wrote: > On Thu, 19 Jan 2017, Gerald Pfeifer wrote: > > > This innocent looking patch shaves 1749 warnings in stage 1 > > when building with clang (such as on newer versions of FreeBSD). > > > > Richi, at one point you indicated such

[Ada] Memory leak on function returning a limited view result

2017-01-19 Thread Arnaud Charlet
This patch modifies the processing of subprograms to properly frag a function as returning by reference when the return type is a limited view and the full view of the type requires the secondary stack. -- Source -- -- pack_1.ads with Pack_2; with Ada.Finalization;

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-19 Thread Bin.Cheng
On Thu, Jan 19, 2017 at 11:22 AM, Richard Biener wrote: > On Thu, Jan 19, 2017 at 11:25 AM, Bin.Cheng wrote: >> On Thu, Jan 19, 2017 at 9:42 AM, Richard Biener >> wrote: >>> On Wed, Jan 18, 2017 at 4:32 PM, Bin.Cheng

[Ada] Better error message on illegal selected component with overloaded prefix.

2017-01-19 Thread Arnaud Charlet
This patch inproves the error report produced on a selected component Nam.Comp which appears in an object declaration, when Nam has seeveral interpretations as a function, and there is non-visible package with the same name. Compiling pqi.adb must yield: pqi.adb:15:07: no legal

[Ada] Missing invariant procedure body in SPARK mode

2017-01-19 Thread Arnaud Charlet
This patch modifies the generation of the invariant procedure body as follows: * The body of the "partial" invariant procedure is still generated at the end of the visible declarations. * The body of the "full" invariant procedure is generated when the related type is frozen or at

Re: [PATCH] Introduce --with-gcc-major-version-only configure option (take 2)

2017-01-19 Thread Franz Sirl
Am 2017-01-12 um 21:16 schrieb Jakub Jelinek: libmpx/ * configure.ac: Add GCC_BASE_VER. * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to get version from BASE-VER file. * configure: Regenerated. Hi, it seems libmpx/configure.ac is missing

[RS6000] PR79144, cmpstrnsi optimization breaks glibc

2017-01-19 Thread Alan Modra
glibc compiled with current gcc-7 fails one test due to strcmp and strncmp appearing in the PLT. This is because the inline expansion of those functions falls back to a function call, but not using the asm name for the call. Fixed by retrieving the asm name from the builtin decl. I used the

[PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Aldy Hernandez
In the attached testcase, we have a clearly bounded case of alloca which is being incorrectly reported: void g (int *p, int *q) { size_t n = (size_t)(p - q); if (n < 10) f (__builtin_alloca (n)); } The problem is that VRP gives us an anti-range for `n' which may be out of range:

[PATCH][AArch64] Purge leftover occurrences of aarch64_nopcrelative_literal_loads

2017-01-19 Thread Kyrill Tkachov
Hi all, The patch that renamed all uses of aarch64_nopcrelative_literal_loads into aarch64_pcrelative_literal_loads missed out its extern declaration in aarch64-protos.h and a couple of its uses in aarch64.md. The aarch64_nopcrelative_literal_loads doesn't get initialised anywhere (since it's

[RS6000] Don't expand strcmp and strncmp inline when -Os

2017-01-19 Thread Alan Modra
The inline expansions are non-trivial, so aren't really appropriate for -Os. Bootstrapped and regression tested powerpc64le-linux. OK to apply? * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if optimizing for size. diff --git a/gcc/config/rs6000/rs6000.md

Re: [PATCH] Introduce --with-gcc-major-version-only configure option (take 2)

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 01:13:14PM +0100, Franz Sirl wrote: > Am 2017-01-12 um 21:16 schrieb Jakub Jelinek: > > libmpx/ > > * configure.ac: Add GCC_BASE_VER. > > * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to > > get version from BASE-VER file. > > *

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 1:17 PM, Aldy Hernandez wrote: > In the attached testcase, we have a clearly bounded case of alloca which is > being incorrectly reported: > > void g (int *p, int *q) > { >size_t n = (size_t)(p - q); > >if (n < 10) > f (__builtin_alloca (n));

Re: [PATCH, Fortran, pr70696, v2] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray

2017-01-19 Thread Andre Vehreschild
Hi all, unfortunately triggered this patch a regression in the opencoarray's testsuite, which also occurs outside of opencoarray, when a caf-function is used in a block in the main-program. This patch fixes the error and adds a testcase. Bootstrapped and regtested ok on x86_64-linux/f25. Ok for

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Aldy Hernandez
On 01/19/2017 07:45 AM, Richard Biener wrote: On Thu, Jan 19, 2017 at 1:17 PM, Aldy Hernandez wrote: In the attached testcase, we have a clearly bounded case of alloca which is being incorrectly reported: void g (int *p, int *q) { size_t n = (size_t)(p - q); if (n <

[PATCH] Fix false positive for -Walloc-size-larger-than (PR, bootstrap/79132).

2017-01-19 Thread Martin Liška
Hello. Following patch fixes asan bootstrap, as mentioned in the PR. Ready to be installed? Thanks, Martin >From 6a3d1b85e124751fdb804ae86596d30ea98b54af Mon Sep 17 00:00:00 2001 From: marxin Date: Thu, 19 Jan 2017 10:25:55 +0100 Subject: [PATCH] Fix false positive for

Re: transaction_safe exceptions prevent libstdc++ building for some targets

2017-01-19 Thread Joe Seymour
On 18/01/2017 19:24, DJ Delorie wrote: > Joe Seymour writes: >>> the msp430 -mlarge multilib failing to build with... configure: error: Unknown underlying type for size_t make[1]: *** [configure-target-libstdc++-v3] Error 1 >> >> This is still reproducible. > >

Re: Fortran, committed: Forall-with-temporary problems(pr 50069 and pr 55086).

2017-01-19 Thread Christophe Lyon
Hi, On 18 January 2017 at 22:45, Louis Krupp wrote: > Fixed in revision 244601. > I've noticed a new failure on arm/aarch64: compiler driver --help=fortran option(s): "^ +-.*[^:.]$" absent from output: " -ftest-forall-temp Force creation of temporary to test

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

2017-01-19 Thread Alexander Monakov
On Wed, 18 Jan 2017, Jakub Jelinek wrote: > > Inlining needs to do just like omp-low; if we take the current framework, it > > would need to collect addressable locals into one struct, replace > > references to > > those locals by field references in the inlined body. Then it needs to > >

Re: [Ping~]Re: [5/5][libgcc] Runtime support for AArch64 return address signing (needs new target macros)

2017-01-19 Thread Richard Earnshaw (lists)
On 18/01/17 17:07, Jiong Wang wrote: > On 12/01/17 18:10, Jiong Wang wrote: >> On 06/01/17 11:47, Jiong Wang wrote: >>> This is the update on libgcc unwinder support according to new DWARF >>> proposal. >>> >>> As Joseph commented, duplication of unwind-dw2.c is not encouraged in >>> libgcc, >>>

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

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 04:36:25PM +0300, Alexander Monakov wrote: > On Wed, 18 Jan 2017, Jakub Jelinek wrote: > > > Inlining needs to do just like omp-low; if we take the current framework, > > > it > > > would need to collect addressable locals into one struct, replace > > > references to > >

Re: [PATCH] Fix libgfortran bootstrap error on x86_64-mingw32 (PR target/79127)

2017-01-19 Thread FX
> 2017-01-19 Jakub Jelinek > > PR target/79127 > * acinclude.m4 (LIBGFOR_CHECK_AVX512F): Ensure the test clobbers > some zmm16+ registers to verify they are handled by unwind info > properly if needed. > * configure: Regenerated. OK to commit,

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 2:02 PM, Aldy Hernandez wrote: > On 01/19/2017 07:45 AM, Richard Biener wrote: >> >> On Thu, Jan 19, 2017 at 1:17 PM, Aldy Hernandez wrote: >>> >>> In the attached testcase, we have a clearly bounded case of alloca which >>> is >>>

Re: [2/5][DWARF] Generate dwarf information for -msign-return-address by introducing new DWARF mapping hook

2017-01-19 Thread Richard Earnshaw (lists)
On 17/01/17 15:11, Jiong Wang wrote: > > > On 17/01/17 13:57, Richard Earnshaw (lists) wrote: >> On 16/01/17 14:29, Jiong Wang wrote: >>> I can see the reason for doing this is if you want to seperate the interpretion of GCC CFA reg-note and the final DWARF CFA operation. My

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Tamar Christina
Hi Joseph & Jeff, Thanks for the feedback! > > Generally, I don't see tests added that these new functions are correct > > for float, double and long double, which would detect such issues if run > > for a target with IBM long double. > > Specifically, I think gcc.dg/tg-tests.h should have tests

Re: [expand] Fix for PR rtl-optimization/79121 incorrect expansion of extend plus left shift

2017-01-19 Thread Jeff Law
On 01/19/2017 03:37 AM, Richard Earnshaw (lists) wrote: On 18/01/17 21:07, Jeff Law wrote: On 01/18/2017 11:08 AM, Richard Earnshaw (lists) wrote: PR 79121 is a silent wrong code regression where, when generating a shift from an extended value moving from one to two machine registers, the type

Re: [Ping~]Re: [5/5][libgcc] Runtime support for AArch64 return address signing (needs new target macros)

2017-01-19 Thread Jiong Wang
Thanks for the review. On 19/01/17 14:18, Richard Earnshaw (lists) wrote: diff --git a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c index 8085a42ace15d53f4cb0c6681717012d906a6d47..cf640135275deb76b820f8209fa51eacfd64c4a2 100644 --- a/libgcc/unwind-dw2.c +++ b/libgcc/unwind-dw2.c @@ -136,6

Re: [PATCH, Fortran, pr70696, v2] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray

2017-01-19 Thread Steve Kargl
On Thu, Jan 19, 2017 at 01:07:50PM +0100, Andre Vehreschild wrote: > Hi all, > > unfortunately triggered this patch a regression in the opencoarray's > testsuite, > which also occurs outside of opencoarray, when a caf-function is used in a > block in the main-program. This patch fixes the error

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-19 Thread Alexander Monakov
On Wed, 18 Jan 2017, Jakub Jelinek wrote: > On Wed, Jan 18, 2017 at 10:52:32PM +0300, Alexander Monakov wrote: > > Sorry for not noticing this earlier, but ... > > > > > +#ifdef __LP64__ > > > +typedef unsigned long long CUdeviceptr; > > > +#else > > > +typedef unsigned CUdeviceptr; > > > +#endif

C++ PATCH for c++/79130 (direct-initialization of arrays with decomposition)

2017-01-19 Thread Jason Merrill
Jakub pointed out that parenthesized decomposition of an array wasn't properly using direct-initialization. Rather than pass the flags down into build_vec_init at this point in GCC 7 development, let's turn the initializer into something that build_vec_init recognizes as direct-initialization.

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Joseph Myers
On Thu, 19 Jan 2017, Tamar Christina wrote: > > Also, I don't think the call to perform_ibm_extended_fixups in > > is_subnormal is correct. Subnormal for IBM long double is *not* the same > > as subnormal double high part. Likewise it's incorrect in is_normal as > > well. > > The calls to

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2017-01-19 Thread Martin Liška
On 01/18/2017 11:18 PM, Jan Hubicka wrote: >> >> 2016-12-19 Martin Liska >> >> * cgraphclones.c (cgraph_node::create_virtual_clone): >> Create either IPA_REF_LOAD of IPA_REF_READ depending on >> whether new_tree is a VAR_DECL or an ADDR_EXPR. >> * ipa-cp.c

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2017-01-19 Thread Jan Hubicka
> >> 2016-12-19 Martin Liska > >> > >>* cgraphclones.c (cgraph_node::create_virtual_clone): > >>Create either IPA_REF_LOAD of IPA_REF_READ depending on > >>whether new_tree is a VAR_DECL or an ADDR_EXPR. > >>* ipa-cp.c (create_specialized_node): Add reference

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

2017-01-19 Thread Cesar Philippidis
On 01/18/2017 06:22 AM, Richard Biener wrote: > On Wed, Jan 18, 2017 at 3:11 PM, Alexander Monakov wrote: >> On Wed, 18 Jan 2017, Richard Biener wrote: After OpenMP lowering, inlining might break this by inlining functions with address-taken locals into SIMD regions.

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Tamar Christina
> > The calls to is_zero and is_subnormal were incorrect indeed. I've > > corrected them by not calling the fixup code and to instead make sure it > > falls through into the old fp based code which did normal floating point > > operations on the number. This is the same code as was before in > >

[PATCH] Fix further -fdebug-types-section bugs (PR debug/79129)

2017-01-19 Thread Jakub Jelinek
Hi! This is on top of the PR78835 patch I've posted yesterday. We ICE on the following testcase reduced from libstdc++ ios_failure.cc. If there are nested comdat types, as B (outer type) and A (inner type) in the testcase, we first move A to a type unit and add there copies of its children, and

Re: [WPA PATCH] Comdat group splitting

2017-01-19 Thread Jan Hubicka
> honza, > this is the fix for the partitioned WPA bug I was tracking down. > > We have base and complete dtors sharing a comdat group (one's an alias for > the other). The linker tells us the complete dtor is PREVAILING_DEF, as > it's referenced from some other library. The base dtor is

Re: C++ PATCH for c++/79130 (direct-initialization of arrays with decomposition)

2017-01-19 Thread Jason Merrill
On Thu, Jan 19, 2017 at 9:43 AM, Jason Merrill wrote: > Jakub pointed out that parenthesized decomposition of an array wasn't > properly using direct-initialization. Rather than pass the flags down > into build_vec_init at this point in GCC 7 development, let's turn the >

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

2017-01-19 Thread Alexander Monakov
On Thu, 19 Jan 2017, Jakub Jelinek wrote: > On Thu, Jan 19, 2017 at 04:36:25PM +0300, Alexander Monakov wrote: > > > One of the problems with that is that it means that you can't easily turn > > > addressable private variables into non-addressable ones once you force > > > them > > > into such

[PATCH, i386]: Remove config/i386/rtems-64.h

2017-01-19 Thread Uros Bizjak
Hello! This file is now the same as config/i386/rtemself.h. Remove one copy. 2017-01-19 Uros Bizjak * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h instead of i386/rtems-64.h. * config/i386/rtems-64.h: Remove. Committed as obvious. Uros. Index:

Re: [RS6000] PR79144, cmpstrnsi optimization breaks glibc

2017-01-19 Thread Segher Boessenkool
On Thu, Jan 19, 2017 at 10:44:27PM +1030, Alan Modra wrote: > glibc compiled with current gcc-7 fails one test due to strcmp and > strncmp appearing in the PLT. This is because the inline expansion of > those functions falls back to a function call, but not using the asm > name for the call.

Re: [PATCH] Introduce --with-gcc-major-version-only configure option (take 2)

2017-01-19 Thread Matthias Klose
On 19.01.2017 13:26, Jakub Jelinek wrote: > On Thu, Jan 19, 2017 at 01:13:14PM +0100, Franz Sirl wrote: >> Am 2017-01-12 um 21:16 schrieb Jakub Jelinek: >>> libmpx/ >>> * configure.ac: Add GCC_BASE_VER. >>> * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to >>> get

Re: [PATCH], PowerPC ISA 3.0 defaults + IEEE 128-bit floating point test

2017-01-19 Thread Segher Boessenkool
On Wed, Jan 18, 2017 at 08:35:05PM -0500, Michael Meissner wrote: > This patch changes the default options enabled for the PowerPC -mcpu=power9 > option to include the undocumented -mpower9-minmax option. This option > enables > MIN/MAX instructions that do not require -ffast-math or

Re: [RS6000] Don't expand strcmp and strncmp inline when -Os

2017-01-19 Thread Segher Boessenkool
On Thu, Jan 19, 2017 at 10:47:12PM +1030, Alan Modra wrote: > --- a/gcc/config/rs6000/rs6000.md > +++ b/gcc/config/rs6000/rs6000.md > @@ -9102,7 +9102,8 @@ (define_expand "cmpstrnsi" > (use (match_operand:SI 4))])] >"TARGET_CMPB && (BYTES_BIG_ENDIAN || TARGET_LDBRX)" > { > - if

Re: [PATCH] PR67085 move comparison functions in heap operations

2017-01-19 Thread Jonathan Wakely
On 19/01/17 20:24 +, Jonathan Wakely wrote: On 19/01/17 18:50 +, Jonathan Wakely wrote: On 19/01/17 18:28 +, Jonathan Wakely wrote: @@ -397,7 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION while (__last - __first > 1) { --__last; - std::__pop_heap(__first,

[PATCH,rs6000] Correct argument and result types for binary floating point built-in functions

2017-01-19 Thread Kelvin Nilsen
This patch corrects several errors in a patch originally committed on 2016-08-10. The following corrections are required to maintain compliance with "Power Architecture 64-Bit ELF V2 ABI Specification", also known as "OpenPOWER ABI for Linux Supplement". vector unsigned long long

RE: [patch mips/gcc] add build-time and runtime options to disable or set madd.fmt type

2017-01-19 Thread Matthew Fortune
Matthew Fortune writes: > I've rewritten/simplified this patch as it provides far too much control > to end users who will undoubtedly shoot themselves in the foot so to > speak. The option I intend to support is simply --with-madd4 --without-madd4 > and -mmadd4

[PATCH, pr63256] update powerpc dg options

2017-01-19 Thread Aaron Sawdey
SMS does process the loop in sms-8.c on powerpc now so I have updated the options to reflect that. Test now passes on powerpc -m64/-m32/-m32 -mpowerpc64. Ok for trunk? testsuite/ChangeLog 2017-01-19  Aaron Sawdey   * gcc.dg/sms-8.c: Update options for

[PATCH] rs6000: Fix the new SSP guard configuration code (PR79140)

2017-01-19 Thread Segher Boessenkool
I foolishly tested this with r241087 reverted. After that revision default_stack_protect_guard is no longer called if the compiler defaults to using the TLS guard, which of course is the wrong thing to do if there is some other way to enable the global guard. This fixes it. Is this okay for

Re: [PATCH] PR69699 document why __GLIBCXX__ macro is useless

2017-01-19 Thread Jonathan Wakely
On 17/01/17 15:36 +, Jonathan Wakely wrote: The closest thing we have to a version macro in libstdc++ is __GLIBCXX__ which holds the valid of gcc/DATESTAMP from the source tree. That's useless for version checking or feature testing because snapshots have arbitrary values and there's no

Re: [PATCH] PR67085 move comparison functions in heap operations

2017-01-19 Thread Jonathan Wakely
On 19/01/17 18:50 +, Jonathan Wakely wrote: On 19/01/17 18:28 +, Jonathan Wakely wrote: @@ -397,7 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION while (__last - __first > 1) { --__last; - std::__pop_heap(__first, __last, __last, __comp); +

[PATCH, configure, libgfortran]: PR78478: Use fpu-generic for x86 when _SOFT_FLOAT is defined

2017-01-19 Thread Uros Bizjak
Hello! Attached patch avoids bootstrap error when building libgfortran for soft-float x86 targets. Configure detects when _SOFT_FLOAT is defined and uses fpu-generic.h instead of fpu-387.h header. The patch also imports ax_check_define.m4 from autoconf archive [1] - the macro is really handy,

Re: [PATCH] C++: fix fix-it hints for misspellings within explicit namespaces (v2)

2017-01-19 Thread David Malcolm
On Thu, 2017-01-19 at 13:15 -0500, Jason Merrill wrote: > On Wed, Jan 18, 2017 at 5:29 PM, David Malcolm > wrote: > > Here's a version of the patch which simply tweaks > > cp_parser_primary_expression's call to finish_id_expression so that > > it passes the location of the

Re: [PATCH, configure, libgfortran]: PR78478: Use fpu-generic for x86 when _SOFT_FLOAT is defined

2017-01-19 Thread Janne Blomqvist
On Thu, Jan 19, 2017 at 10:43 PM, Uros Bizjak wrote: > Hello! > > Attached patch avoids bootstrap error when building libgfortran for > soft-float x86 targets. Configure detects when _SOFT_FLOAT is defined > and uses fpu-generic.h instead of fpu-387.h header. > > The patch

Re: Pretty printers for versioned namespace

2017-01-19 Thread François Dumont
On 10/01/2017 13:39, Jonathan Wakely wrote: I've committed the attached patch, which passes the tests for the default configuration and the versioned namespace configuration. I added another helper function, strip_versioned_namespace, which is more expressive than doing

Re: Pretty printers for versioned namespace

2017-01-19 Thread Jonathan Wakely
On 19/01/17 22:01 +0100, François Dumont wrote: On 10/01/2017 13:39, Jonathan Wakely wrote: I've committed the attached patch, which passes the tests for the default configuration and the versioned namespace configuration. I added another helper function, strip_versioned_namespace, which is

[PATCH, i386] Fix PR78478, Compile Error for i386-rtems

2017-01-19 Thread Uros Bizjak
Hello! This patch (partially) reverts my change from 2013-11-05. Apparently, LONG_DOUBLE_TYPE_SIZE interferes with soft-float handling. 2017-01-19 Uros Bizjak PR target/78478 Revert: 2013-11-05 Uros Bizjak * config/i386/rtemself.h

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Tamar Christina
Hi Joseph, I made the requested changes and did a quick pass over the rest of the fp cases. Regards, Tamar From: Joseph Myers Sent: Thursday, January 19, 2017 4:33:13 PM To: Tamar Christina Cc: Jeff Law; GCC Patches; Wilco

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread Tamar Christina
Hi James, I have corrected the testsuite changes and attached is the new file and changelog. Ok for trunk? Tamar Hi All, This patch vectorizes the copysign builtin for Aarch64 similar to how it is done for Arm. AArch64 now generates: ... .L4: ldr q1, [x6, x3] add

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread James Greenhalgh
On Thu, Jan 19, 2017 at 06:05:52PM +, Tamar Christina wrote: > Hi James, > > I have corrected the testsuite changes and attached is the new file and > changelog. > > Ok for trunk? > > Tamar > > Hi All, > > This patch vectorizes the copysign builtin for Aarch64 > similar to how it is done

Re: [PATCH] C++: fix fix-it hints for misspellings within explicit namespaces (v2)

2017-01-19 Thread Jason Merrill
On Wed, Jan 18, 2017 at 5:29 PM, David Malcolm wrote: > Here's a version of the patch which simply tweaks > cp_parser_primary_expression's call to finish_id_expression so that > it passes the location of the id_expression, rather than that of > id_expr_token. > > The

Re: [Ping~]Re: [5/5][libgcc] Runtime support for AArch64 return address signing (needs new target macros)

2017-01-19 Thread Richard Earnshaw (lists)
On 19/01/17 14:46, Jiong Wang wrote: > Thanks for the review. > > On 19/01/17 14:18, Richard Earnshaw (lists) wrote: >> >>> >>> >>> diff --git a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c >>> index >>> 8085a42ace15d53f4cb0c6681717012d906a6d47..cf640135275deb76b820f8209fa51eacfd64c4a2 >>> 100644

[PATCH] PR64903 fix number of predicate tests in std::is_partitioned

2017-01-19 Thread Jonathan Wakely
PR libstdc++/64903 * include/bits/stl_algo.h (is_partioned): Don't retest the partition point. * testsuite/25_algorithms/is_partitioned/2.cc: New test. Tested powerpc64le-linux, committed to trunk. commit 5e9b690d27ac3cecf138bac904606f5728ca452f Author: Jonathan

Re: [PATCH] rs6000: Fix the new SSP guard configuration code (PR79140)

2017-01-19 Thread David Edelsohn
On Thu, Jan 19, 2017 at 6:00 PM, Segher Boessenkool wrote: > I foolishly tested this with r241087 reverted. After that revision > default_stack_protect_guard is no longer called if the compiler defaults > to using the TLS guard, which of course is the wrong thing to

Re: Re: Fortran, committed: Forall-with-temporary problems(pr 50069 and pr 55086).

2017-01-19 Thread Louis Krupp
I was able to reproduce this on my x86 box by doing "make -k check". Apparently, "make check-fortran" wasn't enough to catch all of the consequences of changing gcc/fortran/lang.opt. The problem was the help text associated with the -ftest-forall-temp option; it needed to end with a period,

Re: [PATCH] PR64903 fix number of predicate tests in std::is_partitioned

2017-01-19 Thread Jonathan Wakely
On 19/01/17 19:08 -0500, Tim Song wrote: On Thu, Jan 19, 2017 at 6:33 PM, Jonathan Wakely wrote: std::advance(__first, 1); Why not just ++__first;? Good question. I have no idea why I did it like that!

[PATCH] PR69321 fix any_cast(any*) for non-copyable T

2017-01-19 Thread Jonathan Wakely
any_cast must not trigger the instantiation of the manager function for types which don't meet the requirements for being stored in an any object. PR libstdc++/69321 * include/experimental/any (__any_caster): Avoid instantiating manager function for types that can't be

[PATCH] Fix PR c++/64382

2017-01-19 Thread Adam Butcher
Hi Jason, I've reopened 64382 and unhooked it from 61636 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64382#c6). This is a rebase of my original patch for 64382 from April 2015 against latest master. My query about caching parsing_default_capturing_generic_lambda_in_template() still applies.

[PATCH] PR79156 fix std::__enable_shared_from_this extension

2017-01-19 Thread Jonathan Wakely
A couple of silly bugs in the non-standard __enable_shared_from_this extension. PR libstdc++/79156 * include/bits/shared_ptr_base.h (__enable_shared_from_this_base): Fix return type. (__enable_shared_from_this): Declare __shared_ptr as a friend. *

Re: [PATCH] PR64903 fix number of predicate tests in std::is_partitioned

2017-01-19 Thread Tim Song
On Thu, Jan 19, 2017 at 6:33 PM, Jonathan Wakely wrote: > std::advance(__first, 1); Why not just ++__first;?

Re: [PATCH] PR64903 fix number of predicate tests in std::is_partitioned

2017-01-19 Thread Jonathan Wakely
On 20/01/17 00:11 +, Jonathan Wakely wrote: On 19/01/17 19:08 -0500, Tim Song wrote: On Thu, Jan 19, 2017 at 6:33 PM, Jonathan Wakely wrote: std::advance(__first, 1); Why not just ++__first;? Good question. I have no idea why I did it like that! Fixed like so.

RE: [patch mips/gcc] add build-time and runtime options to disable or set madd.fmt type

2017-01-19 Thread Moore, Catherine
> -Original Message- > From: Matthew Fortune [mailto:matthew.fort...@imgtec.com] > Sent: Thursday, January 19, 2017 5:30 PM > To: Moore, Catherine > Cc: 'Aurelien Jarno' ; 'Richard Sandiford' > ; Loosemore,

libgo patch committed: Fix build on s390x GNU/Linux

2017-01-19 Thread Ian Lance Taylor
This patch to libgo fixes the build on s390x GNU/Linux by ignoring an s390x-specific file that only works in conjunction with s390x assembly code that has not (yet) been ported to gccgo. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu, which admittedly proves little. Verified that the right

Re: [1/5][AArch64] Return address protection on AArch64

2017-01-19 Thread Andrew Pinski
On Fri, Jan 6, 2017 at 3:47 AM, Jiong Wang wrote: > On 11/11/16 18:22, Jiong Wang wrote: >> >> As described in the cover letter, this patch implements return address >> signing >> for AArch64, it's controlled by the new option: >> >>-msign-return-address=[none |

[PATCH] PR72792 PR72793 relax requirements on rebind members

2017-01-19 Thread Jonathan Wakely
I misread the specifications for pointer_traits::rebind and allocator_traits::rebind_alloc and was requiring them to be valid for any specialization of the class templates. In fact they're only needed if instantiated. This fixes the problem. PR libstdc++/72792 PR libstdc++/72793

[PATCH] rs6000: Small varargs for BE SVR4 (PR61729, PR77850)

2017-01-19 Thread Segher Boessenkool
The varargs code for SVR4 puts all (integer) arguments in 4-byte slots. When it then reads an item from there as something not a multiple of 4 bytes, it needs to adjust the address if big endian. We didn't yet do that. This fixes the g++.dg/abi/scoped1.C, gcc.dg/compat/scalar-by-value-4, and

C++ PATCH for C++17 class deduction issues US 19/20

2017-01-19 Thread Jason Merrill
wg21.link/p0512r0 proposes resolutions for some issues with class template argument deduction raised in national body comments against the C++17 draft; the paper hasn't been accepted yet, but the proposals seem sensible, so I'm implementing them here. The first makes deduction guides take

Re: [PATCH] PR67085 move comparison functions in heap operations

2017-01-19 Thread Jonathan Wakely
On 19/01/17 18:28 +, Jonathan Wakely wrote: @@ -397,7 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION while (__last - __first > 1) { --__last; - std::__pop_heap(__first, __last, __last, __comp); + std::__pop_heap(__first, __last, __last,

  1   2   >