Re: [patches] Re: [PATCH] RISC-V: Pass --no-relax to linker if -mno-relax is present.

2018-04-20 Thread Jim Wilson
On 04/18/2018 06:59 PM, Kito Cheng wrote: Hi Jim: Turned off both the assembler and the linker sounds good idea to me, but it's not support on current assembler now, and gcc might release in next few month, so I afraid we'll have a short time gap that is -mno-relax is broken due to assembler

Re: [PATCH] [PR c++/85437] accept static_casted ptrmem in constexpr

2018-04-20 Thread Jakub Jelinek
On Fri, Apr 20, 2018 at 02:52:32PM -0400, Nathan Sidwell wrote: > On 04/20/2018 01:44 PM, Jason Merrill wrote: > > > Any time we need an actual adjustment, there will be a PLUS_EXPR. The > > issue is somehow distinguishing between a reinterpret_cast and one of > > the many other sources of

[PATCH, rs6000, committed] undef-bool-* tests should exclude -m32

2018-04-20 Thread Bill Schmidt
Hi, These two new tests don't work with -m32, because they include headers that don't support 32-bit. Require lp64 to stop the noise. Tested on powerpc64-linux-gnu (P7, 32/64) and powerpc64le-linux-gnu (P8, 64), committed as pre-approved. Thanks! Bill [gcc/testsuite] 2018-04-20 Bill

libgo patch committed: Only look for data symbols on big-endian PPC64 non-AIX

2018-04-20 Thread Ian Lance Taylor
The libgo gotest script runs nm to find tests to run. It normally looks only for T (text) symbols, but on ppc64 also looks for D (data) symbols, because on PPC64 ELF ABI v1 function symbols are actually descriptors in the data segment. This patch changes the script to not do this on AIX, and to

Re: [PATCH] PR target/85456, Fix __builtin_powil for -mabi=ieeelongdouble on PowerPC

2018-04-20 Thread Michael Meissner
On Fri, Apr 20, 2018 at 10:52:57AM -0500, Segher Boessenkool wrote: > Hi Mike, > > On Thu, Apr 19, 2018 at 12:33:45AM -0400, Michael Meissner wrote: > > This patch adds __powikf2 to libgcc, and makes GCC use it for > > __builtin_powil > > when long double is IEEE 128-bit (-mabi=ieeelongdouble).

Re: [PATCH v2] RISC-V: Make sure stack is always aligned during adjusting

2018-04-20 Thread Jim Wilson
On Thu, Apr 19, 2018 at 7:48 PM, Kito Cheng wrote: > 2018-04-18 Kito Cheng > > * config/riscv/riscv.c (riscv_first_stack_step): Round up min > step to make sure stack always aligned. Committed. Jim

Re: [PATCH] [PR c++/85437] accept static_casted ptrmem in constexpr

2018-04-20 Thread Nathan Sidwell
On 04/20/2018 01:44 PM, Jason Merrill wrote: Any time we need an actual adjustment, there will be a PLUS_EXPR. The issue is somehow distinguishing between a reinterpret_cast and one of the many other sources of NOP_EXPR. yeah, I see that now. Perhaps VIEW_CONVERT_EXPR is more appropriate

Re: [PATCH] Do not overflow string buffer (PR objc/85476).

2018-04-20 Thread Jakub Jelinek
On Fri, Apr 20, 2018 at 11:44:35AM +0200, Martin Liška wrote: > Hi. > > Quite obvious package that causes an ASAN error described in the PR. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? > Martin > > gcc/objc/ChangeLog: > >

[C++ Patch] PR 84588 ("[8 Regression] internal compiler error: Segmentation fault (contains_struct_check())")

2018-04-20 Thread Paolo Carlini
Hi, in this error-recovery regression, after sensible diagnostic about "two or more data types in declaration..." we get confused, we issue a cryptic -  but useful hint to somebody working on the present bug ;) - "template definition of non-template" error and we finally crash. I think the

Re: [PATCH] [PR c++/85437] accept static_casted ptrmem in constexpr

2018-04-20 Thread Jason Merrill
On Fri, Apr 20, 2018, 8:28 AM Nathan Sidwell wrote: > On 04/18/2018 01:07 AM, Jason Merrill wrote: > > I wonder if it would work to use CONVERT_EXPR for reinterpret_cast. > > That's kind of the wrong way round, isn't it? NOP_EXPRs are for things > that don't generate code, which

Minor testsuite improvements for stack-clash-protection tests

