Re: [PATCH 2/2] C++ FE: handle misspelled identifiers and typenames

2016-07-21 Thread Uros Bizjak
Hello! > > gcc/ChangeLog: > > PR c/70339 > > * diagnostic-show-locus.c (diagnostic_show_locus): If this is > > the > > same location as last time, don't skip if we have fix-it hints. > > Clarify the skipping logic by converting it from one "if" > > clause > > to repeated "if" clauses. > > * spellc

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Richard Biener
On Wed, 20 Jul 2016, Bernd Edlinger wrote: > On 07/20/16 20:08, Richard Biener wrote: > > On July 20, 2016 6:54:48 PM GMT+02:00, Bernd Edlinger > > wrote: > >> > >> But I think that alloca just should not be recognized by name any > >> more. > > > > It was introduced to mark calls that should no

Re: [PATCH][C++] C++ bitfield memory model for as-base classes

2016-07-21 Thread Richard Biener
On Wed, 20 Jul 2016, Jeff Law wrote: > On 06/29/2016 05:54 AM, Richard Biener wrote: > > > > Currently as-base classes lack DECL_BIT_FIELD_REPRESENTATIVEs which > > means RTL expansion doesn't honor the C++ memory model for bitfields > > in them thus for the following testcase > > > > struct B {

Re: fold x ^ y to 0 if x == y

2016-07-21 Thread Richard Biener
On Wed, 20 Jul 2016, Prathamesh Kulkarni wrote: > On 20 July 2016 at 16:35, Richard Biener wrote: > > On Wed, 20 Jul 2016, Prathamesh Kulkarni wrote: > > > >> On 8 July 2016 at 12:29, Richard Biener wrote: > >> > On Fri, 8 Jul 2016, Richard Biener wrote: > >> > > >> >> On Fri, 8 Jul 2016, Pratha

[committed] Fix up narrowing conversion in tree-object-size.c

2016-07-21 Thread Jakub Jelinek
Hi! The reporter mentioned in PR71941 a narrowing conversion in tree-object-size.c. Normally we build with -std=gnu++98 at least during bootstrap, so this doesn't show up, but I've committed following as obvious anyway: 2016-07-21 Jakub Jelinek * tree-object-size.c (unknown): Use HOS

Re: [PATCH, rs6000] Fix PR target/71733, ICE with -mcpu=power9 -mno-vsx

2016-07-21 Thread Alan Modra
On Wed, Jul 20, 2016 at 08:51:21PM -0500, Peter Bergner wrote: > This still doesn't answer David's question about what will happen if > we generate this pattern (or one of the older VSX reg+reg patterns) > when we are NOT using -mno-vsx. In those cases, quad_address_p and > mode_supports_vsx_dform

Re: [PATCH 2/2] C++ FE: handle misspelled identifiers and typenames

2016-07-21 Thread Richard Biener
On Thu, Jul 21, 2016 at 9:00 AM, Uros Bizjak wrote: > Hello! > >> > gcc/ChangeLog: >> > PR c/70339 >> > * diagnostic-show-locus.c (diagnostic_show_locus): If this is >> > the >> > same location as last time, don't skip if we have fix-it hints. >> > Clarify the skipping logic by converting it from

Re: [PATCH, PR59833]: Fix sNaN handling in ARM float to double conversion

2016-07-21 Thread Ramana Radhakrishnan
On Wed, Jul 20, 2016 at 1:40 PM, Aurelien Jarno wrote: > On 2016-07-20 11:22, Ramana Radhakrishnan wrote: >> On Wed, Jul 20, 2016 at 11:14 AM, Aurelien Jarno >> wrote: >> > On 2016-07-20 11:04, Ramana Radhakrishnan wrote: >> >> On Wed, Jul 20, 2016 at 10:56 AM, Aurelien Jarno >> >> wrote: >> >

Re: [PATCH 2/2] C++ FE: handle misspelled identifiers and typenames

2016-07-21 Thread Richard Biener
On Thu, Jul 21, 2016 at 10:37 AM, Richard Biener wrote: > On Thu, Jul 21, 2016 at 9:00 AM, Uros Bizjak wrote: >> Hello! >> >>> > gcc/ChangeLog: >>> > PR c/70339 >>> > * diagnostic-show-locus.c (diagnostic_show_locus): If this is >>> > the >>> > same location as last time, don't skip if we have fi

Re: [PATCH GCC]Vectorize possible infinite loops by versioning

2016-07-21 Thread Bin.Cheng
On Wed, Jul 20, 2016 at 10:27 PM, Jeff Law wrote: > On 06/28/2016 12:18 AM, Bin Cheng wrote: >> >> Hi, >> This patch improves vectorizer in order to handle possible infinite loops >> by versioning. Its changes fall in three categories. >> A) Changes in vect_get_loop_niters. AT the moment, it com

Re: [PATCH] Consider functions with xloc.file == NULL (PR, gcov-profile/69028)

