[PATCH] c++: Fix ICE during constexpr virtual call evaluation [PR93633]

2020-02-08 Thread Jakub Jelinek
Hi! The first (valid) testcase ICEs because for A *a = new B (); a->foo (); // virtual method call we actually see &heap and the "heap " objects don't have the class or whatever else type was used in new expression, but an array type containing one (or more of those for array new) and so when

[committed] openmp: Optimize DECL_IN_CONSTANT_POOL vars in target regions

2020-02-08 Thread Jakub Jelinek
Hi! DECL_IN_CONSTANT_POOL are shared and thus don't really get emitted in the BLOCK where they are used, so for OpenMP target regions that have initializers gimplified into copying from them we actually map them at runtime from host to offload devices. This patch instead marks them as "omp declar

[COMMITTED] aarch64: fix strict alignment for vector load/stores (PR 91927)

2020-02-08 Thread apinski
From: Andrew Pinski Hi, The problem here is that the vector mode version of movmisalign was only conditionalized on if SIMD was enabled instead of being also conditionalized on STRICT_ALIGNMENT too. Applied as pre-approved in the bug report by Richard Sandiford after a bootstrap/test on aarch6

Re: [PATCH] rs6000: Fix PR93136, gcc.dg/vmx/ops.c and several other test break after r279772

2020-02-08 Thread Peter Bergner
On 2/8/20 11:13 AM, Segher Boessenkool wrote: >> +/* { dg-final { scan-assembler-times {\mvperm[r]?\M} 1 } } */ > > You can write this without the square brackets, fwiw. > > Okay for trunk. Thank you! Ok, I pushed this change with your suggestion to remove the square brackets on the above regex

Re: [PATCH] Use a non-empty test program to test ability to link

2020-02-08 Thread Sandra Loosemore
On 2/7/20 3:24 PM, Joseph Myers wrote: On Wed, 5 Feb 2020, Sandra Loosemore wrote: This patch is for PR 79193 and 88999, problems where libstdc++ is mis-configuring itself when building for a bare-metal target because it thinks it can link programs without pulling in the BSP that provides low-l

[committed] RISC-V: Improve caller-save code generation.

2020-02-08 Thread Jim Wilson
Avoid paradoxical subregs when caller save. This reduces stack frame size due to smaller loads and stores, and more frequent rematerialization. Tested with cross riscv32-elf and riscv64-linux build and check, with no regressions. Committed. Jim PR target/93532 * config/riscv/ri

