Re: [C++ PATCH] Fix constexpr ICE with statement frontiers (PR c++/83734)

2018-01-09 Thread Jason Merrill
On Tue, Jan 9, 2018 at 10:41 AM, Jakub Jelinek wrote: > On Tue, Jan 09, 2018 at 10:30:31AM -0500, Jason Merrill wrote: >> On Mon, Jan 8, 2018 at 6:55 PM, Jakub Jelinek wrote: >> > The assert there assumes we never evaluate a statement list to >> > DEBUG_BEGIN_STMT, but it breaks appart when a BIN

[Committed] PR Fortran/83742 -- Check for NULL pointer

2018-01-09 Thread Steve Kargl
Committed as obvious after regression testing on x86_64-*-freebsd. 2018-01-09 Steven G. Kargl PR fortran/83742 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer. 2018-01-09 Steven G. Kargl PR fortran/83742 * gfortran.dg/contiguous_6.f90: New test.

[C++ Patch Ping] Two pending patches

2018-01-09 Thread Paolo Carlini
Hi, I'd like to gently point to two pending patches of mine:     The updated fix for PR 81055 ("[6/7/8 Regression] ICE with invalid initializer for array new")     https://gcc.gnu.org/ml/gcc-patches/2017-12/msg01428.html and also     PR 78344 ("ICE on invalid c++ code (tree check: expected

Re: Go patch committed: Update to Go1.10beta1

2018-01-09 Thread Rainer Orth
Hi Ian, > This patch updates libgo to the Go1.10beta1 release. The final Go > 1.10 release is expected around February 1, so it's not clear how the > release timing is going to work with GCC 8. In any case this updates > GCC to something pretty close to the final Go 1.10 release. > > A few chang

Go patch committed: Add escape analysis debug hash

2018-01-09 Thread Ian Lance Taylor
This patch by Cherry Zhang adds a new -fgo-debug-escape-hash option to the Go frontend. This option takes a string that can be used to select specific functions on which to run escape analysis. This makes it easier to find escape analysis bugs by doing a binary search over all the functions, enab

[PATCH] Add some reproducers for issues found when developing the location-wrappers patch

2018-01-09 Thread David Malcolm
Whilst developing the location-wrapper patch kit, I accumulated various source files for which my work-in-progress patched-cc1plus had different behavior to an unpatched cc1plus: some of these were crashes, others were erroneous diagnostics. All of these are now fixed, but it seems appropriate to

Re: [PATCH], Add optional IEEE/IBM long double multilib support

2018-01-09 Thread Joseph Myers
To answer some of my own questions about how this works (or doesn't work): There are two different types in libgcc called TFtype, one in quad-float128.h and one in libgcc2.h. The one in quad-float128.h is mapped to KFmode in the case where TFmode is IBM long double, so functions such as __mulk

[PATCH] i386: Also adjust stack frame for stack slot alignment

2018-01-09 Thread H.J. Lu
We should also adjust stack_realign_offset for the largest alignment of stack slot actually used when stack realignment isn't needed. This is required to keep stack frame properly aligned to satisfy the largest alignment of stack slots. Tested on Linux/i686 and Linux/x86-64. OK for trunk? Thank

Go patch committed: Make top-level decl for address-taken non-escaping locals

2018-01-09 Thread Ian Lance Taylor
In the Go frontend, if a local variable's address is taken and passed out of its lexical scope, the GCC middle-end may reuse the stack slot for the variable, not knowing it is still live through a pointer. This patch by Cherry Zhang creates a top-level temporary variable and let the user-defined va

Re: [PATCH] fold strlen of constant aggregates (PR 83693)

2018-01-09 Thread Martin Sebor
I found a few problems in the previous revision: 1) It didn't handle the simple case of member arrays of const struct objects (only member arrays of const arrays of structs were handled). 2) The array_ctor_elt() function returned a narrow empty string for an uninitialized CONSTRUCTOR el

Re: Go patch committed: Update to Go1.10beta1

2018-01-09 Thread Ian Lance Taylor
On Tue, Jan 9, 2018 at 12:26 PM, Rainer Orth wrote: > Hi Ian, > >> This patch updates libgo to the Go1.10beta1 release. The final Go >> 1.10 release is expected around February 1, so it's not clear how the >> release timing is going to work with GCC 8. In any case this updates >> GCC to somethin

[PATCH] PR libstdc++/80276 fix pretty printers for array smart pointers

2018-01-09 Thread Jonathan Wakely
This fixes unique_ptr so it doesn't print as unique_ptr, and fixes a problem in the type-printers that can result in a gdb.error exception (see https://sourceware.org/PR22686). PR libstdc++/80276 * python/libstdcxx/v6/printers.py (SharedPointerPrinter) (UniquePointerPrinte

Don't use permutes for single-element accesses (PR83753)

