Re: [PATCH] doc: document -ftree-scev-cprop

2018-08-29 Thread Richard Biener
On Tue, Aug 28, 2018 at 4:22 PM Alexander Monakov wrote: > > Hi, > > PR 86726 is pointing out that -ftree-scev-cprop is not documented. > > Here's documentation for the final-value-replacement aspect of the > option. It technically can also replace in-loop references by > constants, but that doesn

Re: [4/6] Make the vectoriser do its own DCE

2018-08-29 Thread Richard Biener
On Wed, Aug 29, 2018 at 1:01 AM Jeff Law wrote: > > On 08/28/2018 05:23 AM, Richard Sandiford wrote: > > The vectoriser normally leaves a later DCE pass to remove the scalar > > code, but we've accumulated various special cases for things that > > DCE can't handle, such as removing the scalar stor

Re: [5/6] Insert pattern statements into vec_basic_blocks

2018-08-29 Thread Richard Biener
On Wed, Aug 29, 2018 at 1:16 AM Jeff Law wrote: > > On 08/28/2018 05:24 AM, Richard Sandiford wrote: > > The point of this patch is to put pattern statements in the same > > vec_basic_block as the statements they replace, with the pattern > > statements for S coming between S and S's original pred

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

2018-08-29 Thread Richard Biener
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's going on. > >> Essentially you'

Re: [6/6] Link imm uses for pattern stmts

2018-08-29 Thread Richard Biener
On Tue, Aug 28, 2018 at 1:25 PM Richard Sandiford wrote: > > One of the warts of the vectoriser IR is that it doesn't link SSA name > uses for pattern statements, leading to complicated special cases in > vect_mark_stmts_to_be_vectorized and (especially) vect_detect_hybrid_slp. > It also makes it

Re: [5/6] Insert pattern statements into vec_basic_blocks

2018-08-29 Thread Jakub Jelinek
On Tue, Aug 28, 2018 at 12:24:06PM +0100, Richard Sandiford wrote: > The point of this patch is to put pattern statements in the same > vec_basic_block as the statements they replace, with the pattern > statements for S coming between S and S's original predecessor. > This removes the need to handl

[PATCH] Add quotes for -fconstexpr-depth= in an error message.

2018-08-29 Thread Martin Liška
Hi. That's just simple patch that wraps an option name in an error message into apostrophes. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin gcc/cp/ChangeLog: 2018-08-28 Martin Liska * constexpr.c (cxx_eval_call_expression):

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

2018-08-29 Thread Martin Liška
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 it fine to add to all configurations that already include 't-slibgcc t-slibgcc-elf-ver'? Patch can bootstrap on ppc64

Re: [PATCH][GCC][AARCH64] Use stdint integers in vect_su_add_sub.c

2018-08-29 Thread Kyrill Tkachov
Hi all, On 28/08/18 23:15, James Greenhalgh wrote: On Fri, Aug 03, 2018 at 11:28:08AM -0500, Matthew Malcomson wrote: On 02/08/18 20:18, James Greenhalgh wrote: On Tue, Jul 31, 2018 at 04:53:19AM -0500, Matthew Malcomson wrote: Fixing the ilp32 issue that Christophe found. The existing testc

Re: [5/6] Insert pattern statements into vec_basic_blocks

2018-08-29 Thread Richard Sandiford
Jakub Jelinek writes: > On Tue, Aug 28, 2018 at 12:24:06PM +0100, Richard Sandiford wrote: >> The point of this patch is to put pattern statements in the same >> vec_basic_block as the statements they replace, with the pattern >> statements for S coming between S and S's original predecessor. >> T

Re: [5/6] Insert pattern statements into vec_basic_blocks

2018-08-29 Thread Jakub Jelinek
On Wed, Aug 29, 2018 at 09:59:07AM +0100, Richard Sandiford wrote: > Jakub Jelinek writes: > > On Tue, Aug 28, 2018 at 12:24:06PM +0100, Richard Sandiford wrote: > >> The point of this patch is to put pattern statements in the same > >> vec_basic_block as the statements they replace, with the patt

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

2018-08-29 Thread Richard Biener
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 it fine to add to all configurations that already > i

Re: [5/6] Insert pattern statements into vec_basic_blocks

2018-08-29 Thread Richard Biener
On Wed, Aug 29, 2018 at 11:10 AM Jakub Jelinek wrote: > > On Wed, Aug 29, 2018 at 09:59:07AM +0100, Richard Sandiford wrote: > > Jakub Jelinek writes: > > > On Tue, Aug 28, 2018 at 12:24:06PM +0100, Richard Sandiford wrote: > > >> The point of this patch is to put pattern statements in the same >

Re: [6/6] Link imm uses for pattern stmts

2018-08-29 Thread Richard Sandiford
Richard Biener writes: > On Tue, Aug 28, 2018 at 1:25 PM Richard Sandiford > wrote: >> >> One of the warts of the vectoriser IR is that it doesn't link SSA name >> uses for pattern statements, leading to complicated special cases in >> vect_mark_stmts_to_be_vectorized and (especially) vect_detect

Re: [5/6] Insert pattern statements into vec_basic_blocks

2018-08-29 Thread Richard Sandiford
Richard Biener writes: > On Wed, Aug 29, 2018 at 11:10 AM Jakub Jelinek wrote: >> >> On Wed, Aug 29, 2018 at 09:59:07AM +0100, Richard Sandiford wrote: >> > Jakub Jelinek writes: >> > > On Tue, Aug 28, 2018 at 12:24:06PM +0100, Richard Sandiford wrote: >> > >> The point of this patch is to put p

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

2018-08-29 Thread Thomas Preudhomme
Resend hopefully without HTML this time. On Wed, 29 Aug 2018 at 10:49, Thomas Preudhomme wrote: > > Hi, > > I've reworked the patch fixing PR85434 (spilling of stack protector guard's > address on ARM) to address the testsuite regression on powerpc and x86 as > well as glibc testsuite regressio

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

2018-08-29 Thread Paolo Carlini
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 - in general the front-end doesn't expect to f

Re: [PATCH v3 01/10] Initial TI PRU GCC port

2018-08-29 Thread Dimitar Dimitrov
On Thursday, 08/23/2018. 8:09:05 EEST Dimitar Dimitrov wrote: > > > +/* Emit function epilogue. */ > > > +void > > > +pru_expand_epilogue (bool sibcall_p) > > > +{ > > > + rtx cfa_adj; > > > + int total_frame_size; > > > + int sp_adjust, save_offset; > > > + int regno_start; > > > + > > > + i

[PATCH] PR libstdc++/31413 fix test failure on Debian systems

2018-08-29 Thread Jonathan Wakely
Debian uses a different D_FMT string for the zh_TW.UTF-8 locale, which caused this test to fail. Try to detect the Debian format and adjust the input being tested. PR libstdc++/31413 * testsuite/22_locale/time_get/get_date/wchar_t/4.cc: Check D_FMT string for alternative f

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

[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

[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++

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][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: [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

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 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.

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

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

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]

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: [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: 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] 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: [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: [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. >

[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

[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

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

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] 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

[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 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

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: 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][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: 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] 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: [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

[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] 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] 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

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

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

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, > > >> > >

[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] 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

[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] 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

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: [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

[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: [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:

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: [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

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] 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 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: [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: 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] 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

[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

[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

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

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: 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: [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 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, 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 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: 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

[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: 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, 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: [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

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 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: 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 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: [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] 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: 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: [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: [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: [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 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

  1   2   >