[PATCH][GCC][AARCH64] use "arch_enabled" attribute for aarch64.

2018-08-23 Thread Matthew Malcomson
Hello, arm.md has some attributes "arch" and "arch_enabled" to aid enabling and disabling insn alternatives based on the architecture being targeted. This patch introduces a similar attribute in the aarch64 backend. The new attribute will be used to enable a new alternative for the atomic_store in

Re: [Patch][GCC] Document and fix -r (partial linking)

2018-08-23 Thread Iain Sandoe
> On 20 Aug 2018, at 23:38, Joseph Myers wrote: > > On Fri, 3 Aug 2018, Allan Sandfeld Jensen wrote: > >>> I think you're changing the wrong place for this. If you want -r to be >>> usable with GCC without using -nostdlib (which is an interesting >>> question), you actually need to change LIN

[PATCH] Remove C++14-isms from C++11 tests

2018-08-23 Thread Jonathan Wakely
* testsuite/20_util/reference_wrapper/lwg2993.cc: Fix C++11 test to not use C++14 feature. * testsuite/23_containers/list/68222_neg.cc: Likewise. Tested x86_64-linux, committed to trunk. commit 7125051d44c2f4e52641658b7a35a26379f2db17 Author: Jonathan Wakely Date: Thu

[PATCH] Skip tests that depend on the cxx11 std::string

2018-08-23 Thread Jonathan Wakely
* testsuite/21_strings/basic_string/init-list.cc: Require cxx11-abi. * testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc: Likewise. * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc: Likewise. Tested x86_64-linux

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-23 Thread Bernd Edlinger
On 08/23/18 00:50, Jeff Law wrote: > On 08/22/2018 02:14 AM, Richard Biener wrote: >> On Wed, 22 Aug 2018, Bernd Edlinger wrote: >> >>> On 08/22/18 09:26, Richard Biener wrote: On Wed, 22 Aug 2018, Bernd Edlinger wrote: > On 08/21/18 10:59, Richard Biener wrote: >> On Tue, 21 Aug

Fix aarch64_evpc_tbl guard (PR 85910)

2018-08-23 Thread Richard Sandiford
This patch fixes a typo in aarch64_expand_vec_perm_const_1 that I introduced as part of the SVE changes. I don't know of any cases in which it has any practical effect, since we'll eventually try to use TBL as a variable permute instead. Having the code is still an important part of defining the

[AArch64] Improve SVE handling of single-vector permutes

2018-08-23 Thread Richard Sandiford
aarch64_vectorize_vec_perm_const was failing to set one_vector_p if the permute had only a single input. This in turn was hiding a problem in the SVE TBL handling: it accepted single-vector variable-length permutes, but sent them through the general two-vector aarch64_expand_sve_vec_perm, which is

Handle SLP permutations for variable-length vectors

2018-08-23 Thread Richard Sandiford
The SLP code currently punts for all variable-length permutes. This patch makes it handle the easy case of N->N permutes in which the number of vector lanes is a multiple of N. Every permute then uses the same mask, and that mask repeats (with a stride) every N elements. The patch uses the same p

Re: [PATCH] Skip tests that depend on the cxx11 std::string

2018-08-23 Thread Jonathan Wakely
On 23/08/18 09:24 +0100, Jonathan Wakely wrote: --- a/libstdc++-v3/testsuite/21_strings/basic_string/init-list.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/init-list.cc @@ -17,6 +17,7 @@ // // { dg-do run { target c++11 } } +// { dg-require-effective-target cxx11-abi } Actually I sh

Avoid is_constant calls in vectorizable_bswap

2018-08-23 Thread Richard Sandiford
The "new" VEC_PERM_EXPR handling makes it easy to support bswap for variable-length vectors. Tested on aarch64-linux-gnu (with and without SVE), aarch64_be-elf and x86_64-linux-gnu. OK to install? Richard 2018-08-23 Richard Sandiford gcc/ * tree-vect-stmts.c (vectorizable_bswap): H

RFA: Define vect_perm for variable-length SVE

2018-08-23 Thread Richard Sandiford
Variable-length SVE now supports enough permutes to define vect_perm. The change to vect_perm_supported is currently a no-op because the function is only called with a count of 3. Tested on aarch64-linux-gnu (with and without SVE), aarch64_be-elf and x86_64-linux-gnu. OK for the vect_perm_suppor

Re: [PATCH] Improve checks in c_strlen (PR 87053)

2018-08-23 Thread Bernd Edlinger
On 08/22/18 18:28, Martin Sebor wrote: > On 08/22/2018 08:41 AM, Bernd Edlinger wrote: >> Hi! >> >> >> This patch adds some more checks to c_getstr to fix PR middle-end/87053 >> wrong code bug. >> >> Unfortunately this patch alone is not sufficient to fix the problem, >> but also the patch for PR 8

[PATCH] Fix PR87024

2018-08-23 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk sofar. Richard. 2018-08-23 Richard Biener PR middle-end/87024 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len calls. * gcc.dg/pr87024.c: New testcase. diff --git a/gcc/t

PR target/86951 arm - Handle speculation barriers on pre-armv7 CPUs

