Re: [PR80693] drop value of parallel SETs dropped by combine

2017-06-22 Thread Alexandre Oliva
On Jun 8, 2017, Segher Boessenkool wrote: > [ I missed this patch the first time around; please cc: me to prevent this ] > On Thu, May 18, 2017 at 07:25:57AM -0300, Alexandre Oliva wrote: >> When an insn used by combine has multiple SETs, only the non-REG_UNUSED >>

Re: libgo patch committed: Fix ptrace implementation on MIPS

2017-06-22 Thread Andreas Schwab
include/linux/ptrace.h:69, from ../../../libgo/sysinfo.c:106: /usr/include/asm/fpu.h:57:8: error: redefinition of 'struct ia64_fpreg' struct ia64_fpreg { ^~ In file included from /usr/include/signal.h:339:0, from /usr/local/gcc/gcc-20170622/Build/gcc/includ

Re: Unreviewed^2 build, cpp patches

2017-06-22 Thread Rainer Orth
Rainer Orth writes: > The following patches have remained unreviewed for two weeks despite a > reminder: it's three weeks now... > [build] Support --sysroot with Solaris ld > https://gcc.gnu.org/ml/gcc-patches/2017-05/msg02342.html > > This needs a

Re: [PATCH, alpha, go]: Introduce applyRelocationsALPHA

2017-06-22 Thread Uros Bizjak
On Thu, Jun 22, 2017 at 12:39 AM, Ian Lance Taylor wrote: > On Tue, Jun 20, 2017 at 12:46 PM, Uros Bizjak wrote: >> This patch inroduces applyRelocationsALPHA to solve: >> >> FAIL: TestCgoConsistentResults >> FAIL: TestCgoPkgConfig >> FAIL:

Re: [libgomp, OpenACC] Add more map handling for enter/exit data directives

2017-06-22 Thread Chung-Lin Tang
On 2017/6/14 12:00 AM, Jakub Jelinek wrote: > I don't see sufficient information on what you want to change and why > and whether the changes are backwards compatible (say will a valid > OpenACC 2.0 program compiled by GCC 7 work against both libgomp from GCC 7 > as well as one with this patch)? >

Re: [RFC PATCH] Fix pointer diff (was: -fsanitize=pointer-overflow support (PR sanitizer/80998))

2017-06-22 Thread Richard Biener
On Wed, 21 Jun 2017, Marc Glisse wrote: > On Wed, 21 Jun 2017, Jakub Jelinek wrote: > > > So, I wrote following patch to do the subtraction in unsigned > > type. It passes bootstrap, but on both x86_64-linux and i686-linux > > regresses: > > +FAIL: gcc.dg/torture/pr66178.c -O* (test for

Re: [PATCH] Implement cond and induction cond reduction w/o REDUC_MAX_EXPR

2017-06-22 Thread Richard Biener
On Wed, 21 Jun 2017, Richard Biener wrote: > > During my attempt to refactor reduction vectorization I ran across > the special casing of inital values for INTEGER_INDUC_COND_REDUCTION > and tried to see what it is about. So I ended up implementing > cond reduction support for targets w/o

Re: [Patch match.pd] Fold (A / (1 << B)) to (A >> B)

2017-06-22 Thread James Greenhalgh
On Wed, Jun 21, 2017 at 08:59:29AM +0200, Richard Biener wrote: > Actually I was looking for a bit more generic > > bool > target_supports_op_p (tree type, enum tree_code code, > enum optab_subtype = optab_default) > { > optab ot = optab_for_tree_code (code, type,

Re: RFC: stack/heap collision vulnerability and mitigation with GCC

2017-06-22 Thread Richard Earnshaw (lists)
On 21/06/17 18:25, Jeff Law wrote: > On 06/21/2017 02:41 AM, Richard Earnshaw (lists) wrote: > >>> But the stack pointer might have already been advanced into the guard >>> page by the caller. For the sake of argument assume the guard page is >>> 0xf1000 and assume that our stack pointer at

Re: [PATCH 2/6] New warnings -Wstring-plus-{char, int} (PR c++/62181)

2017-06-22 Thread Xi Ruoyao
On 2017-06-19 12:44 -0600, Martin Sebor wrote: > On 06/19/2017 11:28 AM, Xi Ruoyao wrote: > > On 2017-06-19 10:51 -0600, Martin Sebor wrote: > > > On 06/11/2017 07:32 PM, Xi Ruoyao wrote: > > > > This patch adds warning option -Wstring-plus-int for C/C++. > > > > > > > > gcc/ChangeLog: > > > > >

Re: [PATCH] Implement cond and induction cond reduction w/o REDUC_MAX_EXPR

2017-06-22 Thread Richard Biener
On Thu, 22 Jun 2017, Richard Biener wrote: > On Wed, 21 Jun 2017, Richard Biener wrote: > > > > > During my attempt to refactor reduction vectorization I ran across > > the special casing of inital values for INTEGER_INDUC_COND_REDUCTION > > and tried to see what it is about. So I ended up

Re: [RFC PATCH] Fix pointer diff (was: -fsanitize=pointer-overflow support (PR sanitizer/80998))

2017-06-22 Thread Richard Biener
On Thu, 22 Jun 2017, Marc Glisse wrote: > On Thu, 22 Jun 2017, Richard Biener wrote: > > > > If we consider pointers as unsigned, with a subtraction that has a signed > > > result with the constraint that overflow is undefined, we cannot model > > > that > > > optimally with just the usual

Re: [PATCH 4/N] Recover GOTO predictor.

2017-06-22 Thread Martin Liška
On 06/22/2017 12:27 PM, Richard Biener wrote: > On Wed, Jun 21, 2017 at 3:06 PM, Martin Liška wrote: >> Hello. >> >> There's one additional predictor enhancement that is GOTO predict that >> used to working. Following patch adds expect statement for C and C++ family >> languages.

Re: Refactor fileptr_type_node handling

2017-06-22 Thread Marc Glisse
On Thu, 22 Jun 2017, Richard Biener wrote: On Thu, Jun 22, 2017 at 10:46 AM, Marc Glisse wrote: Hello, I was asked to handle (const) fenv_t and fexcept_t the same way as FILE and const tm. Since these have special handling in quite a few places, it seems necessary to

Backports to GCC 5.x

2017-06-22 Thread Martin Liška
Hello. I'm going to install the very same set of patches as for GCC 6.x except first 4 patches to ipa-visibility.c. These will be more complicated to backport. Martin >From 4d28482901c9569abd91cbff64a2362d39be50a1 Mon Sep 17 00:00:00 2001 From: marxin

Refactor fileptr_type_node handling

2017-06-22 Thread Marc Glisse
Hello, I was asked to handle (const) fenv_t and fexcept_t the same way as FILE and const tm. Since these have special handling in quite a few places, it seems necessary to make their support a bit more generic first. If I didn't mess up, this patch should not change anything. Bootstrap +

[PATCH] Fix ipa-split-5.c test-case.

2017-06-22 Thread Martin Liška
Hi. There's a small fallout where I blow up a function in order to suppress function inlining. Honza pre-approved the change, I'm going to install the patch. Martin >From dc4f022b91913e25eaff2ddcaf4dfef0e44217a2 Mon Sep 17 00:00:00 2001 From: marxin Date: Thu, 22 Jun 2017

Re: [RFC PATCH] Fix pointer diff (was: -fsanitize=pointer-overflow support (PR sanitizer/80998))

2017-06-22 Thread Marc Glisse
On Thu, 22 Jun 2017, Richard Biener wrote: If we consider pointers as unsigned, with a subtraction that has a signed result with the constraint that overflow is undefined, we cannot model that optimally with just the usual signed/unsigned operations, so I am in favor of POINTER_DIFF, at least

Re: i386/sse.md:round2 skips operands[2] -> -O0 warning

2017-06-22 Thread Jakub Jelinek
On Thu, Jun 22, 2017 at 07:00:59AM -0300, Alexandre Oliva wrote: > [adding the list] > > On Jun 8, 2017, Uros Bizjak wrote: > > > On Thu, Jun 8, 2017 at 9:22 PM, Alexandre Oliva wrote: > >> I was playing with bootstrap STAGE2_C{,XX}FLAGS='-O0

Re: [PATCH 4/N] Recover GOTO predictor.

2017-06-22 Thread Richard Biener
On Wed, Jun 21, 2017 at 3:06 PM, Martin Liška wrote: > Hello. > > There's one additional predictor enhancement that is GOTO predict that > used to working. Following patch adds expect statement for C and C++ family > languages. > > There's one fallout which is vrp24.c test-case,

Re: [PATCH] Implement cond and induction cond reduction w/o REDUC_MAX_EXPR

2017-06-22 Thread Alan Hayward
> On 22 Jun 2017, at 09:52, Richard Biener wrote: > > On Thu, 22 Jun 2017, Richard Biener wrote: > >> On Wed, 21 Jun 2017, Richard Biener wrote: >> >>> >>> During my attempt to refactor reduction vectorization I ran across >>> the special casing of inital values for

Re: i386/sse.md:round2 skips operands[2] -> -O0 warning

2017-06-22 Thread Alexandre Oliva
[adding the list] On Jun 8, 2017, Uros Bizjak wrote: > On Thu, Jun 8, 2017 at 9:22 PM, Alexandre Oliva wrote: >> I was playing with bootstrap STAGE2_C{,XX}FLAGS='-O0 -fcompare-debug' to >> test some changes I'm working on, and -Werror in stage2 prevented

Re: Backports to 6.x

2017-06-22 Thread Richard Biener
On Wed, Jun 21, 2017 at 1:17 PM, Nathan Sidwell wrote: > On 06/21/2017 04:14 AM, Martin Liška wrote: >> >> As release managers are planning to release next version of GCC 6. I would >> like to >> do backport revisions attached. >> >> The only complicated one is the one for PR69953

Re: [PATCH] [Aarch64] Variable shift count truncation issues

2017-06-22 Thread James Greenhalgh
Resending for the list, as the last copy got bounced. Thanks, James - Forwarded message from James Greenhalgh - Date: Thu, 22 Jun 2017 11:16:38 +0100 From: James Greenhalgh To: Michael Collison , Wilco

[PATCH] Avoid UB in the Ada FE

2017-06-22 Thread Jakub Jelinek
Hi! I'm seeing almost 750 of runtime errors like: ../../gcc/ada/gcc-interface/trans.c:6992:20: runtime error: load of value 240, which is not a valid value for type 'bool' (with random values in place of the 240 above) during bootstrap-ubsan. The problem is that atomic_access_required_p only

Re: Refactor fileptr_type_node handling

2017-06-22 Thread Richard Biener
On Thu, Jun 22, 2017 at 10:46 AM, Marc Glisse wrote: > Hello, > > I was asked to handle (const) fenv_t and fexcept_t the same way as FILE and > const tm. Since these have special handling in quite a few places, it seems > necessary to make their support a bit more generic

Re: [PATCH] Port Doxygen support script from Perl to Python; add unittests

2017-06-22 Thread Martin Liška
PING^1 On 05/31/2017 04:10 PM, Martin Liška wrote: > ..adding missing patch >

PR81136: ICE from inconsistent DR_MISALIGNMENTs

2017-06-22 Thread Richard Sandiford
The test case triggered this assert in vect_update_misalignment_for_peel: gcc_assert (DR_MISALIGNMENT (dr) / dr_size == DR_MISALIGNMENT (dr_peel) / dr_peel_size); We knew that the two DRs had the same misalignment at runtime, but when considered in isolation, one

[PATCH] Condition reduction w/o REDUC_MAX_EXPR support

2017-06-22 Thread Richard Biener
The following patch implements $subject which means condition reduction support for x86_64 which lacks a horizontal max vector operation. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2016-06-22 Richard Biener * tree-vect-loop.c

Re: SSA range class and removal of VR_ANTI_RANGEs

2017-06-22 Thread Richard Sandiford
Aldy Hernandez writes: > On 06/20/2017 10:59 AM, Martin Sebor wrote: >> On 06/20/2017 02:41 AM, Aldy Hernandez wrote: >>> On 05/23/2017 03:26 PM, Martin Sebor wrote: On 05/23/2017 04:48 AM, Aldy Hernandez wrote: >>> + void Union (wide_int x, wide_int y); + bool

Re: [PATCH 4/N] Recover GOTO predictor.

2017-06-22 Thread Richard Biener
On Thu, Jun 22, 2017 at 12:57 PM, Martin Liška wrote: > On 06/22/2017 12:27 PM, Richard Biener wrote: >> On Wed, Jun 21, 2017 at 3:06 PM, Martin Liška wrote: >>> Hello. >>> >>> There's one additional predictor enhancement that is GOTO predict that >>> used to

Re: [PATCH] Implement cond and induction cond reduction w/o REDUC_MAX_EXPR

2017-06-22 Thread Richard Biener
On Thu, 22 Jun 2017, Alan Hayward wrote: > > > On 22 Jun 2017, at 09:52, Richard Biener wrote: > > > > On Thu, 22 Jun 2017, Richard Biener wrote: > > > >> On Wed, 21 Jun 2017, Richard Biener wrote: > >> > >>> > >>> During my attempt to refactor reduction vectorization I

Re: [PR80693] drop value of parallel SETs dropped by combine

2017-06-22 Thread Alexandre Oliva
On Jun 8, 2017, Segher Boessenkool wrote: > Would it work to just have "else" instead if this "if"? Or hrm, we'll > need to kill the recorded reg_stat value in the last case before this > as well? The patch below (is this what you meant?) fixes the PR testcase, and

[PATCH][DOC] Enhance target_clones documentation (PR other/78366).

2017-06-22 Thread Martin Liška
Hi. As mentioned in the PR, we only generate a resolver function when there's a usage of a function with target_clones attribute. Let's document the behavior. Ready to be installed? Martin gcc/ChangeLog: 2017-06-22 Martin Liska PR other/78366 *

Backports to gcc 7.x

2017-06-22 Thread Martin Liška
And there are backports for GCC 7 branch that I'm going to install. Martin >From 818c118793ae5e95948dd95471561c261247924c Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 19 Jun 2017 13:27:48 + Subject: [PATCH 12/12] Backport r249368

Re: Reorganise machmode.h headers

2017-06-22 Thread Richard Sandiford
Ping*2 Richard Sandiford writes: > Ping > > Richard Sandiford writes: >> Jeff Law writes: >>> On 11/16/2016 09:32 AM, Richard Sandiford wrote: Later patches will make machmode.h rely on wide-int.h and the

Re: [2/2] PR 80769: Incorrect strlen optimisation

2017-06-22 Thread Richard Sandiford
Ping*3 Richard Sandiford writes: > Ping*2 > > Richard Sandiford writes: >> In this testcase, we (correctly) record after: >> >> strcpy (p1, "abcde"); >> char *p2 = strchr (p1, '\0'); >> strcpy (p2, q); >> >> that the length of p1

[PING*2, Ada] Re: Handle data dependence relations with different bases

2017-06-22 Thread Richard Sandiford
Ping*2 Richard Sandiford writes: > Ping for this Ada patch/question. > > Richard Sandiford writes: >> Richard Biener writes: > How does this look? Changes since v1: > > - Added

Re: Refactor fileptr_type_node handling

2017-06-22 Thread Richard Biener
On Thu, Jun 22, 2017 at 12:58 PM, Marc Glisse wrote: > On Thu, 22 Jun 2017, Richard Biener wrote: > >> On Thu, Jun 22, 2017 at 10:46 AM, Marc Glisse >> wrote: >>> >>> Hello, >>> >>> I was asked to handle (const) fenv_t and fexcept_t the same way as

Re: fix libcc1 dependencies in toplevel Makefile

2017-06-22 Thread Alexandre Oliva
On Jun 13, 2017, Olivier Hainque wrote: > 2017-06-13 Olivier Hainque > * Makefile.def (host_modules): Set depgcc to true for libcc1, > meaning need of a dep on stage_current if gcc-bootstrap and on > maybe-all-gcc otherwise. >

Re: [PR80693] drop value of parallel SETs dropped by combine

2017-06-22 Thread Alexandre Oliva
On Jun 22, 2017, Alexandre Oliva wrote: > The patch below (is this what you meant?) fixes the PR testcase, and the > new else block doesn't get exercised in an x86_64-linux-gnu bootstrap. Err, I misdescribed the situation. It's not that it doesn't get exercised, it's that

Re: i386/sse.md:round2 skips operands[2] -> -O0 warning

2017-06-22 Thread Alexandre Oliva
On Jun 22, 2017, Jakub Jelinek wrote: > On Thu, Jun 22, 2017 at 07:00:59AM -0300, Alexandre Oliva wrote: >> [adding the list] >> Thanks, I'm checking this in. Regstrapped on x86_64-linux-gnu. > I bet it won't apply, I didn't know you were looking at this; > Martin Liska

Re: Add quality tracking for profile counter

2017-06-22 Thread Jan Hubicka
Hi, I proofread the code and noticed that in some cases I may trigger division by 0 that may get different outputs depending on optimization setting on Itanium. This is what I comitted after profiledbootstrap and regtesting at x86_64. * profile-count.h (apply_probability,

[PATCH][RFA] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Jeff Law
This fixes a bug discovered when we were evaluating the current state of -fstack-check. It ought to be able to go forward independent of the rest of the -fstack-check work. The aarch64 specific code does not correctly handle large frames and will generate RTL with unrecognizable insns for such

Re: [PATCH][RFA] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Jakub Jelinek
On Thu, Jun 22, 2017 at 09:01:03AM -0600, Jeff Law wrote: > This fixes a bug discovered when we were evaluating the current state of > -fstack-check. It ought to be able to go forward independent of the > rest of the -fstack-check work. > > The aarch64 specific code does not correctly handle

Re: RFC: stack/heap collision vulnerability and mitigation with GCC

2017-06-22 Thread Szabolcs Nagy
On 22/06/17 16:30, Jeff Law wrote: > It just happens to be the case that x86 hits *sp when it stores the > return pointer and that ppc always stores the backchain into *sp when it > allocates additional stack space. As a result on those targets we know > the offset between the stack pointer and

Re: SSA range class and removal of VR_ANTI_RANGEs

2017-06-22 Thread Martin Sebor
On 06/22/2017 06:16 AM, Richard Sandiford wrote: Aldy Hernandez writes: On 06/20/2017 10:59 AM, Martin Sebor wrote: On 06/20/2017 02:41 AM, Aldy Hernandez wrote: On 05/23/2017 03:26 PM, Martin Sebor wrote: On 05/23/2017 04:48 AM, Aldy Hernandez wrote: + void Union

Re: [PATCH][RFA] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Jakub Jelinek
On Thu, Jun 22, 2017 at 10:02:16AM -0700, Mike Stump wrote: > On Jun 22, 2017, at 8:32 AM, Jeff Law wrote: > > > > Sure. I'll do something with 20031023-1.c to ensure it or an equivalent > > is compiled with -fstack-check. That isn't totally unexpected. I > > would have also

Re: [PR80693] drop value of parallel SETs dropped by combine

2017-06-22 Thread Segher Boessenkool
On Thu, Jun 22, 2017 at 09:25:21AM -0300, Alexandre Oliva wrote: > On Jun 8, 2017, Segher Boessenkool wrote: > > > Would it work to just have "else" instead if this "if"? Or hrm, we'll > > need to kill the recorded reg_stat value in the last case before this > > as

Re: [PATCH 1/2] i386: Consider Kaby Lake to be equivalent to Skylake

2017-06-22 Thread Matt Turner
On Sun, Jun 18, 2017 at 10:56 AM, Uros Bizjak wrote: > On Fri, Jun 16, 2017 at 11:42 PM, Matt Turner wrote: >> Currently -march=native selects -march=broadwell on Kaby Lake systems, >> since its model numbers are missing from the switch statement. It falls

Re: libgo patch committed: Change some stack fields to uintptr

2017-06-22 Thread Rainer Orth
Hi Ian, > Because of how gccgo implements cgo calls, the code in dropm may not > have any write barriers. As a step toward implementing that, change > the gcstack, gcnextsegment, and gcnextsp fields of the g struct to > uintptr, so that assignments to them do not require write barriers. > The

Re: [PATCH] consider casts in -Wclass-memaccess (PR c++/81169)

2017-06-22 Thread Jason Merrill
OK. On Thu, Jun 22, 2017 at 2:00 PM, Martin Sebor wrote: > By making use of STRIP_NOPS() on the destination of the memory > function call, besides discarding the (implicit) conversion to > void* the warning also strips any explicit casts that remove > cv-qualifiers. This

Re: [PATCH][RFA] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Richard Biener
On June 22, 2017 7:17:16 PM GMT+02:00, Jeff Law wrote: >On 06/22/2017 11:07 AM, Jakub Jelinek wrote: >> On Thu, Jun 22, 2017 at 10:02:16AM -0700, Mike Stump wrote: >>> On Jun 22, 2017, at 8:32 AM, Jeff Law wrote: Sure. I'll do something with

Re: [PATCH][AArch64][GCC 6] PR target/79041: Correct -mpc-relative-literal-loads logic in aarch64_classify_symbol

2017-06-22 Thread Yvan Roux
Hi all, On 16 January 2017 at 16:34, Kyrill Tkachov wrote: > > On 13/01/17 16:35, James Greenhalgh wrote: >> >> On Wed, Jan 11, 2017 at 04:32:45PM +, Kyrill Tkachov wrote: >>> >>> Hi all, >>> >>> In this PR we generated ADRP/ADD instructions with :lo12:

Re: RFC: stack/heap collision vulnerability and mitigation with GCC

2017-06-22 Thread Jeff Law
On 06/22/2017 10:07 AM, Szabolcs Nagy wrote: > On 22/06/17 16:30, Jeff Law wrote: >> It just happens to be the case that x86 hits *sp when it stores the >> return pointer and that ppc always stores the backchain into *sp when it >> allocates additional stack space. As a result on those targets we

Re: [PATCH] Implement cond and induction cond reduction w/o REDUC_MAX_EXPR

2017-06-22 Thread Richard Biener
On June 22, 2017 6:20:57 PM GMT+02:00, Alan Hayward wrote: > >> On 22 Jun 2017, at 12:54, Richard Biener wrote: >> >> On Thu, 22 Jun 2017, Alan Hayward wrote: >> >>> On 22 Jun 2017, at 09:52, Richard Biener wrote:

Re: [PATCH][RFA] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Andrew Pinski
On Thu, Jun 22, 2017 at 10:02 AM, Mike Stump wrote: > On Jun 22, 2017, at 8:32 AM, Jeff Law wrote: >> >> Sure. I'll do something with 20031023-1.c to ensure it or an equivalent >> is compiled with -fstack-check. That isn't totally unexpected. I >>

[C++ PATCH] Special identifier marking

2017-06-22 Thread Nathan Sidwell
This patch starts cleaning up how we mark special identifiers. We currently use some of the TREE_LANG_FLAGS on IDENTIFIER_NODEs for various things, but most of those things are mutually exclusive, so an enumeration is better -- it allows us to distinguish more things with fewer bits. This

Re: RFC: stack/heap collision vulnerability and mitigation with GCC

2017-06-22 Thread Jeff Law
On 06/21/2017 11:47 AM, Wilco Dijkstra wrote: > Jeff Law wrote: > >> I'm a little confused. I'm not defining or changing the ABI. I'm >> working within my understanding of the existing aarch64 ABI used on >> linux systems. My understanding after reading that ABI and the prologue >> code for

Re: [PATCH, rs6000] Fix for vec_mulo and vec_mule test case

2017-06-22 Thread Segher Boessenkool
Hi Carl, On Thu, Jun 22, 2017 at 09:04:38AM -0700, Carl Love wrote: > Commit 249424 fixed the vec_mulo and vec_mule support however, the > changes for the test case did not get included in the previous patch. > The testing worked great for me as I had the fix. Not so good for > everyone else as

Re: [committed] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Mike Stump
On Jun 22, 2017, at 10:21 AM, Jeff Law wrote: > > This time with the test. Just #includes 20031023-1.c with a suitable dg > directive to ensure we compile with -fstack-check. > > I won't be surprised if other targets fail this test. It's a really big > stack frame :-) The

Re: [committed] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Jakub Jelinek
On Thu, Jun 22, 2017 at 11:21:15AM -0600, Jeff Law wrote: > +2017-06-22 Jeff Law > + > + * gcc.c-torture/compile/stack-check-1.c: New test. > + > 2016-06-22 Richard Biener > > * gcc.dg/vect/pr65947-1.c: Remove xfail. > diff --git

Re: [PATCH] Implement cond and induction cond reduction w/o REDUC_MAX_EXPR

2017-06-22 Thread Alan Hayward
> On 22 Jun 2017, at 12:54, Richard Biener wrote: > > On Thu, 22 Jun 2017, Alan Hayward wrote: > >> >>> On 22 Jun 2017, at 09:52, Richard Biener wrote: >>> >>> On Thu, 22 Jun 2017, Richard Biener wrote: >>> On Wed, 21 Jun 2017, Richard Biener

Re: [PATCH][RFA] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Mike Stump
On Jun 22, 2017, at 8:32 AM, Jeff Law wrote: > > Sure. I'll do something with 20031023-1.c to ensure it or an equivalent > is compiled with -fstack-check. That isn't totally unexpected. I > would have also been receptive to adding -fstack-check to the torture flags. Ouch.

Re: [PATCH][RFA] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Florian Weimer
* Mike Stump: > On Jun 22, 2017, at 8:32 AM, Jeff Law wrote: >> >> Sure. I'll do something with 20031023-1.c to ensure it or an equivalent >> is compiled with -fstack-check. That isn't totally unexpected. I >> would have also been receptive to adding -fstack-check to the

[committed] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Jeff Law
This time with the test. Just #includes 20031023-1.c with a suitable dg directive to ensure we compile with -fstack-check. I won't be surprised if other targets fail this test. It's a really big stack frame :-) Anyways, committed to the trunk. Jeff diff --git a/gcc/ChangeLog

Re: [PATCH][RFA] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Jeff Law
On 06/22/2017 12:23 PM, Florian Weimer wrote: > * Mike Stump: > >> On Jun 22, 2017, at 8:32 AM, Jeff Law wrote: >>> >>> Sure. I'll do something with 20031023-1.c to ensure it or an equivalent >>> is compiled with -fstack-check. That isn't totally unexpected. I >>> would have

Re: [PATCH][RFA] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Jeff Law
On 06/22/2017 11:07 AM, Jakub Jelinek wrote: > On Thu, Jun 22, 2017 at 10:02:16AM -0700, Mike Stump wrote: >> On Jun 22, 2017, at 8:32 AM, Jeff Law wrote: >>> >>> Sure. I'll do something with 20031023-1.c to ensure it or an equivalent >>> is compiled with -fstack-check. That

libgo patch committed: Mark dropm and callees nowritebarrierrec

2017-06-22 Thread Ian Lance Taylor
The CgocallbackDone function calls dropm after it calls entersyscall, which means that dropm must not have any write barriers. Mark it accordingly. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

[patch,avr][ping #1] PR81075: Move jump-tables out of .text

2017-06-22 Thread Georg-Johann Lay
Ping #1 http://gcc.gnu.org/ml/gcc-patches/2017-06/msg01029.html Georg-Johann Lay schrieb: Hi, Since PR71151 we have jump-tables in .text so that branches crossing the tables have longer offsets that needed. This moves jump-tables out of test again, but not into .progmem.gcc_sw_tables like

[PATCH] reorganize block/string move/compare expansions out of rs6000.c

2017-06-22 Thread Aaron Sawdey
This patch moves about 1400 lines of code for various block and string compare/move/zero expansions out of rs6000.c into a new file  rs6000-string.c. Segher had asked me to do this before I go adding new code here. Bootstrap passes on ppc64le, regtest in progress. OK for trunk if that passes?

Re: [PR80693] drop value of parallel SETs dropped by combine

2017-06-22 Thread Segher Boessenkool
On Thu, Jun 22, 2017 at 03:21:01AM -0300, Alexandre Oliva wrote: > On Jun 8, 2017, Segher Boessenkool wrote: > > > [ I missed this patch the first time around; please cc: me to prevent this ] > > > On Thu, May 18, 2017 at 07:25:57AM -0300, Alexandre Oliva wrote: >

[PATCH, rs6000] Fix for vec_mulo and vec_mule test case

2017-06-22 Thread Carl Love
GCC Maintainers: Commit 249424 fixed the vec_mulo and vec_mule support however, the changes for the test case did not get included in the previous patch. The testing worked great for me as I had the fix. Not so good for everyone else as I didn't share the test case fix with mainline. Sorry for

[PATCH] consider casts in -Wclass-memaccess (PR c++/81169)

2017-06-22 Thread Martin Sebor
By making use of STRIP_NOPS() on the destination of the memory function call, besides discarding the (implicit) conversion to void* the warning also strips any explicit casts that remove cv-qualifiers. This causes warnings that should otherwise be suppressed, as pointed out in bug 81169. The

Re: [PATCH][RFA] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Jakub Jelinek
On Thu, Jun 22, 2017 at 08:42:54PM +0200, Richard Biener wrote: > >The thought of scanning the assembly code or RTL is too painful to > >contemplate. THus I've been pondering having the prologue expanders > >emit notes into the dump file about what they did and why WRT probing. > > > >Or maybe we

Re: libgo patch committed: Fix ptrace implementation on MIPS

2017-06-22 Thread Ian Lance Taylor
h:57:8: error: redefinition of 'struct ia64_fpreg' > struct ia64_fpreg { > ^~ > In file included from /usr/include/signal.h:339:0, > from > /usr/local/gcc/gcc-20170622/Build/gcc/include-fixed/sys/ucontext.h:32, > from /usr/include/ucont

Re: [PATCH][RFA] Fix -fstack-check with really big frames on aarch64

2017-06-22 Thread Florian Weimer
* Jeff Law: > But I still think we're going to want to explicitly test the various > cases where we want to see probes vs when we do not. That kind of > testing won't be covered unless we explicitly do so and the least > painful way to cover may be via dump messages or the unit testing >

libgo patch committed: Export getm for test

2017-06-22 Thread Ian Lance Taylor
This patch to libgo exports the getm function so that it can be referenced by a test (from runtime/testdata/testprogcgo/dropm_stub.go). The test is not currently run, but it will be soon. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index:

Re: libgo patch committed: Change some stack fields to uintptr

2017-06-22 Thread Ian Lance Taylor
On Thu, Jun 22, 2017 at 11:09 AM, Rainer Orth wrote: > >> Because of how gccgo implements cgo calls, the code in dropm may not >> have any write barriers. As a step toward implementing that, change >> the gcstack, gcnextsegment, and gcnextsp fields of the g struct

libgo patch committed: Uncomment check for gchelper on g0 stack

2017-06-22 Thread Ian Lance Taylor
This libgo patch uncomments a check. Now that systemstack changes to the g0 stack, the check passes. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === ---

Re: [PATCH][ PR rtl-optimization/79286] Drop may_trap_p exception to testing dominance in update_equiv_regs

2017-06-22 Thread Jeff Law
On 04/29/2017 01:06 AM, Bernd Edlinger wrote: > On 04/28/17 20:46, Jeff Law wrote: >> On 04/28/2017 11:27 AM, Bernd Edlinger wrote: >>> Yes I agree, that is probably not worth it. So I could try to remove >>> the special handling of PIC+const and see what happens. >>> >>> However the

Re: [PATCH] Fix expand_builtin_atomic_fetch_op for pre-op (PR80902)

2017-06-22 Thread Jeff Law
On 05/28/2017 06:31 AM, Segher Boessenkool wrote: > __atomic_add_fetch adds a value to some memory, and returns the result. > If there is no direct support for this, expand_builtin_atomic_fetch_op > is asked to implement this as __atomic_fetch_add (which returns the > original value of the mem),

Re: [PATCH] handle enumerated types in -Wformat-overflow (PR 80397)

2017-06-22 Thread Jeff Law
On 05/08/2017 08:38 PM, Martin Sebor wrote: > On 04/28/2017 12:35 PM, Jeff Law wrote: >> On 04/26/2017 11:05 AM, Martin Sebor wrote: >>> On 04/24/2017 03:35 PM, Jeff Law wrote: On 04/11/2017 12:57 PM, Martin Sebor wrote: > In a review of my fix for bug 80364 Jakub pointed out that to

Re: [RFC PATCH, i386]: Enable post-reload compare elimination pass

2017-06-22 Thread Jeff Law
On 05/17/2017 12:33 AM, Uros Bizjak wrote: > On Wed, May 17, 2017 at 4:45 AM, Hans-Peter Nilsson wrote: > >>> But yes, we definitely should document the final canonical ordering. >> >> Is that about to also happen? >> >> I foresee in another half-a-dozen years, and *this*

Re: [PATCH] Always print attributes when dumping tree

2017-06-22 Thread Jeff Law
On 05/16/2017 08:18 PM, Andi Kleen wrote: > From: Andi Kleen > > A tree type dump currently doesn't print the attributes. Since we have > so many now and they do many interesting things dumping them can be > useful. So dump them by default for tree type dumps. > > Passes

Re: remove call to memset in value-prof.c:free_hist()

2017-06-22 Thread Jeff Law
On 05/23/2017 07:50 AM, Prathamesh Kulkarni wrote: > Hi Jeff, > As discussed in the other thread, this patch removes dead call to > memset in free_hist(). > Bootstrap+tested on x86_64-unknown-linux-gnu. > Cross-tested on arm*-*-*, aarch64*-*-*. > OK for trunk ? > > Thanks, > Prathamesh > > >

Re: [PATCH GCC][5/5]Enable tree loop distribution at -O3 and above optimization levels.

2017-06-22 Thread Jeff Law
On 06/07/2017 02:07 AM, Bin.Cheng wrote: > On Tue, Jun 6, 2017 at 6:47 PM, Jeff Law wrote: >> On 06/02/2017 05:52 AM, Bin Cheng wrote: >>> Hi, >>> This patch enables -ftree-loop-distribution by default at -O3 and above >>> optimization levels. >>> Bootstrap and test at O2/O3 on

Re: [PR target/25111] New patterns for m68k bit insns

2017-06-22 Thread Jeff Law
On 06/20/2017 04:28 AM, Andreas Schwab wrote: > Tested on m68k, installed on trunk and gcc-7 branch. > > Andreas. > > PR target/80970 > * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d" > instead of "+d". Thanks for taking care of this. I've been buried in the

[PATCH] PR ipa/81185, Improve naming of target_clone cloned function names

2017-06-22 Thread Michael Meissner
he June 19th, 2017 change from Martin Liska , made the target_clones support more usable, in that it it changed the external name from being the default function to being the ifunc handler. This means that calls from other modules will call the appropriate clone based on what

Re: [PATCH] Fix-it hints for -Wimplicit-fallthrough

2017-06-22 Thread Jeff Law
On 05/04/2017 12:16 PM, David Malcolm wrote: > As of r247522, fix-it-hints can suggest the insertion of new lines. > > This patch updates -Wimplicit-fallthrough to provide suggestions > with fix-it hints, showing the user where to insert "break;" or > fallthrough attributes. > > For example: >

Re: Unreviewed patches

2017-06-22 Thread Jeff Law
On 06/08/2017 04:08 AM, Rainer Orth wrote: > The following patches have remained unreviewed for a week or more: > > [build] Support --sysroot with Solaris ld > https://gcc.gnu.org/ml/gcc-patches/2017-05/msg02342.html > > This needs a build maintainer unless one considers it

[PATCH], PR target/80510, Optimize 32-bit offsettable memory references on power7/power8

2017-06-22 Thread Michael Meissner
Andreas Schwab noticed that the two tests for PR 80510 failed on 32-bit systems due to long being only a 32-bit type. Yesterday, I committed this patch to disable the test for 32-bit: https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01607.html This patch implements the necessary move and peephole

RE: [Neon intrinsics] Literal vector construction through vcombine is poor

2017-06-22 Thread Michael Collison
Richard, I reworked the patch and retested on big endian as well as little. The original code was performing two swaps in the big endian case which works out to no swaps at all. I also updated the ChangeLog per your comments. Okay for trunk? 2017-06-19 Michael Collison

Re: RFC: stack/heap collision vulnerability and mitigation with GCC

2017-06-22 Thread Wilco Dijkstra
Jeff Law wrote: > You can be in one of 3 states when you start the callee's prologue. > > 1. You're somewhere in the normal stack. > > 2. You've past the guard and are already in the heap or elsewhere > > 3. You're somewhere in the guard > > State #3 is what we're trying to address.  The attacker

[PATCH 2/2] C++: bulletproof the %H and %I format codes (PR c++/81167)

2017-06-22 Thread David Malcolm
The %T format code in the C++ frontend gracefully handles being passed a NULL type, printing nothing (and hence '' for %qT). In r248698 (template type diff printing) I converted many uses of pairs of %qT in the C++ FE to %qH and %qI. PR c++/81167 reports a case where a NULL is passed to one of

[PATCH 1/2] Support C++-specific selftests

2017-06-22 Thread David Malcolm
Currently the "make selftest" target run during each stage of the build just runs the selftests within cc1. As part of the fix for PR c++/81167 I want to be able to write C++-specific selftests (to exercise the C++ implementation of the pp's format_decoder). Hence this patch generalizes the

[PATCH] RFC: enable pretty printers for --enable-libstdcxx-debug libs

2017-06-22 Thread Jonathan Wakely
The --enable-libstdcxx-debug option builds extra versions of libstdc++ without optimisation and installs them in $libdir/debug, which can be used via RPATH or LD_LIBRARY_PATH. However, there's no gdb.py installed alongside those debug versions of the libs, so while you can step into unoptimised

Re: [PATCH][AArch64] Mark symbols as constant

2017-06-22 Thread Andreas Schwab
On Jun 20 2017, Wilco Dijkstra <wilco.dijks...@arm.com> wrote: > * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): > Return true for non-tls symbols. This breaks gcc.target/aarch64/reload-valid-spoff.c with -mabi=ilp32: /opt/gcc/gcc-20170622/gcc/testsuit

Re: [PATCH v2, rs6000] Add vec_reve support

2017-06-22 Thread Segher Boessenkool
Hi Carl, On Wed, Jun 21, 2017 at 02:23:06PM -0700, Carl Love wrote: > +;; Vector reverse elements > +(define_expand "altivec_vreve2" > + [(set (match_operand:VEC_A 0 "register_operand" "=v") > + (unspec:VEC_A [(match_operand:VEC_A 1 "register_operand" "v")] > +

[PATCH] Fix pr80044, -static and -pie insanity, and pr81170

2017-06-22 Thread Alan Modra
PR80044 notes that -static and -pie together behave differently when gcc is configured with --enable-default-pie as compared to configuring without (or --disable-default-pie). This patch removes that difference. In both cases you now will have -static completely overriding -pie. Fixing this

  1   2   >