Re: [PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-08 Thread Segher Boessenkool
On Sat, Feb 08, 2020 at 10:17:42AM -0600, Segher Boessenkool wrote: > And we do not know which of the register will be used for the return, in > untyped_call (only untyped-return knows). But we can add clobbers of all > registers that *might* be used for the return, we do know that here, see > ope

Re: [PATCH] Improve splitX passes management

2020-02-08 Thread Segher Boessenkool
Hi again, On Sat, Feb 08, 2020 at 11:54:48AM +0100, Uros Bizjak wrote: > On Fri, Feb 7, 2020 at 5:41 PM Segher Boessenkool > wrote: > > On Thu, Feb 06, 2020 at 12:13:35PM +0100, Uros Bizjak wrote: > > > The names of split_before_sched2 ("split4") and split_before_regstack > > > ("split3") do not

Re: [PATCH] rs6000: Fix PR93136, gcc.dg/vmx/ops.c and several other test break after r279772

2020-02-08 Thread Segher Boessenkool
Hi! On Fri, Feb 07, 2020 at 06:22:56PM -0600, Peter Bergner wrote: > On 1/9/20 6:29 PM, Peter Bergner wrote: > > On 1/9/20 4:51 PM, Segher Boessenkool wrote: > >> Splitting out separate functions in the testcase shouldn't be so much > >> work? Or am I too optimistic :-) > >> > >> This should make

Re: [RFA] [PR rtl-optimization/90275] Handle nop reg->reg copies in cse

2020-02-08 Thread Segher Boessenkool
On Fri, Feb 07, 2020 at 09:00:40AM -0700, Jeff Law wrote: > On Thu, 2020-02-06 at 07:56 -0600, Segher Boessenkool wrote: > > On Wed, Feb 05, 2020 at 11:48:23AM -0700, Jeff Law wrote: > > > Yea, it's closely related. In your case you need to effectively ignore > > > the nop insn to get the optimiza

[PATCH] configure: Re-disable building cross-gdbserver

2020-02-08 Thread Maciej W. Rozycki
Correct fallout from commit 919adfe84092 ("Move gdbserver to top level") and revert to not building `gdbserver' in a cross-configuration, that is where host != target, matching the documented behaviour. We have no way to support non-native `gdbserver', and native `gdbserver' is usually of no u

Re: [PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-08 Thread Segher Boessenkool
Hi! On Fri, Feb 07, 2020 at 03:10:05PM +0800, Jiufu Guo wrote: > Segher Boessenkool writes: > > On Thu, Feb 06, 2020 at 10:49:36AM +0800, Jiufu Guo wrote: > >> > ... and nothing in the rtl stream says that those return registers are > >> > actually set by that call. Maybe we should use gen_call_

[COMMITTED] c++: Use constexpr to avoid wrong -Wsign-compare

2020-02-08 Thread Jason Merrill
We would like to do constexpr evaluation to avoid false positives on warnings, but constexpr evaluation can involve function body copying that changes DECL_UID, which breaks -fcompare-debug. In the PR Jakub suggested that one possibility would be to avoid operations that might affect DECL_UID;

Re: [PATCH v2] c++: Handle CONSTRUCTORs without indexes in find_array_ctor_elt [PR93549]

2020-02-08 Thread Jason Merrill
On 2/8/20 5:14 AM, Jakub Jelinek wrote: Hi! On Thu, Feb 06, 2020 at 05:04:49PM +0100, Jakub Jelinek wrote: On Thu, Feb 06, 2020 at 10:38:25AM -0500, Jason Merrill wrote: I don't know, can try to add some instrumentation and do bootstrap/regtest with it. The handling of the CONSTRUCTORs with m

[PATCH] i386: Properly pop restore token in signal frame

2020-02-08 Thread H.J. Lu
Linux CET kernel places a restore token on shadow stack for signal handler to enhance security. The restore token is 8 byte and aligned to 8 bytes. It is usually transparent to user programs since kernel will pop the restore token when signal handler returns. But when an exception is thrown from

Re: [PATCH] i386: Make xmm16-xmm31 call used even in ms ABI

2020-02-08 Thread Uros Bizjak
On Sat, Feb 8, 2020 at 11:52 AM Jakub Jelinek wrote: > > On Sat, Feb 08, 2020 at 11:32:40AM +0100, Uros Bizjak wrote: > > I think that the patch should also be backported to gcc-9 branch. The > > change is backward compatible, since the new code will save and > > restore zmm16+ registers at the ca

Re: [PATCH] Improve splitX passes management

2020-02-08 Thread Uros Bizjak
On Fri, Feb 7, 2020 at 5:41 PM Segher Boessenkool wrote: > > On Thu, Feb 06, 2020 at 12:13:35PM +0100, Uros Bizjak wrote: > > The names of split_before_sched2 ("split4") and split_before_regstack > > ("split3") do not reflect their insertion point in the sequence of passes, > > where split_before_

Re: [PATCH] i386: Make xmm16-xmm31 call used even in ms ABI

2020-02-08 Thread Jakub Jelinek
On Sat, Feb 08, 2020 at 11:32:40AM +0100, Uros Bizjak wrote: > I think that the patch should also be backported to gcc-9 branch. The > change is backward compatible, since the new code will save and > restore zmm16+ registers at the caller site, and the old code (e.g. > existing libraries) will the

Re: [PATCH] i386: Make xmm16-xmm31 call used even in ms ABI

2020-02-08 Thread Jakub Jelinek
On Sat, Feb 08, 2020 at 11:32:40AM +0100, Uros Bizjak wrote: > On Sat, Feb 8, 2020 at 11:05 AM Jakub Jelinek wrote: > > > > On Sat, Feb 08, 2020 at 08:24:38AM +, JonY wrote: > > > It does not, I just checked with the master branch of binutils. > > ... > > > I did a -c test build with an older

Re: [PATCH] i386: Make xmm16-xmm31 call used even in ms ABI

2020-02-08 Thread Uros Bizjak
On Sat, Feb 8, 2020 at 11:05 AM Jakub Jelinek wrote: > > On Sat, Feb 08, 2020 at 08:24:38AM +, JonY wrote: > > It does not, I just checked with the master branch of binutils. > ... > > I did a -c test build with an older toolchain, it fails to compile > > (invalid register for .seh_savexmm) wh

[PATCH v2] c++: Handle CONSTRUCTORs without indexes in find_array_ctor_elt [PR93549]

2020-02-08 Thread Jakub Jelinek
Hi! On Thu, Feb 06, 2020 at 05:04:49PM +0100, Jakub Jelinek wrote: > On Thu, Feb 06, 2020 at 10:38:25AM -0500, Jason Merrill wrote: > > > I don't know, can try to add some instrumentation and do bootstrap/regtest > > > with it. The handling of the CONSTRUCTORs with missing or present or > > > mi

Re: [PATCH] i386: Make xmm16-xmm31 call used even in ms ABI

2020-02-08 Thread Jakub Jelinek
On Sat, Feb 08, 2020 at 08:24:38AM +, JonY wrote: > It does not, I just checked with the master branch of binutils. ... > I did a -c test build with an older toolchain, it fails to compile > (invalid register for .seh_savexmm) while the latest gcc is passing, > both are using the same binutils

[FYI] Patches that fix testing santiziers with qemu user mode

2020-02-08 Thread Andrew Pinski
Hi, These two patches are what I use to fix testing of the santizers with qemu. The first one disables coloring always as for some reason when running with qemu (but not normally), coloring is detected. I have not gone and debugged the reason why the sanitizers does not detect coloring when run

Re: [PATCH] i386: Make xmm16-xmm31 call used even in ms ABI

2020-02-08 Thread JonY
On 2/7/20 11:28 AM, Jakub Jelinek wrote: > On Fri, Feb 07, 2020 at 10:57:22AM +, JonY wrote: Is this patch testing still required? I just got back from traveling. >>> >>> Yes, our reading of the MS ABI docs show that xmm16-31 are to be call used >>> (not preserved over calls), while in gcc