2018-04-20 Thread Jeff Law
Back in October I added dg-skip-if directives for a small number of stack-clash tests which were sensitive to whether or not the stack protector was enabled. Those skips triggered on -fstack-protector. That worked, but was insufficient to DTRT for -fstack-protector-strong of

[PATCH][i386] PR target/85473, Fix _movdir64b expansion with -mx32

2018-04-20 Thread Peryt, Sebastian
Hi, This fixes PR85473 by fixing _movdir64b expansion for -mx32. Ok for trunk? 2018-04-20 Sebastian Peryt gcc/ChangeLog: PR target/85473 * config/i386/i386.c (ix86_expand_builtin): Change memory operand to XI, op0 extend to Pmode.

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

2018-04-20 Thread Kyrill Tkachov
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 aarch64-none-elf and doesn't get run on arm-none-eabi. Committing

Re: [PATCH] Do not overflow string buffer (PR objc/85476).

2018-04-20 Thread Martin Sebor
On 04/20/2018 03:44 AM, Martin Liška wrote: Hi. Quite obvious package that causes an ASAN error described in the PR. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. As an aside, I went and looked at the rest of code to see if the overflow could be detected at

Re: [PATCH] PR target/85456, Fix __builtin_powil for -mabi=ieeelongdouble on PowerPC

2018-04-20 Thread Segher Boessenkool
Hi Mike, On Thu, Apr 19, 2018 at 12:33:45AM -0400, Michael Meissner wrote: > This patch adds __powikf2 to libgcc, and makes GCC use it for __builtin_powil > when long double is IEEE 128-bit (-mabi=ieeelongdouble). > > I tested it on a little endian power8 system with a bootstrap compiler. There

Re: [PATCH, rs6000] Fix PR83969: ICE in final_scan_insn, at final.c:2997

2018-04-20 Thread Peter Bergner
On 4/20/18 9:34 AM, Peter Bergner wrote: > Neither test case fails on GCC 6, but I haven't tested on BE which is > where the PR83969 test case was failing (-m32 BE). I'll do a build on > BE and verify whether the tests compile there or not. If they PASS, > I'd probably just leave it alone until

Re: [PATCH, rs6000] Fix PR83969: ICE in final_scan_insn, at final.c:2997

2018-04-20 Thread Peter Bergner
On 4/19/18 5:40 PM, Segher Boessenkool wrote: > On Thu, Apr 19, 2018 at 01:23:51PM -0500, Peter Bergner wrote: >> On 3/9/18 4:25 PM, Peter Bergner wrote: >>> Technically, it is broken there too, but until trunk, we never really >>> generated the altivec mems that trigger this bug, so I think I

Re: [PATCH] [PR c++/85437] accept static_casted ptrmem in constexpr

2018-04-20 Thread Nathan Sidwell
On 04/18/2018 01:07 AM, Jason Merrill wrote: I wonder if it would work to use CONVERT_EXPR for reinterpret_cast. That's kind of the wrong way round, isn't it? NOP_EXPRs are for things that don't generate code, which a reinterpret_cast is. static_cast adds a constant, which is only zero for

[nvptx, PR85445, committed] Fix calls to vector and worker routines

2018-04-20 Thread Tom de Vries
Hi, Consider this test-case (minimized from the test-case in the patch): ... #pragma acc routine vector static void __attribute__((always_inline)) Vector (int *ptr, int n, const int ) { #pragma acc loop vector for (unsigned ix = 0; ix < n; ix++) ptr[ix] += inc; } #pragma acc routine

RE: [PATCH] x86: Allow -fcf-protection with multi-byte NOPs

2018-04-20 Thread Tsimbalist, Igor V
> -Original Message- > From: H.J. Lu [mailto:hjl.to...@gmail.com] > Sent: Friday, April 20, 2018 1:15 PM > To: Jakub Jelinek > Cc: Tsimbalist, Igor V ; Richard Biener > ; Uros Bizjak ; gcc- >

Re: [PATCH] x86: Allow -fcf-protection with multi-byte NOPs

2018-04-20 Thread H.J. Lu
On Fri, Apr 20, 2018 at 09:39:58AM +0200, Jakub Jelinek wrote: > On Fri, Apr 20, 2018 at 06:25:10AM +, Tsimbalist, Igor V wrote: > > > Something like this? > > > > Shouldn't this > > > > -# ifdef __IBT__ > > +# if (__CET__ & 1) != 0 > > > > Be as > > > > -# ifdef __IBT__ > > +#ifdef

Re: [PATCH] Do not overflow string buffer (PR objc/85476).