2016-07-21 Thread Richard Biener
On Wed, Jul 20, 2016 at 3:34 PM, Martin Liška wrote: > Hi. > > Following patch addresses ICE which happens when coverage.c computes checksum > of a function w/o xloc.file. My patch assumes it's a valid state having a > function > w/o xloc.file, which is situation exposed by cilkplus functions. >

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-07-21 Thread Ilya Enkovich
In my list I see #1, #4, and #5 are not approved. Thanks, Ilya 2016-07-20 19:24 GMT+03:00 Jeff Law : > On 07/20/2016 08:37 AM, Ilya Enkovich wrote: > >> Here is an updated version. >> >> Thanks, >> Ilya >> -- >> gcc/ >> >> 2016-07-20 Ilya Enkovich >> >> * dbgcnt.def (vect_tail_combine)

Re: [PATCH, Fortran, OpenACC] Fix PR70598, Fortran host_data ICE (ping x4)

2016-07-21 Thread Chung-Lin Tang
Ping x4 On 2016/7/13 7:52 PM, Chung-Lin Tang wrote: > Ping x3 > > On 06/21/2016 02:18 PM, Chung-Lin Tang wrote: >> Ping x2 >> >> On 2016/6/7 08:03 PM, Chung-Lin Tang wrote: >>> Ping. >>> >>> On 2016/5/11 02:57 AM, Bernhard Reutner-Fischer wrote: On May 9, 2016 4:26:50 PM GMT+02:00, Chung-Lin

Re: [PATCH GCC]Improve no-overflow check in SCEV using value range info.

2016-07-21 Thread Richard Biener
On Wed, Jul 20, 2016 at 6:23 PM, Bin.Cheng wrote: > On Wed, Jul 20, 2016 at 11:01 AM, Richard Biener > wrote: >> On Tue, Jul 19, 2016 at 6:15 PM, Bin.Cheng wrote: >>> On Tue, Jul 19, 2016 at 1:10 PM, Richard Biener >>> wrote: On Mon, Jul 18, 2016 at 6:27 PM, Bin Cheng wrote: > Hi, >>>

Re: [PATCH GCC]Cleanup lt_to_ne handling in niter analyzer

2016-07-21 Thread Richard Biener
On Wed, Jul 20, 2016 at 6:40 PM, Bin Cheng wrote: > Hi, > This patch cleans up function number_of_iterations_lt_to_ne mainly by > removing computation of may_be_zero. The computation is unnecessary and > may_be_zero in this case must be true. Specifically, DELTA is integer > constant and iv0.

Re: [AArch64][3/3] Migrate aarch64_expand_prologue/epilogue to aarch64_add_constant

2016-07-21 Thread Richard Earnshaw (lists)
On 20/07/16 16:02, Jiong Wang wrote: > On 20/07/16 15:18, Richard Earnshaw (lists) wrote: >> On 20/07/16 14:03, Jiong Wang wrote: >>> Those stack adjustment sequences inside aarch64_expand_prologue/epilogue >>> are doing exactly what's aarch64_add_constant offered, except they also >>> need to be a

Re: [patch,avr] More insns to handle (inverted) bit-bit moves

2016-07-21 Thread Denis Chertykov
2016-07-20 15:59 GMT+03:00 Georg-Johann Lay : > This adds some insns that set a destination bit expressed as zero_extract to > a source bit expressed as extract, right shift, and simple combinations > thereof. > > Purpose is smaller code and to avoid costly extracts or shifts. This > applies mostl

[PATCH] Tree-level fix for PR 69526

2016-07-21 Thread Robin Dapp
As described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69526, we currently fail to simplify cases like (unsigned long)(a - 1) + 1 to (unsigned long)a when VRP knows that (a - 1) does not overflow. This patch introduces a match.pd pattern as well as a helper function that checks for overf

Re: [PATCH, Fortran, OpenACC] Fix PR70598, Fortran host_data ICE (ping x4)

2016-07-21 Thread Paul Richard Thomas
Hi Chung-Lin, I was ignoring your patch on the grounds that one of the omp gurus should deal with it. That says, it looks OK for trunk to me. I presume that fortran/host_data-1.f90 should have the XFAIL removed? Cheers Paul On 21 July 2016 at 11:28, Chung-Lin Tang wrote: > Ping x4 > > On 201

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Bernd Edlinger
On 07/21/16 09:09, Richard Biener wrote: > On Wed, 20 Jul 2016, Bernd Edlinger wrote: > >> On 07/20/16 20:08, Richard Biener wrote: >>> On July 20, 2016 6:54:48 PM GMT+02:00, Bernd Edlinger >>> wrote: But I think that alloca just should not be recognized by name any more. >>> >>> I

Re: [PATCH, Fortran, OpenACC] Fix PR70598, Fortran host_data ICE