2018-01-09 Thread Richard Sandiford
After cunrolling the inner loop, the remaining loop in the testcase has a single 32-bit access and a group of 64-bit accesses. We first try to vectorise at 128 bits (VF 4), but decide not to for cost reasons. We then try with 64 bits (VF 2) instead. This means that the group of 64-bit accesses us

Ping*2 [PATCH][Middle-end][version 2]2nd patch of PR78809 and PR83026

2018-01-09 Thread Qing Zhao
Hi, I’d like to ping the following patch the 2nd time: https://gcc.gnu.org/ml/gcc-patches/2017-12/msg01454.html I already addressed all the issues raised for the first version of the patch, and retested on both X86 and Aarch64, without any issue. I’d really like to make it into GCC 8. thank

[PATCH, rs6000] Change x86 intrinsic compat headers to use #error

2018-01-09 Thread Peter Bergner
The following patch changes the x86 intrinsic compat headers to use #error instead of #warning. We do this for two reasons. Firstly, we want the user to really be sure they want/need to use the x86 intrinsic compat support before doing so, because a warning is too easy to ignore. Secondly, we do

Re: Smart pointer pretty printers

2018-01-09 Thread Jonathan Wakely
On 09/01/18 18:50 +, Jonathan Wakely wrote: On 09/01/18 15:02 +, Jonathan Wakely wrote: On 09/01/18 14:59 +, Jonathan Wakely wrote: On 04/01/18 11:22 +0100, Juraj Oršulić wrote: Hi Jonathan (and the libstdc++ list). Can we revive this? I sent the patches for improving the smart poi

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Bernd Edlinger
On 01/09/18 18:50, Richard Earnshaw (lists) wrote: > On 09/01/18 17:36, Bernd Edlinger wrote: >> Richard Earnshaw wrote: >>  > Let me give an example, we use the generic code expansion if we >>  > encounter the builtin when generating code for Thumb on pre-ARMv7 >>  > devices.  We don't have ins

Re: [PATCH] RL78 movdi improvement

2018-01-09 Thread DJ Delorie
I saw one regression with this patch: PASS-FAIL: gcc.dg/torture/vshuf-v8qi.c -O2 execution test Could you confirm this? Note: I'm testing with your other (pre-2018 at least) patches applied at the same time (smax etc, anddi, bswaphi) so it might be an interaction, but the code looks like a m

Re: [PATCH] Fix PR80846, change vectorizer reduction epilogue (on x86)

2018-01-09 Thread Jeff Law
On 01/05/2018 02:01 AM, Richard Biener wrote: > On Tue, 28 Nov 2017, Richard Biener wrote: > >> >> The following adds a new target hook, targetm.vectorize.split_reduction, >> which allows the target to specify a preferred mode to perform the >> final reducion on using either vector shifts or scala

[PATCH] i386: Add a test for PR target/78585

2018-01-09 Thread H.J. Lu
PR target/78585 has been fixed for GCC 7 by commit 7ed04d053eead43d87dff40fb4e2904219afc4d5 Author: jakub Date: Wed Nov 30 13:02:07 2016 + * config/i386/i386.c (dimode_scalar_chain::convert_op): Avoid sharing the SUBREG rtx between move and following insn. git-svn-id: svn+

Go patch committed: Delay escaping sliced arrays

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang delays escaping sliced arrays. Arrays that are sliced are set to escape in type checking, very early in compilation. The escape analysis runs later but cannot undo it. This patch changes it to not escape in the early stage. Later the escape analysis

Go patch committed: Stack allocate non-escaping constant make of slice

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang stack allocates a non-escaping make of a slice type with a constant length and capacity. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ===

Go patch committed: Support go:noescape cross package

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang adds support for the go:noescape compilation pragma across packages. https://golang.org/cl/83876 added support for the go:noescape pragma, but only for functions called from the same package. The pragma did not take effect for exported functions that a

Go patch committed: Do some escape checks earlier

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang moves some checks of escape state earlier, from get_backend to Mark_address_taken. This permits us to reclaim escape analysis Nodes before kicking off the backend (although that is not done in this patch). Also it makes it easier to check variables a

Go patch committed: Don't heap allocate non-escaping Bound_method_expression

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang makes non-escaping Bound_method_expression not heap allocate. It stack allocates the closure when it does not escape. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

Re: [PATCH] Implementation of RANDOM_INIT from F2018

2018-01-09 Thread Damian Rouson
Hi Steve, Here are the results of compiling with the OpenCoarrays “caf” compiler wrapper, which uses -fcoarray=lib -lcaf_mpi: 1. random_init(repeatable=.true., image_distinct=.true.) gives repeatable sequences that are distinct on each image. 2. random_init(.true., .false.) gives repeatable seq

Go patch committed: Stack allocate defer thunk

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang stack allocates defer thunk when possible, which is to say when the defer statement is not in a loop. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE =

Re: [PATCH PR82096] Fix ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi

2018-01-09 Thread Jeff Law
On 01/05/2018 12:25 PM, Sudakshina Das wrote: > Hi Jeff > > On 05/01/18 18:44, Jeff Law wrote: >> On 01/04/2018 08:35 AM, Sudakshina Das wrote: >>> Hi >>> >>> The bug reported a particular test di-longlong64-sync-1.c failing when >>> run on arm-linux-gnueabi with options -mthumb -march=armv5t -O[g

Go patch committed: Set captured var address to not escape before flood

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang sets captured variable addresses to nonescape until the flood phase. The escape analysis pass models closures by flowing captured variable address to the closure node. However, the escape state for the address expressions remained unset as ESCAPE_UNKN

Re: Mostly revert r254296

2018-01-09 Thread Jeff Law
On 01/07/2018 03:26 AM, Richard Sandiford wrote: > r254296 added support for (const ...) wrappers around vectors, > but in the end the agreement was to use a variable-length > encoding of CONST_VECTOR (and VECTOR_CST) instead. This patch > therefore reverts the bits that are no longer needed. > >

Go patch committed: Use temporary variable for stack allocation

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang uses a temporary variable for stack allocation when possible. Currently, an allocation expression that can be allocated on stack is implemented with __builtin_alloca, which turns into __morestack_allocate_stack_space, which may call the C malloc functi

Re: [PATCH improve early strlen range folding (PR 83671)

2018-01-09 Thread Jeff Law
On 01/08/2018 08:05 PM, Martin Sebor wrote: > On 01/08/2018 04:28 AM, Richard Biener wrote: >> On Sat, Jan 6, 2018 at 11:04 PM, Martin Sebor wrote: >>> Bug 83671 - Fix for false positive reported by -Wstringop-overflow >>> does not work at -O1, points out that the string length range >>> optimizat

[PATCH] PR Fortran/83093 -- Check the type of character length

2018-01-09 Thread Steve Kargl
When parsing code and implicit typing is used, the type of an entity used as a character length is not known until after resolution. The attach patch checks the type of length and response accordingly. Regression tested on x86_64-*-freebsd. Ok to commit? 2018-01-09 Steven G. Kargl P

libgo patch committed: Add aix build tags

2018-01-09 Thread Ian Lance Taylor
This patch by Tony Reix adds some aix build tags to new libgo files. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/go/gofrontend/MERGE (revision 256412) +++ gcc/go/gofr

Re: [PATCH][AArch64] Use LDP/STP in shrinkwrapping

2018-01-09 Thread Andrew Pinski
On Tue, Jan 9, 2018 at 6:54 AM, Segher Boessenkool wrote: > On Tue, Jan 09, 2018 at 12:23:42PM +, Wilco Dijkstra wrote: >> Segher Boessenkool wrote: >> > On Mon, Jan 08, 2018 at 0:25:47PM +, Wilco Dijkstra wrote: >> >> > Always pairing two registers together *also* degrades code quality. >

libgo patch committed: Add AIX support to cmd/go

2018-01-09 Thread Ian Lance Taylor
This patch by Tony Reix adds AIX support to cmd/go in libgo. For gccgo code avoid --whole-archive and -(. Use -blibpath instead of -rpath. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

libgo patch committed: Add some noescape cases to runtime

2018-01-09 Thread Ian Lance Taylor
This libgo patch by Cherry Zhang adds some noescape cases to the runtime package. This is in preparation of turning on escape analysis for the runtime. - In gccgo, systemstack is implemented with mcall, which is not go:noescape. Wrap the closure in noescape so the escape analysis does not th

libgo patch committed: Work around escaping closure in runtime/export_test.go

2018-01-09 Thread Ian Lance Taylor
This libgo patch by Cherry Zhang works around some escaping code in runtime/export_test.go. When compiling the runtime, local variables and closures may not be heap allocated. In one test, there is a go statement with a closure. In the gc compiler, it distinguishes capturing variable by value vs

Re: [PATCH] PR Fortran/83093 -- Check the type of character length

2018-01-09 Thread Janne Blomqvist
On Wed, Jan 10, 2018 at 3:18 AM, Steve Kargl wrote: > When parsing code and implicit typing is used, the > type of an entity used as a character length is not > known until after resolution. The attach patch > checks the type of length and response accordingly. > Regression tested on x86_64-*-fre

Re: [PATCH] i386: Also adjust stack frame for stack slot alignment

2018-01-09 Thread Uros Bizjak
On Tue, Jan 9, 2018 at 10:29 PM, H.J. Lu wrote: > We should also adjust stack_realign_offset for the largest alignment of > stack slot actually used when stack realignment isn't needed. This is > required to keep stack frame properly aligned to satisfy the largest > alignment of stack slots. > >

Re: Go patch committed: Update to Go1.10beta1

2018-01-09 Thread Uros Bizjak
> This patch updates libgo to the Go1.10beta1 release. The final Go > 1.10 release is expected around February 1, so it's not clear how the > release timing is going to work with GCC 8. In any case this updates > GCC to something pretty close to the final Go 1.10 release. This patch introduces a

<    1   2