2018-08-23 Thread Richard Earnshaw (lists)
The AArch32 instruction sets prior to Armv7 do not define the ISB and DSB instructions that are needed to form a speculation barrier. While I do not know of any instances of cores based on those instruction sets being vulnerable to speculative side channel attacks it is possible to run code built

Re: VRP: make range_includes_zero_p handle value_ranges

2018-08-23 Thread Richard Biener
On Wed, Aug 22, 2018 at 11:31 AM Aldy Hernandez wrote: > > > > On 08/21/2018 05:46 AM, Richard Biener wrote: > > On Wed, Aug 15, 2018 at 3:33 AM Aldy Hernandez wrote: > > >> Finally, my apologies for including a tiny change to the > >> POINTER_PLUS_EXPR handling code as well. It came about the s

Re: [PATCH] Optimise sqrt reciprocal multiplications

2018-08-23 Thread Richard Sandiford
Kyrill Tkachov writes: > Hi all, > > This patch aims to optimise sequences involving uses of 1.0 / sqrt (a) under > -freciprocal-math and -funsafe-math-optimizations. > In particular consider: > > x = 1.0 / sqrt (a); > r1 = x * x; // same as 1.0 / a > r2 = a * x; // same as sqrt (a) > > If x, r

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-23 Thread Bernd Edlinger
On 08/22/18 10:14, Richard Biener wrote: > On Wed, 22 Aug 2018, Bernd Edlinger wrote: > >> On 08/22/18 09:26, Richard Biener wrote: >>> On Wed, 22 Aug 2018, Bernd Edlinger wrote: >>> On 08/21/18 10:59, Richard Biener wrote: > On Tue, 21 Aug 2018, Bernd Edlinger wrote: > >> gcc -S

Re: [PATCH][RFC] Add gimple-cfg.h.

2018-08-23 Thread Martin Liška
On 08/21/2018 03:55 PM, Richard Biener wrote: > On Tue, Aug 21, 2018 at 2:58 PM Martin Liška wrote: >> >> Hi. >> >> I'm considering adding couple of new gimple-related functions that >> are related to gswitch statement. >> >> Is it a good idea? > > Just add them to tree-cfg.h? That's what should

Re: [PATCH] Use more DECL_BUILT_IN_P macro.

2018-08-23 Thread Martin Liška
On 08/20/2018 10:34 AM, Richard Biener wrote: > On Wed, Aug 15, 2018 at 2:52 PM Martin Liška wrote: >> >> On 08/14/2018 06:02 PM, Martin Sebor wrote: >>> On 08/14/2018 03:06 AM, Martin Liška wrote: Hi. The patch adds more usages of the new macro. I hope it improves readability

Re: [PATCH] Skip tests that depend on the cxx11 std::string

2018-08-23 Thread Jonathan Wakely
On 23/08/18 10:03 +0100, Jonathan Wakely wrote: On 23/08/18 09:24 +0100, Jonathan Wakely wrote: --- a/libstdc++-v3/testsuite/21_strings/basic_string/init-list.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/init-list.cc @@ -17,6 +17,7 @@ // // { dg-do run { target c++11 } } +// { dg-req

Re: [PATCH] Print default options selection for -march,-mcpu and -mtune for aarch64 (PR driver/83193).

2018-08-23 Thread Martin Liška
PING^1 On 08/02/2018 11:46 AM, Martin Liška wrote: > On 08/02/2018 11:39 AM, Richard Earnshaw (lists) wrote: >> On 18/07/18 16:48, Martin Liška wrote: >>> Hi. >>> >>> This is aarch64 fix for PR83193. It's about setting of default options >>> so that --help=target -Q prints proper numbers: >>> >>>

Re: [PATCH] Provide extension hint for aarch64 target (PR driver/83193).

2018-08-23 Thread Martin Liška
PING^2 On 08/01/2018 03:56 PM, Martin Liška wrote: > PING^1 > > On 07/18/2018 05:49 PM, Martin Liška wrote: >> Hi. >> >> This patch improves aarch64 feature modifier hints. >> >> May I please ask ARM folks to test the patch? >> Thanks, >> Martin >> >> gcc/ChangeLog: >> >> 2018-07-18 Martin Liska

Re: Allow target to emit LTO early debug to a separate LTO file.

2018-08-23 Thread Richard Biener
On Wed, Aug 22, 2018 at 10:09 PM Iain Sandoe wrote: > > Hi Tom, Richi, > > This is something I was experimenting with to try and solve platform problems > with early debug. > > Not a “finished patch” (I’ve removed the Darwin back-end parts) but would > like your comments on the central idea. > >

[PATCH] Remove verify_no_unreachable_blocks

2018-08-23 Thread Richard Biener
This removes verify_no_unreachable_blocks and implements checking for unreachable blocks in inverted_post_order_compute by simply looking if we reach a block without predecessors that is not the entry block. This solves a problem I ran into when (ab-)using BB_REACHABLE in a pass and I got compar

Re: Allow target to emit LTO early debug to a separate LTO file.

2018-08-23 Thread Tom de Vries
On 08/22/2018 10:09 PM, Iain Sandoe wrote: > Hi Tom, Richi, > > This is something I was experimenting with to try and solve platform problems > with early debug. > > Not a “finished patch” Hmm, not a building patch either. > (I’ve removed the Darwin back-end parts) but would like your comment

Re: patch to bug #86829

