Re: [PATCH 1/1] Move AESNI generation to Skylake and Goldmont

2018-08-29 Thread Uros Bizjak
On Thu, Aug 30, 2018 at 7:14 AM, Thiago Macieira wrote: > The instruction set first appeared with Westmere, but not all processors > in that and the next few generations have the instructions. According to > Wikipedia[1], the first generation in which all SKUs have AES > instructions are Skylake a

Re: [PATCHv2] Handle overlength strings in C++ FE

2018-08-29 Thread Bernd Edlinger
On 08/30/18 00:17, Jason Merrill wrote: > On Fri, Aug 24, 2018 at 4:02 PM, Bernd Edlinger > wrote: >> Hi! >> >> >> This is an alternative approach to handle overlength strings in the C++ FE. >> >> The difference to the previous version is that overlength >> STRING_CST never have a longer TREE_STRI

[PATCH 1/1] Move AESNI generation to Skylake and Goldmont

2018-08-29 Thread Thiago Macieira
The instruction set first appeared with Westmere, but not all processors in that and the next few generations have the instructions. According to Wikipedia[1], the first generation in which all SKUs have AES instructions are Skylake and Goldmont. I can't find any Skylake, Kabylake, Kabylake-R or Ca

Re: [PATCHv2] Call braced_list_to_string after array size is fixed

2018-08-29 Thread Jason Merrill
On 08/24/2018 03:52 PM, Bernd Edlinger wrote: this updated patch fixes one regression with current trunk due to a new test case. Sorry for the confusion. The change to the previous version is: 1) the check to avoid folding on empty char arrays is restored. 2) A null-termination character is add

Re: [PR c++/87137] GCC-8 Fix

2018-08-29 Thread Liu Hao
在 2018-08-30 01:36, Nathan Sidwell 写道: But, it would be bad to make that particular ABI fix in a point release, so this patch just reverts the regression I caused.  Sadly, because it requires understanding TEMPLATE_DECL, we can't simply update place_field.  Instead I temporarily stitch out unde

Re: [PATCH][testcase]patch for fixing PR 86519

2018-08-29 Thread Jeff Law
On 08/29/2018 08:53 AM, Qing Zhao wrote: > Hi, > > this is the patch to fix PR86519. > > Per Jeff’s suggestion, I removed strcmpopt_6.c from gcc.dg, and > added it to gcc.target/aarch64 and gcc.target/i386. > > retested on x86 and aarch64. no issue. > > Okay to commit? > > thanks. > > Qing. >

Re: [PATCH AArch64]Fix test failure for pr84682-2.c

2018-08-29 Thread Bin.Cheng
On Thu, Aug 30, 2018 at 2:47 AM Richard Sandiford wrote: > > Joey Ye writes: > > diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c > > index 07c55b1..9e965ab 100644 > > --- a/gcc/config/aarch64/aarch64.c > > +++ b/gcc/config/aarch64/aarch64.c > > @@ -5674,9 +5674,6 @@ aarch

Re: [PATCH] avoid warning on constant strncpy until next statement is reachable (PR 87028)

2018-08-29 Thread Jeff Law
On 08/28/2018 06:12 PM, Martin Sebor wrote: >>> Sadly, dstbase is the PARM_DECL for d.  That's where things are going >>> "wrong".  Not sure why you're getting the PARM_DECL in that case.  I'd >>> debug get_addr_base_and_unit_offset to understand what's going on. >>> Essentially you're getting diff

[PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-08-29 Thread Martin Sebor
The attached patch adds code to work harder to determine whether the destination of an assignment involving MEM_REF is the same as the destination of a prior strncpy call. The included test case demonstrates when this situation comes up. During ccp, dstbase and lhsbase returned by get_addr_base_

C++ PATCH/RFC for c++/87109, wrong overload with ref-qualifiers

2018-08-29 Thread Marek Polacek
I've now gotten to the point where I question the validity of this PR, so it's probably a good time to stop and ask for some advice. As discussed in , we choose the wrong overload for f1: struct C { }; struct A { operator C() &; operat

Re: [PATCH] Rewrite pic.md to improve medany and pic code size.

2018-08-29 Thread Palmer Dabbelt
On Wed, 29 Aug 2018 09:52:00 PDT (-0700), Jim Wilson wrote: On Wed, Aug 29, 2018 at 9:22 AM, Palmer Dabbelt wrote: Thanks Jim -- I'm afraid at least part of this was my mess, as I had to go add in the ZERO_EXTEND_LOAD hackery to work around some bug in this file that I couldn't figure out how t

Re: PING^1 [PATCH] DWARF: Relax SUPPORTS_STACK_ALIGNMENT with !crtl->stack_realign_tried

2018-08-29 Thread H.J. Lu
On Wed, Aug 29, 2018 at 3:37 PM, Jason Merrill wrote: > On Wed, Aug 29, 2018 at 5:43 PM, H.J. Lu wrote: >> On Wed, Aug 29, 2018 at 2:17 PM, Jason Merrill wrote: >>> On Wed, Aug 29, 2018 at 3:38 PM, H.J. Lu wrote: On Wed, Aug 29, 2018 at 12:32 PM, Jason Merrill wrote: > On Wed, Aug 29,

Re: [PATCH 3/3] or1k: gcc: initial support for openrisc

2018-08-29 Thread Stafford Horne
On Wed, Aug 29, 2018 at 04:38:45PM -0600, Jeff Law wrote: > ps. Any plans for glibc? How complete is the qemu support? I'm having > reasonable success building little chroot filesystems, then using qemu > to do bootstrap testing within those chroots. Hello Juff, I was planning to start to look

[PATCH, v2], Improve PowerPC switch behavior on medium code model system

2018-08-29 Thread Michael Meissner
This patch is a respin of the original patch. I moved the support for the LWAX instruction in a separate patch, and it has already been committed. I added a test case for the switch code on PowerPC LE medium code. I made the labelref insn not have a generator because there was no caller for it (

Re: [PATCH 3/3] or1k: gcc: initial support for openrisc

2018-08-29 Thread Richard Henderson
On 08/29/2018 03:38 PM, Jeff Law wrote: > As far as I'm concerned, you can commit this once the barriers & > speculation bits are fixed. If you can avoid trampolines, that can be a > follow-up. And long branches can definitely be punted until it's really > needed. Thanks. > ps. Any plans for gl

Re: [PATCH 3/3] or1k: gcc: initial support for openrisc

2018-08-29 Thread Stafford Horne
On Wed, Aug 29, 2018 at 02:29:45PM -0700, Richard Henderson wrote: > On 08/28/2018 07:13 AM, Jeff Law wrote: > > I didn't see any provision for long vs short branches. How are branches > > to targets within the same function, but which are out of the range that > > can be encoded in a single instr

Re: [PATCH 3/3] or1k: gcc: initial support for openrisc

2018-08-29 Thread Jeff Law
On 08/29/2018 04:38 PM, Jeff Law wrote: > On 08/29/2018 03:29 PM, Richard Henderson wrote: > > As far as I'm concerned, you can commit this once the barriers & > speculation bits are fixed. If you can avoid trampolines, that can be a > follow-up. And long branches can definitely be punted until

Re: [PATCH 3/3] or1k: gcc: initial support for openrisc

2018-08-29 Thread Jeff Law
On 08/29/2018 03:29 PM, Richard Henderson wrote: > On 08/28/2018 07:13 AM, Jeff Law wrote: >> Your port defines instruction scheduling, so please check that you're >> emitting the proper barriers, particularly in your epilogue code. In >> particular most ports need a barrier to prevent movement of

Re: PING^1 [PATCH] DWARF: Relax SUPPORTS_STACK_ALIGNMENT with !crtl->stack_realign_tried

2018-08-29 Thread Jason Merrill
On Wed, Aug 29, 2018 at 5:43 PM, H.J. Lu wrote: > On Wed, Aug 29, 2018 at 2:17 PM, Jason Merrill wrote: >> On Wed, Aug 29, 2018 at 3:38 PM, H.J. Lu wrote: >>> On Wed, Aug 29, 2018 at 12:32 PM, Jason Merrill wrote: On Wed, Aug 29, 2018 at 2:59 PM, H.J. Lu wrote: > On Wed, Aug 29, 2018

Re: [PATCH 3/3] or1k: gcc: initial support for openrisc

2018-08-29 Thread Stafford Horne
On Tue, Aug 28, 2018 at 08:13:48AM -0600, Jeff Law wrote: > On 08/26/2018 03:18 PM, Stafford Horne wrote: > > -mm-dd Stafford Horne > > Richard Henderson > > > > gcc/ChangeLog: > > > > * common/config/or1k/or1k-common.c: New file. > > * config/or1k/*: New. > > * confi

Re: [PATCH 2/3] or1k: testsuite: initial support for openrisc

2018-08-29 Thread Stafford Horne
On Wed, Aug 29, 2018 at 02:12:57PM -0700, Richard Henderson wrote: > On 08/26/2018 02:18 PM, Stafford Horne wrote: > > diff --git a/gcc/testsuite/gcc.target/or1k/cmov-1.c > > b/gcc/testsuite/gcc.target/or1k/cmov-1.c > > new file mode 100644 > > index 000..fcac129175d > > --- /dev/null > >

Re: [PATCH 1/3] or1k: libgcc: initial support for openrisc

2018-08-29 Thread Stafford Horne
On Wed, Aug 29, 2018 at 02:08:07PM -0700, Richard Henderson wrote: > On 08/26/2018 02:18 PM, Stafford Horne wrote: > > + .section .init > > + .align 4 > > + .global _init > > + .type _init,@function > > +_init: > > + l.sw-4(r1), r9 > > + l.addi r1,r1,-4 > > + > > + .section .fi

Re: [PATCHv2] Handle overlength strings in C++ FE

2018-08-29 Thread Jason Merrill
On Fri, Aug 24, 2018 at 4:02 PM, Bernd Edlinger wrote: > Hi! > > > This is an alternative approach to handle overlength strings in the C++ FE. > > The difference to the previous version is that overlength > STRING_CST never have a longer TREE_STRING_LENGTH than the TYPE_DOMAIN. > And those STRING_

Re: PING^1 [PATCH] DWARF: Relax SUPPORTS_STACK_ALIGNMENT with !crtl->stack_realign_tried

2018-08-29 Thread H.J. Lu
On Wed, Aug 29, 2018 at 2:17 PM, Jason Merrill wrote: > On Wed, Aug 29, 2018 at 3:38 PM, H.J. Lu wrote: >> On Wed, Aug 29, 2018 at 12:32 PM, Jason Merrill wrote: >>> On Wed, Aug 29, 2018 at 2:59 PM, H.J. Lu wrote: On Wed, Aug 29, 2018 at 11:33 AM, Jason Merrill wrote: > On Wed, Aug 29

Re: [PATCH] Improve checks in c_strlen (PR 87053)

2018-08-29 Thread Jeff Law
On 08/22/2018 08:41 AM, Bernd Edlinger wrote: > Hi! > > > This patch adds some more checks to c_getstr to fix PR middle-end/87053 > wrong code bug. > > Unfortunately this patch alone is not sufficient to fix the problem, > but also the patch for PR 86714 that hardens c_getstr is necessary > to p

Re: [C++ PATCH] Fix -fsanitize=vptr -fno-sanitize-recover=vptr (PR c++/87095)

2018-08-29 Thread Jason Merrill
OK. On Tue, Aug 28, 2018 at 6:39 PM, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, if some class has nearly empty virtual base as > primary base, it shares the vptr with that primary base; in that case, > we can't clear the vptr in the not in charge destructor of that class, > as the dto

Re: [PATCH 3/3] or1k: gcc: initial support for openrisc

2018-08-29 Thread Richard Henderson
On 08/28/2018 07:13 AM, Jeff Law wrote: > Your port defines instruction scheduling, so please check that you're > emitting the proper barriers, particularly in your epilogue code. In > particular most ports need a barrier to prevent movement of register > restores past the stack adjustment when th

Re: PING^1 [PATCH] DWARF: Relax SUPPORTS_STACK_ALIGNMENT with !crtl->stack_realign_tried

2018-08-29 Thread Jason Merrill
On Wed, Aug 29, 2018 at 3:38 PM, H.J. Lu wrote: > On Wed, Aug 29, 2018 at 12:32 PM, Jason Merrill wrote: >> On Wed, Aug 29, 2018 at 2:59 PM, H.J. Lu wrote: >>> On Wed, Aug 29, 2018 at 11:33 AM, Jason Merrill wrote: On Wed, Aug 29, 2018 at 8:47 AM, H.J. Lu wrote: > On Wed, Aug 8, 2018

Re: [PATCH 2/3] or1k: testsuite: initial support for openrisc

2018-08-29 Thread Richard Henderson
On 08/26/2018 02:18 PM, Stafford Horne wrote: > diff --git a/gcc/testsuite/gcc.target/or1k/cmov-1.c > b/gcc/testsuite/gcc.target/or1k/cmov-1.c > new file mode 100644 > index 000..fcac129175d > --- /dev/null > +++ b/gcc/testsuite/gcc.target/or1k/cmov-1.c > @@ -0,0 +1,8 @@ > +/* { dg-do comp

Re: [PATCH] Use complete_array_type on flexible array member initializers

2018-08-29 Thread Jason Merrill
On Sun, Aug 26, 2018 at 4:52 AM, Bernd Edlinger wrote: > On 08/26/18 07:36, Jeff Law wrote: >> On 08/24/2018 07:13 AM, Bernd Edlinger wrote: >>> Hi! >>> >>> >>> This patch prevents init values of STRING_CST and braced >>> array initializers to reach the middle-end with incomplete >>> type. >>> >>>

Re: [PATCH 1/3] or1k: libgcc: initial support for openrisc

2018-08-29 Thread Richard Henderson
On 08/26/2018 02:18 PM, Stafford Horne wrote: > + .section .init > + .align 4 > + .global _init > + .type _init,@function > +_init: > + l.sw-4(r1), r9 > + l.addi r1,r1,-4 > + > + .section .fini > + .align 4 > + .global _fini > + .type _fini,@functio

[PATCH, OpenACC] OpenACC subarray data alignment in Fortran

2018-08-29 Thread Julian Brown
This patch (by Cesar) removes several pointer-to-character casts emitted during OpenMP/OpenACC clause processing in the Fortran front end. It's not quite clear to me why these casts were needed to start with, but they are problematic in that an offload target will create a copy of the array data w

Re: Keep std::deque algos specializations in Debug mode

2018-08-29 Thread François Dumont
On 08/28/2018 09:00 PM, Jonathan Wakely wrote: On 25/08/18 22:44 +0200, François Dumont wrote: The last optimizations that get disabled when Debug mode is enable are the algo specializations for std::deque iterators. This patch move those algos in std namespace as they should even when Debug

[PATCH] C++: Fix-it hints for '.' vs '->' (PR c++/84898)

2018-08-29 Thread David Malcolm
This patch implements fix-it hints for "." vs "->" mismatches in the C++ frontend, for the places where the relevant location information is readily available. Successfully bootstrapped®rtested on x86_64-pc-linux-gnu; adds 39 PASS results to g++.sum. OK for trunk? gcc/cp/ChangeLog: PR c+

Re: PING^1 [PATCH] DWARF: Relax SUPPORTS_STACK_ALIGNMENT with !crtl->stack_realign_tried

2018-08-29 Thread H.J. Lu
On Wed, Aug 29, 2018 at 12:32 PM, Jason Merrill wrote: > On Wed, Aug 29, 2018 at 2:59 PM, H.J. Lu wrote: >> On Wed, Aug 29, 2018 at 11:33 AM, Jason Merrill wrote: >>> On Wed, Aug 29, 2018 at 8:47 AM, H.J. Lu wrote: On Wed, Aug 8, 2018 at 6:32 AM, H.J. Lu wrote: > Assert for SUPPORTS_S

Re: PING^1 [PATCH] DWARF: Relax SUPPORTS_STACK_ALIGNMENT with !crtl->stack_realign_tried

2018-08-29 Thread Jason Merrill
On Wed, Aug 29, 2018 at 2:59 PM, H.J. Lu wrote: > On Wed, Aug 29, 2018 at 11:33 AM, Jason Merrill wrote: >> On Wed, Aug 29, 2018 at 8:47 AM, H.J. Lu wrote: >>> On Wed, Aug 8, 2018 at 6:32 AM, H.J. Lu wrote: Assert for SUPPORTS_STACK_ALIGNMENT was added for dynamic stack alignment. At

Re: [Patch, fortran] PR86328 - [8/9 Regression] Runtime segfault reading an allocatable class(*) object in allocate statements

2018-08-29 Thread Janus Weil
Hi Paul, > The attached patch fixes PR86328 and PR86760. The regression was > caused by my commit r252949. > > The parts of the patch that fix the PRs are in trans.c and > trans-array.c. The problem was caused by fixing the expressions that > would provide the 'span' in gfc_build_array_ref, since

Re: PING^1 [PATCH] DWARF: Relax SUPPORTS_STACK_ALIGNMENT with !crtl->stack_realign_tried

2018-08-29 Thread H.J. Lu
On Wed, Aug 29, 2018 at 11:33 AM, Jason Merrill wrote: > On Wed, Aug 29, 2018 at 8:47 AM, H.J. Lu wrote: >> On Wed, Aug 8, 2018 at 6:32 AM, H.J. Lu wrote: >>> Assert for SUPPORTS_STACK_ALIGNMENT was added for dynamic stack >>> alignment. At the time, arg_pointer_rtx would only be eliminated >>>

Re: [PATCH AArch64]Fix test failure for pr84682-2.c

2018-08-29 Thread Richard Sandiford
Joey Ye writes: > diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c > index 07c55b1..9e965ab 100644 > --- a/gcc/config/aarch64/aarch64.c > +++ b/gcc/config/aarch64/aarch64.c > @@ -5674,9 +5674,6 @@ aarch64_classify_address (struct aarch64_address_info > *info, >&& (

Re: PING^1 [PATCH] DWARF: Relax SUPPORTS_STACK_ALIGNMENT with !crtl->stack_realign_tried

2018-08-29 Thread Jason Merrill
On Wed, Aug 29, 2018 at 8:47 AM, H.J. Lu wrote: > On Wed, Aug 8, 2018 at 6:32 AM, H.J. Lu wrote: >> Assert for SUPPORTS_STACK_ALIGNMENT was added for dynamic stack >> alignment. At the time, arg_pointer_rtx would only be eliminated >> by either hard_frame_pointer_rtx or stack_pointer_rtx only wh

Re: [PR c++/87137] GCC-8 Fix

2018-08-29 Thread Jakub Jelinek
On Wed, Aug 29, 2018 at 01:36:15PM -0400, Nathan Sidwell wrote: > --- gcc/cp/class.c(revision 263959) > +++ gcc/cp/class.c(working copy) > @@ -4041,6 +4041,32 @@ layout_nonempty_base_or_field (record_la >field_p = true; > } > > + /* PR c++/87137 When ms_bitfield_layout_p is

Re: [PR c++/87137] GCC-8 Fix

2018-08-29 Thread Richard Biener
On August 29, 2018 7:36:15 PM GMT+02:00, Nathan Sidwell wrote: >This defect concerns bitfield layout in the Microsoft ABI. This is a >fix for gcc-8. > >As well as MINGW targets, MS-ABI can be enabled on PowerPC & SuperH by >suitable use of attributes or options. > >When I folded TYPE_METHODS in

[PR c++/87137] GCC-8 Fix

2018-08-29 Thread Nathan Sidwell
This defect concerns bitfield layout in the Microsoft ABI. This is a fix for gcc-8. As well as MINGW targets, MS-ABI can be enabled on PowerPC & SuperH by suitable use of attributes or options. When I folded TYPE_METHODS into TYPE_FIELDS, the 'am I the last field' check of place_field could

[committed][tree-optimization/86711][tree-optimization/86714] Gracefully handle non-terminated strings

2018-08-29 Thread Jeff Law
This is primarily Martin's work. The core of the change here is to have string_constant generally not return non-NUL terminated strings. There's an additional argument which indicates if a non-NUL terminated string can be handled and to allow string_constant to bubble up the non-NUL terminated ob

Re: [PING] [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-29 Thread Jeff Law
On 08/17/2018 03:14 AM, Bernd Edlinger wrote: > Hi! > > > After the other patch has been applied, I re-based this patch accordingly. > > Except the mechanical changes, there are a few notable differences to the > previous version: > > In string_constant, I added a similar check for the STRING_C

Re: PING [PATCH] warn for strlen of arrays with missing nul (PR 86552, 86711, 86714) )

2018-08-29 Thread Jeff Law
On 08/02/2018 12:56 PM, Bernd Edlinger wrote: > On 08/02/18 15:26, Bernd Edlinger wrote: >>> >>>    /* If the length can be computed at compile-time, return it.  */ >>> -  len = c_strlen (src, 0); >>> +  tree array; >>> +  tree len = c_strlen (src, 0, &array); >> >> You know the c_strlen tries to c

Re: [PING] [PATCH] libiberty: fix memory usage explosion for invalid templates (PR demangler/84668)

2018-08-29 Thread Jason Merrill
On Wed, Aug 29, 2018 at 9:41 AM, David Malcolm wrote: > On Fri, 2018-06-22 at 15:44 -0600, Jeff Law wrote: >> On 03/03/2018 05:48 AM, David Malcolm wrote: >> > PR demangler/84668 reports this failure of c++filt (found by >> > fuzzing): >> > >> > $ c++filt '__H5z55_H5z55

Re: [GCC][PATCH] Enable underflow check in canonicalize_comparison. (PR86995)

2018-08-29 Thread Jakub Jelinek
On Wed, Aug 29, 2018 at 05:49:02PM +0100, Vlad Lazar wrote: > On 29/08/18 17:43, Jakub Jelinek wrote: > > On Wed, Aug 29, 2018 at 05:39:26PM +0100, Vlad Lazar wrote: > > > r263591 introduced the following regressions on multiple platforms: > > > +FAIL: c-c++-common/torture/builtin-arith-overflow-17

Re: [PATCH] Rewrite pic.md to improve medany and pic code size.

2018-08-29 Thread Jim Wilson
On Wed, Aug 29, 2018 at 9:22 AM, Palmer Dabbelt wrote: > Thanks Jim -- I'm afraid at least part of this was my mess, as I had to go > add in the ZERO_EXTEND_LOAD hackery to work around some bug in this file > that I couldn't figure out how to fix in a better way. ZERO_EXTEND_LOAD is exactly the s

Re: [GCC][PATCH] Enable underflow check in canonicalize_comparison. (PR86995)

2018-08-29 Thread Vlad Lazar
On 29/08/18 17:43, Jakub Jelinek wrote: On Wed, Aug 29, 2018 at 05:39:26PM +0100, Vlad Lazar wrote: r263591 introduced the following regressions on multiple platforms: +FAIL: c-c++-common/torture/builtin-arith-overflow-17.c -O0 execution test +FAIL: c-c++-common/torture/builtin-arith-overflow

Re: [PATCH][GCC][AArch64] Limit movmem copies to TImode copies.

2018-08-29 Thread James Greenhalgh
On Wed, Aug 15, 2018 at 07:55:18AM -0500, Tamar Christina wrote: > Hi All, > > I'm updating the patch with the suggested changes and also fixing a bug with > a boundary condition. > > On AArch64 we have integer modes larger than TImode, and while we can generate > moves for these they're not as

Workaround for building trunk with GCC 4.4.7

2018-08-29 Thread Jose E. Marchesi
Hi people! I found this compilation problem while building today's trunk with GCC 4.4.7 [1] in a RHEL 6.9 derivative in sparc64: g++ -fno-PIE -c -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribut

Re: [GCC][PATCH] Enable underflow check in canonicalize_comparison. (PR86995)

2018-08-29 Thread Jakub Jelinek
On Wed, Aug 29, 2018 at 05:39:26PM +0100, Vlad Lazar wrote: > r263591 introduced the following regressions on multiple platforms: > +FAIL: c-c++-common/torture/builtin-arith-overflow-17.c -O0 execution test > +FAIL: c-c++-common/torture/builtin-arith-overflow-17.c -O2 execution test > +FAIL:

[GCC][PATCH] Enable underflow check in canonicalize_comparison. (PR86995)

2018-08-29 Thread Vlad Lazar
Hi. r263591 introduced the following regressions on multiple platforms: +FAIL: c-c++-common/torture/builtin-arith-overflow-17.c -O0 execution test +FAIL: c-c++-common/torture/builtin-arith-overflow-17.c -O2 execution test +FAIL: c-c++-common/torture/builtin-arith-overflow-17.c -O2 -flto

Re: [PING 5][PATCH] [v4][aarch64] Avoid tag collisions for loads falkor

2018-08-29 Thread James Greenhalgh
On Mon, Aug 20, 2018 at 05:39:52AM -0500, Siddhesh Poyarekar wrote: > Ping! > > On 07/24/2018 12:37 PM, Siddhesh Poyarekar wrote: > > Hi, > > > > This is a rewrite of the tag collision avoidance patch that Kugan had > > written as a machine reorg pass back in February. > > > > The falkor hardwar

Re: VRP: abstract out POINTER_TYPE_P handling

2018-08-29 Thread David Malcolm
On Wed, 2018-08-29 at 06:54 -0400, Aldy Hernandez wrote: > Never say never. Just when I thought I was done... > > It looks like I need the special casing we do for pointer types in > extract_range_from_binary_expr_1. > > The code is simple enough that we could just duplicate it anywhere > we >

Re: [PATCH] Rewrite pic.md to improve medany and pic code size.

2018-08-29 Thread Palmer Dabbelt
On Tue, 28 Aug 2018 19:21:23 PDT (-0700), Jim Wilson wrote: The pic.md file has patterns used only for the medany code model and for pic code. They match an unsplit 2-instruction address load pattern followed by a load or store instruction, and emit an assembler macro that expands to two instruc

[C++ PATCH] Remove K&R declaration hack.

2018-08-29 Thread Nathan Sidwell
When SYSTEM_IMPLICIT_EXTERN_C is in effect, we have a couple of hacks to allow unprototyped declarations. 1) in decls_match we look at the promoted return types 2) in decls_match and in the parser we allow '()' to mean '(...)'. This is of course horrible, #2 will fail badly on modern ABIs. #1 ma

Re: [PATCH] Introduce libgcov.so run-time library (PR gcov-profile/84107).

2018-08-29 Thread Alexander Monakov
On Wed, 29 Aug 2018, Martin Liška wrote: > > Can you shortly tell why the testcase in the PR segfaults? Does the issue > > only affect indirect call profiling? > > What happens is that there will exist 2 instances of: > void * __gcov_indirect_call_callee; > > one in main executable, and one anot

[Patch, fortran] PR86328 - [8/9 Regression] Runtime segfault reading an allocatable class(*) object in allocate statements

2018-08-29 Thread Paul Richard Thomas
The attached patch fixes PR86328 and PR86760. The regression was caused by my commit r252949. The parts of the patch that fix the PRs are in trans.c and trans-array.c. The problem was caused by fixing the expressions that would provide the 'span' in gfc_build_array_ref, since the latter expected a

Re: [PATCH AArch64]Fix test failure for pr84682-2.c

2018-08-29 Thread Joey Ye
Ping^2 for Bin The ICE is still there annoyingly. Thanks, Joey On Wed, May 16, 2018 at 9:21 AM Kyrill Tkachov wrote: > > Hi Bin, > > > On 22/03/18 11:07, Bin.Cheng wrote: > > On Sat, Mar 17, 2018 at 8:54 AM, Richard Sandiford > > wrote: > > > Kyrill Tkachov writes: > > >> Hi Bin, > > >> > >

Re: [PATCH] avoid warning on constant strncpy until next statement is reachable (PR 87028)

2018-08-29 Thread Martin Sebor
On 08/29/2018 01:29 AM, Richard Biener wrote: On Wed, Aug 29, 2018 at 2:12 AM Martin Sebor wrote: Sadly, dstbase is the PARM_DECL for d. That's where things are going "wrong". Not sure why you're getting the PARM_DECL in that case. I'd debug get_addr_base_and_unit_offset to understand what

Reduce memory usage of sreal

2018-08-29 Thread Jan Hubicka
Hi, this patch reduces memory use of sreal by converting m_sig from int64_t to int32_t. This requires me to reduce SREAL_PART_BITS from 32 to 31 so there is space for sign. There is comment "SREAL_PART_BITS has to be an even number." but I found no reason for that comment. It is possible that I mi

[PATCH] Fix RPO VN region boundary check

2018-08-29 Thread Richard Biener
The following moves the region boundary check for alias stmt walking where it is effective. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2018-08-29 Richard Biener * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited virtual operand

Re: [PATCH] Introduce libgcov.so run-time library (PR gcov-profile/84107).

2018-08-29 Thread Alexander Monakov
On Wed, 29 Aug 2018, Martin Liška wrote: > >> That said, it looks the shared library libgcov.so is overkill. > > > > It feels like that somehow. > > > >> Alexander may explain how that can be beneficial? > >> > >> Note that I can fix the segfault being caused by inter-DSO calls. > > > > I think

[PATCH][testcase]patch for fixing PR 86519

2018-08-29 Thread Qing Zhao
Hi, this is the patch to fix PR86519. Per Jeff’s suggestion, I removed strcmpopt_6.c from gcc.dg, and added it to gcc.target/aarch64 and gcc.target/i386. retested on x86 and aarch64. no issue. Okay to commit? thanks. Qing. gcc/testsuite/ChangeLog: --- ChangeLog (revision 263888) +++ Chang

Re: [PATCH][RFC] Early phiopt pass

2018-08-29 Thread Richard Biener
On Wed, 29 Aug 2018, Jeff Law wrote: > On 08/29/2018 04:56 AM, Richard Biener wrote: > > > > In response to PR87105 I dusted off an old patch that adds an early > > phiopt pass. Recognizing we run phiopt twice with not many passes > > in between early in post-IPA optimizations this patch moves t

Re: [PATCH] x86 V[24]TImode vec_{init,extract} (PR target/80846)

2018-08-29 Thread H.J. Lu
On Thu, Jul 20, 2017 at 12:47 AM, Jakub Jelinek wrote: > Hi! > > Richard has asked me recently to look at V[24]TI vector extraction > and initialization, which he wants to use from the vectorizer. > > The following is an attempt to implement that. > > On the testcases included in the patch we get

Re: VRP: abstract out wide int CONVERT_EXPR_P code

2018-08-29 Thread Bernhard Reutner-Fischer
On 27 August 2018 14:24:33 CEST, Aldy Hernandez wrote: >Howdy! > >Phew, I think this is the last abstraction. This handles the unary >CONVERT_EXPR_P code. +bool +wide_int_range_convert_tree (tree &tmin, tree &tmax, +tree outer_type, +signo

Re: [PATCH][RFC] Early phiopt pass

2018-08-29 Thread Jeff Law
On 08/29/2018 04:56 AM, Richard Biener wrote: > > In response to PR87105 I dusted off an old patch that adds an early > phiopt pass. Recognizing we run phiopt twice with not many passes > in between early in post-IPA optimizations this patch moves the > first of said to the early pipeline. > > T

Re: 86711/86714

2018-08-29 Thread Jeff Law
OK. So time to unstick 86711/86714. I'm actually going to start by separating these two issues. While they are related I think it's better to handle them as separate patches. I also realize there's still ongoing work to change some of the STRING_CST semantics. If that work reaches fruition w

Re: [PATCH 4/4] bb-reorder: convert to gcc_stablesort

2018-08-29 Thread Alexander Monakov
On Tue, 28 Aug 2018, Michael Matz wrote: > > I think it's not too complicated, but how about adding this comment: > > > > profile_count m = c1.max (c2); > > /* Return 0 if counts are equal, -1 if E1 has the larger count. */ > > return (m == c2) - (m == c1); > > > > Or, alternatively, emplo

Re: [PATCH RFC] add generic expansion for MULT_HIGHPART_EXP

2018-08-29 Thread Alexander Monakov
On Tue, 28 Aug 2018, Richard Biener wrote: > I think that if we want to support MULT_HIGHPART generally then we need > to support it for all modes - what's your plan for 32bit targets here? This > means providing libgcc fallback implementations for modes we cannot directly > expand to. I didn't h

[PING] [PATCH] libiberty: fix memory usage explosion for invalid templates (PR demangler/84668)

2018-08-29 Thread David Malcolm
On Fri, 2018-06-22 at 15:44 -0600, Jeff Law wrote: > On 03/03/2018 05:48 AM, David Malcolm wrote: > > PR demangler/84668 reports this failure of c++filt (found by > > fuzzing): > > > > $ c++filt '__H5z55_H5z555' > > c++filt: out of memory allocating 184467440716

Re: [PATCH] Introduce libgcov.so run-time library (PR gcov-profile/84107).

2018-08-29 Thread Martin Liška
On 08/29/2018 02:20 PM, Richard Biener wrote: > On Wed, Aug 29, 2018 at 2:13 PM Martin Liška wrote: >> >> On 08/29/2018 01:18 PM, Richard Biener wrote: >>> On Wed, Aug 29, 2018 at 12:44 PM Martin Liška wrote: On 08/29/2018 11:17 AM, Richard Biener wrote: > On Wed, Aug 29, 2018 at 10

Re: [PATCH][RFC] Early phiopt pass

2018-08-29 Thread Jan Hubicka
> > In response to PR87105 I dusted off an old patch that adds an early > phiopt pass. Recognizing we run phiopt twice with not many passes > in between early in post-IPA optimizations this patch moves the > first of said to the early pipeline. > > The main motivation is to do things like MIN/MA

Re: [PATCH] Come up with TARGET_GET_VALID_OPTION_VALUES option hook (PR driver/83193).

2018-08-29 Thread Martin Liška
On 08/29/2018 01:06 PM, Richard Biener wrote: > On Mon, Aug 27, 2018 at 12:00 PM Martin Liška wrote: >> >> On 08/13/2018 03:00 PM, Martin Liška wrote: >>> On 08/13/2018 02:54 PM, Ramana Radhakrishnan wrote: On Mon, Aug 13, 2018 at 1:49 PM, Martin Liška wrote: > PING^1 > > On 07/2

PING^1 [PATCH] DWARF: Relax SUPPORTS_STACK_ALIGNMENT with !crtl->stack_realign_tried

2018-08-29 Thread H.J. Lu
On Wed, Aug 8, 2018 at 6:32 AM, H.J. Lu wrote: > Assert for SUPPORTS_STACK_ALIGNMENT was added for dynamic stack > alignment. At the time, arg_pointer_rtx would only be eliminated > by either hard_frame_pointer_rtx or stack_pointer_rtx only when > dynamic stack alignment is supported. With > > c

[PATCH] Fix PR87132

2018-08-29 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, re-doing together with the fix for the fallout. Richard. 2018-08-29 Richard Biener PR tree-optimization/87132 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate when skipping defs reachable over backed

[PATCH] Move const_parm trick to generic code

2018-08-29 Thread Richard Biener
This moves looking at a functions fnspec to decide whether parameters point to read-only memory and do alias disambiugations based on that from a "hack" in VN to generic alias code. This is to avoid regressions with a fix for PR87132 but looks useful generally. Bootstrap & regtest running on x8

Re: [PATCH] Introduce libgcov.so run-time library (PR gcov-profile/84107).

2018-08-29 Thread Richard Biener
On Wed, Aug 29, 2018 at 2:13 PM Martin Liška wrote: > > On 08/29/2018 01:18 PM, Richard Biener wrote: > > On Wed, Aug 29, 2018 at 12:44 PM Martin Liška wrote: > >> > >> On 08/29/2018 11:17 AM, Richard Biener wrote: > >>> On Wed, Aug 29, 2018 at 10:31 AM Martin Liška wrote: > > Hello. >

Re: [PATCH] Introduce libgcov.so run-time library (PR gcov-profile/84107).

2018-08-29 Thread Martin Liška
On 08/29/2018 01:18 PM, Richard Biener wrote: > On Wed, Aug 29, 2018 at 12:44 PM Martin Liška wrote: >> >> On 08/29/2018 11:17 AM, Richard Biener wrote: >>> On Wed, Aug 29, 2018 at 10:31 AM Martin Liška wrote: Hello. Moving the thread from gcc ML into gcc-patches. That's first

Re: [C++ Patch] Pr 85265 ("[concepts] ICE with missing identifier")

2018-08-29 Thread Nathan Sidwell
On 08/29/2018 05:56 AM, Paolo Carlini wrote: Hi, in this small error-recovery issue, we don't notice that cp_parser_identifier returns error_mark_node because the introduction-list is empty and we proceed to assign the error_mark_node to DECL_NAME (parm) to crash later in find_local_binding -

Re: Make safe_iterator inline friends

2018-08-29 Thread Jonathan Wakely
On 29/08/18 07:54 +0200, François Dumont wrote: On 28/08/2018 21:04, Jonathan Wakely wrote: On 23/08/18 22:59 +0200, François Dumont wrote: On 22/08/2018 23:45, Jonathan Wakely wrote: On 22/08/18 23:08 +0200, François Dumont wrote: Only operator== and != remains outside _Safe_iterator because

Re: [C++ PATCH] Fix structured binding range for in generic lambda inside of template (PR c++/87122)

2018-08-29 Thread Nathan Sidwell
On 08/28/2018 06:34 PM, Jakub Jelinek wrote: Hi! The following testcase ICEs in tsubst_decomp_names, because the earlier tsubst_expr still with processing_template_decl called just tsubst_decomp_names, but didn't arrange for DECL_VALUE_EXPR to be set on the decomp identifier decls (which cp_fini

Re: [PATCH] Introduce libgcov.so run-time library (PR gcov-profile/84107).

2018-08-29 Thread Richard Biener
On Wed, Aug 29, 2018 at 12:44 PM Martin Liška wrote: > > On 08/29/2018 11:17 AM, Richard Biener wrote: > > On Wed, Aug 29, 2018 at 10:31 AM Martin Liška wrote: > >> > >> Hello. > >> > >> Moving the thread from gcc ML into gcc-patches. That's first implementation > >> of shared libgcov library. Cu

Re: [ARM/FDPIC v2 09/21] [ARM] FDPIC: Add support for taking address of nested function

2018-08-29 Thread Kyrill Tkachov
Hi Christophe, On 13/07/18 17:11, christophe.l...@st.com wrote: From: Christophe Lyon In FDPIC mode, the trampoline generated to support pointers to nested functions looks like: .word trampoline address .word trampoline GOT address ldrr12, [pc, #8]

VRP: abstract out bitwise AND/OR optimizations

2018-08-29 Thread Aldy Hernandez
I thought I was done with this one as well, but it looks like we can push more things out to wide-int-range.*. I also pushed the optimization itself into wide_int_range_bit_{and,or}, for maximal sharing. And finally, I split out getting the mask and the bounds into its own function (wide_int

[PATCH][RFC] Early phiopt pass

2018-08-29 Thread Richard Biener
In response to PR87105 I dusted off an old patch that adds an early phiopt pass. Recognizing we run phiopt twice with not many passes in between early in post-IPA optimizations this patch moves the first of said to the early pipeline. The main motivation is to do things like MIN/MAX_EXPR early

VRP: abstract out POINTER_TYPE_P handling

2018-08-29 Thread Aldy Hernandez
Never say never. Just when I thought I was done... It looks like I need the special casing we do for pointer types in extract_range_from_binary_expr_1. The code is simple enough that we could just duplicate it anywhere we need it, but I hate code duplication and keeping track of multiple ve

Re: [ARM/FDPIC v2 07/21] [ARM] FDPIC: Avoid saving/restoring r9 on stack since it is RO

2018-08-29 Thread Kyrill Tkachov
Hi Christophe, On 13/07/18 17:11, christophe.l...@st.com wrote: From: Christophe Lyon 2018-XX-XX Christophe Lyon Mickaël Guêné gcc/ * config/arm/arm.c (arm_compute_save_reg0_reg12_mask): Handle FDPIC. (thumb1_compute_save_core_reg_mask): Likewise.

Re: [ARM/FDPIC v2 06/21] [ARM] FDPIC: Add support for c++ exceptions

2018-08-29 Thread Kyrill Tkachov
On 13/07/18 17:11, christophe.l...@st.com wrote: From: Christophe Lyon The main difference with existing support is that function addresses are function descriptor addresses instead. This means that all code dealing with function pointers now has to cope with function descriptors instead. Fo

Re: [ARM/FDPIC v2 04/21] [ARM] FDPIC: Add support for FDPIC for arm architecture

2018-08-29 Thread Kyrill Tkachov
Hi Christophe, On 13/07/18 17:10, christophe.l...@st.com wrote: From: Christophe Lyon The FDPIC register is hard-coded to r9, as defined in the ABI. We have to disable tailcall optimizations if we don't know if the target function is in the same module. If not, we have to set r9 to the value

Re: [ARM/FDPIC v2 02/21] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts

2018-08-29 Thread Kyrill Tkachov
On 13/07/18 17:10, christophe.l...@st.com wrote: From: Christophe Lyon The new arm-uclinuxfdpiceabi target behaves pretty much like arm-linux-gnueabi. In order the enable the same set of features, we have to update several configure scripts that generally match targets like *-*-linux*: in mos

[PATCH][OBVIOUS] Fix thinko in lto.c (PR bootstrap/87130).

2018-08-29 Thread Martin Liška
Hi. When introducing fndecl_built_in_p I did a thinko. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. And LTO bootstrap is fine on x86_64-linux-gnu. I'm going to install the patch. Martin gcc/lto/ChangeLog: 2018-08-29 Martin Liska PR bootstrap/87130

Re: [ARM/FDPIC v2 01/21] [ARM] FDPIC: Add -mfdpic option support

2018-08-29 Thread Kyrill Tkachov
Hi Christophe, On 13/07/18 17:10, christophe.l...@st.com wrote: From: Christophe Lyon 2018-XX-XX Christophe Lyon Mickaël Guêné gcc/ * config/arm/arm.opt: Add -mfdpic option. Change-Id: Ie5c4ed7434488933de6133186da09cd3ea1291a7 diff --git a/gcc/config/arm/arm.opt

Re: [PATCH] Introduce libgcov.so run-time library (PR gcov-profile/84107).

2018-08-29 Thread Martin Liška
On 08/29/2018 11:17 AM, Richard Biener wrote: > On Wed, Aug 29, 2018 at 10:31 AM Martin Liška wrote: >> >> Hello. >> >> Moving the thread from gcc ML into gcc-patches. That's first implementation >> of shared libgcov library. Currently inclusion of t-libgcov is added only >> to *-linux targets. Is

[PATCH, testsuite] Don't assume that HOSTCXX can respond to TEST_ALWAYS_FLAGS.

2018-08-29 Thread Iain Sandoe
Hi, I have noticed, for some configuration cases, that the ms-sysv tests fail with “can’t build generator”. The setting of HOSTCXX in gcc/testsuite/gcc/site.exp is dependent on the top level configuration; for example, configuring with —target,host,build = x86_64-linux-gnu or CXX=/usr/bin/g++

[MAINTAINERS, committed] Add myself to write after approval

2018-08-29 Thread Vlad Lazar
Add myself to write after approval. Committed in r263949. Vlad --- Index: ChangeLog === --- ChangeLog (revision 263948) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2018-08-29 Vlad Lazar + + * MAINTAINERS (write afte

Re: [PATCH, ARM] PR85434: Prevent spilling of stack protector guard's address on ARM

2018-08-29 Thread Thomas Preudhomme
Forgot another important change in ARM backend: The expander were causing one too many indirection which was what caused the test failure in glibc. The new expanders code skip the creation of a move from the memory reference of the guard's address to a register since this is done in the insn thems

  1   2   >