2016-07-21 Thread Jakub Jelinek
On Mon, May 09, 2016 at 10:26:50PM +0800, Chung-Lin Tang wrote: > 2015-05-09 Chung-Lin Tang > > gcc/ > * fortran/openmp.c (resolve_omp_clauses): Adjust use_device clause > handling to only allow pointers and arrays. As has been mentioned earlier, this should go into gcc/fortr

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Jakub Jelinek
On Thu, Jul 21, 2016 at 11:04:48AM +, Bernd Edlinger wrote: > bool > +gimple_alloca_call_p (const gimple *stmt) > +{ > + tree fndecl; > + > + if (!is_gimple_call (stmt)) > +return false; > + > + fndecl = gimple_call_fndecl (stmt); > + if (fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT

Re: [PATCH, rs6000] Fix PR target/71733, ICE with -mcpu=power9 -mno-vsx

2016-07-21 Thread Peter Bergner
On 7/21/16 3:26 AM, Alan Modra wrote: On Wed, Jul 20, 2016 at 08:51:21PM -0500, Peter Bergner wrote: This still doesn't answer David's question about what will happen if we generate this pattern (or one of the older VSX reg+reg patterns) when we are NOT using -mno-vsx. In those cases, quad_addr

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Bernd Schmidt
On 07/21/2016 01:16 PM, Jakub Jelinek wrote: On Thu, Jul 21, 2016 at 11:04:48AM +, Bernd Edlinger wrote: bool +gimple_alloca_call_p (const gimple *stmt) +{ + tree fndecl; + + if (!is_gimple_call (stmt)) +return false; + + fndecl = gimple_call_fndecl (stmt); + if (fndecl && DECL_BU

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Bernd Edlinger
On 07/21/16 13:16, Jakub Jelinek wrote: > On Thu, Jul 21, 2016 at 11:04:48AM +, Bernd Edlinger wrote: >> bool >> +gimple_alloca_call_p (const gimple *stmt) >> +{ >> + tree fndecl; >> + >> + if (!is_gimple_call (stmt)) >> +return false; >> + >> + fndecl = gimple_call_fndecl (stmt); >> +

Re: [PATCH] Tree-level fix for PR 69526

2016-07-21 Thread Richard Biener
On Thu, Jul 21, 2016 at 12:42 PM, Robin Dapp wrote: > As described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69526, we > currently fail to simplify cases like > > (unsigned long)(a - 1) + 1 > > to > > (unsigned long)a > > when VRP knows that (a - 1) does not overflow. > > This patch introduc

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Richard Biener
On Thu, 21 Jul 2016, Bernd Edlinger wrote: > On 07/21/16 13:16, Jakub Jelinek wrote: > > On Thu, Jul 21, 2016 at 11:04:48AM +, Bernd Edlinger wrote: > >> bool > >> +gimple_alloca_call_p (const gimple *stmt) > >> +{ > >> + tree fndecl; > >> + > >> + if (!is_gimple_call (stmt)) > >> +ret

Re: [Re: RFC: Patch 1/2 v3] New target hook: max_noce_ifcvt_seq_cost

2016-07-21 Thread Bernd Schmidt
On 07/20/2016 06:39 PM, James Greenhalgh wrote: On Wed, Jul 20, 2016 at 01:41:39PM +0200, Bernd Schmidt wrote: How about wrapping the param value into COSTS_N_INSNS, to make the value of the param less dependent on compiler internals? I did consider this, but found it hard to word for the user

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Bernd Edlinger
On 07/21/16 13:25, Bernd Schmidt wrote: > > > On 07/21/2016 01:16 PM, Jakub Jelinek wrote: >> On Thu, Jul 21, 2016 at 11:04:48AM +, Bernd Edlinger wrote: >>> bool >>> +gimple_alloca_call_p (const gimple *stmt) >>> +{ >>> + tree fndecl; >>> + >>> + if (!is_gimple_call (stmt)) >>> +return

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Richard Biener
On Thu, 21 Jul 2016, Bernd Edlinger wrote: > On 07/21/16 13:25, Bernd Schmidt wrote: > > > > > > On 07/21/2016 01:16 PM, Jakub Jelinek wrote: > >> On Thu, Jul 21, 2016 at 11:04:48AM +, Bernd Edlinger wrote: > >>> bool > >>> +gimple_alloca_call_p (const gimple *stmt) > >>> +{ > >>> + tree fnd

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Bernd Edlinger
On 07/21/16 13:35, Richard Biener wrote: > On Thu, 21 Jul 2016, Bernd Edlinger wrote: > >> On 07/21/16 13:25, Bernd Schmidt wrote: >>> >>> >>> On 07/21/2016 01:16 PM, Jakub Jelinek wrote: On Thu, Jul 21, 2016 at 11:04:48AM +, Bernd Edlinger wrote: > bool > +gimple_alloca_call_p (

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Richard Biener
On Thu, 21 Jul 2016, Bernd Edlinger wrote: > On 07/21/16 13:35, Richard Biener wrote: > > On Thu, 21 Jul 2016, Bernd Edlinger wrote: > > > >> On 07/21/16 13:25, Bernd Schmidt wrote: > >>> > >>> > >>> On 07/21/2016 01:16 PM, Jakub Jelinek wrote: > On Thu, Jul 21, 2016 at 11:04:48AM +, Bern

fix typo in comment in tree-ssa-strlen.c

2016-07-21 Thread Prathamesh Kulkarni
Committed as obvious (r238588). Thanks, Prathamesh Index: tree-ssa-strlen.c === --- tree-ssa-strlen.c (revision 238587) +++ tree-ssa-strlen.c (working copy) @@ -2383,7 +2383,7 @@ }; /* Callback for walk_dominator_tree. Attemp

[PATCH] Assorted fixes from LTO early debug

2016-07-21 Thread Richard Biener
The following makes sure the BLOCK_SUPERCONTEXT of DECL_INITIAL (decl) is decl itself (I won't commit the assert in cfgexpand.c but bootstrap/test passed with it). It also marks yet another global initializer with DECL_IGNORED_P, in this case as it is emitted very late after early debug is finis

[PATCH, OBVIOUS] Do not divide by zero in analyze_brprob.py

2016-07-21 Thread Martin Liška
Hi. Following trivial patch is necessary to preserve division by zero. Installed as r238590. Thanks, Martin >From 990fd22bfe222a5f66fa780d5b596b7a948ea267 Mon Sep 17 00:00:00 2001 From: marxin Date: Thu, 21 Jul 2016 14:49:30 +0200 Subject: [PATCH] Do not divide by zero in analyze_brprob.py con

Re: [RFC][IPA-VRP] Add support for IPA VRP in ipa-cp/ipa-prop

2016-07-21 Thread Jan Hubicka
> Maybe it is better to separate value range and alignment summary > writing/reading to different functions. Here is another updated > version which does this. Makes sense to me. Note that the alignment summary propagation can be either handled by doing bitwise constant propagation and/or extendin

Re: [Fortran] Help with STAT= attribute in coarray reference

2016-07-21 Thread Andre Vehreschild
Hi all, the attached patch fixes some style issues in the caf code recently modified. Furthermore does it correct the function specifications of caf_get() and caf_send() that where missing some specifiers. Bootstrapped and regtested ok on x86_64-linux/F23. If noone objects I commit this patch as

[PATCH] Improve VRP for PR71947

2016-07-21 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2016-07-21 Richard Biener PR tree-optimization/71947 * tree-vrp.c (extract_range_from_assert): Singleton symbolic ranges have useful limit_vr information. * gcc.dg/tree-ssa/vrp102

[Fortran, patch, v1] Add STAT= support to caf_single get()/send()

2016-07-21 Thread Andre Vehreschild
Hi all, the attached patch adds support for a stat parameter to caf_single's caf_get() and caf_send() routines and adds a testcase. Unfortunately is there not much that can go wrong in a caf_single's get/send, so the test resides to check whether stat is reset correctly. Bootstraps and regtests

Re: [PATCH 2/2] C++ FE: handle misspelled identifiers and typenames

2016-07-21 Thread David Malcolm
On Thu, 2016-07-21 at 09:00 +0200, Uros Bizjak wrote: > Hello! > > > > gcc/ChangeLog: > > > PR c/70339 > > > * diagnostic-show-locus.c (diagnostic_show_locus): If this is > > > the > > > same location as last time, don't skip if we have fix-it hints. > > > Clarify the skipping logic by converting

Re: [PATCH 2/2] C++ FE: handle misspelled identifiers and typenames

2016-07-21 Thread David Malcolm
On Thu, 2016-07-21 at 10:28 -0400, David Malcolm wrote: > On Thu, 2016-07-21 at 09:00 +0200, Uros Bizjak wrote: > > Hello! > > > > > > gcc/ChangeLog: > > > > PR c/70339 > > > > * diagnostic-show-locus.c (diagnostic_show_locus): If this is > > > > the > > > > same location as last time, don't skip

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Bernd Edlinger
On 07/21/16 14:08, Richard Biener wrote: > On Thu, 21 Jul 2016, Bernd Edlinger wrote: > >> On 07/21/16 13:35, Richard Biener wrote: >>> On Thu, 21 Jul 2016, Bernd Edlinger wrote: >>> On 07/21/16 13:25, Bernd Schmidt wrote: > > > On 07/21/2016 01:16 PM, Jakub Jelinek wrote: >> O

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Jeff Law
On 07/21/2016 09:07 AM, Bernd Edlinger wrote: On 07/21/16 14:08, Richard Biener wrote: On Thu, 21 Jul 2016, Bernd Edlinger wrote: On 07/21/16 13:35, Richard Biener wrote: On Thu, 21 Jul 2016, Bernd Edlinger wrote: On 07/21/16 13:25, Bernd Schmidt wrote: On 07/21/2016 01:16 PM, Jakub Jeli

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread H.J. Lu
On Wed, Jul 20, 2016 at 1:02 PM, Eric Botcazou wrote: >> Very few targets continue to use SJLJ eh (perhaps just cygwin/mingw). >> *But* I think the Ada front-end explicitly uses SJLJ EH, so if you want >> to get some smoke testing, the Ada testsuite is probably the place to go. > > Right, the Ada

[patch,avr] remove secondary_reload hook implementation

2016-07-21 Thread Georg-Johann Lay
This removes avr's TARGET_SECONDARY_RELOAD implementation which never worked as expected... Its intention was to provide an 8-bit scratch register for loads from non-generic address-spaces as they might need to set RAMPZ to the needed flash segment. The avr BE uses avr_find_unused_d_reg for

Re: [patch] Get rid of stack trampolines for nested functions

2016-07-21 Thread Jeff Law
On 06/29/2016 04:08 PM, Eric Botcazou wrote: Hi, this patch implements generic support for the elimination of stack trampolines and, consequently, of the need to make the stack executable when pointers to nested functions are used. That's done on a per-language and per-target basis (i.e. there

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Bernd Edlinger
On 07/21/16 17:17, Jeff Law wrote: > It's possible the issue came up building the SunOS/Solaris kernel -- > circa 1992 I was loosely involved in a project that was bringing up that > kernel on non-Sun hardware. And that fits my recollection of when > savectx support went into GCC. > > jeff Yes.

Re: [patch] Get rid of stack trampolines for nested functions

2016-07-21 Thread Arnaud Charlet
Jeff, > So just to be clear, once installed, for Ada we'll start using the > descriptor based scheme on the subset of targets below, which will > be an ABI change, right? Right. > If so and this goes in, we'll have to make sure to signal loud and > wide about the ABI change at the project level

Re: [patch] Get rid of stack trampolines for nested functions

2016-07-21 Thread Andrew Pinski
On Thu, Jul 21, 2016 at 8:45 AM, Arnaud Charlet wrote: > Jeff, > >> So just to be clear, once installed, for Ada we'll start using the >> descriptor based scheme on the subset of targets below, which will >> be an ABI change, right? > > Right. > >> If so and this goes in, we'll have to make sure t

Re: [Fortran, patch, v1] Add STAT= support to caf_single get()/send()

2016-07-21 Thread Paul Richard Thomas
Hi Andre, That looks good to me. OK for trunk. Thanks for the patch. Paul On 21 July 2016 at 15:31, Andre Vehreschild wrote: > Hi all, > > the attached patch adds support for a stat parameter to caf_single's > caf_get() and caf_send() routines and adds a testcase. Unfortunately is > there not

[C++ PATCH] Fix ICE with statement expression (PR c++/71728)

2016-07-21 Thread Jakub Jelinek
Hi! It is true that parsing should make sure that GOTO_EXPRs (other than break/continue) aren't allowed in constant expression contexts, but potential_constant_expression_1 may be called (with tf_none) also on arbitrary code either for warning purposes, or (very recent change) also in cp_fully_fol

[committed] Fix asan C++ ICE with PCH (PR sanitizer/71953)

2016-07-21 Thread Jakub Jelinek
Hi! If a PCH file is built without -fsanitize=address and a TU doesn't contain any functions, only file scope ctor, then we ICE because sanitizer builtins aren't yet initialized. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk and 6.2 as obvious. 2016-07-2

Re: [PING**2] [PATCH] Fix asm X constraint (PR inline-asm/59155)

2016-07-21 Thread Bernd Edlinger
On 07/20/16 22:04, Jeff Law wrote: > On 06/22/2016 02:48 PM, Bernd Edlinger wrote: >> On 06/22/16 21:51, Jeff Law wrote: >>> On 06/19/2016 07:25 AM, Bernd Edlinger wrote: Hi, ping... As this discussion did not make any progress, I just attached the latest version of my

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-07-21 Thread Jeff Law
On 07/21/2016 03:15 AM, Ilya Enkovich wrote: In my list I see #1, #4, and #5 are not approved. So I think Richi wanted to see param control for the new options; Joseph wanted the new options properly documented in invoke.texi; I had a few higher level questions which you answered. Your update

Re: [PATCH] RFC: On-demand locations within string-literals

2016-07-21 Thread Jeff Law
On 07/20/2016 01:38 PM, David Malcolm wrote: On Fri, 2016-07-08 at 17:49 -0400, David Malcolm wrote: [...] Also, this patch currently makes the assumption (in charset.c) that there's a 1:1 correspondence between bytes in the source character set and bytes in the execution character set. This c

[PATCH GCC/02]Remove -funsafe-loop-optimizations option.

2016-07-21 Thread Bin Cheng
Hi, This patch removes support for -funsafe-loop-optimizations on both GIMPLE and RTL level by marking it as ignored. Bootstrap and test on x86_64. Is it OK? Thanks, bin 2016-07-20 Bin Cheng * common.opt (funsafe-loop-optimizations): Mark ignore. * doc/invoke.texi (funsafe-l

[Patch GCC/01]Bring back warning message on loop whose counter might overflow

2016-07-21 Thread Bin Cheng
Hi, Previous patch removed warning message on loops whose counter might overflow, while this patch adds it back. Reason is it's always good to have a warning message indicating missed loop optimizations. Also warning message itself is slightly changed. There will be following patch which remov

[PATCH GCC/03]New option warning missed optimization on loops whose counter may overflow

2016-07-21 Thread Bin Cheng
Hi, This patch adds new option -Wmissed-loop-optimizations warning on loops whose counter may overflow, as well as makes -Wunsafe-loop-optimizations an alias to the new option. Bootstrap and test on x86_64 ongoing. Is it OK? Thanks, bin 2016-07-20 Bin Cheng * common.opt (Wmissed-lo

[PATCH] Fix early debug regression with DW_AT_string_length (PR debug/71906)

2016-07-21 Thread Jakub Jelinek
Hi! The early debug changes broke e.g. following testcase: program pr71906 character(len=8) :: vard character(len=:), allocatable :: vare type t character(len=:), allocatable :: f end type type(t) :: varf allocate(character(len=10) :: vare) allocate(character(len=9) :: varf%f)

Re: Fix fir PR71696 in Libiberty Demangler (6)

2016-07-21 Thread Jeff Law
On 06/30/2016 12:46 AM, Marcel Böhme wrote: Hi, The attached patch fixes the stack overflow in the demangler due to cycles in the references of “remembered” mangled types (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71696). The methods demangle_signature and do_arg in cplus-dem.c allow to “r

[PATCH,rs6000] Consolidate Power9 Option Flags

2016-07-21 Thread Kelvin Nilsen
This patch undocuments various compiler flags that are associated with different subsets of the full Power9 instruction set. The benefits of hiding these option flags are to reduce testing complexity and to reduce the likelihood of user error (because certain combinations of flag values are not m

Re: [PATCH, contrib] download_prerequisites: check for existing symlinks before making new ones

2016-07-21 Thread Jeff Law
On 07/14/2016 01:57 PM, Eric Gallager wrote: So apparently the "-f" flag properly overwrites symlinks that point to regular files, but I also did this in my gcc builddir: $ mkdir isl-0.1.2.3 $ ln -s isl-0.1.2.3 isl-s $ ln -sfv isl isl-s isl-s/isl -> isl $ ln -sfFv isl isl-s isl-s/isl -> isl $

Re: [PATCH] nvptx: do not implicitly enable -ftoplevel-reorder

2016-07-21 Thread Thomas Schwinge
Hi! On Wed, 20 Jul 2016 08:27:56 -0400, Nathan Sidwell wrote: > On 07/19/16 14:34, Alexander Monakov wrote: > > I've recently committed a middle-end patch that adds handling of undefined > > variables (that the nvptx backend needs) under -fno-toplevel-reorder (svn > > rev. > > 238371). With tha

Re: [PATCH 2/2] C++ FE: handle misspelled identifiers and typenames

2016-07-21 Thread David Malcolm
On Thu, 2016-07-21 at 10:38 -0400, David Malcolm wrote: > On Thu, 2016-07-21 at 10:28 -0400, David Malcolm wrote: > > On Thu, 2016-07-21 at 09:00 +0200, Uros Bizjak wrote: > > > Hello! > > > > > > > > gcc/ChangeLog: > > > > > PR c/70339 > > > > > * diagnostic-show-locus.c (diagnostic_show_locus):

Re: [PATCH] Merge liboffloadmic from upstream

2016-07-21 Thread Jakub Jelinek
On Thu, Jul 21, 2016 at 08:46:00PM +0300, Ilya Verbin wrote: > This patch contains an update for liboffloadmic, imported from > , version 20160715. > > abidiff didn't show any difference in the functions, which are used by libgomp > plugin. make check with inte

Re: [patch, Fortran] Fix some string temporaries

2016-07-21 Thread H.J. Lu
On Tue, Jul 19, 2016 at 2:27 PM, Thomas Koenig wrote: > Hi Mikael, > >> Then handle the GFC_DEP_ERROR here. Or initialize fin_dep with >> GFC_DEP_NODEP at the beginning, as you prefer. >> OK with either (and the unreachable assertions). > > > Here is the pacth the way I committed it. > > Thanks fo

Re: [C++ PATCH] Fix ICE with statement expression (PR c++/71728)

2016-07-21 Thread Jason Merrill
OK. On Thu, Jul 21, 2016 at 12:09 PM, Jakub Jelinek wrote: > Hi! > > It is true that parsing should make sure that GOTO_EXPRs (other than > break/continue) aren't allowed in constant expression contexts, but > potential_constant_expression_1 may be called (with tf_none) also > on arbitrary code e

Re: [PATCH, contrib] download_prerequisites: check for existing symlinks before making new ones

2016-07-21 Thread Bernd Edlinger
Hi, > So rather than relying on ln to remove the link, why don't we just > explicitly remove it with rm -f? sounds good, I ran into similar issues already. ln -nfs does not follow the target if it is a symlink -n, --no-dereference treat LINK_NAME as a normal file if i

Re: [libstdc++] Add C++17clamp

2016-07-21 Thread Jonathan Wakely
On 15/07/16 13:34 -0400, Ed Smith-Rowland wrote: OK for trunk, thanks. I didn't see a feature test in any of the SD-6 papers or P0025. p0096r3 proposes __cpp_lib_clamp = 201603. I added the feature macro and committed the attached as 238383. Thanks, Ed 2016-07-15 Edward Smith-Rowlan

Re: C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)

2016-07-21 Thread Jeff Law
On 07/15/2016 07:04 AM, Bernd Schmidt wrote: On 06/22/2016 05:37 AM, Jeff Law wrote: It looks like this stalled... Anyway, it's fine for the trunk. Some of the surrounding code was changed a bit to produce different errors for different C standards, so I had to make an adjustment to the patch

Re: [RFC, v2] Test coverage for --param boundary values

2016-07-21 Thread Jeff Law
On 07/18/2016 01:53 AM, Martin Liška wrote: You are right, I was inspired by what we do for GCC plugins in: gcc/testsuite/lib/plugin-support.exp where we have following comment: # Note that the plugin test support currently only works when the GCC # build tree is available. (We make sure

Re: [Fortran, Patch] First patch for coarray FAILED IMAGES (TS 18508)

2016-07-21 Thread Alessandro Fanfarillo
Dear Mikael and all, in attachment the new patch, built and regtested on x86_64-pc-linux-gnu. Cheers, Alessandro 2016-07-20 13:17 GMT-06:00 Mikael Morin : > Le 20/07/2016 à 11:39, Andre Vehreschild a écrit : >> >> Hi Mikael, >> >> + if(st == ST_FAIL_IMAGE) +new_st.op = EXEC_FAIL_I

[PATCH 1/4] Fix undefined behaviour in libstdc++ testsuite

2016-07-21 Thread Jonathan Wakely
I've finally got the testsuite able to run with ubsan and asan enabled, with a few hacks in place. That revealed quite a few problems! The first patch in this series just frees some memory which wasn't being deallocated. That isn't really a problem, as the tests exit immediately anyway, but it's

Re: [PATCH, contrib] download_prerequisites: check for existing symlinks before making new ones

2016-07-21 Thread Eric Gallager
On 7/21/16, Jeff Law wrote: > On 07/14/2016 01:57 PM, Eric Gallager wrote: > >> >> So apparently the "-f" flag properly overwrites symlinks that point to >> regular files, but I also did this in my gcc builddir: >> >> $ mkdir isl-0.1.2.3 >> $ ln -s isl-0.1.2.3 isl-s >> $ ln -sfv isl isl-s >> isl-s

[PATCH 2/4] Fix undefined behaviour in libstdc++ testsuite

2016-07-21 Thread Jonathan Wakely
This one just fixes some missing returns, where the functions should have been declared to return void anyway. Fix missing returns in libstdc++ testsuite * testsuite/24_iterators/container_access.cc: Fix missing returns. * testsuite/24_iterators/range_access_cpp14.cc: Likewise

[PATCH] Fix naming, qualification and broken test for propagate_const

2016-07-21 Thread Jonathan Wakely
This test was invalid because it asserted that a default-constructed propagate_const would be null, but it's intentional that the default constructor doesn't initialize its member. I also fixed things in to meet our conventions. * include/experimental/propagate_const (propagate_const::_

[PATCH 3/4] Fix undefined behaviour in libstdc++ testsuite

2016-07-21 Thread Jonathan Wakely
This one's a bit more involved. There are a number of calls to char_traits<>::copy() and char_traits<>::compare() that incorrectly use the length of the larger array, not the shorter one. The specialization in testsuite/util/testsuite_character.cc was setting a null terminator after the numpunct

Re: [PATCH,rs6000] Consolidate Power9 Option Flags

2016-07-21 Thread Segher Boessenkool
Hello Kelvin, On Thu, Jul 21, 2016 at 11:04:45AM -0600, Kelvin Nilsen wrote: > This patch undocuments various compiler flags that are associated with > different subsets of the full Power9 instruction set. The benefits of > hiding these option flags are to reduce testing complexity and to > reduc

[PATCH 4/4] Fix undefined behaviour in libstdc++ testsuite

2016-07-21 Thread Jonathan Wakely
This fixes a couple of places where we replaced operator delete(void*) but not the version that was needed by the tests (the first case used to be correct, but was broken by the sized deallocation change in C++14, so uses the feature-test macro to decide whether the extra overload is needed).

Re: [patch, Fortran] Fix some string temporaries

2016-07-21 Thread Thomas Koenig
Am 21.07.2016 um 20:00 schrieb H.J. Lu: On Tue, Jul 19, 2016 at 2:27 PM, Thomas Koenig wrote: Here is the pacth the way I committed it. This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71961 As usual for SPEC errors: Please provide a test case. Regards Thomas

Re: [PATCH 2/2][v3] Drop excess size used for run time allocated stack variables.

2016-07-21 Thread Jeff Law
On 06/23/2016 03:57 AM, Dominik Vogt wrote: 0002-v3-ChangeLog gcc/ChangeLog * explow.c (round_push): Use know adjustment. (allocate_dynamic_stack_space): Pass known adjustment to round_push. gcc/testsuite/ChangeLog * gcc.dg/pr50938.c: New test. 0002-v3-Drop-excess-si

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-07-21 Thread Jeff Law
On 07/18/2016 03:59 PM, Martin Sebor wrote: Unfortunately, linking with C_COMMON_OBJS isn't enough and linking with C_OBJS doesn't work because of multiple definitions for symbols like gt_ggc_mx_language_function. I don't know this part of of GCC but it seems that each front end gets a set of t

[PATCH], Add PowerPC vec_extract tests

2016-07-21 Thread Michael Meissner
I am preparing to submit patches to enhance vec_extract for 64-bit power8 and power9 systems shortly. As part of my work, I added executable tests to test all vector types, and doing both constant and variable vector extracts from each vector type. Because these are just new tests and not compile

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-07-21 Thread Jeff Law
I saw a few places in GCC itself where you increased buffer sizes. Were any of those level 1 failures? In c.opt: +C ObjC C++ ObjC++ Warning Alias (Wformat-length=, 1, 0) Can't this take on values 0, 1, 2? And if so, is the "1" above correct? In invoke.texi we have: +-Wno-format-contains-

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-21 Thread Bernd Edlinger
Hi, based on the discussion here, I have updated my patch again... This is the rest of the patch, which removes outdated function names, and creates built-in definitions for vfork, getcontext, savectx. These built-ins have the return_twice attribute but not the leaf attribute, because we do not r

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-07-21 Thread Martin Sebor
To that end, the attached patch adds the checker under its own new pass. The pass runs very early without optimization, and relatively late with it to benefit from the passes above. With optimization the pass also can (but doesn't yet) fold the return value from these functions into a constant.

Re: [PATCH], Add PowerPC vec_extract tests

2016-07-21 Thread Segher Boessenkool
On Thu, Jul 21, 2016 at 05:15:26PM -0400, Michael Meissner wrote: > I am preparing to submit patches to enhance vec_extract for 64-bit power8 and > power9 systems shortly. As part of my work, I added executable tests to test > all vector types, and doing both constant and variable vector extracts

Re: [libstdc++] Add C++17clamp

2016-07-21 Thread NightStrike
On Thu, Jul 14, 2016 at 7:50 PM, Ed Smith-Rowland <3dw...@verizon.net> wrote: > Here is an implementation of P0025 > An algorithm to "clamp" a value between a pair of boundary values. > > Testing is almost finished - looks good so far. > > OK if testing passes? > > I didn't see a feature test in an

Re: [PATCH], Add PowerPC vec_extract tests

2016-07-21 Thread Michael Meissner
On Thu, Jul 21, 2016 at 06:17:24PM -0500, Segher Boessenkool wrote: > On Thu, Jul 21, 2016 at 05:15:26PM -0400, Michael Meissner wrote: > > I am preparing to submit patches to enhance vec_extract for 64-bit power8 > > and > > power9 systems shortly. As part of my work, I added executable tests to

Go patch committed: accept a, a, a = 1, 2, 3

2016-07-21 Thread Ian Lance Taylor
The Go frontend was incorrectly rejecting a, a, a = 1, 2, 3 This was a misfire of the code that detects and rejects a, a, a := 1, 2, 3 The former is valid, albeit not very useful, Go. This patch fixes the problem. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to main

C++ PATCH for c++/71913 (copy elision choices)

2016-07-21 Thread Jason Merrill
71913 is a case where unsafe_copy_elision_p was being too conservative. We can allow copy elision in a new expression; the only way we could end up initializing a base subobject without knowing it would be through a placement new, in which case we would already be using the wrong (complete object)

C++ PATCH for c++/71630 (extern variable template)

2016-07-21 Thread Jason Merrill
instantiate_decl's setting of pattern_defined never got adjusted for variable templates; it was still checking DECL_IN_AGGR_P to decide whether a static data member temploid is defined, which doesn't make sense for namespace-scope variable templates. Tested x86_64-pc-linux-gnu, applying to trunk,

C++ PATCH for c++/69223 (ICE with deduced return type)

2016-07-21 Thread Jason Merrill
Here when we deduced the return type for a lambda to an uninstantiated class template specialization, we built the new RESULT_DECL, and called layout_decl, before we called complete_type_or_else, so the RESULT_DECL wasn't properly laid out. Tested x86_64-pc-linux-gnu, applying to trunk, 6, 5. comm

C++ PATCH for c++/71274 (deprecated warning without use)

2016-07-21 Thread Jason Merrill
In this testcase we were giving a deprecated declaration warning without the deprecated declaration ever having been used, because we called mark_used when checking whether the variable is constant. What we really want from mark_used is the instantiation semantics, so let's split that out. Tested

Re: [PATCH] Avoid invoking ranlib on libbackend.a

2016-07-21 Thread Andrew Pinski
On Wed, Jul 20, 2016 at 7:11 AM, Patrick Palka wrote: > On Wed, 20 Jul 2016, Bernd Schmidt wrote: > >> On 07/19/2016 10:20 AM, Richard Biener wrote: >> > I like it. Improving re-build time in my dev tree is very much >> > welcome, and yes, >> > libbackend build time is a big part of it usually (p

[PATCH 3/3][GCC-6] Backport support for arm*-*-phoenix* targets in libgcc.

2016-07-21 Thread Kuba Sejdak
This patch is already in trunk. It adds no new features, just new arm-phoenix* OS target to libgcc. I have SVN write access, so only approval is needed. Is it OK for gcc-6 branch? 2016-07-22 Jakub Sejdak * config.host: Add suport for arm*-*-phoenix* targets. --- libgcc/ChangeLog | 4 +++

[PATCH 2/3][GCC-6] Backport support for arm*-*-phoenix* targets.

2016-07-21 Thread Kuba Sejdak
This patch is already in trunk. It adds no new features, just new arm-phoenix* OS target to gcc config. I have SVN write access, so only approval is needed. Is it OK for gcc-6 branch? 2016-07-22 Jakub Sejdak * config.gcc: Add support for arm*-*-phoenix* targets. * config/arm/t-phoenix: N

[PATCH 1/3][GCC-6] Backport support for Phoenix-RTOS targets in config.sub.

2016-07-21 Thread Kuba Sejdak
This patch is already in trunk. It adds no new features, just new OS target. I have SVN write access, so only approval is needed. Is it OK for gcc-6 branch? 2016-07-22 Jakub Sejdak * config.sub: Add support for Phoenix-RTOS targets. --- ChangeLog | 4 config.sub | 2 +- 2 files chan