2018-08-23 Thread Giuliano Augusto Faulin Belinassi
> > Ah, a runtime test. That'd be sufficient. The cost when we can't do > the transformation is relatively small, but the gains when we can are huge. Thank you. I will update the patch and send it again :-) On Wed, Aug 22, 2018 at 7:05 PM, Jeff Law wrote: > On 08/22/2018 06:02 AM, Richard Bien

Re: [PATCH] Skip tests that depend on the cxx11 std::string

2018-08-23 Thread Jonathan Wakely
On 23/08/18 11:52 +0100, Jonathan Wakely wrote: On 23/08/18 10:03 +0100, Jonathan Wakely wrote: On 23/08/18 09:24 +0100, Jonathan Wakely wrote: --- a/libstdc++-v3/testsuite/21_strings/basic_string/init-list.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/init-list.cc @@ -17,6 +17,7 @@ /

Re: [PATCH] Remove verify_no_unreachable_blocks

2018-08-23 Thread Steven Bosscher
On Thu, Aug 23, 2018 at 1:18 PM Richard Biener <> wrote: > -/* Verify that there are no unreachable blocks in the current function. */ > - > -void > -verify_no_unreachable_blocks (void) > -{ > - find_unreachable_blocks (); > - > - basic_block bb; > - FOR_EACH_BB_FN (bb, cfun) > -gcc_assert

Re: Allow target to emit LTO early debug to a separate LTO file.

2018-08-23 Thread Richard Biener
On Thu, Aug 23, 2018 at 1:19 PM Tom de Vries wrote: > > On 08/22/2018 10:09 PM, Iain Sandoe wrote: > > Hi Tom, Richi, > > > > This is something I was experimenting with to try and solve platform > > problems with early debug. > > > > Not a “finished patch” > > Hmm, not a building patch either. >

Re: [PATCH] Remove verify_no_unreachable_blocks

2018-08-23 Thread Richard Biener
On Thu, 23 Aug 2018, Steven Bosscher wrote: > On Thu, Aug 23, 2018 at 1:18 PM Richard Biener <> wrote: > > -/* Verify that there are no unreachable blocks in the current function. */ > > - > > -void > > -verify_no_unreachable_blocks (void) > > -{ > > - find_unreachable_blocks (); > > - > > - ba

Re: [PATCH] Remove verify_no_unreachable_blocks

2018-08-23 Thread Tom de Vries
On 08/23/2018 01:18 PM, Richard Biener wrote: > This removes verify_no_unreachable_blocks and implements checking > for unreachable blocks in inverted_post_order_compute by simply > looking if we reach a block without predecessors that is not the > entry block. > I think that doesn't detect unrea

Re: Allow target to emit LTO early debug to a separate LTO file.

2018-08-23 Thread Iain Sandoe
> On 23 Aug 2018, at 12:37, Richard Biener wrote: > > On Thu, Aug 23, 2018 at 1:19 PM Tom de Vries wrote: >> >> On 08/22/2018 10:09 PM, Iain Sandoe wrote: >>> Hi Tom, Richi, >>> >>> This is something I was experimenting with to try and solve platform >>> problems with early debug. >>> >>>

Re: [PATCH] Use more DECL_BUILT_IN_P macro.

2018-08-23 Thread Richard Biener
On Thu, Aug 23, 2018 at 12:46 PM Martin Liška wrote: > > On 08/20/2018 10:34 AM, Richard Biener wrote: > > On Wed, Aug 15, 2018 at 2:52 PM Martin Liška wrote: > >> > >> On 08/14/2018 06:02 PM, Martin Sebor wrote: > >>> On 08/14/2018 03:06 AM, Martin Liška wrote: > Hi. > > The patch

Re: C++ PATCH for c++/87029, Implement -Wredundant-move

2018-08-23 Thread Jason Merrill
On Thu, Aug 23, 2018 at 12:12 PM, Marek Polacek wrote: > Now that we have -Wpessimizing-move implemented, it was fairly easy to extend > it to -Wredundant-move, which warns about redundant calls to std::move; it's > supposed to detect cases where the compiler is obliged to treat an object as > if

Re: Walk pointer_to and reference_to chain in free_lang_data

2018-08-23 Thread Jan Hubicka
> > tree type_decl = build_decl (input_location, TYPE_DECL, > > > >get_identifier ("__asan_global"), ret); > > > > DECL_IGNORED_P (type_decl) = 1; > > > > DECL_ARTIFICIAL (type_d

[PATCH] Fix recent bug in canonicalize_comparison (PR87026)

2018-08-23 Thread Segher Boessenkool
The new code testing which way a comparison is best expressed creates a pseudoregister (by hand) and creates some insns with that. Such insns will no longer recog() when pseudo-registers are no longer aloowed (after reload). But we have an ifcvt pass after reload (ce3). This patch simply returns

Re: [PATCH] Remove verify_no_unreachable_blocks

2018-08-23 Thread Richard Biener
On Thu, 23 Aug 2018, Tom de Vries wrote: > On 08/23/2018 01:18 PM, Richard Biener wrote: > > This removes verify_no_unreachable_blocks and implements checking > > for unreachable blocks in inverted_post_order_compute by simply > > looking if we reach a block without predecessors that is not the >

Re: Walk pointer_to and reference_to chain in free_lang_data

2018-08-23 Thread Jan Hubicka
Hi this patch takes care of gcov. There are two oddities. First that gcov uses langhook to produce new records while asan gets around with make_node. I think both are middle-end types and in the direction of separating front-ends and middle-ends better the langhooks are not desirable. The TYPE_ST

Re: Walk pointer_to and reference_to chain in free_lang_data

2018-08-23 Thread Richard Biener
On Thu, 23 Aug 2018, Jan Hubicka wrote: > > > tree type_decl = build_decl (input_location, TYPE_DECL, > > > > > >get_identifier ("__asan_global"), ret); > > > > > > DECL_IGNORED_P (type_decl) = 1;

Re: [PATCH] Fix recent bug in canonicalize_comparison (PR87026)

2018-08-23 Thread Richard Biener
On Thu, Aug 23, 2018 at 2:05 PM Segher Boessenkool wrote: > > The new code testing which way a comparison is best expressed creates > a pseudoregister (by hand) and creates some insns with that. Such > insns will no longer recog() when pseudo-registers are no longer > aloowed (after reload). But

Re: Walk pointer_to and reference_to chain in free_lang_data

2018-08-23 Thread Richard Biener
On Thu, 23 Aug 2018, Jan Hubicka wrote: > Hi > this patch takes care of gcov. There are two oddities. First that gcov uses > langhook to produce new records while asan gets around with make_node. > I think both are middle-end types and in the direction of separating > front-ends > and middle-end

Re: Async I/O patch with compilation fix

2018-08-23 Thread David Edelsohn
Thomas, After your complaint about bootstrap on gcc119, I tried it again. My bootstrap worked correctly. I used exactly the public instructions. Others have been able to bootstrap on gcc119. The problem is local to you. Does your environment have any special variables? You can see the bootstr

Re: Walk pointer_to and reference_to chain in free_lang_data

2018-08-23 Thread Jan Hubicka
> On Thu, 23 Aug 2018, Jan Hubicka wrote: > > > Hi > > this patch takes care of gcov. There are two oddities. First that gcov uses > > langhook to produce new records while asan gets around with make_node. > > I think both are middle-end types and in the direction of separating > > front-ends >

Do not stream TYPE_STUB_DECL

2018-08-23 Thread Jan Hubicka
Hi, this patch removes streaming of TYPE_STUB_DECL. The sanity checking part depends on the coverage change but I may just drop it (though I think it is useful as a sanity check that things are consistend within the middle-end). lto-bootstrapped/regtested x86_64-linux, OK? Honza * ipa-ut

[PATCH] Do not read gcda files multiple times (PR gcov-profile/87069).

2018-08-23 Thread Martin Liška
Hi. This is simple fix of situation when a source file is passed on command line multiple times. I'm planning to install that if no objection. Survives regression tests of gcov.exp. Martin gcc/ChangeLog: 2018-08-23 Martin Liska PR gcov-profile/87069 * gcov.c (process_file):

Re: [PATCH][GCC][AARCH64] use "arch_enabled" attribute for aarch64.

2018-08-23 Thread Richard Earnshaw (lists)
On 23/08/18 08:23, Matthew Malcomson wrote: > Hello, > > arm.md has some attributes "arch" and "arch_enabled" to aid enabling and > disabling insn alternatives based on the architecture being targeted. > This patch introduces a similar attribute in the aarch64 backend. > The new attribute will be

Re: VRP: rewrite the division code (to handle corner cases including 0)

2018-08-23 Thread Richard Biener
On Tue, Aug 21, 2018 at 7:35 PM Aldy Hernandez wrote: > > > > On 08/21/2018 05:46 AM, Richard Biener wrote: > > On Wed, Aug 15, 2018 at 3:33 AM Aldy Hernandez wrote: > >> > >> Howdy! > >> > >> In auditing the *_DIV_EXPR code I noticed that we were really botching > >> some divisions where the div

Re: Async I/O patch with compilation fix

2018-08-23 Thread David Edelsohn
Thomas, Once the plural.c file has been re-generated incorrectly using the local Yacc, it must be deleted and checked out again. Did you pull it fresh from the repository in your AIX tree after the incorrect checkout? Thanks, David On Wed, Aug 22, 2018 at 5:30 PM Thomas Koenig wrote: > Hi Da

Re: [PATCH] print full STRING_CST in Gimple dumps (PR 87052)

2018-08-23 Thread Richard Biener
On Wed, Aug 22, 2018 at 5:05 PM Martin Sebor wrote: > > On 08/22/2018 06:48 AM, Richard Biener wrote: > > On Wed, Aug 22, 2018 at 4:56 AM Martin Sebor wrote: > >> > >> In the discussion of the fallout from the enhancement for pr71625 > >> it was pointed out that STRING_CSts in Gimple dumps extend

Re: [PATCH] DWARF: Call set_indirect_string on DW_MACINFO_start_file

2018-08-23 Thread Richard Biener
On Wed, Aug 22, 2018 at 9:36 PM H.J. Lu wrote: > > Since -gsplit-dwarf -g3 will output filename as indirect string, call > set_indirect_string on DW_MACINFO_start_file for -gsplit-dwarf -g3. > > OK for trunk? Can you add a testcase? Richard. > H.J. > -- > PR debug/79342 > * dwar

Re: [PATCH] treat -Wxxx-larger-than=HWI_MAX special (PR 86631)

2018-08-23 Thread Richard Biener
On Thu, Aug 23, 2018 at 12:20 AM Martin Sebor wrote: > > On 08/20/2018 06:14 AM, Richard Biener wrote: > > On Thu, Jul 26, 2018 at 10:52 PM Martin Sebor wrote: > >> > >> On 07/26/2018 08:58 AM, Martin Sebor wrote: > >>> On 07/26/2018 02:38 AM, Richard Biener wrote: > On Wed, Jul 25, 2018 at

Re: VRP: rewrite the division code (to handle corner cases including 0)

2018-08-23 Thread Aldy Hernandez
On 08/23/2018 08:51 AM, Richard Biener wrote: On Tue, Aug 21, 2018 at 7:35 PM Aldy Hernandez wrote: On 08/21/2018 05:46 AM, Richard Biener wrote: On Wed, Aug 15, 2018 at 3:33 AM Aldy Hernandez wrote: Howdy! In auditing the *_DIV_EXPR code I noticed that we were really botching some d

Re: RFA: Define vect_perm for variable-length SVE

2018-08-23 Thread Richard Biener
On Thu, Aug 23, 2018 at 11:15 AM Richard Sandiford wrote: > > Variable-length SVE now supports enough permutes to define vect_perm. > > The change to vect_perm_supported is currently a no-op because the > function is only called with a count of 3. > > Tested on aarch64-linux-gnu (with and without

Re: [PATCH] Remove verify_no_unreachable_blocks

2018-08-23 Thread Tom de Vries
On 08/23/2018 02:06 PM, Richard Biener wrote: > On Thu, 23 Aug 2018, Tom de Vries wrote: > >> On 08/23/2018 01:18 PM, Richard Biener wrote: >>> This removes verify_no_unreachable_blocks and implements checking >>> for unreachable blocks in inverted_post_order_compute by simply >>> looking if we re

Re: [PATCH] Use more DECL_BUILT_IN_P macro.

2018-08-23 Thread Martin Liška
On 08/23/2018 01:58 PM, Richard Biener wrote: > On Thu, Aug 23, 2018 at 12:46 PM Martin Liška wrote: >> >> On 08/20/2018 10:34 AM, Richard Biener wrote: >>> On Wed, Aug 15, 2018 at 2:52 PM Martin Liška wrote: On 08/14/2018 06:02 PM, Martin Sebor wrote: > On 08/14/2018 03:06 AM, Mart

Re: VEC_DUPLICATE_EXPR options (was Re: [PATCH, RFC, rs6000] enable GIMPLE folding of vec_splat)

2018-08-23 Thread Richard Biener
On Sat, Aug 18, 2018 at 7:01 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Tue, Aug 7, 2018 at 9:25 PM Will Schmidt > > wrote: > >> > >> Hi > >> Enable GIMPLE folding of the vec_splat() intrinsic. > >> > >> For review.. feedback is expected. :-) > >> > >> I came up with the foll

Re: C++ PATCH for c++/87029, Implement -Wredundant-move

2018-08-23 Thread David Malcolm
On Wed, 2018-08-22 at 20:12 -0400, Marek Polacek wrote: > Now that we have -Wpessimizing-move implemented, it was fairly easy > to extend > it to -Wredundant-move, which warns about redundant calls to > std::move; it's > supposed to detect cases where the compiler is obliged to treat an > object as

[PATCH] fix typo 'exapnded' to 'expanded'

2018-08-23 Thread Giuliano Augusto Faulin Belinassi
There was a small typo in the current version of trunk, more precisely in genmatch.c and exp_unst.ads. This patch fixes it. Changelog: 2018-08-23 Giuliano Belinassi * genmatch.c: Fix typo 'exapnded' to 'expanded'. * exp_unst.ads: Likewise. I don't think this requires a test case :P In

Re: [PATCH] Use more DECL_BUILT_IN_P macro.

2018-08-23 Thread Richard Biener
On Thu, Aug 23, 2018 at 3:30 PM Martin Liška wrote: > > On 08/23/2018 01:58 PM, Richard Biener wrote: > > On Thu, Aug 23, 2018 at 12:46 PM Martin Liška wrote: > >> > >> On 08/20/2018 10:34 AM, Richard Biener wrote: > >>> On Wed, Aug 15, 2018 at 2:52 PM Martin Liška wrote: > > On 08/14/

Re: [PATCH] print full STRING_CST in Gimple dumps (PR 87052)

2018-08-23 Thread Michael Matz
Hi, On Thu, 23 Aug 2018, Richard Biener wrote: > > > Can you write a not \0 terminated string literal in C? > > > > Yes: char a[2] = "12"; > > I thought they are fully defined in translation phase #1 ... No, you can't write a string literal which is not zero terminated, because in translation

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-23 Thread Jeff Law
On 08/23/2018 04:21 AM, Bernd Edlinger wrote: > On 08/22/18 10:14, Richard Biener wrote: >> On Wed, 22 Aug 2018, Bernd Edlinger wrote: >> >>> On 08/22/18 09:26, Richard Biener wrote: On Wed, 22 Aug 2018, Bernd Edlinger wrote: > On 08/21/18 10:59, Richard Biener wrote: >> On Tue, 2

Re: C++ PATCH for c++/87029, Implement -Wredundant-move

2018-08-23 Thread Marek Polacek
On Thu, Aug 23, 2018 at 09:51:43AM -0400, David Malcolm wrote: > On Wed, 2018-08-22 at 20:12 -0400, Marek Polacek wrote: > > Now that we have -Wpessimizing-move implemented, it was fairly easy > > to extend > > it to -Wredundant-move, which warns about redundant calls to > > std::move; it's > > sup

[PATCH] C++: underline param in print_conversion_rejection (more PR c++/85110)

2018-08-23 Thread David Malcolm
Consider this bogus code (from g++.dg/diagnostic/param-type-mismatch-2.C): struct s4 { static int member_1 (int one, const char **two, float three); }; int test_4 (int first, const char *second, float third) { return s4::member_1 (first, second, third); } Before this patch, g++ emits: demo.cc

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-23 Thread Jeff Law
On 08/22/2018 11:40 PM, Bernd Edlinger wrote: > On 08/23/18 01:36, Jeff Law wrote: >> On 08/22/2018 05:22 PM, Bernd Edlinger wrote: >>> On 08/23/18 00:50, Jeff Law wrote: On 08/22/2018 02:14 AM, Richard Biener wrote: > On Wed, 22 Aug 2018, Bernd Edlinger wrote: > >> On 08/22/18 09:

Re: [PATCH] DWARF: Call set_indirect_string on DW_MACINFO_start_file

2018-08-23 Thread H.J. Lu
On Thu, Aug 23, 2018 at 5:56 AM, Richard Biener wrote: > On Wed, Aug 22, 2018 at 9:36 PM H.J. Lu wrote: >> >> Since -gsplit-dwarf -g3 will output filename as indirect string, call >> set_indirect_string on DW_MACINFO_start_file for -gsplit-dwarf -g3. >> >> OK for trunk? > > Can you add a testcase

Re: [PATCH] Use more DECL_BUILT_IN_P macro.

2018-08-23 Thread Martin Liška
On 08/23/2018 03:58 PM, Richard Biener wrote: > On Thu, Aug 23, 2018 at 3:30 PM Martin Liška wrote: >> >> On 08/23/2018 01:58 PM, Richard Biener wrote: >>> On Thu, Aug 23, 2018 at 12:46 PM Martin Liška wrote: On 08/20/2018 10:34 AM, Richard Biener wrote: > On Wed, Aug 15, 2018 at 2:

Re: C++ PATCH for c++/87029, Implement -Wredundant-move

2018-08-23 Thread Marek Polacek
On Thu, Aug 23, 2018 at 11:59:13PM +1200, Jason Merrill wrote: > On Thu, Aug 23, 2018 at 12:12 PM, Marek Polacek wrote: > > +Wredundant-move > > +C++ ObjC++ Var(warn_redundant_move) Warning LangEnabledBy(C++ ObjC++, Wall) > > +Warn about redundant calls to std::move. > > I don't think this belong

Re: Fix aarch64_evpc_tbl guard (PR 85910)

2018-08-23 Thread Richard Earnshaw (lists)
On 23/08/18 09:52, Richard Sandiford wrote: > This patch fixes a typo in aarch64_expand_vec_perm_const_1 that I > introduced as part of the SVE changes. I don't know of any cases in > which it has any practical effect, since we'll eventually try to use > TBL as a variable permute instead. Having

Re: [PATCH] Print default options selection for -march,-mcpu and -mtune for aarch64 (PR driver/83193).

2018-08-23 Thread Richard Earnshaw (lists)
On 02/08/18 10:46, Martin Liška wrote: > On 08/02/2018 11:39 AM, Richard Earnshaw (lists) wrote: >> On 18/07/18 16:48, Martin Liška wrote: >>> Hi. >>> >>> This is aarch64 fix for PR83193. It's about setting of default options >>> so that --help=target -Q prints proper numbers: >>> >>> Now this is s

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-23 Thread Bernd Edlinger
On 08/23/18 16:24, Jeff Law wrote: >> >> Yes, and which one was the earlier, more controversial patch from me? > > https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01800.html > > > Which is the issue I'm working through right now :-) > Okay, please note that a re-based patch is here: https://gcc

Re: VRP: make range_includes_zero_p handle value_ranges

2018-08-23 Thread Aldy Hernandez
On 08/23/2018 05:59 AM, Richard Biener wrote: On Wed, Aug 22, 2018 at 11:31 AM Aldy Hernandez wrote: On 08/21/2018 05:46 AM, Richard Biener wrote: On Wed, Aug 15, 2018 at 3:33 AM Aldy Hernandez wrote: Finally, my apologies for including a tiny change to the POINTER_PLUS_EXPR handling

Re: C++ PATCH for c++/87029, Implement -Wredundant-move

2018-08-23 Thread Marek Polacek
On Thu, Aug 23, 2018 at 10:44:30AM -0400, Marek Polacek wrote: > +T > +fn3 (const T t) > +{ > + // t is const: will decay into move. > + return t; > +} > + > +T > +fn4 (const T t) > +{ > + // t is const: will decay into move despite std::move, so it's redundant. > + return std::move (t); // { d

Re: [PATCH] Fix tests that fail in C++98 mode

2018-08-23 Thread Jonathan Wakely
On 23/08/18 00:42 +0100, Jonathan Wakely wrote: * testsuite/23_containers/deque/capacity/max_size.cc: Fix test for C++98 mode. * testsuite/23_containers/deque/modifiers/assign/1.cc: Likewise. * testsuite/23_containers/list/modifiers/assign/1.cc: Likewise. *

Re: [PATCH] print full STRING_CST in Gimple dumps (PR 87052)

2018-08-23 Thread Martin Sebor
On 08/23/2018 08:07 AM, Michael Matz wrote: Hi, On Thu, 23 Aug 2018, Richard Biener wrote: Can you write a not \0 terminated string literal in C? Yes: char a[2] = "12"; I thought they are fully defined in translation phase #1 ... No, you can't write a string literal which is not zero ter

Re: PR libstdc++/68222 Hide safe iterator operators

2018-08-23 Thread Jonathan Wakely
On 23/08/18 15:29 +0100, Jonathan Wakely wrote: On 23/08/18 08:51 +0100, Jonathan Wakely wrote: On 21/08/18 22:18 +0200, François Dumont wrote: On 21/08/2018 11:33, Jonathan Wakely wrote: On 18/08/18 22:31 +0200, François Dumont wrote: Here is the new proposal. It is indeed possible to keep _

Re: [PATCH][Middle-end]patch for fixing PR 86519

2018-08-23 Thread Qing Zhao
> On Aug 22, 2018, at 5:01 PM, Jeff Law wrote: > > On 08/22/2018 11:05 AM, Qing Zhao wrote: >> >>> On Aug 22, 2018, at 10:50 AM, Rainer Orth >>> wrote: >>> >>> Hi Qing, >>> From the comments you put into PR86519, for SPARC, looks like that only 32-bit sparc has the problem.

Re: C++ PATCH for c++/67012, c++/86942, detect invalid cases with function return type deduction

2018-08-23 Thread Marek Polacek
On Tue, Aug 21, 2018 at 11:59:06PM +1200, Jason Merrill wrote: > On Fri, Aug 17, 2018 at 2:17 PM, Marek Polacek wrote: > > As I promised in , > > this patch fixes a couple of invalid cases we weren't detecting. It's got > > testcases from

Re: [PATCH] fix typo 'exapnded' to 'expanded'

2018-08-23 Thread Richard Sandiford
Giuliano Augusto Faulin Belinassi writes: > There was a small typo in the current version of trunk, more precisely > in genmatch.c and exp_unst.ads. This patch fixes it. > > Changelog: > > 2018-08-23 Giuliano Belinassi > > * genmatch.c: Fix typo 'exapnded' to 'expanded'. > * exp_unst.ads

Re: [PATCH] Optimise sqrt reciprocal multiplications

2018-08-23 Thread Kyrill Tkachov
Hi Richard, On 23/08/18 11:13, Richard Sandiford wrote: Kyrill Tkachov writes: Hi all, This patch aims to optimise sequences involving uses of 1.0 / sqrt (a) under -freciprocal-math and -funsafe-math-optimizations. In particular consider: x = 1.0 / sqrt (a); r1 = x * x; // same as 1.0 / a

[PATCH] C++: highlight bad argument in some users of print_z_candidates (more PR c++/85110)

2018-08-23 Thread David Malcolm
This is a followup to: "[PATCH] C++: underline param in print_conversion_rejection (more PR c++/85110)" https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01480.html to highlight the pertinent argument in a unmatched function call for which there is one candidate. It updates the output from:

Re: Async I/O patch with compilation fix

2018-08-23 Thread Thomas Koenig
David, I will take the "thank you for restoring bootstrap for AIX" as implied in your e-mail. Second, the patch that you applied is unacceptable.  ASYNC_IO already is set to zero for AIX. There is a clear procedure for this something that you deem "unacceptable": Submit a patch (for which I p

Fix typo "permutaion" in vect_grouped_store_supported.

2018-08-23 Thread Prathamesh Kulkarni
Committed as obvious in r263819. Regards, Prathamesh 2018-08-23 Prathamesh Kulkarni * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo "permutaion". diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index d70d207c7d2..909728919c7 100644 --- a/gcc

[PATCH,FORTRAN] Remove OS dependency in definition of ASYNC_IO

2018-08-23 Thread David Edelsohn
The recent fix for Async I/O on systems without Gthread cond support added an explicit test for _AIX. This test is unnecessary because __GTHREAD_HAS_COND is not defined on AIX. Protecting the use of __gthread_cond_t inside in the ASYNC_IO macro for the declaration of struct adv_cond is sufficient

Re: [PATCH,FORTRAN] Remove OS dependency in definition of ASYNC_IO

2018-08-23 Thread Thomas Koenig
David, The recent fix for Async I/O on systems without Gthread cond support added an explicit test for _AIX. This test is unnecessary because __GTHREAD_HAS_COND is not defined on AIX. Protecting the use of __gthread_cond_t inside in the ASYNC_IO macro for the declaration of struct adv_cond is

[PATCH] Fix failure when -fno-rtti test is run in C++17 or later

2018-08-23 Thread Jonathan Wakely
* testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource): Only define when RTTI is enabled. Tested x86_64-linux, committed to trunk. commit b79c14098cd52633b680c7186f472028fec64f04 Author: Jonathan Wakely Date: Thu Aug 23 20:25:36 2018 +0100 Fix failure when

[patch, fortran] Fix PR 86837, wrong code regression in implied do loop in i/o

2018-08-23 Thread Thomas König
Hello world, this patch fixes a regression by correctly checking that the innner start, step or end values of an implied do loop do not depend on an outer loop variable. The check was actually done before, but gfc_check_dependency wasn't finding all relevant cases. Regression-tested. OK for tru

PATCH for c++/87068, missing diagnostic with fallthrough statement

2018-08-23 Thread Marek Polacek
The C++ standard says that [[fallthrough]]; at the end of a switch statement is ill-formed: Currently we do check that the statement after a fallthrough statement is a labeled statement, but we didn't warn if a fallthrough statement is at the very end

Re: Make safe_iterator inline friends

2018-08-23 Thread François Dumont
On 22/08/2018 23:45, Jonathan Wakely wrote: On 22/08/18 23:08 +0200, François Dumont wrote: Only operator== and != remains outside _Safe_iterator because all my attempts to make them inline friends failed. I understand that an inline friend within a base class is not a very clean design. Comp

Re: [Patch][GCC] Document and fix -r (partial linking)

2018-08-23 Thread Joseph Myers
On Thu, 23 Aug 2018, Iain Sandoe wrote: > Joseph: As a side-comment, is there a reason that we don’t exclude > gomp/itm/fortran/gcov from the link for -nostdlib / -nodefaultlib? > > If we are relying on the lib self-specs for this, then we’re not > succeeding since the one we build at the momen

OpenRISC Port Submission

2018-08-23 Thread Stafford Horne
Hello, Since February this year I have been working on an OpenRISC clean room rewrite. http://stffrdhrn.github.io/software/embedded/openrisc/2018/02/03/openrisc_gcc_rewrite.html As per the article, the old port had issues with some of the owners signing over FSF copyright. To get around this

Re: [PATCH] treat -Wxxx-larger-than=HWI_MAX special (PR 86631)

2018-08-23 Thread Martin Sebor
On 08/23/2018 07:18 AM, Richard Biener wrote: On Thu, Aug 23, 2018 at 12:20 AM Martin Sebor wrote: On 08/20/2018 06:14 AM, Richard Biener wrote: On Thu, Jul 26, 2018 at 10:52 PM Martin Sebor wrote: On 07/26/2018 08:58 AM, Martin Sebor wrote: On 07/26/2018 02:38 AM, Richard Biener wrote:

Re: OpenRISC Port Submission

2018-08-23 Thread David Edelsohn
Stafford, Thanks for rewriting and contributing the new OpenRISC port for GCC. I have forwarded your request to the GCC Steering Committee to formally accept the contribution. The port still requires a technical review and approval from a GCC Global Reviewer. You mentioned Richard Henderson as c

Re: [patch, fortran] Fix PR 86837, wrong code regression in implied do loop in i/o

2018-08-23 Thread Jerry DeLisle
On 08/23/2018 01:12 PM, Thomas König wrote: Hello world, this patch fixes a regression by correctly checking that the innner start, step or end values of an implied do loop do not depend on an outer loop variable. The check was actually done before, but gfc_check_dependency wasn't finding all r

Re: [PATCH][Middle-end]patch for fixing PR 86519

2018-08-23 Thread Jeff Law
On 08/23/2018 10:13 AM, Qing Zhao wrote: > >> On Aug 22, 2018, at 5:01 PM, Jeff Law wrote: >> >> On 08/22/2018 11:05 AM, Qing Zhao wrote: >>> On Aug 22, 2018, at 10:50 AM, Rainer Orth wrote: Hi Qing, > From the comments you put into PR86519, for SPARC, looks like th

Re: [PATCH] Improve checks in c_strlen (PR 87053)

2018-08-23 Thread Jeff Law
On 08/22/2018 10:28 AM, Martin Sebor wrote: > On 08/22/2018 08:41 AM, Bernd Edlinger wrote: >> Hi! >> >> >> This patch adds some more checks to c_getstr to fix PR middle-end/87053 >> wrong code bug. >> >> Unfortunately this patch alone is not sufficient to fix the problem, >> but also the patch for

Re: [PATCH] Improve checks in c_strlen (PR 87053)

2018-08-23 Thread Jeff Law
On 08/23/2018 03:27 AM, Bernd Edlinger wrote: > On 08/22/18 18:28, Martin Sebor wrote: >> On 08/22/2018 08:41 AM, Bernd Edlinger wrote: >>> Hi! >>> >>> >>> This patch adds some more checks to c_getstr to fix PR middle-end/87053 >>> wrong code bug. >>> >>> Unfortunately this patch alone is not suffi

Re: PING [PATCH] warn for strlen of arrays with missing nul (PR 86552, 86711, 86714) )

2018-08-23 Thread Jeff Law
On 08/02/2018 07:26 AM, Bernd Edlinger wrote: > On 08/02/18 04:44, Martin Sebor wrote: >> Since the foundation of the patch is detecting and avoiding >> the overly aggressive folding of unterminated char arrays, >> besides issuing a warning for such arguments to strlen, >> the patch also fixes pr86