[PATCH] Suppress ssp.c unused variable warning on mingw

2017-03-31 Thread JonY
Hi, This suppresses an unused variable warning for mingw*, patch OK? Index: libssp/ssp.c === --- libssp/ssp.c(revision 246630) +++ libssp/ssp.c(working copy) @@ -72,7 +72,6 @@ __guard_setup (void) { unsigned char

[PATCH,rs6000] PR80108: Fix ICE with cross compiler

2017-03-31 Thread Kelvin Nilsen
PR 80108 describes an ICE that occurs on an existing test program when compiled with a particular combination of target options. This patch fixes the compiler to reject that particular combination of target options since it is not meaningful and duplicates the offending test case with a dg-opti

Re: [PATCH] fwprop: Prevent infinite looping (PR79405)

2017-03-31 Thread Jeff Law
On 03/23/2017 08:58 AM, Segher Boessenkool wrote: The algorithm fwprop uses never reconsiders a possible propagation, although it could succeed if the def (in the def-use to propagate) has changed. This causes fwprop to do infinite propagations, like in the scenario in the PR, where we end up wi

[PATCH] simplify-rtx: Fix compare of comparisons (PR60818)

2017-03-31 Thread Segher Boessenkool
The function simplify_binary_operation_1 has code that does /* Convert (compare (gt (flags) 0) (lt (flags) 0)) to (flags). */ but this transformation is only valid if "flags" has the same machine mode as the outer compare. This fixes it. Bootstrapped and tested on powerpc64-linux {-m32,-m64} (an

Re: [PATCH] [gcc, testsuite] Don't xfail on s390.

2017-03-31 Thread Martin Sebor
On 03/29/2017 04:23 AM, Dominik Vogt wrote: The attached patch removes the XFAIL in attr-alloc_size-11.c on s390. (PR 79356). https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79356 Untested. It looks like the only target the test does fail on is x86. The attached patch simplifies the test to XFA

Re: Fix ICE with -fauto-profile when walking vdefs

2017-03-31 Thread Sebastian Pop
On Fri, Mar 31, 2017 at 1:50 PM, Richard Biener wrote: > That looks like a workaround rather than the correct fix. Who sets .MEM? It > should assign the proper def. > Moving the auto_profile pass above several other passes fixes the problem. The minimal change to fix the problem is by disabling

[gomp4] update parsing for the bind clause in fortran

2017-03-31 Thread Cesar Philippidis
This patch does the following: * Update gfortran's bind parser to allow the bind with a string argument to be used with 'implicit none' * Teaches gfortran how to lower the bind clause like the c and c++ front ends. Note that the bind clause still isn't implemented in the middle end. Also,

[PATCH] Add gcc_jit_type_get_aligned

2017-03-31 Thread David Malcolm
On Thu, 2017-03-30 at 22:28 +0200, Florian Weimer wrote: > * David Malcolm: > > > Here's a work-in-progress implementation of the idea, adding this > > entrypoint to the API: > > > > extern gcc_jit_type * > > gcc_jit_type_get_aligned (gcc_jit_type *type, > > unsign

[gomp4] fix an ICE involving derived-typed subarray

2017-03-31 Thread Cesar Philippidis
I'll apply this patch to gomp-4_0-branch shortly which fixes an ICE triggered by using data clauses with derived-type subarray arguments. Such subarrays can be handled generically. Cesar 2017-03-31 Cesar Philippidis gcc/fortran/ * trans-openmp.c (gfc_trans_omp_clauses_1): Update handling of

Re: [PATCH] Fix description of Wendif-labels (PR documentation/78732)

2017-03-31 Thread Martin Sebor
On 03/31/2017 09:06 AM, David Malcolm wrote: As noted in the PR, c.opt's description of -Wendif-labels erroneously refers to #elif, rather than #else. warn_endif_labels is used by: libcpp/directives.c: do_else libcpp/directives.c: do_endif in which they use it to guard calls to check_eol_end

[patch, MIPS] Update -mvirt option description

2017-03-31 Thread Matthew Fortune
Hi Catherine, I'm following up on PR target/80057 to update the description of -mvirt. I agree with Roland that the description is inconsistent and should not state 'application specific' as none of the other ASE options include it. Instead I suggest we put the shortened form of (VZ) in like (XPA

Re: Fix ICE with -fauto-profile when walking vdefs

2017-03-31 Thread Richard Biener
On March 31, 2017 8:10:51 PM GMT+02:00, Sebastian Pop wrote: >On Fri, Mar 31, 2017 at 12:06 PM, Richard Biener >wrote: >> That's not a default definition but bogus SSA form. You have to fix >that, not this symptom. >> > >Ok. >It also crashes when adding a call to verifty_ssa > >diff --git a/gcc/

Re: Patch ping

2017-03-31 Thread Jakub Jelinek
On Fri, Mar 31, 2017 at 09:07:14AM -0600, Jeff Law wrote: > On 03/31/2017 12:36 AM, Jakub Jelinek wrote: > > Hi! > > > > I'd like to ping two patches: > > > > PR c++/79572 > > - ubsan instrumentation of reference binding to NULL if the reference > > is folded into INTEGER_CST with REFERENCE

Re: Fix ICE with -fauto-profile when walking vdefs

2017-03-31 Thread Sebastian Pop
On Fri, Mar 31, 2017 at 12:06 PM, Richard Biener wrote: > That's not a default definition but bogus SSA form. You have to fix that, > not this symptom. > Ok. It also crashes when adding a call to verifty_ssa diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c index 4b21340c6f0..b834a40af4d 10

Re: [PATCH, GCC/LTO, ping2] Fix PR69866: LTO with def for weak alias in regular object file

2017-03-31 Thread Richard Biener
On March 31, 2017 5:23:03 PM GMT+02:00, Jeff Law wrote: >On 03/16/2017 08:05 AM, Thomas Preudhomme wrote: >> Ping? >> >> Is this ok for stage4? >Given the lack of response from Richi, I'd suggest deferring to stage1. Honza needs to review this, i habe too little knowledge here. Richard. >jeff

Re: Fix ICE with -fauto-profile when walking vdefs

2017-03-31 Thread Richard Biener
On March 31, 2017 6:04:32 PM GMT+02:00, Sebastian Pop wrote: >Hi, > >with trunk gcc as of today and gcc releases 6.* and 5.*, >I get an ICE when compiling a large c++ project with autoFDO >at -O1 and above with -fauto-profile=some.gcov > >internal compiler error: tree check: expected ssa_name, hav

[committed] nvptx: correct -Wformat issue

2017-03-31 Thread Alexander Monakov
Hello, I've applied the following patch as obvious to fix the -Wformat issue pointed out by Thomas Schwinge. * config/nvptx/nvptx.c (nvptx_output_softstack_switch): Correct format string. diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 83f4610..4c35c16 1006

[PATCH] Fix spelling suggestions for reserved words (PR c++/80177)

2017-03-31 Thread David Malcolm
As noted in the PR, the C++ frontend currently offers a poor suggestion for this misspelling: a.C: In function ???void f()???: a.C:3:3: error: ???static_assertion??? was not declared in this scope static_assertion (1 == 0, "1 == 0"); ^~~~ a.C:3:3: note: suggested alternative: ???

Fix ICE with -fauto-profile when walking vdefs

2017-03-31 Thread Sebastian Pop
Hi, with trunk gcc as of today and gcc releases 6.* and 5.*, I get an ICE when compiling a large c++ project with autoFDO at -O1 and above with -fauto-profile=some.gcov internal compiler error: tree check: expected ssa_name, have var_decl in walk_aliased_vdefs_1, at tree-ssa-alias.c:2912 0x1072fe

Re: [PATCH 2/5] omp-low: implement SIMT privatization, part 1

2017-03-31 Thread Alexander Monakov
Hello Jakub, I've noticed while re-reading that this patch incorrectly handled SIMT case in lower_lastprivate_clauses. The code was changed to look for variables with "omp simt private" attribute, and was left under 'simduid && DECL_HAS_VALUE_EXPR_P (new_var)' condition. This effectively constra

Re: [PATCH rs6000] Fix PR target/80107, ICE in final_scan_insn

2017-03-31 Thread Segher Boessenkool
On Fri, Mar 31, 2017 at 10:25:00AM -0500, Pat Haugen wrote: > float2_internal uses gen_extendhidi2 on a VSX > register but extendhidi2 only supports GPRs if -mno-gen-cell-microcode > is in effect. Fixed by adding a check of TARGET_VSX_SMALL_INTEGER. Yuck :-) > Bootstrap/regtest on powerpc64le-lin

[PATCH] [PR tree-optimization/49498] Re-enable DOM for uninit-pred-8_b.c

2017-03-31 Thread Jeff Law
As discussed in the BZ, this bug was fixed long ago and we should re-enable DOM opts for this test. Tested on cris-elf. Installing on the trunk. Jeff diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dce1278..6e53829 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite

[PATCH rs6000] Fix PR target/80107, ICE in final_scan_insn

2017-03-31 Thread Pat Haugen
float2_internal uses gen_extendhidi2 on a VSX register but extendhidi2 only supports GPRs if -mno-gen-cell-microcode is in effect. Fixed by adding a check of TARGET_VSX_SMALL_INTEGER. Bootstrap/regtest on powerpc64le-linux with no regressions, ok for trunk? The -mvsx-small-integer option/code was

Re: [PATCH, GCC/LTO, ping2] Fix PR69866: LTO with def for weak alias in regular object file

2017-03-31 Thread Jeff Law
On 03/16/2017 08:05 AM, Thomas Preudhomme wrote: Ping? Is this ok for stage4? Given the lack of response from Richi, I'd suggest deferring to stage1. jeff

Re: [PATCH] Fix description of Wendif-labels (PR documentation/78732)

2017-03-31 Thread Jeff Law
On 03/31/2017 09:06 AM, David Malcolm wrote: As noted in the PR, c.opt's description of -Wendif-labels erroneously refers to #elif, rather than #else. warn_endif_labels is used by: libcpp/directives.c: do_else libcpp/directives.c: do_endif in which they use it to guard calls to check_eol_end

Re: Patch ping

2017-03-31 Thread Jeff Law
On 03/31/2017 12:36 AM, Jakub Jelinek wrote: Hi! I'd like to ping two patches: PR c++/79572 - ubsan instrumentation of reference binding to NULL if the reference is folded into INTEGER_CST with REFERENCE_TYPE http://gcc.gnu.org/ml/gcc-patches/2017-03/msg01255.html PR debug/79255 -

Re: Patch ping

2017-03-31 Thread Jeff Law
On 03/31/2017 12:36 AM, Jakub Jelinek wrote: Hi! I'd like to ping two patches: PR c++/79572 - ubsan instrumentation of reference binding to NULL if the reference is folded into INTEGER_CST with REFERENCE_TYPE http://gcc.gnu.org/ml/gcc-patches/2017-03/msg01255.html Just one question he

Re: [PATCH, rs6000] Document location of ELF V2 ABI specification

2017-03-31 Thread Bill Schmidt
On Mar 29, 2017, at 5:36 PM, Segher Boessenkool wrote: > > On Wed, Mar 29, 2017 at 04:27:28PM -0500, Bill Schmidt wrote: >> There is finally a permanent link to the OpenPOWER ELF V2 ABI Specification >> document. This patch adds a paragraph to the PowerPC Built-Ins section of >> the GCC documen

Remove unused "default_kind" member from gcc/omp-low.c's "struct omp_context"

2017-03-31 Thread Thomas Schwinge
Hi! It would appear that ever since the first version of gcc/omp-low.c got committed to GCC trunk (more than ten years ago), it extraced OpenMP default clause data that it doesn't actually use for anything. OK to commit the following cleanup to trunk in next stage 1? commit cd157ff348694009f4043

Re: [PATCH] Real fix for AIX exception handling

2017-03-31 Thread Jeff Law
On 03/30/2017 02:11 AM, Michael Haubenwallner wrote: When statically linked, shouldn't collect2 add libstdc++'s EH frames to the main executable's registration table again? Or is libstdc++'s constructor called instead? I would think the latter -- because libstdc++ is already linked into a DSO.

[PATCH] Fix description of Wendif-labels (PR documentation/78732)

2017-03-31 Thread David Malcolm
As noted in the PR, c.opt's description of -Wendif-labels erroneously refers to #elif, rather than #else. warn_endif_labels is used by: libcpp/directives.c: do_else libcpp/directives.c: do_endif in which they use it to guard calls to check_eol_endif_labels. It's not used by do_elif. doc/cppw

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-31 Thread Rainer Orth
Hi Bin, > Here is the patch. Test result checked on arm-none-eabi. Is it OK? it passes on sparc-sun-solaris2.12, too. Thanks. Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-31 Thread Bin.Cheng
On Fri, Mar 31, 2017 at 2:57 PM, Bin.Cheng wrote: > On Fri, Mar 31, 2017 at 11:37 AM, Richard Biener wrote: >> On Fri, 31 Mar 2017, Markus Trippelsdorf wrote: >> >>> On 2017.03.31 at 11:16 +0200, Richard Biener wrote: >>> > On Fri, 31 Mar 2017, Richard Biener wrote: >>> > >>> > > On Fri, 31 Mar 2

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-31 Thread Bin.Cheng
On Fri, Mar 31, 2017 at 11:37 AM, Richard Biener wrote: > On Fri, 31 Mar 2017, Markus Trippelsdorf wrote: > >> On 2017.03.31 at 11:16 +0200, Richard Biener wrote: >> > On Fri, 31 Mar 2017, Richard Biener wrote: >> > >> > > On Fri, 31 Mar 2017, Rainer Orth wrote: >> > > >> > > > Hi Christophe, >> >

[PATCH] Destroy arguments for _Cilk_spawn calling in the child (PR 80038)

2017-03-31 Thread Xi Ruoyao
Hi, I''ve sent this patch once (). But I haven't got any response.  I'd like to resend it instead of pinging, and explain it more. There was an ancient bug PR middle-end/60586 before r227423.  At that time GCC evaluated parameters insid

[DOC PATCH] PowerPC extended asm example

2017-03-31 Thread Alan Modra
Some people over at OpenBLAS were asking me whether I knew of a whitepaper on gcc asm. I didn't besides the gcc manual, and wrote a note explaining some tricks. This patch is that note cleaned up. Tested by an x86_64-linux build. OK to apply? BTW, anyone wandering over to look at OpenBLAS might

[PATCH] Increase memory limit for genautomata on AIX

2017-03-31 Thread Sam Thursfield
When doing 64-bit builds of GCC on AIX, genautomata experiences malloc() failures. It seems that a 512MB heap is no longer big enough. I also updated the comments in this file to match the values passed to the linker. The AIX `ld` manual says this about the maxdata option: Sets the maximum s

Re: Trunk patches required for gcc-6-branch to build for msp430

2017-03-31 Thread Jozef Lawrynowicz
The gcc-6-branch at the current upstream revision (r246561) doesn't build when configured with the following options: "--target=msp430-elf --enable-languages=c,c++" The gcc-5-branch does build with these options. Backporting r244727 and r243310 to the gcc-6-branch fixes the two build issues, so t

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-31 Thread Richard Biener
On Fri, 31 Mar 2017, Markus Trippelsdorf wrote: > On 2017.03.31 at 11:16 +0200, Richard Biener wrote: > > On Fri, 31 Mar 2017, Richard Biener wrote: > > > > > On Fri, 31 Mar 2017, Rainer Orth wrote: > > > > > > > Hi Christophe, > > > > > > > > > With this patch, the following testcase now fails

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-31 Thread Markus Trippelsdorf
On 2017.03.31 at 11:16 +0200, Richard Biener wrote: > On Fri, 31 Mar 2017, Richard Biener wrote: > > > On Fri, 31 Mar 2017, Rainer Orth wrote: > > > > > Hi Christophe, > > > > > > > With this patch, the following testcase now fails on arm* targets: > > > > gcc.dg/tree-ssa/pr71347.c scan-tree-dum

Re: [PATCHv2 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-03-31 Thread Thomas Schwinge
Hi! On Wed, 22 Mar 2017 18:46:30 +0300, Alexander Monakov wrote: > This patchset implements privatization of addressable variables in OpenMP SIMD > regions lowered for SIMT targets (i.e. NVPTX) via the approach identified in > the review of the previous submission. [...] Given that the subject

[patch,MIPS,committed] Fix extraction from odd-numbered MSA registers

2017-03-31 Thread Matthew Fortune
Another MSA related fix; this time relating to using -mno-odd-spreg. This fixes a build-failure with gcc.c-torture/execute/20050604-1.c when using -mabi=32 -mmsa -mno-odd-spreg. The fix is to copy the whole vector from the odd-numbered source register to the even numbered single-precision destinat

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-31 Thread Richard Biener
On Fri, 31 Mar 2017, Richard Biener wrote: > On Fri, 31 Mar 2017, Rainer Orth wrote: > > > Hi Christophe, > > > > > With this patch, the following testcase now fails on arm* targets: > > > gcc.dg/tree-ssa/pr71347.c scan-tree-dump-not optimized ".* = MEM.*;" > > > > same on Solaris/SPARC. > > I

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-31 Thread Richard Biener
On Fri, 31 Mar 2017, Rainer Orth wrote: > Hi Christophe, > > > With this patch, the following testcase now fails on arm* targets: > > gcc.dg/tree-ssa/pr71347.c scan-tree-dump-not optimized ".* = MEM.*;" > > same on Solaris/SPARC. I've reverted r241968 with (patch reverted). It doesn't include

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-31 Thread Richard Biener
On Fri, 31 Mar 2017, Christophe Lyon wrote: > Hi Richard, > > > On 30 March 2017 at 09:13, Richard Biener wrote: > > On Wed, 29 Mar 2017, Jeff Law wrote: > > > >> On 03/29/2017 04:05 AM, Richard Biener wrote: > >> > > >> > After quite some pondering over this and other related bugs I propose >

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-31 Thread Rainer Orth
Hi Christophe, > With this patch, the following testcase now fails on arm* targets: > gcc.dg/tree-ssa/pr71347.c scan-tree-dump-not optimized ".* = MEM.*;" same on Solaris/SPARC. Rainer -- - Rainer Orth, Center

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-31 Thread Christophe Lyon
Hi Richard, On 30 March 2017 at 09:13, Richard Biener wrote: > On Wed, 29 Mar 2017, Jeff Law wrote: > >> On 03/29/2017 04:05 AM, Richard Biener wrote: >> > >> > After quite some pondering over this and other related bugs I propose >> > the following for GCC 7 which tames down PRE a bit (back to

[AArch64] Tighten move constraints for symbolic operands

2017-03-31 Thread Richard Sandiford
The movsi and movdi constraints allowed the source to be any absolute symbolic expression ("S"). That's OK for operands that have already been vetted by the aarch64_mov_operand predicate but causes problems if the register allocator substitutes an equivalence (the usual "the constraints can't acce

[PATCH] Cherry-pick upstream r299036 from libsanitizer (PR sanitizer/80166).

2017-03-31 Thread Martin Liška
Hello. Cherry-picking the commit to fix PR reported originally to the GCC. Ready to install after it finishes regression tests? Thanks, Martin >From 36cc9827dd47f213bb17dd7e37b3b19b740a0928 Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 31 Mar 2017 10:28:25 +0200 Subject: [PATCH] Cherry-pick u