[libstdc++; pr66689; pr68397] Backport special function fixes to 7.

2018-04-26 Thread Ed Smith-Rowland
I'm thinking of going back on my choice not to fix special function bugs on 7. These build and test clean on gcc-7. OK? 2018-04-30 Edward Smith-Rowland <3dw...@verizon.net> PR libstdc++/pr66689 - comp_ellint_3 and ellint_3 return garbage values *

ATTRIBUTE_NONSTRING

2018-04-26 Thread Alan Modra
This patch adds ATTRIBUTE_NONSTRING, which will be used to curb -Wstringop-truncation warnings in binutils. OK to apply? * ansidecl.h (ATTRIBUTE_NONSTRING): Define. diff --git a/include/ansidecl.h b/include/ansidecl.h index c11daff..ec5f34d 100644 --- a/include/ansidecl.h +++

Re: [PATCH] [Microblaze]: PIC Data Text Relative

2018-04-26 Thread Michael Eager
On 04/19/2018 03:43 AM, Andrew Sadek wrote: On Wed, Apr 18, 2018 at 6:57 PM, Michael Eager wrote: Hi Andrew -- Check indents in the following files: (Make sure that your tabs are set at 8 chars.) --- gcc/config/microblaze/microblaze.c ---

PR85532, crtend.o built without --enable-initfini-array has bad .eh_frame

2018-04-26 Thread Alan Modra
This patch is aimed at removing bogus .eh_frame info emitted after the zero terminator in crtend.o, which will cause a ld warning and slow exception handling. The right fix for the PR is probably to change libgcc/Makefile.in to always supply -fno-asynchronous-unwind-tables when building

Re: [PATCH] Fix loop-header copying do-while loop detection (PR85116)

2018-04-26 Thread David Edelsohn
Hi, Richi This patches causes a boostrap failure on AIX. Everything miscompares. The code itself is the same, but the DWARF debug information contains many differences. - David

[PATCH] v2: Don't offer suggestions for compiler-generated variables (PR c++/85515)

2018-04-26 Thread David Malcolm
On Thu, 2018-04-26 at 15:53 -0400, Jason Merrill wrote: > On Thu, Apr 26, 2018 at 3:45 AM, Richard Biener > wrote: > > On Wed, Apr 25, 2018 at 7:10 PM, Nathan Sidwell > > wrote: > > > On 04/25/2018 11:41 AM, David Malcolm wrote: > > > > > > > > Jason

RE: [PATCH 2/2] MIPS/GCC/testsuite: Fix data-sym-pool.c for n64 code

2018-04-26 Thread Maciej W. Rozycki
On Wed, 18 Apr 2018, Matthew Fortune wrote: > Apologies as before on slowness. This looks trivially OK to me but that's > thanks to the description, much appreciated. You are welcome, that just means I did my homework right. > OK for commit but adding RMs given the imminent release. Applied

RE: [PATCH 1/2] MIPS/GCC/testsuite: Fix data-sym-pool.c for SVR4 model at -O0

2018-04-26 Thread Maciej W. Rozycki
On Wed, 18 Apr 2018, Matthew Fortune wrote: > OK to apply but given the release date I've added RMs to approve for > trunk right now. Applied to trunk, now that GCC 8 has branched. Thanks for your review. Maciej

[PATCH] Fix reassoc var_bound optimization (PR tree-optimization/85529)

2018-04-26 Thread Jakub Jelinek
Hi! As explained in the comment below, when doing the inter-bb range test optimization and are trying to optimize the a >= 0 && a < b where b is known to be >= 0 into (unsigned) a < (unsigned) b, we need to be careful if the a >= 0 condition is in a different bb from the a < b one and the a >= 0

[PATCH] Add _mm512_{,mask_}mullox_epi64 intrinsics (PR target/85530)

