Re: [PATCH] enhance -Warray-bounds to detect out-of-bounds offsets (PR 82455)

2017-11-10 Thread Richard Biener
On Thu, 9 Nov 2017, Jeff Law wrote: > On 11/02/2017 05:48 AM, Richard Biener wrote: > > > > > There were elaborate transforms of ptr + CST to ptr->a.b.c[3] in the > > past. We have ripped out _most_ of them because of bad interaction > > with dependence analysis and _b_o_s warnings. > > > > Bu

Re: [PATCH] Fix profiledbootstrap - store-merging aliasing issue (PR bootstrap/82916)

2017-11-10 Thread Jakub Jelinek
On Fri, Nov 10, 2017 at 08:52:16AM +0100, Richard Biener wrote: > > @@ -958,8 +959,10 @@ pass_store_merging::terminate_all_aliasi > >unsigned int i; > >FOR_EACH_VEC_ELT (cur->m_store_info, i, info) > > { > > - if (ref_maybe_used_by_stmt_p (stmt, gimple_assign_lhs (info->stmt

[Ada] Fix ICE on defaulted string parameters at -O

2017-11-10 Thread Eric Botcazou
This is a regression present on the mainline, 7 and 6 branches if optimization is enabled. It turns out that we don't need to generate a VIEW_CONVERT_EXPR for a regular conversion between an unconstrained array parameter and one of its constrained subtype. Tested on x86_64-suse-linux, applied

Re: [PATCH] Fix profiledbootstrap - store-merging aliasing issue (PR bootstrap/82916)

2017-11-10 Thread Richard Biener
On Fri, 10 Nov 2017, Jakub Jelinek wrote: > On Fri, Nov 10, 2017 at 08:52:16AM +0100, Richard Biener wrote: > > > @@ -958,8 +959,10 @@ pass_store_merging::terminate_all_aliasi > > >unsigned int i; > > >FOR_EACH_VEC_ELT (cur->m_store_info, i, info) > > > { > > > - if (ref_maybe_

[PATCH][ARM,testsuite] Skip copysign_softfloat_1.c on hard-float targets

2017-11-10 Thread Christophe Lyon
Hi, The attached testsuite patch makes gcc.target/arm/copysign_softfloat_1.c UNSUPPORTED on arm-none-linux-gnueabihf, rather than FAIL/UNRESOLVED because of a link failure since the toolchain startup code is in hard-float ABI while the testcase is compiled with -mfloat-abi=soft. Tested on arm* co

[PATCH][AArch64] Improve scheduling model for X-Gene

2017-11-10 Thread Dominik Inführ
Hi, this patch tries to refine the instruction scheduling model for X-Gene. Improved performance for 456.hmmer and 464.h264ref (about 1%). Also splits the model into multiple automatons, therefore smaller binary and faster build time. Survives bootstrap. Best, Dominik gcc/ChangeLog: 2017-10-0

Re: [02/nn] Add more vec_duplicate simplifications

2017-11-10 Thread Christophe Lyon
On 25 October 2017 at 18:29, Jeff Law wrote: > On 10/23/2017 05:17 AM, Richard Sandiford wrote: >> This patch adds a vec_duplicate_p helper that tests for constant >> or non-constant vector duplicates. Together with the existing >> const_vec_duplicate_p, this complements the gen_vec_duplicate >>

Re: [PATCH][AArch64] Improve scheduling model for X-Gene

2017-11-10 Thread James Greenhalgh
On Fri, Nov 10, 2017 at 10:36:57AM +0100, Dominik Inführ wrote: > Hi, > > this patch tries to refine the instruction scheduling model for X-Gene. > Improved performance for 456.hmmer and 464.h264ref (about 1%). Also splits > the model into multiple automatons, therefore smaller binary and faster b

Re: [PATCH][AArch64] Improve scheduling model for X-Gene

2017-11-10 Thread Dominik Inführ
> On 10 Nov 2017, at 10:40, James Greenhalgh wrote: > > On Fri, Nov 10, 2017 at 10:36:57AM +0100, Dominik Inführ wrote: >> Hi, >> >> this patch tries to refine the instruction scheduling model for X-Gene. >> Improved performance for 456.hmmer and 464.h264ref (about 1%). Also splits >> the model

Re: [PATCH][AArch64] Improve scheduling model for X-Gene

2017-11-10 Thread Kyrill Tkachov
Hi Dominic, On 10/11/17 09:36, Dominik Inführ wrote: Hi, this patch tries to refine the instruction scheduling model for X-Gene. Improved performance for 456.hmmer and 464.h264ref (about 1%). Also splits the model into multiple automatons, therefore smaller binary and faster build time. Surv

Re: [4/4] SVE unwinding

2017-11-10 Thread James Greenhalgh
On Fri, Nov 03, 2017 at 05:52:05PM +, Richard Sandiford wrote: > This patch adds support for unwinding frames that use the SVE > pseudo VG register. We want this register to act like a normal > register if the CFI explicitly sets it, but want to provide a > default value otherwise. Computing

RE: [PATCH][GCC][ARM] Implement "arch" GCC pragma and "+" attributes [Patch (2/3)]

2017-11-10 Thread Tamar Christina
Hi Sandra, I've respun the patch with the docs changes you requested. Regards, Tamar > -Original Message- > From: Sandra Loosemore [mailto:san...@codesourcery.com] > Sent: 07 November 2017 03:38 > To: Tamar Christina; gcc-patches@gcc.gnu.org > Cc: nd; Ramana Radhakrishnan; Richard Earnsh

Re: [05/nn] [AArch64] Rewrite aarch64_simd_valid_immediate

2017-11-10 Thread James Greenhalgh
On Fri, Oct 27, 2017 at 02:27:08PM +0100, Richard Sandiford wrote: > This patch reworks aarch64_simd_valid_immediate so that > it's easier to add SVE support. The main changes are: > > - make simd_immediate_info easier to construct > - replace the while (1) { ... break; } blocks with checks that

Re: [PATCH][ARM,testsuite] Skip copysign_softfloat_1.c on hard-float targets

2017-11-10 Thread Kyrill Tkachov
Hi Christophe, On 10/11/17 08:43, Christophe Lyon wrote: Hi, The attached testsuite patch makes gcc.target/arm/copysign_softfloat_1.c UNSUPPORTED on arm-none-linux-gnueabihf, rather than FAIL/UNRESOLVED because of a link failure since the toolchain startup code is in hard-float ABI while the te

[PATCH, GCC/testsuite/ARM] Consolidate sources for cmse tests

2017-11-10 Thread Thomas Preudhomme
For the most part, testcases under gcc.target/arm/cmse/baseline and gcc.target/arm/cmse/mainline are duplicate copies with only different dejagnu directives. Although there is no requirement for them to be similar, having them both identical allow to compare the code generated and make it easier i

Re: [PATCH, GCC/testsuite/ARM] Consolidate sources for cmse tests

2017-11-10 Thread Thomas Preudhomme
Sorry for the garbled email, I guess I did a middle click paste which sometimes paste things several times. Let me try again: For the most part, testcases under gcc.target/arm/cmse/baseline and gcc.target/arm/cmse/mainline are duplicate copies with only different dejagnu directives. Although the

[patch] Fix PR lto/81351

2017-11-10 Thread Eric Botcazou
Hi, this is the EH breakage introduced in LTO mode on non-(x86 or Linux): https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00771.html As Jan explained, in the end it's only a matter of recording whether at least one function needs a FDE for EH in the compilation unit and, if so, generating the E

[Patch, fortran] PR82934 - [6/7/8 Regression] Segfault on assumed character length in allocate

2017-11-10 Thread Paul Richard Thomas
Committed as obvious in r254624. I will apply to 6- and 7-branches over the weekend. Although not a regression, the fix prevents an ICE in a particularly robust way. Cheers Paul 2017-11-10 Paul Thomas PR fortran/82934 * trans-stmt.c (gfc_trans_allocate): Remove the gcc_assert on

[PATCH] Fix ICE in store-merging (PR tree-optimization/82929)

2017-11-10 Thread Jakub Jelinek
Hi! Because BIT_{AND,IOR,XOR}_EXPR are commutative, we std::swap the store_operand_info ops if that means we could append the store into a group rather than having to start a new group. Unfortunately for count_multiple_uses we need to walk the stmts computing the stored value in order to check th

Re: [PATCH] Fix ICE in store-merging (PR tree-optimization/82929)

2017-11-10 Thread Richard Biener
On Fri, 10 Nov 2017, Jakub Jelinek wrote: > Hi! > > Because BIT_{AND,IOR,XOR}_EXPR are commutative, we std::swap the > store_operand_info ops if that means we could append the store into > a group rather than having to start a new group. Unfortunately > for count_multiple_uses we need to walk th

[PATCH] Handle different bit_not_p in store merging (PR tree-optimization/78821)

2017-11-10 Thread Jakub Jelinek
Hi! This is something Uros requested in the PR, at least with BIT_NOT_EXPRs it is easy. Previous store merging changes required that bit_not_p is equal on all stores in the group (in all 3 spots, i.e. on the result of BIT_{AND,IOR,XOR}_EXPR and on both of the operands). This patch handles mixed

Re: [RFA][PATCH] 2/n Refactoring tree-vrp.c -- pull evrp bits into their own file

2017-11-10 Thread Richard Biener
On Fri, Nov 10, 2017 at 1:30 AM, Jeff Law wrote: > This patch pulls out the EVRP class & methods from tree-vrp.c. It's a > straight copy-n-paste with the exception of the evrp_folder class which > I trimmed back down to its minimal form. > > This obviously forces shared structures/routines betwee

Re: [PATCH PR82726/PR70754][2/2]New fix by finding correct root reference in combined chains

2017-11-10 Thread Bin.Cheng
On Tue, Nov 7, 2017 at 10:53 AM, Richard Biener wrote: > On Fri, Nov 3, 2017 at 1:40 PM, Bin Cheng wrote: >> Hi, >> As described in message of previous patch: >> >> This patch set fixes both PRs in the opposite way: Instead of find dominance >> insertion position for root reference, we resort zer

Re: [PATCH PR82726/PR70754][2/2]New fix by finding correct root reference in combined chains

2017-11-10 Thread Bin.Cheng
t; PR tree-optimization/70754 >>> * tree-predcom.c (, INCLUDE_ALGORITHM): New headers. >>> (order_drefs_by_pos): New function. >>> (combine_chains): Move code setting has_max_use_after to... >>> (try_combine_chains): ...here

Re: [PATCH] Add option to force indirect calls for x86

2017-11-10 Thread Rainer Orth
Hi Andi, > This patch adds a -mforce-indirect-call option to force all calls > or tail calls on x86_64 between functions to indirect. This is similar to the > large code model, but doesn't affect jumps inside functions, so has much > less run time overhead. > > This is useful with Intel Processor

[C++ PATCH] P0428R2 - familiar template syntax for generic lambdas

2017-11-10 Thread Jakub Jelinek
Hi! This feature seems to be fully implemented from what I can see, except that we pedwarn on it, which we shouldn't do for -std=c++2a or -std=gnu++2a when it is standard. I'm not really sure about the pedwarn wording(s), the reality is that it is supported for C++14 and later as an extension and

Re: [PATCH] GCOV: do not support unexecuted blocks in Ada

2017-11-10 Thread Martin Liška
On 11/09/2017 04:27 PM, Nathan Sidwell wrote: > >> +  /* support for unexecuted basic blocks */ > > comment is not a sentence. > >> +  unsigned support_unexecuted_blocks = gcov_read_unsigned (); >> +  if (!support_unexecuted_blocks) >> +    printf ("%s: has_unexecuted_block is not supported\n",

Re: [PATCH] GCOV: create one intermediate file per a gcno file (PR gcov-profile/82702).

2017-11-10 Thread Martin Liška
On 11/09/2017 04:23 PM, Nathan Sidwell wrote: > https://gcc.gnu.org/ml/gcc-patches/2017-10/msg02337.html > > sorry for dropping this one. > > looks good, except: >> -  for (; argno != argc; argno++) >> +  if (flag_intermediate_format) >> { >> -  if (flag_display_progress) >> -    printf

Re: [03/nn] [AArch64] Rework interface to add constant/offset routines

2017-11-10 Thread James Greenhalgh
On Mon, Oct 30, 2017 at 10:52:26AM +, Richard Sandiford wrote: > Richard Sandiford writes: > > The port had aarch64_add_offset and aarch64_add_constant routines > > that did similar things. This patch replaces them with an expanded > > version of aarch64_add_offset that takes separate source

Re: [AArch64] Tweak aarch64_classify_address interface

2017-11-10 Thread James Greenhalgh
On Mon, Oct 23, 2017 at 06:58:29PM +0100, Richard Sandiford wrote: > Ping. Makes sense. OK. Reviewed-By: James Greenhalgh James > Richard Sandiford writes: > > Richard Sandiford writes: > >> James Greenhalgh writes: > >>> On Tue, Aug 22, 2017 at 10:23:47AM +0100, Richard Sandiford wrote: >

Re: [PATCH][AArch64] Restrict POST_INC operand in aarch64_simd_mem_operand_p to register

2017-11-10 Thread Dominik Inführ
Ping > On 31 Oct 2017, at 14:47, Dominik Inführ > wrote: > > Hi, > > I have a custom optimization pass, that moves an expression into an > POST_INC-expression. GCC then ICE’s in df-scan.c since it expects REG_P to be > true for POST_INC’s operand. aarch64_simd_mem_operand_p doesn’t seem to c

Re: [PATCH] Add offset_int to guard HOST_WIDE_INT overflow (PR tree-optimization/82042).

2017-11-10 Thread Martin Sebor
On 10/19/2017 05:58 AM, Richard Biener wrote: On Thu, Oct 19, 2017 at 1:21 PM, Martin Liška wrote: On 09/20/2017 05:47 PM, Richard Biener wrote: On Wed, Sep 20, 2017 at 9:50 AM, Martin Liška wrote: Hi. This is partial fix for the PR, where I calculate 2 offsets in offset_int type. Patch ca

Re: Adjust empty class parameter passing ABI (PR c++/60336)

2017-11-10 Thread Jason Merrill
On 11/09/2017 10:26 AM, Richard Biener wrote: Moving TYPE_EMPTY_P to finalize_type_size revealed a bug in Cilk+, it was bogusly (I believe) setting TREE_ADDRESSABLE, so the assert fired. Since Cilk+ is being deprecated and the Cilk+ testsuite still passes, I'm not too worried about this change.

Re: [C++ PATCH] Remove the null check from placement new in all modes

2017-11-10 Thread Jason Merrill
OK. On Fri, Nov 10, 2017 at 12:29 AM, Ville Voutilainen wrote: > Tested manually on Linux-X64, finishing testing with the full suite on > Linux-PPC64. > > I spent far too much time contemplating whether to add a compatibility switch > for this, but -fcheck-new *is* such a compatibility switch. >

Re: [PATCH] [GOLD] Add plugin API for processing plugin-added input files

2017-11-10 Thread Sriraman Tallam via gcc-patches
On Thu, Nov 9, 2017 at 9:04 PM, Cary Coutant wrote: > > include/ChangeLog: > > 2017-11-09 Stephen Crane > > > > * plugin-api.h: Add new plugin hook to allow processing of input > > files added by a plugin. > > (ld_plugin_new_input_handler): New funcion hook type. > >

Re: [PATCH] Handle different bit_not_p in store merging (PR tree-optimization/78821)

2017-11-10 Thread Kyrill Tkachov
Hi Jakub, On 10/11/17 13:59, Jakub Jelinek wrote: Hi! This is something Uros requested in the PR, at least with BIT_NOT_EXPRs it is easy. Previous store merging changes required that bit_not_p is equal on all stores in the group (in all 3 spots, i.e. on the result of BIT_{AND,IOR,XOR}_EXPR and

Re: [C++ PATCH] Remove the null check from placement new in all modes

2017-11-10 Thread Ville Voutilainen
On 10 November 2017 at 18:19, Jason Merrill wrote: > OK. I see non-obvious testsuite failures, I'll see if adding -fcheck-new to those cases cures the problem. Please stay tuned. :)

Re: [PATCH, GCC/testsuite/ARM] Consolidate sources for cmse tests

2017-11-10 Thread Kyrill Tkachov
Hi Thomas, On 10/11/17 11:57, Thomas Preudhomme wrote: Sorry for the garbled email, I guess I did a middle click paste which sometimes paste things several times. Let me try again: For the most part, testcases under gcc.target/arm/cmse/baseline and gcc.target/arm/cmse/mainline are duplicate co

[PATCH][ARM] Fix more -Wreturn-type fallout

2017-11-10 Thread Sudi Das
Hi This patch fixes a couple of more tests that are giving out warnings with -Wreturn-type: - g++.dg/ext/pr57735.C - gcc.target/arm/pr54300.C *** gcc/testsuite/ChangeLog *** 2017-11-10 Sudakshina Das * g++.dg/ext/pr57735.C: Add -Wno-return-type for test. * gcc.target/arm/pr

Re: [PATCH][GCC][ARM] Refactor arm_option_override to extract global field setters [Patch (1/3)]

2017-11-10 Thread Tamar Christina
Hi Kyrill, Bootstrap on arm-none-linux-gnueabihf showed no issue, so I will commit the patch. Thanks, Tamar From: Kyrill Tkachov Sent: Wednesday, November 8, 2017 10:08:45 AM To: Tamar Christina; gcc-patches@gcc.gnu.org Cc: nd; Ramana Radhakrishnan; Ric

Re: [RFA][PATCH] 2/n Refactoring tree-vrp.c -- pull evrp bits into their own file

2017-11-10 Thread Aldy Hernandez
On 11/10/2017 09:11 AM, Richard Biener wrote: On Fri, Nov 10, 2017 at 1:30 AM, Jeff Law wrote: This patch pulls out the EVRP class & methods from tree-vrp.c. It's a straight copy-n-paste with the exception of the evrp_folder class which I trimmed back down to its minimal form. This obviousl

Re: [RFA][PATCH] 2/n Refactoring tree-vrp.c -- pull evrp bits into their own file

2017-11-10 Thread Jeff Law
On 11/10/2017 07:11 AM, Richard Biener wrote: > On Fri, Nov 10, 2017 at 1:30 AM, Jeff Law wrote: >> This patch pulls out the EVRP class & methods from tree-vrp.c. It's a >> straight copy-n-paste with the exception of the evrp_folder class which >> I trimmed back down to its minimal form. >> >> Th

Re: [PATCH], Generate XXBR{H,W,D} for bswap{16,32,64} on PowerPC ISA 3.0 (power9)

2017-11-10 Thread Segher Boessenkool
Hi Mike, On Wed, Nov 08, 2017 at 03:02:30PM -0500, Michael Meissner wrote: > > Should this somehow be joined with p9_xxbrd_? Or maybe you should > > generate that, instead. > > No, since p9_xxbrd_ doesn't include DImode. We could add yet another > mode iterator to include DI + V2DI/V2DF modes,

Re: [PATCH, rs6000] Add __builtin_altivec_vsumsws

2017-11-10 Thread Segher Boessenkool
Hi Carl, On Wed, Nov 08, 2017 at 01:21:46PM -0800, Carl Love wrote: > 2017-11-08 Carl Love > > * config/rs6000/rs6000-c.c (ALTIVEC_BUILTIN_VEC_SUMS): Add macro > expansion. This line is too long (79 or 80 chars). > +(define_expand "altivec_vsumsws_be" > + [(use (match_operand:V4SI 0

Re: [PATCH, rs6000 V2] Add Power 9 support for vec_first builtins

2017-11-10 Thread Segher Boessenkool
Hi! On Thu, Nov 09, 2017 at 03:42:42PM -0800, Carl Love wrote: > * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): > Add support for builtins: > unsigned int vec_first_{,miss}_match_{,or_eos}index ( Don't end a line with an opening parenthesis. > vector {un,}signe

[PATCH, testsuite]: Fix gcc.target/i386/force-indirect-call-?.c fallout

2017-11-10 Thread Uros Bizjak
2017-11-10 Uros Bizjak * gcc.target/i386/force-indirect-call-1.c: Merge scan strings. * gcc.target/i386/force-indirect-call-2.c: Ditto. Require fpic effective target. * gcc.target/i386/force-indirect-call-3.c: Ditto. Require lp64 effective target. Tested on x86_64-linux-gnu

[PATCH] avoid -Wstringop-truncation in Darwin bootstrap

2017-11-10 Thread Martin Sebor
A few not incorrect but not strictly intended (according to the function's original purpose) uses of strncpy trigger the new -Wstringop-truncation warning because they temporarily leave the copied string without a terminating nul. The attached patch replaces these uses with memcpy to avoid the wa

Re: [PATCH] avoid -Wstringop-truncation in Darwin bootstrap

2017-11-10 Thread Mike Stump
On Nov 10, 2017, at 11:55 AM, Martin Sebor wrote: > A few not incorrect but not strictly intended (according to > the function's original purpose) uses of strncpy trigger the > new -Wstringop-truncation warning because they temporarily > leave the copied string without a terminating nul. If peopl

Re: [patch][i386, AVX] GFNI enabling [3/4]

2017-11-10 Thread Kirill Yukhin
Hello Julia! On 06 Nov 08:26, Koval, Julia wrote: > Rebased after last patch fixes. > > gcc/ >* config/i386/gfniintrin.h (_mm_gf2p8affine_epi64_epi8, >_mm256_gf2p8affine_epi64_epi8, _mm_mask_gf2p8affine_epi64_epi8, >_mm_maskz_gf2p8affine_epi64_epi8, _mm256_mask_gf2p8affine_

Re: [PATCH] avoid -Wstringop-truncation in Darwin bootstrap

2017-11-10 Thread Martin Sebor
On 11/10/2017 01:13 PM, Mike Stump wrote: On Nov 10, 2017, at 11:55 AM, Martin Sebor wrote: A few not incorrect but not strictly intended (according to the function's original purpose) uses of strncpy trigger the new -Wstringop-truncation warning because they temporarily leave the copied string

Re: SFN+LVU+IEPM v4

2017-11-10 Thread Alexandre Oliva
On Nov 10, 2017, Alexandre Oliva wrote: > Most of the patchset is already approved, part by richi, part by jeff. > The only points still requiring changes, AFAIK, are the ones mentioned > above. Actually, I've just noticed that there's one big patch in the set that's still missing review and app

Re: std::advance istreambuf_iterator overload

2017-11-10 Thread Jonathan Wakely
On 09/11/17 22:12 +0100, François Dumont wrote: Hi     Working on istreambuf_iterator I realized that this iterator would really benefit from an std::advance overload so here it is.     Tested under Linux x86_64 normal and debug modes, ok to commit ? François diff --git a/libstdc++-v3/

[PATCH, Fortran] Fix PR 82886 - ICE with -finit-derived in gfc_conv_expr

2017-11-10 Thread Fritz Reese
All, The attached patch fixes the ICE reported in PR 82886. The ICE is due to compiling the program with -finit-derived, but without any other -finit-* flag (apparently this is something which I never tried when I introduced -finit-derived, somehow...) Previously, -finit-derived would inherit the

Re: [PATCH, Fortran] Fix PR 82886 - ICE with -finit-derived in gfc_conv_expr

2017-11-10 Thread Fritz Reese
My mistake, the patch file should not have the random changes to libiberty/functions.texi. Not sure how that ended up there. --- Fritz Reese On Fri, Nov 10, 2017 at 4:31 PM, Fritz Reese wrote: > All, > > The attached patch fixes the ICE reported in PR 82886. The ICE is due > to compiling the pro

[PATCH v2: 00/14] Preserving locations for variable-uses and constants (PR 43486)

2017-11-10 Thread David Malcolm
On Thu, 2017-11-02 at 10:46 -0400, Jason Merrill wrote: > On Tue, Oct 31, 2017 at 5:09 PM, David Malcolm > wrote: > > On Tue, 2017-10-24 at 09:53 -0400, Jason Merrill wrote: > > > On Fri, Oct 20, 2017 at 5:53 PM, David Malcolm > > om> > > > wrote: > > > > Design questions: > > > > > > > > * The

[PATCH 01/14] C++: preserve locations within build_address

2017-11-10 Thread David Malcolm
This is needed for the locations of string literals to be usable, otherwise the ADDR_EXPR has UNKNOWN_LOCATION, despite wrapping a node with a correct location_t. gcc/cp/ChangeLog: * typeck.c (build_address): Use location of operand when building address expression. --- gcc/cp/typ

[PATCH 02/14] Support for adding and stripping location_t wrapper nodes

2017-11-10 Thread David Malcolm
This patch provides a mechanism in tree.c for adding a wrapper node for expressing a location_t, for those nodes for which !CAN_HAVE_LOCATION_P, along with a new method of cp_expr. It's called in later patches in the kit via that new method. In this version of the patch, I use NON_LVALUE_EXPR for

[PATCH 03/14] C++: add location_t wrapper nodes during parsing (minimal impl)

2017-11-10 Thread David Malcolm
The initial version of the patch kit added location wrapper nodes around constants and uses-of-declarations, along with some other places in the parser (typeid, alignof, sizeof, offsetof). This version takes a much more minimal approach: it only adds location wrapper nodes around the arguments at

[PATCH 04/14] Update testsuite to show improvements

2017-11-10 Thread David Malcolm
gcc/testsuite/ChangeLog: PR c++/43486 * g++.dg/diagnostic/param-type-mismatch.C: Update expected results to reflect that the arguments are correctly underlined. * g++.dg/plugin/diagnostic-test-expressions-1.C: Add test coverage for globals, params, locals and

[PATCH 05/14] tree.c: strip location wrappers from integer_zerop etc

2017-11-10 Thread David Malcolm
We need to strip away location wrappers in tree.c predicates like integer_zerop, otherwise they fail when they're called on wrapped INTEGER_CST; an example can be seen for c-c++-common/Wmemset-transposed-args1.c in g++.sum, where the warn_for_memset fails to detect integer zero if the location wr

[PATCH 06/14] Fix Wsizeof-pointer-memaccess*.c

2017-11-10 Thread David Malcolm
gcc/c-family/ChangeLog: * c-warn.c (sizeof_pointer_memaccess_warning): Strip any location wrappers from src and dest. --- gcc/c-family/c-warn.c | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c index 09ef685..245c37d 100644 --- a

[PATCH 07/14] reject_gcc_builtin: strip any location wrappers

2017-11-10 Thread David Malcolm
Otherwise pr70144-1.c breaks. gcc/c-family/ChangeLog: * c-common.c (reject_gcc_builtin): Strip any location from EXPR. --- gcc/c-family/c-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 24077c7..739c54e 100644 --- a/gc

[PATCH 08/14] cp/tree.c: strip location wrappers in lvalue_kind

2017-11-10 Thread David Malcolm
Without this, then lvalue_p returns false for decls, and hence e.g. uses of them for references fail. Stripping location wrappers in lvalue_kind restores the correct behavior of lvalue_p etc. gcc/cp/ChangeLog: * tree.c (lvalue_kind): Strip any location wrapper. --- gcc/cp/tree.c | 2 ++

[PATCH 09/14] Strip location wrappers in null_ptr_cst_p

2017-11-10 Thread David Malcolm
Without this, "NULL" fails to be usable in C++11 onwards. gcc/cp/ChangeLog: * call.c (null_ptr_cst_p): Strip location wrappers when converting from '0' to a pointer type in C++11 onwards. --- gcc/cp/call.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/cp/call.c b/gcc/c

[PATCH 10/14] warn_for_memset: handle location wrappers

2017-11-10 Thread David Malcolm
gcc/c-family/ChangeLog: * c-warn.c (warn_for_memset): Strip any location wrappers from arg0 and arg2. gcc/cp/ChangeLog: * parser.c (cp_parser_postfix_expression): Before warn_for_memset, strip any wrapper around "arg2" before testing for CONST_DECL. --- gcc/c-famil

[PATCH 13/14] c-format.c: handle location wrappers

2017-11-10 Thread David Malcolm
gcc/c-family/ChangeLog: * c-format.c (check_format_arg): Strip any location wrapper around format_tree. --- gcc/c-family/c-format.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c index 164d035..6b436ec 1

[PATCH 12/14] C++: introduce null_node_p

2017-11-10 Thread David Malcolm
Eschew comparison with null_node in favor of a new null_node_p function, which strips any location wrappers. All of these sites require the node to be non-NULL, with the exception of the one in build_throw, hence the patch adds a test for NULL before the call to non_null_p at that site, rather tha

[PATCH 14/14] pp_c_cast_expression: don't print casts for location wrappers

2017-11-10 Thread David Malcolm
This patch suppresses the user-visible printing of location wrappers for "%E" (and "%qE"), adding test coverage via selftests. Seen via a failure of g++.dg/parse/error34.C and g++.dg/parse/error35.C. gcc/c-family/ChangeLog: * c-common.c (selftest::c_family_tests): Call selftest::c

[PATCH 11/14] Handle location wrappers in string_conv_p

2017-11-10 Thread David Malcolm
gcc/cp/ChangeLog: * typeck.c (string_conv_p): Strip any location wrapper from "exp". --- gcc/cp/typeck.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index dd3e19d..523e4d3 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -2149,6 +2149,8 @@ s

[PATCH] PR libstdc++/82917 add missing returns in

2017-11-10 Thread Jonathan Wakely
Thanks to the front-end now checking my dumb mistakes, these functions no longer compiled - yay for G++ improvements! PR libstdc++/82917 * include/std/fstream (basic_ifstream::open, basic_ofstream::open) (basic_fstream::open): Fix missing return. Tested powerpc64le-linux,

Re: [PATCH] [GOLD] Add plugin API for processing plugin-added input files

2017-11-10 Thread Sriraman Tallam via gcc-patches
On Thu, Nov 9, 2017 at 9:04 PM, Cary Coutant wrote: > > include/ChangeLog: > > 2017-11-09 Stephen Crane > > > > * plugin-api.h: Add new plugin hook to allow processing of input > > files added by a plugin. > > (ld_plugin_new_input_handler): New funcion hook type. > >

Re: [PATCH] avoid -Wstringop-truncation in Darwin bootstrap

2017-11-10 Thread Jeff Law
On 11/10/2017 12:55 PM, Martin Sebor wrote: > A few not incorrect but not strictly intended (according to > the function's original purpose) uses of strncpy trigger the > new -Wstringop-truncation warning because they temporarily > leave the copied string without a terminating nul. > > The attache

Re: [PATCH,doc] Fix latency in pipeline description example

2017-11-10 Thread Jim Wilson
On 11/09/2017 03:44 AM, Luis Machado wrote: Am i missing something or is this example incorrect and this should either have a latency of 9 (patch attached) or a different resource utilization description, say, containing "div*6" instead? The numbers are somewhat arbitrary, but you are right tha

Re: [PATCH 2/4] enhance overflow and truncation detection in strncpy and strncat (PR 81117)

2017-11-10 Thread Marc Glisse
On Sun, 6 Aug 2017, Martin Sebor wrote: +@item nonstring (@var{nonstring}) Hello, what is the "(@var{nonstring})" for? This attribute does not seem to take any argument... -- Marc Glisse

Re: [PATCH] avoid -Wstringop-truncation in Darwin bootstrap

2017-11-10 Thread Martin Sebor
On 11/10/2017 03:18 PM, Jeff Law wrote: On 11/10/2017 12:55 PM, Martin Sebor wrote: A few not incorrect but not strictly intended (according to the function's original purpose) uses of strncpy trigger the new -Wstringop-truncation warning because they temporarily leave the copied string without

Re: [PATCH], Generate XXBR{H,W,D} for bswap{16,32,64} on PowerPC ISA 3.0 (power9)

2017-11-10 Thread Michael Meissner
On Fri, Nov 10, 2017 at 11:45:23AM -0600, Segher Boessenkool wrote: > Hi Mike, > > On Wed, Nov 08, 2017 at 03:02:30PM -0500, Michael Meissner wrote: > > > Should this somehow be joined with p9_xxbrd_? Or maybe you should > > > generate that, instead. > > > > No, since p9_xxbrd_ doesn't include D

Hurd port for gcc-8 go PATCH 1-3(15)

2017-11-10 Thread Svante Signell
Hi, Attached are patches to enable gccgo to build properly on Debian GNU/Hurd on gcc-8 (8-8-20171108-1). The first two patches are Debian-specific: Enable build of gccgo for GNU/Hurd: * debian_rules.defs.diff Define patches for the generated series file: * debian_rules.patch.diff The third enabl

Hurd port for gcc-8 go PATCH 4-10(15)

2017-11-10 Thread Svante Signell
* src_libgo_build.diff: configure.ac, Makefile.* and shell script patches. * src_libgo_go_crypto.diff: Certificate go files. * src_libgo_go_net.diff: OS-specific net go files. * src_libgo_go_os.diff: OS-specific os go files. * src_libgo_go_runtime.diff: OS-specific runtime go files. * src_libgo_go_

Hurd port for gcc-8 go PATCH 11-15(15)

2017-11-10 Thread Svante Signell
* add-gnu-to-libgo-headers.diff: Add gnu to libgo headers for build. * add-gnu-to-libgo-test-headers.diff: Add gnu to libgo headers for tests. * src_libgo_go_go_build_syslist.go.diff: Add gnu to the goosList. * src_libgo_go_syscall_syscall_gnu_test.go.diff: gnu-specific file for tests involving str

[PATCH], make Float128 built-in functions work with -mabi=ieeelongdouble

2017-11-10 Thread Michael Meissner
This patch updates the float128 built-in functions that get/set exponents, get mantissa, and do tests to work with _Float128 on the current system, and with long double when -mabi=ieeelongdouble is used. The issue is when long double == IEEE, we use TFmode instead of KFmode. I decided to fix this

[PATCH] [ARC] update GLIBC_DYNAMIC_LINKER per glibc upstreaming review comments

2017-11-10 Thread Vineet Gupta
gcc/ * config/arc/linux.h: GLIBC_DYNAMIC_LINKER update per glibc upstreaming review comments Link: http://lists.infradead.org/pipermail/linux-snps-arc/2017-June/002634.html Signed-off-by: Vineet Gupta --- ChangeLog | 5 + gcc/config/arc/linux.h | 2 +- 2 files ch

Re: [PATCH, Fortran] Fix PR 82886 - ICE with -finit-derived in gfc_conv_expr

2017-11-10 Thread Steve Kargl
On Fri, Nov 10, 2017 at 04:35:56PM -0500, Fritz Reese wrote: > My mistake, the patch file should not have the random changes to > libiberty/functions.texi. Not sure how that ended up there. > > > > PR fortran/82886 > > gcc/fortran/ > > * gfortran.h (gfc_build_init_expr): New

Re: [RFTesting] New POINTER_DIFF_EXPR

2017-11-10 Thread Marc Glisse
Adding some random cc: to people who might be affected. Hopefully I am not breaking any of your stuff... Ulrich Weigand (address space) Ilya Enkovich (pointer bound check) DJ Delorie (target with 24-bit partial mode pointer) If you want to give it a try, or just take a quick look to check that

fix -fcompare-debug OBJ_TYPE_REF dumps of linker plugin-less LTO builds

2017-11-10 Thread Alexandre Oliva
There are two patches below. Each one of them fixes the problem described below by itself, and both would also fix it together. The former preserves OBJ_TYPE_REF type info in all dumps that should/would have it, even after TYPE_BINFO is reset to release its memory. To that end, it requires chang

[PATCH] Minor tweak to libstdc++ testsuite helper type

2017-11-10 Thread Jonathan Wakely
There's no need to use the THROW macro for this type, as it's only defined for C++11 and up anyway. * testsuite/util/testsuite_tr1.h (ThrowMoveConsClass): Use noexcept. Tested powerpc64le-linux, committed to trunk. commit d2049661a973dcc3ea22113432ebc9de0f3dbe74 Author: Jonathan Wakely

Re: bootstrap-debug-lean + flags in producer vs compare

2017-11-10 Thread Alexandre Oliva
On Oct 30, 2017, Jeff Law wrote: > I'd support either or both. Your call. Thanks. I think I'll go with both, then. Ok to install as follows? (edited the comments and added a ChangeLog) Use compare-debug for bootstrap-debug-lean to ignore != DW_AT_producer Unlike bootstrap-debug, bootstrap-

Re: [PATCH] avoid -Wstringop-truncation in Darwin bootstrap

2017-11-10 Thread Mike Stump
On Nov 10, 2017, at 12:36 PM, Martin Sebor wrote: > > The warning is included in -Wall Ah, I missed that little detail the first time around. -Wall is special in that we already just sanitize the source to pass it. I assumed it was a non-wall flag someone added or wanted to add to the bootst

Re: [PATCH, Fortran] Fix PR 82886 - ICE with -finit-derived in gfc_conv_expr

2017-11-10 Thread Fritz Reese
On Fri, Nov 10, 2017 at 6:40 PM, Steve Kargl wrote: > On Fri, Nov 10, 2017 at 04:35:56PM -0500, Fritz Reese wrote: >> My mistake, the patch file should not have the random changes to >> libiberty/functions.texi. Not sure how that ended up there. >> > >> > PR fortran/82886 >> > gcc/

RE: [PATCH] Set default to -fomit-frame-pointer

2017-11-10 Thread James Bowman
Andreas Schwab wrote: >> Joseph Myers wrote: >>> On Fri, 3 Nov 2017, Wilco Dijkstra wrote: >>> >>> > Almost all targets add an explict -fomit-frame-pointer in the target >>> > specific >>> > options. Rather than doing this in a target-specific way, do this in the >>> >>> Which targets do not? Yo