2018-04-20 Thread Richard Biener
On Fri, Apr 20, 2018 at 11:44 AM, Martin Liška wrote: > Hi. > > Quite obvious package that causes an ASAN error described in the PR. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? Ok. Richard. > Martin > >

[PATCH] Do not overflow string buffer (PR objc/85476).

2018-04-20 Thread Martin Liška
Hi. Quite obvious package that causes an ASAN error described in the PR. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin gcc/objc/ChangeLog: 2018-04-20 Martin Liska PR objc/85476 * objc-act.c

Re: [PATCH] Fix ICE with single element vector

2018-04-20 Thread Richard Biener
On Fri, Apr 20, 2018 at 11:05 AM, Andreas Krebbel wrote: > On 04/18/2018 10:25 AM, Richard Biener wrote: >> On Mon, Apr 16, 2018 at 6:16 PM, Andreas Krebbel >> wrote: >>> I did run into an ICE with a single element vector triggered by >>>

Re: [PATCH] Fix ICE with single element vector

2018-04-20 Thread Andreas Krebbel
On 04/18/2018 10:25 AM, Richard Biener wrote: > On Mon, Apr 16, 2018 at 6:16 PM, Andreas Krebbel > wrote: >> I did run into an ICE with a single element vector triggered by >> dividing the number of elements by 2 with exact_div here: >> >> tree-vect-data-refs.c:5132 >>

[PATCH] Fix PR85475

2018-04-20 Thread Richard Biener
The following fixes exponential complexity with /* Reassociate (X * CST) * Y to (X * Y) * CST. This does not introduce signed overflow for CST != 0 && CST != -1. */ (simplify (mult:c (mult:s @0 INTEGER_CST@1) @2) (if (TREE_CODE (@2) != INTEGER_CST && !integer_zerop (@1) &&

[PR 85449] Fix IPA-CP test for self-feeding recursive dependency

2018-04-20 Thread Martin Jambor
Hi, the issue in PR 85449 is that the code for gathering call graph edges to redirect to a new clone that identified self-recursive PASS-THROUGHs also triggered for clones of these (self recursively calling a previous clone of the same function) and redirected them too. Fixed by the patch below

[PR 85447] Check that clones of edges exist during IPA-CP

2018-04-20 Thread Martin Jambor
Hi, the details of what leads to this bug are in Bugzilla (comment 3), the basic problem is that when IPA-CP is looking for a clone of an edge it is not there because speculation resolution removed it. After conversation with Honza, he preferred this smaller local fix rather than incorporating

Re: [PATCH] x86: Allow -fcf-protection with multi-byte NOPs

2018-04-20 Thread Jakub Jelinek
On Fri, Apr 20, 2018 at 06:25:10AM +, Tsimbalist, Igor V wrote: > > Something like this? > > Shouldn't this > > -# ifdef __IBT__ > +# if (__CET__ & 1) != 0 > > Be as > > -# ifdef __IBT__ > +#ifdef __CET__ > +# if (__CET__ & 1) != 0 > > OK otherwise. Only if you use -Wundef warning (not

Re: [PATCH] x86: Allow -fcf-protection with multi-byte NOPs

2018-04-20 Thread Jakub Jelinek
On Thu, Apr 19, 2018 at 03:08:06PM -0700, H.J. Lu wrote: > > As -fcf-protection and -mcet/-mibt/-mshstk are are disjoint and > > control different parts I agree with > > > > + if ((isa_flag & OPTION_MASK_ISA_SHSTK)) > > +def_or_undef (parse_in, "__SHSTK__"); > > + if (flag_cf_protection !=

Re: [PING] [PATCH] avoid -Wrestrict for null pointers (PR 85365)

2018-04-20 Thread Richard Biener
On Thu, Apr 19, 2018 at 6:05 PM, Martin Sebor wrote: > Ping: https://gcc.gnu.org/ml/gcc-patches/2018-04/msg00676.html > > Testing on x86_64-linux showed no regressions. OK. Richard. > > On 04/13/2018 10:49 AM, Martin Sebor wrote: >> >> PR 85365 is another example of a false

RE: [PATCH] x86: Allow -fcf-protection with multi-byte NOPs

2018-04-20 Thread Tsimbalist, Igor V
> -Original Message- > From: H.J. Lu [mailto:hjl.to...@gmail.com] > Sent: Friday, April 20, 2018 3:17 AM > To: Jakub Jelinek > Cc: Tsimbalist, Igor V ; Richard Biener > ; Uros Bizjak ; gcc- >