2018-04-26 Thread Jakub Jelinek
Hi! ICC apparently has these two intrinsics (why it doesn't have a maskz_ one is unclear to me) which are like _mm512_{,mask_}mullo_epi64, except they are available in AVX512F rather than just AVX512DQ and if AVX512DQ is not enabled they expand to 3 vpmuludq instructions + 3 shifts + 2 adds; for

Re: [PATCH] Don't offer suggestions for compiler-generated variables (PR c++/85515)

2018-04-26 Thread Jason Merrill
On Thu, Apr 26, 2018 at 3:45 AM, Richard Biener wrote: > On Wed, Apr 25, 2018 at 7:10 PM, Nathan Sidwell wrote: >> On 04/25/2018 11:41 AM, David Malcolm wrote: >>> >>> Jason Turner's video C++ Weekly - Ep 112 - GCC's Leaky Abstractions shows >>> two

Re: [PATCH] Fix PR c++/85400

2018-04-26 Thread Jason Merrill
On Thu, Apr 26, 2018 at 9:42 AM, Eric Botcazou wrote: > Hi, > > for the attached testcase compiled/linked with -shared -fPIC -O, the Solaris > linker chokes on SPARC because the generated code uses the local-dynamic TLS > model for a global symbol: > > ld: fatal: relocation

Re: [patch] allow '-' for stdout dump

2018-04-26 Thread Sandra Loosemore
On 04/26/2018 11:12 AM, Nathan Sidwell wrote: Index: doc/invoke.texi === --- doc/invoke.texi (revision 259680) +++ doc/invoke.texi (working copy) @@ -13368,9 +13368,10 @@ Says to make debugging dumps during comp

[patch] allow '-' for stdout dump

2018-04-26 Thread Nathan Sidwell
Here's the patch to allow '-' as a synonym for 'stdout'. It's easier to type, and a convention used elsewhere. Also document the existing stdout/stderr selection along with the new behaviour? ok for trunk? nathan -- Nathan Sidwell 2018-04-26 Nathan Sidwell * dumpfile.c

Fix wrong loop-invariant motion

2018-04-26 Thread Eric Botcazou
This fixes a wrong loop-invariant motion applied to an adjustment of the frame pointer generated by expand_builtin_setjmp_receiver, e.g. for a target using the SJLJ exception handling scheme. Tested on x86-64/Linux, applied on the mainline. 2018-04-26 Eric Botcazou

[PATCH] Do not set nothrow flag on recursive function with stack checking

2018-04-26 Thread Eric Botcazou
Hi, when stack checking is enabled in Ada, it is supposed to be able to handle the case of a recursive function that does essentially nothing. But in this case the IPA machinery will compute that the function is nothrow, which means that the Storage_Error exception cannot be caught by the

Re: dumpfile cleanup

2018-04-26 Thread Richard Biener
On Thu, Apr 26, 2018 at 2:00 PM, Nathan Sidwell wrote: > I wanted to add '-' as a synonym for stdout in the dumping machinery. But > this bit of cleanup's needed first. We check the special stdout/stderr > names in 3 different places -- that's crying out for a worker function.

Re: [PATCH] Fix aarch64 ILP32 ICE with vaarg gimplified code

2018-04-26 Thread Christophe Lyon
On 26 April 2018 at 15:41, Richard Biener wrote: > On Thu, 26 Apr 2018, Christophe Lyon wrote: > >> On 26 April 2018 at 14:09, Richard Biener wrote: >> > >> > Seen by Christophe Lyon, verified with a cross that this fixes the >> > issue. >> > >> > aarch64

Re: [PATCH][AArch64] PR target/85512: Tighten SIMD right shift immediate constraints

2018-04-26 Thread Richard Sandiford
Kyrill Tkachov writes: > On 24/04/18 17:41, Jakub Jelinek wrote: >> On Tue, Apr 24, 2018 at 05:22:15PM +0100, Kyrill Tkachov wrote: >>> I've cleaned up the testcase a bit to leave only the function that >>> generates the invalid instruction, >>> making it shorter.

[PATCH] Fix PR c++/85400

2018-04-26 Thread Eric Botcazou
Hi, for the attached testcase compiled/linked with -shared -fPIC -O, the Solaris linker chokes on SPARC because the generated code uses the local-dynamic TLS model for a global symbol: ld: fatal: relocation error: R_SPARC_TLS_LDM_HI22: file /var/tmp//ccKG6GQC.o: symbol

Re: [PATCH] Fix aarch64 ILP32 ICE with vaarg gimplified code

2018-04-26 Thread Richard Biener
On Thu, 26 Apr 2018, Christophe Lyon wrote: > On 26 April 2018 at 14:09, Richard Biener wrote: > > > > Seen by Christophe Lyon, verified with a cross that this fixes the > > issue. > > > > aarch64 people, can you please test & commit this? > > > > As I have just written in

Re: PR testsuite/85483: Move aarch64/sve/vcond_1.c test to g++.dg/other/

2018-04-26 Thread Richard Sandiford
Kyrill Tkachov writes: > Hi all, > > I totally botched up this sve test file in 259437. > It needs C++, so move it to g++.dg/other and make it a .C file. > Also adds the target guards to prevent it from running on non-aarch64 targets. > > Tested that it passes on

Re: [PATCH] Fix aarch64 ILP32 ICE with vaarg gimplified code

2018-04-26 Thread Christophe Lyon
On 26 April 2018 at 14:09, Richard Biener wrote: > > Seen by Christophe Lyon, verified with a cross that this fixes the > issue. > > aarch64 people, can you please test & commit this? > As I have just written in bugzilla, this patch avoids an ICE when compiling newlib's

Re: PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process'

2018-04-26 Thread Martin Jambor
Hi, On Thu, Apr 26 2018, Thomas Schwinge wrote: > Hi Martin! > > On Wed, 25 Apr 2018 15:56:26 +0200, Martin Jambor wrote: >> On Thu, Apr 19 2018, Thomas Schwinge wrote: >> > * testsuite/libgomp.oacc-fortran/error_stop-1.f: New file. >> > *

[PATCH] Prevent excessive loop-header copying with multiple exits

2018-04-26 Thread Richard Biener
The following makes loop-header copying stop after the first exit test it copied. The reports rightfully complain about too much peeling. If some cases pop up which show we should peel up to a specific test we need to improve this heuristic which simply errs on the easy side. Bootstrap &

Re: [PATCH] Fix loop-header copying do-while loop detection (PR85116)

2018-04-26 Thread Richard Biener
On Thu, 26 Apr 2018, Richard Biener wrote: > > In PR85116 there's a loop which isn't optimized well, first because > it is not header copied. The reason is the do_while_loop_p predicate is > "strange". The following adds the natural test - whether the single > latch predecessor exits the loop.

[PATCH] Fix aarch64 ILP32 ICE with vaarg gimplified code

2018-04-26 Thread Richard Biener
Seen by Christophe Lyon, verified with a cross that this fixes the issue. aarch64 people, can you please test & commit this? Thanks, Richard. 2018-04-26 Richard Biener * config/aarch64/aarch64.c: Simplify ap.__stack advance and fix for ILP32. Index:

dumpfile cleanup

2018-04-26 Thread Nathan Sidwell
I wanted to add '-' as a synonym for stdout in the dumping machinery. But this bit of cleanup's needed first. We check the special stdout/stderr names in 3 different places -- that's crying out for a worker function. We also check those streams by name before determining whether to fclose.

[PATCH] Use response files from the driver in more cases

2018-04-26 Thread Eric Botcazou
Hi, response files were added to the GNU toolchain to work around length limits put on the command line by some OSes, typically Windows. For the compiler, the implementation is as follows: if a response file is passed to the driver at link time, typically containing the list of object files,

Re: PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process'

2018-04-26 Thread Thomas Schwinge
Hi Martin! On Wed, 25 Apr 2018 15:56:26 +0200, Martin Jambor wrote: > On Thu, Apr 19 2018, Thomas Schwinge wrote: > > * testsuite/libgomp.oacc-fortran/error_stop-1.f: New file. > > * testsuite/libgomp.oacc-fortran/error_stop-2.f: Likewise. > >

Re: GCC 8.1 RC1 Bootstrap comparison failure on AIX

2018-04-26 Thread Jakub Jelinek
On Thu, Apr 26, 2018 at 10:28:52AM +0200, Jakub Jelinek wrote: > On Thu, Apr 26, 2018 at 09:56:30AM +0200, Richard Biener wrote: > > --- gcc/cgraph.h(revision 259668) > > +++ gcc/cgraph.h(working copy) > > @@ -,7 +,7 @@ public: > >void dump (FILE *f); > > > >/*

[PATCH] Fix loop-header copying do-while loop detection (PR85116)

2018-04-26 Thread Richard Biener
In PR85116 there's a loop which isn't optimized well, first because it is not header copied. The reason is the do_while_loop_p predicate is "strange". The following adds the natural test - whether the single latch predecessor exits the loop. It also removes the check that claims that a loop

Re: [PATCH] Improve bootstrap times

2018-04-26 Thread Jakub Jelinek
On Thu, Apr 26, 2018 at 10:08:09AM +0200, Richard Biener wrote: > Ok, so the following passed bootstrap & profiledbootstrap (and I checked > we only get -fno-checking at the appropriate places and not -fchecking) > on trunk, a bootstrap with all languages and release checking is running > (just to

Re: GCC 8.1 RC1 Bootstrap comparison failure on AIX

2018-04-26 Thread Jakub Jelinek
On Thu, Apr 26, 2018 at 09:56:30AM +0200, Richard Biener wrote: > --- gcc/cgraph.h(revision 259668) > +++ gcc/cgraph.h(working copy) > @@ -,7 +,7 @@ public: >void dump (FILE *f); > >/* Dump symbol table to stderr. */ > - inline DEBUG_FUNCTION void debug (void) >

Re: [PATCH] Improve bootstrap times

2018-04-26 Thread Richard Biener
On Thu, 26 Apr 2018, Richard Biener wrote: > On Thu, 26 Apr 2018, Bernhard Reutner-Fischer wrote: > > > On 25 April 2018 16:11:23 CEST, Richard Biener wrote: > > >On Wed, 25 Apr 2018, Jakub Jelinek wrote: > > > > > >> On Wed, Apr 25, 2018 at 03:52:28PM +0200, Richard Biener

Re: GCC 8.1 RC1 Bootstrap comparison failure on AIX

2018-04-26 Thread Jakub Jelinek
On Thu, Apr 26, 2018 at 09:56:30AM +0200, Richard Biener wrote: > On Thu, Apr 26, 2018 at 3:40 AM, David Edelsohn wrote: > > Jakub and Richi, > > > > GCC 8.1 is experiencing the same bootstrap failure with GCC 8.1 RC1 as > > we saw previously. > > > > Bootstrap comparison

Re: GCC 8.1 RC1 Bootstrap comparison failure on AIX

2018-04-26 Thread Richard Biener
On Thu, Apr 26, 2018 at 3:40 AM, David Edelsohn wrote: > Jakub and Richi, > > GCC 8.1 is experiencing the same bootstrap failure with GCC 8.1 RC1 as > we saw previously. > > Bootstrap comparison failure! > gcc/function-tests.o differs > > And the same reason: unique, static

Re: [PATCH][arm][FreeBSD] PR libgcc/84292

2018-04-26 Thread Richard Biener
On Wed, Apr 25, 2018 at 10:41 PM, Andreas Tobler wrote: > Hi all, > > I'm going to commit this patch to all active branches as soon as the branch > status permits. > Built and tested on native armv5 FreeBSD12. If you think it is safe then it's fine for gcc-8-branch now.

Re: [PATCH] Document that -Wreturn-type is enabled by default for C++

2018-04-26 Thread Richard Biener
On Wed, Apr 25, 2018 at 8:54 PM, Jonathan Wakely wrote: > * doc/invoke.texi (-Wreturn-type): Document default status for C++. > > OK for trunk and gcc-8-branch? OK. >

Re: [PATCH] Don't offer suggestions for compiler-generated variables (PR c++/85515)

2018-04-26 Thread Richard Biener
On Wed, Apr 25, 2018 at 7:10 PM, Nathan Sidwell wrote: > On 04/25/2018 11:41 AM, David Malcolm wrote: >> >> Jason Turner's video C++ Weekly - Ep 112 - GCC's Leaky Abstractions shows >> two issues where g++ offers suggestions about implementation details: > > >> For the lambda

Re: [PATCH] Improve bootstrap times

2018-04-26 Thread Richard Biener
On Thu, 26 Apr 2018, Bernhard Reutner-Fischer wrote: > On 25 April 2018 16:11:23 CEST, Richard Biener wrote: > >On Wed, 25 Apr 2018, Jakub Jelinek wrote: > > > >> On Wed, Apr 25, 2018 at 03:52:28PM +0200, Richard Biener wrote: > >> > Forcefully setting STAGE3_[CT]FLAGS doesn't

[PATCH] Fix PR85450

2018-04-26 Thread Richard Biener
The following patch restores checking of integer<->pointer conversions which I broke with a cut error when introducing ptrofftype_p and friends. It also contains a fix from Jakub for the fallout in omp expansion. Bootstrapped and tested on x86_64-unknown-linux-gnu with all languages, applied to

Re: [PATCH] Improve bootstrap times

2018-04-26 Thread Bernhard Reutner-Fischer
On 25 April 2018 16:11:23 CEST, Richard Biener wrote: >On Wed, 25 Apr 2018, Jakub Jelinek wrote: > >> On Wed, Apr 25, 2018 at 03:52:28PM +0200, Richard Biener wrote: >> > Forcefully setting STAGE3_[CT]FLAGS doesn't have any effect on >> > a checking enabled build but it will