Re: malloc cannot alias preexisting pointers

2019-05-14 Thread Richard Biener
On Mon, May 13, 2019 at 3:38 PM Marc Glisse wrote: > > On Mon, 13 May 2019, Richard Biener wrote: > > > On Sun, May 12, 2019 at 2:51 PM Marc Glisse wrote: > >> > >> On Sun, 12 May 2019, Richard Sandiford wrote: > >> > >>> Marc Glisse writes: > Hello, > > this patch lets gcc know t

Re: [PATCH v2 1/3] Move prepare_decl_rtl to expr.[ch] as extern

2019-05-14 Thread Richard Biener
On Tue, May 14, 2019 at 5:09 AM wrote: > > From: Kewen Lin > > Previous version link: > https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00912.html > > This is a NFC (no functional change) patch. Ivopts has > some codes to expand gimple to RTL seq, but before call > expanding, we should call a prep

Re: [PATCH v2 2/3] Add predict_doloop_p target hook

2019-05-14 Thread Richard Biener
On Tue, May 14, 2019 at 5:10 AM wrote: > > From: Kewen Lin > > Previous version link for background: > https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00912.html > > This hook is to predict whether one loop in gimple will > be transformed to low-overhead loop later in RTL, and > designed to be call

Re: [PATCH v2 3/3] Consider doloop cmp use in ivopts

2019-05-14 Thread Richard Biener
On Tue, May 14, 2019 at 5:10 AM wrote: > > From: Kewen Lin > > Previous version link for background: > https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00912.html > > Firstly, it's to call predict_doloop_p hook to check this > loop will be transformed to doloop or not, if yes, find > the expected co

[PATCH 1/3] Do a refactoring in linemap (PR preprocessor/90382).

2019-05-14 Thread marxin
libcpp/ChangeLog: 2019-05-13 Martin Liska PR preprocessor/90382 * include/line-map.h (get_data_from_adhoc_loc): Add const to the first argument. (get_location_from_adhoc_loc): Likewise. * line-map.c(get_data_from_adhoc_loc): Add const to the fi

Re: [PATCH][GCC][AArch64] Vectorise __builtin_signbit on aarch64

2019-05-14 Thread Richard Sandiford
Przemyslaw Wirkus writes: > Hi all, > > Vectorise __builtin_signbit (v2sf, v4sf) with unsigned shift right vector > instruction. > > Bootstrapped and tested on aarch64-none-linux-gnu. > > Assembly output for: > $ aarch64-elf-gcc -S -O3 signbitv2sf.c -dp > > Before patch: > > foo: > ldp w

[PATCH 0/3] Fix linemap assertation connected to PR preprocessor/90382.

2019-05-14 Thread marxin
Hi. I'm sending series of 3 patches where first part is a refactoring in order to use get_location_from_adhoc_loc and get_data_from_adhoc_loc. Second part is dealing with the ICE and is about using of get_location_from_adhoc_loc for IS_ADHOC_LOC. Last one is reappliation of Paolo's patch. Patch c

[PATCH 2/3] Fix min_location usage in line-map.c (PR preprocessor/90382).

2019-05-14 Thread marxin
libcpp/ChangeLog: 2019-05-13 Martin Liska PR preprocessor/90382 * line-map.c (first_map_in_common_1): Handle ADHOC locations. --- libcpp/line-map.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libcpp/line-map.c b/libcpp/line-map.c index

[PATCH 3/3] /cp 2018-05-14 Paolo Carlini

2019-05-14 Thread paolo
* decl.c (grokdeclarator): Fix value assigned to typespec_loc, use min_location. /testsuite 2018-05-14 Paolo Carlini * g++.dg/diagnostic/trailing1.C: New. --- gcc/cp/decl.c | 4 ++-- gcc/testsuite/g++.dg/diagnostic/trailing1.C | 5 +

Re: [PATCH][GCC][AArch64] Vectorise __builtin_signbit on aarch64

2019-05-14 Thread Jakub Jelinek
On Tue, May 14, 2019 at 09:08:28AM +0100, Richard Sandiford wrote: > > 2019-05-13 Przemyslaw Wirkus What is that backslash in \> doing in the ChangeLog entries? Jakub

Re: [PATCH][GCC][AArch64] Vectorise __builtin_signbit on aarch64

2019-05-14 Thread Przemyslaw Wirkus
> What is that backslash in \> doing in the ChangeLog entries? >    Jakub My bad, tool I use for code review crafted in backslash when it wrongly assumed I want a markdown. An early sign that machines want to take over, I guess... I promise I will be more diligent next time. kind regards Prz

GCC 9 backports

2019-05-14 Thread Martin Liška
Hi. There are 2 backport patches that I've just tested and I'm going to install them. Martin >From 4ad5f7ebfa965fc65acca851e48e9f56e9a2f20d Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 13 May 2019 07:04:58 + Subject: [PATCH 1/2] Backport r271116 gcc/ChangeLog: 2019-05-13 Martin Liska

Re: GCC 9 backports

2019-05-14 Thread Martin Liška
On 5/14/19 10:45 AM, Martin Liška wrote: > Hi. > > There are 2 backport patches that I've just tested and I'm going to install > them. > > Martin > One more patch. Martin >From fb33e008c2e2a9216cae193d46c08e266250b6ae Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 13 May 2019 10:26:09 +000

Re: GCC 8 backports

2019-05-14 Thread Martin Liška
On 5/6/19 4:00 PM, Martin Liška wrote: > Hi. > > I'm sending following backport that I've just tested. > > Martin > Hi. There are 2 more patches that I've tested. Martin >From af452cc71498c097d09bc8ecd848d28555a00bb2 Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 13 May 2019 07:04:58 +

Re: V6 [PATCH] Optimize vector constructor

2019-05-14 Thread Richard Biener
On Wed, May 8, 2019 at 2:04 PM Richard Biener wrote: > > On Fri, May 3, 2019 at 6:54 PM H.J. Lu wrote: > > > > On Thu, May 2, 2019 at 10:53 AM H.J. Lu wrote: > > > > > > On Thu, May 2, 2019 at 7:55 AM Richard Biener > > > wrote: > > > > > > > > On Thu, May 2, 2019 at 4:54 PM Richard Biener > >

[PATCH][OBVIOUS] Fix a test-case in PR middle-end/90340.

2019-05-14 Thread Martin Liška
Hi. It's a small tweak to a test-case. I've tested that on x86_64-linux-gnu and aarch64-linux-gnu. I'm going to install the patch. Martin gcc/testsuite/ChangeLog: 2019-05-14 marxin PR middle-end/90340 * gcc.dg/tree-ssa/pr90340-2.c: Add case-values-threshold param. --

[PATCH] LWG 2899 - Make is_move_constructible correct for unique_ptr

2019-05-14 Thread Jonathan Wakely
* include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor, move assignment operator. (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add. (__uniq_ptr_data): New class template with conditionally deleted special members. (uniq

[PATCH] Fix unique_ptr pretty printer for empty classes

2019-05-14 Thread Jonathan Wakely
The printer was confused when unique_ptr::pointer is an empty class, or the deleter is not empty. Instead of assuming the tuple has a single _M_head_impl member manually inspect the tuple base classes to get the first element. Doing this means the "compat" tuple in compat.cc needs to have the sam

[PATCH] Fix indentation in testsuite utility header

2019-05-14 Thread Jonathan Wakely
* testsuite/util/testsuite_allocator.h (memory_resource) (default_resource_mgr): Fix indentation. Tested powerpc64le-linux, committed to trunk. commit 59c33c756da61c7e8c25dea832055a16156ed97a Author: Jonathan Wakely Date: Tue May 14 11:03:23 2019 +0100 Fix indentation in

[PATCH] Add __gnu_test::NullablePointer utility to testsuite

2019-05-14 Thread Jonathan Wakely
* testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc: Use operator-> to access raw pointer member. * testsuite/23_containers/vector/59829.cc: Likewise. * testsuite/23_containers/vector/bool/80893.cc: Likewise. * testsuite/libstdc++-prettyprin

Re: [PATCH 1/3] Do a refactoring in linemap (PR preprocessor/90382).

2019-05-14 Thread Nathan Sidwell
On 5/13/19 7:07 AM, marxin wrote: libcpp/ChangeLog: 2019-05-13 Martin Liska PR preprocessor/90382 * include/line-map.h (get_data_from_adhoc_loc): Add const to the first argument. (get_location_from_adhoc_loc): Likewise. * line-map.c(get_data_from_adho

Re: [PATCH 2/3] Fix min_location usage in line-map.c (PR preprocessor/90382).

2019-05-14 Thread Nathan Sidwell
On 5/13/19 7:10 AM, marxin wrote: libcpp/ChangeLog: 2019-05-13 Martin Liska PR preprocessor/90382 * line-map.c (first_map_in_common_1): Handle ADHOC locations. --- ok -- Nathan Sidwell

[PATCH 3/3] /cp 2018-05-14 Paolo Carlini

2019-05-14 Thread Martin Liška
Missing part 3/3. Martin >From c026b716c0ee0595f0577b32e511dbdf7cf960a3 Mon Sep 17 00:00:00 2001 From: paolo Date: Fri, 26 Apr 2019 11:46:15 + Subject: [PATCH 3/3] /cp 2018-05-14 Paolo Carlini * decl.c (grokdeclarator): Fix value assigned to typespec_loc, use min_location. /testsuite 201

Re: [v3 PATCH] Inconsistency wrt Allocators in basic_string assignment vs. basic_string::assign (LWG2579)

2019-05-14 Thread Jonathan Wakely
On 09/05/19 09:26 +0100, Nina Dinka Ranns wrote: Tested on Linux x86_64 Inconsistency wrt Allocators in basic_string assignment vs. basic_string::assign (LWG2579) 2019-05-09 Nina Dinka Ranns Inconsistency wrt Allocators in basic_string assignment vs. basic_string::assign (LWG2579)

[PATCH] PR libstdc++/69724 avoid temporary in std::thread construction

2019-05-14 Thread Jonathan Wakely
The std::thread constructor creates (and then moves) an unnecessary temporary copy of each argument. Optimize it to only make the one copy that is required. PR libstdc++/69724 * include/std/thread (thread::_State_impl, thread::_S_make_state): Replace single _Callable param

Re: [PATCH] Make std::match_results::_M_resize more useful

2019-05-14 Thread Jonathan Wakely
On 04/12/18 14:30 +, Jonathan Wakely wrote: As both callers of match_results::_M_resize(unsigned) immediately follow it with a loop to update the value of each sub_match, that behaviour can be moved into _M_resize itself. The first caller fills the container with unmatched subs, which can be

[PATCH] Removing unused, non-standard function in _Rb_tree

2019-05-14 Thread Jonathan Wakely
* include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)): Remove unused, non-standard function. As suggested in https://gcc.gnu.org/ml/libstdc++/2016-12/msg00100.html I've removed this unused member. Tested powerpc64le-linux, committed to trunk. commit 4a182e12a82554

[PATCH][gimplefe] Add __VIEW_CONVERT parsing

2019-05-14 Thread Richard Biener
For vector testcases this is very much required (as others, coming). It also seems to handle __VIEW_CONVERT in a component-reference chain just fine though handling this wasn't the original intention. Bootstrap / regtest running on x86_64-unknown-linux-gnu. Richard. 2019-05-14 Richard Biener

[PATCH] Reduce header dependencies in

2019-05-14 Thread Jonathan Wakely
* include/std/iterator: Include instead of and . This makes 5kloc smaller! Tested powerpc64le-linux, committed to trunk. commit 32a8a4b2518030b683561d26ef64c301b46deb5a Author: Jonathan Wakely Date: Thu Feb 23 20:13:37 2017 + Reduce header dependencies in

[PATCH] PR90424 - lowpart vector set recognition

2019-05-14 Thread Richard Biener
The following makes SSA rewrite (update-address-taken) recognize sets of aligned sub-vectors in aligned position (v2qi into v16qi, but esp. v8qi into v16qi). It uses the BIT_INSERT_EXPR support for this, enabling that for vector typed values. This makes us turn for example typedef unsigned cha

Re: [PATCH] Fix aarch64 exception handling (PR c++/59813)

2019-05-14 Thread Michael Matz
Hi, On Tue, 14 May 2019, Jakub Jelinek wrote: > In https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00484.html I've posted > a patch that would set it earlier (or it could be set during > gimplification and propagated during inlining, would need to be in > cfun->calls_eh_return instead of crtl->c

Re: [PATCH] PR90424 - lowpart vector set recognition

2019-05-14 Thread Richard Sandiford
Richard Biener writes: > The following makes SSA rewrite (update-address-taken) recognize > sets of aligned sub-vectors in aligned position > (v2qi into v16qi, but esp. v8qi into v16qi). It uses the > BIT_INSERT_EXPR support for this, enabling that for vector > typed values. This makes us turn f

[PATCH] GCC 8 Backports for AIX

2019-05-14 Thread David Edelsohn
I would like to backport two AIX-specific patches to GCC 8. These both fix bugs that generate wrong code on AIX. 1) XCOFF private read only data section 2) Follow AIX ABI to not pass FP structures in FPRs. These patches have been on trunk / GCC 9 for months. Bootstrapped gcc-8-branch on powerp

[RFC, PATCH] Don't introduce useless edge splits unless in PRE

2019-05-14 Thread Vladislav Ivanishin
Hi! The split_critical_edges() function has multiple uses and it seems, a portion of its code was added to work only when called from tree-ssa-pre but right now it is executed regardless of the caller. The below patch survives bootstrap and regression testing on x86_64-pc-linux-gnu. Does it make

[DRIVER PATCH]: Nadger subprocess argv[0]

2019-05-14 Thread Nathan Sidwell
This patch nadgers the driver's subprocess names to include the driver name. It results in more informative error messages. For instance, rather than: >./xg++ -B./ frob.cc -c -fdump-tree-nope cc1plus: error: unrecognized command line option '-fdump-tree-nope' we get: >./xg++ -B./ frob.

Re: [PATCH] PR90424 - lowpart vector set recognition

2019-05-14 Thread Richard Biener
On Tue, 14 May 2019, Richard Sandiford wrote: > Richard Biener writes: > > The following makes SSA rewrite (update-address-taken) recognize > > sets of aligned sub-vectors in aligned position > > (v2qi into v16qi, but esp. v8qi into v16qi). It uses the > > BIT_INSERT_EXPR support for this, enabl

Re: malloc cannot alias preexisting pointers

2019-05-14 Thread Marc Glisse
On Tue, 14 May 2019, Richard Biener wrote: In princple PTA should know the aliasing cannot happen but possibly the info is either lost or the IL is too obfuscated at the point it gets computed. (hello C++...) We don't need much obfuscation for this, a simple C program int g; int*f(int**p){

Re: [PATCH] PR90424 - lowpart vector set recognition

2019-05-14 Thread Richard Sandiford
Richard Biener writes: > On Tue, 14 May 2019, Richard Sandiford wrote: > >> Richard Biener writes: >> > The following makes SSA rewrite (update-address-taken) recognize >> > sets of aligned sub-vectors in aligned position >> > (v2qi into v16qi, but esp. v8qi into v16qi). It uses the >> > BIT_INS

New .md construct: define_insn_and_rewrite

2019-05-14 Thread Richard Sandiford
Several SVE patterns need define_insn_and_splits that generate the same insn_code, but with different operands. That's probably a niche requirement, but it's cropping up often enough on the ACLE branch that I think it would be good to have a syntactic sugar for it. This patch therefore adds a new

[PATCH] Add __is_nothrow_convertible to fix std::is_nothrow_invocable_r

2019-05-14 Thread Jonathan Wakely
The definition of is_nothrow_invocable in terms of is_convertible and is_nothrow_constructible is incorrect, because a type could have an explicit constructor that means is_nothrow_constructible is true, but implicit conversions could use a different constructor that is potentially-throwing. Fix

[v3 PATCH] nonesuch is insufficiently useless (lwg2996)

2019-05-14 Thread Nina Dinka Ranns
Tested on Linux x86_64 nonesuch is insufficiently useless (lwg2996) 2019-05-14 Nina Dinka Ranns nonesuch is insufficiently useless (lwg2996) * include/std/type_traits struct __nonesuch: added private base class to make __nonesuch not an aggregate and removed deleted defa

Re: [PATCH][RFC] Come up with TARGET_HAS_FAST_MEMPCPY_ROUTINE (PR middle-end/90263).

2019-05-14 Thread Martin Liška
On 5/13/19 3:07 PM, Jakub Jelinek wrote: > On Mon, May 13, 2019 at 12:14:37PM +0200, Martin Liška wrote: >> On 5/10/19 11:21 AM, Jakub Jelinek wrote: >>> On Fri, May 10, 2019 at 11:04:12AM +0200, Martin Liška wrote: --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1906,6

libgo patch committed: Reduce profiling overhead

2019-05-14 Thread Ian Lance Taylor
This libgo patch by Than McIntosh revises the gccgo version of memory/block/mutex profiling to reduce runtime overhead. The main change is to collect raw stack traces while the profile is on line, then post-process the stacks just prior to the point where we are ready to use the final product. Me

[PATCH] Add gdc support to macOS

2019-05-14 Thread ciel
Dear GCC team, I have succeeded to build gdc on macOS. I firstly submitted the patch to https://github.com/Homebrew/homebrew-core/pull/39712 but I was encouraged to submit to gcc team instead. So could you take a look at it? Best Regards, T. Yamada gcc9-gdc.patch Description: Binary data

Re: [PATCH][RFC] Come up with TARGET_HAS_FAST_MEMPCPY_ROUTINE (PR middle-end/90263).

2019-05-14 Thread Martin Sebor
On 5/14/19 8:55 AM, Martin Liška wrote: On 5/13/19 3:07 PM, Jakub Jelinek wrote: On Mon, May 13, 2019 at 12:14:37PM +0200, Martin Liška wrote: On 5/10/19 11:21 AM, Jakub Jelinek wrote: On Fri, May 10, 2019 at 11:04:12AM +0200, Martin Liška wrote: --- a/gcc/config/i386/i386.h +++ b/gcc/config/

[PATCH] Define std::__invoke_r for INVOKE

2019-05-14 Thread Jonathan Wakely
* include/bits/invoke.h (__invoke_r): Define new function implementing the INVOKE pseudo-function. * testsuite/20_util/function_objects/invoke/1.cc: Add more tests. * testsuite/20_util/function_objects/invoke/2.cc: New test. Tested powerpc64le-linux, committed to t

[PATCH] Use INVOKE in std::function, std::bind and std::packaged_task

2019-05-14 Thread Jonathan Wakely
As well as simpifying the code by removing duplication, this means that we only need to touch std::__invoke_r if we need to implement changes to INVOKE, such as those in P0932R0. * include/bits/std_function.h (_Simple_type_wrapper): Remove. (_Function_handler): Remove partial spec

[C++ Patch] Consistently use OVL_P

2019-05-14 Thread Paolo Carlini
Hi, another straightforward one sitting in my tree... Sanity checked on x86_64-linux. Thanks, Paolo. /// 2019-05-14 Paolo Carlini * call.c (perform_overload_resolution, build_new_method_call_1): Use OVL_P. * decl.c (grokfndecl): Likewise. *

Re: [v3 PATCH] nonesuch is insufficiently useless (lwg2996)

2019-05-14 Thread Jonathan Wakely
On 14/05/19 15:43 +0100, Nina Dinka Ranns wrote: Tested on Linux x86_64 nonesuch is insufficiently useless (lwg2996) 2019-05-14 Nina Dinka Ranns nonesuch is insufficiently useless (lwg2996) * include/std/type_traits struct __nonesuch: added private base class to make __no

Re: [PATCH] Add gdc support to macOS

2019-05-14 Thread Iain Buclaw
On Tue, 14 May 2019 at 17:05, ciel wrote: > > Dear GCC team, > > I have succeeded to build gdc on macOS. I firstly submitted the patch > to https://github.com/Homebrew/homebrew-core/pull/39712 but I was > encouraged to submit to gcc team instead. So could you take a look at > it? > Some of it loo

[Contrib PATCH] Add scripts to convert GCC repo from SVN to Git

2019-05-14 Thread Maxim Kuvyrkov
This patch adds scripts to contrib/ to migrate full history of GCC's subversion repository to git. My hope is that these scripts will finally allow GCC project to migrate to Git. The result of the conversion is at https://github.com/maxim-kuvyrkov/gcc/branches/all . Branches with "@rev" suff

Re: [v3 PATCH] nonesuch is insufficiently useless (lwg2996)

2019-05-14 Thread Nina Dinka Ranns
That was fast :) I’ll check the changelog for future reference. Thanks, Nina On Tue, 14 May 2019 at 16:50, Jonathan Wakely wrote: > On 14/05/19 15:43 +0100, Nina Dinka Ranns wrote: > >Tested on Linux x86_64 > >nonesuch is insufficiently useless (lwg2996) > > > >2019-05-14 Nina Dinka Ranns > >

[PATCH, i386]: Macroize DIVMOD patterns

2019-05-14 Thread Uros Bizjak
Recent work by Richard Sandiford [1] enabled the possibility to macroize DIVMOD patterns in i386.md. 2019-05-14 Uroš Bizjak * config/i386/i386.md (any_div): New code iterator. (paired_mod): New code attribute. (sgnprefix): Handle DIV and UDIV RTXes. (u): Ditto. (divmod4): M

[PATCH, lto-plugin] Make the plugin more -save-temps friendly.

2019-05-14 Thread Iain Sandoe
Currently the lto plugin has a somewhat obscure incantation to get it to save its temp files, and at least one is not named in any sensible way for development examination. This patch makes it follow the same approach as collect2. -save-temps causes the temp file to be named meaningfully, and

[PATCH] Add __raw_visit and __raw_idx_visit, use INVOKE

2019-05-14 Thread Jonathan Wakely
This change simplifies visitation for variants, by using INVOKE for the visit form, and explicitly specifying the tag types for raw visitation, instead of inferring them from the return types of the lambda functions used as visitors. * include/std/variant (__visit_with_index): Remove type

Re: New .md construct: define_insn_and_rewrite

2019-05-14 Thread Eric Botcazou
> This patch therefore adds a new construct called define_insn_and_rewrite. > It's basically a define_insn_and_split with an implicit split pattern, > obtained by copying the insn pattern and replacing match_operands with > match_dups and match_operators with match_op_dups. Isn't that what define_

Re: [PATCH] Add __gnu_test::NullablePointer utility to testsuite

2019-05-14 Thread Daniel Krügler
Am Di., 14. Mai 2019 um 13:20 Uhr schrieb Jonathan Wakely : > > * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc: > Use operator-> to access raw pointer member. > * testsuite/23_containers/vector/59829.cc: Likewise. > * testsuite/23_containers/vec

Re: [C++ Patch] Consistently use OVL_P

2019-05-14 Thread Marek Polacek
On Tue, May 14, 2019 at 05:28:09PM +0200, Paolo Carlini wrote: > Hi, > > another straightforward one sitting in my tree... Sanity checked on > x86_64-linux. > > Thanks, Paolo. > > /// > > 2019-05-14 Paolo Carlini > > * call.c (perform_overload_resolution, build_new_me

[PATCH 2/2] rs6000: Make eh_set_lr_ a define_insn_and_split

2019-05-14 Thread Segher Boessenkool
2019-05-14 Segher Boessenkool * config/rs6000/rs6000.md (eh_set_lr_): Merge with following define_split to become a define_insn_and_split. --- gcc/config/rs6000/rs6000.md | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gcc/config/rs6000/rs6000.m

[PATCH 1/2] rs6000: New enum epilogue_type

2019-05-14 Thread Segher Boessenkool
We currently call rs6000_emit_epilogue with a boolean parameter saying if this is for a sibcall. We also need to create epilogues for eh_return. This isn't yet indicated directly: instead, we get an eh_return epilogue if crtl->calls_eh_return and this is not a sibcall. This patch changes things

Re: [DRIVER PATCH]: Nadger subprocess argv[0]

2019-05-14 Thread Martin Sebor
On 5/14/19 8:02 AM, Nathan Sidwell wrote: This patch nadgers the driver's subprocess names to include the driver name. It results in more informative error messages.  For instance, rather than:   >./xg++ -B./ frob.cc -c -fdump-tree-nope   cc1plus: error: unrecognized command line option '-fd

[PATCH] gcc: move assemble_start_function / assemble_end_function to output_mi_thunk

2019-05-14 Thread Max Filippov
Let backends call assemble_start_function after they have generated thunk function body so that a constant pool could be output if it is required. This may help backends to avoid implementing custom constant loading code specifically for the MI thunk and reuse existing functionality. gcc/ 2019-01-

Re: [PATCH] GCC 8 Backports for AIX

2019-05-14 Thread Segher Boessenkool
On Tue, May 14, 2019 at 09:42:58AM -0400, David Edelsohn wrote: > I would like to backport two AIX-specific patches to GCC 8. These > both fix bugs that generate wrong code on AIX. > > 1) XCOFF private read only data section > > 2) Follow AIX ABI to not pass FP structures in FPRs. > > These pat

Re: [C++ Patch] Consistently use OVL_P

2019-05-14 Thread Nathan Sidwell
On 5/14/19 11:28 AM, Paolo Carlini wrote: another straightforward one sitting in my tree... Sanity checked on x86_64-linux. I suspect many/all of the TREE_CODE (x) == TEMPLATE_DECL (or DECL_FUNCTION_TEMPLATE_P) could also be elided -- we don't have naked function templates at that point, they

Re: [C++ Patch] Consistently use OVL_P

2019-05-14 Thread Marek Polacek
On Tue, May 14, 2019 at 03:01:35PM -0400, Nathan Sidwell wrote: > On 5/14/19 11:28 AM, Paolo Carlini wrote: > > > another straightforward one sitting in my tree... Sanity checked on > > x86_64-linux. > > I suspect many/all of the TREE_CODE (x) == TEMPLATE_DECL > (or DECL_FUNCTION_TEMPLATE_P) coul

Re: [PATCH] Fix aarch64 exception handling (PR c++/59813)

2019-05-14 Thread Jeff Law
On 5/13/19 4:51 PM, Jakub Jelinek wrote: > On Mon, May 13, 2019 at 04:29:21PM -0600, Jeff Law wrote: >>> That is a serious misunderstanding of what __builtin_eh_return does. >>> For the most part, __builtin_eh_return works by forcing all call clobbered >>> registers to stack, having that described

Re: [PATCH v2 2/3] Add predict_doloop_p target hook

2019-05-14 Thread Jeff Law
On 5/13/19 9:09 PM, li...@linux.ibm.com wrote: > From: Kewen Lin > > Previous version link for background: > https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00912.html > > This hook is to predict whether one loop in gimple will > be transformed to low-overhead loop later in RTL, and > designed to

Re: [C++ Patch] Consistently use OVL_P

2019-05-14 Thread Paolo Carlini
Hi, On 14/05/19 21:05, Marek Polacek wrote: On Tue, May 14, 2019 at 03:01:35PM -0400, Nathan Sidwell wrote: On 5/14/19 11:28 AM, Paolo Carlini wrote: another straightforward one sitting in my tree... Sanity checked on x86_64-linux. I suspect many/all of the TREE_CODE (x) == TEMPLATE_DECL (or

Re: [PATCH v2 2/3] Add predict_doloop_p target hook

2019-05-14 Thread Bill Schmidt
On 5/14/19 2:13 PM, Jeff Law wrote: > On 5/13/19 9:09 PM, li...@linux.ibm.com wrote: >> From: Kewen Lin >> >> Previous version link for background: >> https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00912.html >> >> This hook is to predict whether one loop in gimple will >> be transformed to low-ove

Re: [PATCH] Add __gnu_test::NullablePointer utility to testsuite

2019-05-14 Thread Jonathan Wakely
On 14/05/19 19:09 +0200, Daniel Krügler wrote: Am Di., 14. Mai 2019 um 13:20 Uhr schrieb Jonathan Wakely : * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc: Use operator-> to access raw pointer member. * testsuite/23_containers/vector/59829.cc: Likewi

[PATCH] improve linter for diagnostics

2019-05-14 Thread Roland Illig
The linter in contrib/ checks all messages that the GCC user may see whether they conform roughly to the GCC Guidelines for Diagnostics. * contrib/check-internal-format-escaping.py: improve output of the linter by providing short rationales for the warnings; detect space be

[PATCH, Darwin] Fix more PR82920

2019-05-14 Thread Iain Sandoe
Darwin doesn't support mx32, and some tests were failing because it was trying to do them. When we disable this it turns out that quite a few tests requiring mx32 support were not guarded. Tested on x86_64-linux-gnu (m32/m64) and x86_64-darwin12 applied to mainline. Iain gcc/ 2019-05-14 Iain

C++ PATCH to add test for c++/70156

2019-05-14 Thread Marek Polacek
This got fixed by r254461. Tested on x86_64-linux, applying to trunk. 2019-05-14 Marek Polacek PR c++/70156 * g++.dg/init/static5.C: New test. diff --git gcc/testsuite/g++.dg/init/static5.C gcc/testsuite/g++.dg/init/static5.C new file mode 100644 index 000..4eaf787d0

C++ PATCH to add test for c++/68918

2019-05-14 Thread Marek Polacek
We used to print errors, but since r236221 this compiles fine. clang++ also compiles it without errors. Tested on x86_64-linux, applying to trunk. 2019-05-14 Marek Polacek PR c++/68918 * g++.dg/cpp0x/decltype71.C: New test. diff --git gcc/testsuite/g++.dg/cpp0x/decltype71.C

Re: [Contrib PATCH] Add scripts to convert GCC repo from SVN to Git

2019-05-14 Thread Segher Boessenkool
On Tue, May 14, 2019 at 07:11:18PM +0300, Maxim Kuvyrkov wrote: > This patch adds scripts to contrib/ to migrate full history of GCC's > subversion repository to git. My hope is that these scripts will > finally allow GCC project to migrate to Git. Thank you for doing this. > The result of the c

Re: [PATCH v2 2/3] Add predict_doloop_p target hook

2019-05-14 Thread Jeff Law
On 5/14/19 1:35 PM, Bill Schmidt wrote: > On 5/14/19 2:13 PM, Jeff Law wrote: >> On 5/13/19 9:09 PM, li...@linux.ibm.com wrote: >>> From: Kewen Lin >>> >>> Previous version link for background: >>> https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00912.html >>> >>> This hook is to predict whether one

[PATCH 0/12] detect quoting and punctuation problems in diagnostics

2019-05-14 Thread Martin Sebor
Near the end of every release a bunch of problem reports are raised for various punctuation, quoting, and spelling issues in GCC. In GCC 9 a total 28 such issues were submitted. A fair number of them are discovered as new or changed diagnostics are being translated. A checker was developed to he

Re: [C++ Patch] Consistently use OVL_P

2019-05-14 Thread Paolo Carlini
Hi again, On 14/05/19 21:21, Paolo Carlini wrote: Hi, On 14/05/19 21:05, Marek Polacek wrote: On Tue, May 14, 2019 at 03:01:35PM -0400, Nathan Sidwell wrote: On 5/14/19 11:28 AM, Paolo Carlini wrote: another straightforward one sitting in my tree... Sanity checked on x86_64-linux. I suspec

Re: [C++ Patch] Consistently use OVL_P

2019-05-14 Thread Marek Polacek
On Tue, May 14, 2019 at 11:20:16PM +0200, Paolo Carlini wrote: > Hi again, > > On 14/05/19 21:21, Paolo Carlini wrote: > > Hi, > > > > On 14/05/19 21:05, Marek Polacek wrote: > > > On Tue, May 14, 2019 at 03:01:35PM -0400, Nathan Sidwell wrote: > > > > On 5/14/19 11:28 AM, Paolo Carlini wrote: >

[PATCH 2/12] fix diagnostic quoting/spelling in ada

2019-05-14 Thread Martin Sebor
The attached patch fixes quoting, spelling, and other formatting issues in diagnostics issued by the Ada front and pointed out by the -Wformat-diag warning. Martin gcc/ada/ChangeLog: * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote reserved names. diff --git a/gcc/ada/gcc-in

[PATCH 1/12] implement -Wformat-diag to detect quoting and spelling issues in GCC diagnostics

2019-05-14 Thread Martin Sebor
The attached patch implements the -Wformat-diag warning to help find quoting, spelling, and other formatting issues in diagnostics issued by GCC. Martin gcc/c-family/ChangeLog: * c-common.h (GCC_DIAG_STYLE): Adjust. (GCC_DIAG_RAW_STYLE): New macro. c-format.c (function_format_info::format_ty

[PATCH 3/12] fix diagnostic quoting/spelling in Brig

2019-05-14 Thread Martin Sebor
The attached patch fixes quoting, spelling, and other formatting issues in diagnostics issued by the Brig front end and pointed out by the -Wformat-diag warning. Martin gcc/brig/ChangeLog: * brigfrontend/brig-control-handler.cc (brig_directive_control_handler::operator): Remove trailing newlin

[PATCH 4/12] fix diagnostic quoting/spelling in the C front-end

2019-05-14 Thread Martin Sebor
The attached patch fixes quoting, spelling, and other formatting issues in diagnostics issued by the C front-end and pointed out by the -Wformat-diag warning. Martin gcc/c/ChangeLog: * c-decl.c (start_decl): Quote keywords, operators, and types in diagnostics. (finish_decl): Same. * c-parser

[PATCH 7/12] fix diagnostic quoting/spelling in libgcc

2019-05-14 Thread Martin Sebor
The attached patch fixes quoting, spelling, and other formatting issues in diagnostics issued from files in the libgcc directory and pointed out by the -Wformat-diag warning. Martin libgcc/ChangeLog: * libgcov-util.c (read_gcda_file): Remove trailing newline. diff --git a/libgcc/libgcov-util.c

[PATCH 6/12] fix diagnostic quoting/spelling in C++

2019-05-14 Thread Martin Sebor
The attached patch fixes quoting, spelling, and other formatting issues in diagnostics issued by the C++ front-end and pointed out by the -Wformat-diag warning. Martin gcc/cp/ChangeLog: * call.c (print_z_candidate): Wrap diagnostic text in a gettext macro. Adjust. (print_z_candidates): Same.

[PATCH 10/12] fix diagnostic quoting/spelling in D

2019-05-14 Thread Martin Sebor
The attached patch fixes quoting, spelling, and other formatting issues in diagnostics issued by the D front end and pointed out by the -Wformat-diag warning. Martin gcc/d/ChangeLog: * d/d-builtins.cc (d_init_builtins): Quote keywords, operators, and types in diagnostics. * d/d-codegen.cc (ge

[PATCH 5/12] fix diagnostic quoting/spelling in c-family

2019-05-14 Thread Martin Sebor
The attached patch fixes quoting, spelling, and other formatting issues in diagnostics issued from files in the c-family/ directory and pointed out by the -Wformat-diag warning. Martin gcc/c-family/ChangeLog: * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers, keywords, operators,

[PATCH 11/12] fix diagnostic quoting/spelling issues in i386 back-end

2019-05-14 Thread Martin Sebor
The attached patch fixes quoting, spelling, and other formatting issues in diagnostics issued by the i386 back-end and pointed out by the -Wformat-diag warning. Martin gcc/ChangeLog: * config/i386/i386-expand.c (get_element_number): Quote keywords and other internal names in diagnostics. Adju

[PATCH 8/12] fix diagnostic quoting/spelling in the middle-end

2019-05-14 Thread Martin Sebor
The attached patch fixes quoting, spelling, and other formatting issues in diagnostics issued from files in middle-end files and pointed out by the -Wformat-diag warning. Martin gcc/ChangeLog: * builtins.c (expand_builtin_atomic_always_lock_free): Quote identifiers, keywords, operators, and ty

[PATCH 12/12] fix diagnostic quoting/spelling issues in ObjC

2019-05-14 Thread Martin Sebor
The attached patch fixes quoting, spelling, and other formatting issues in diagnostics issued by the Objective C/C++ front-end and pointed out by the -Wformat-diag warning. Martin gcc/objc/ChangeLog: * objc-act.c (objc_begin_catch_clause): Quote keywords and options in diagnostics. (objc_buil

[PATCH 0/3] GNAT test suite fixes for build sysroot

2019-05-14 Thread Maciej W. Rozycki
Hi, In the course of setting up GCC regression testing for the RISC-V target I have discovered that the GNAT test suite does not correctly respond to the test environment settings passed from the test harness in my setup and consequently no test case works correctly. In my particular setup `

[PATCH 1/3][GCC] gnatmake: Accept the `--sysroot=' GCC driver option

2019-05-14 Thread Maciej W. Rozycki
According to `gnatmake' documentation: "Any uppercase or multi-character switch that is not a 'gnatmake' switch is passed to 'gcc' (e.g., '-O', '-gnato,' etc.)" however the `--sysroot=' switch is actually rejected: gnatmake: invalid switch: --sysroot=... likely because it is one of the very few

[PATCH 2/3][GCC] GNAT/testsuite: Pass the `ada' option to target compilation

2019-05-14 Thread Maciej W. Rozycki
Pass the `ada' option to DejaGNU's `target_compile' procedure, which by default calls `default_target_compile', so that it arranges for an Ada compilation rather the default of C. We set the compiler to `gnatmake' manually here, so that part of the logic in `default_target_compile' is not used

[PATCH 3/3][DejaGNU] target: Wrap linker flags into `-largs'/`-margs' for Ada

2019-05-14 Thread Maciej W. Rozycki
Unrecognized `gnatmake' switches are not implicitly passed on to the linker, so just pasting board `ldflags' and any other linker flags verbatim into `add_flags' to use for the invocation line of `gnatmake' will make them ignored at best. For example in a GCC test environment that has: set_boa

Re: [PATCH v2 2/3] Add predict_doloop_p target hook

2019-05-14 Thread Segher Boessenkool
On Tue, May 14, 2019 at 01:13:34PM -0600, Jeff Law wrote: > Trying to guess what the target is going to do, then changing the > structure of the loops in gimple based on that guess -- is that really a > good idea. It's fairly counter to many of the design goals around gimple. That is exactly what

Re: [PATCH] Fix aarch64 exception handling (PR c++/59813)

2019-05-14 Thread Jakub Jelinek
On Tue, May 14, 2019 at 01:08:27PM -0600, Jeff Law wrote: > > In https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00484.html I've posted a > > patch that would set it earlier (or it could be set during gimplification > > and propagated during inlining, would need to be in cfun->calls_eh_return > > ins

Re: [PATCH 12/12] fix diagnostic quoting/spelling issues in ObjC

2019-05-14 Thread Iain Sandoe
Hi Martin, > On 14 May 2019, at 22:33, Martin Sebor wrote: > > The attached patch fixes quoting, spelling, and other formatting > issues in diagnostics issued by the Objective C/C++ front-end and > pointed out by the -Wformat-diag warning. > The ObjC changes are OK. It’s possible there might

Re: [PATCH v2 1/3] Move prepare_decl_rtl to expr.[ch] as extern

2019-05-14 Thread Kewen.Lin
on 2019/5/14 下午3:18, Richard Biener wrote: > Hum. The function is somewhat of a hack, trying to produce > "reasonable" DECL_RTL, exposing it in expr.[ch] with this > name is eventually misleading. Also you fail to "outline" > the most important part: > > FOR_EACH_VEC_ELT (decl_rtl_to_reset,

[PATCH 0/2] [RFC][PR88834]

2019-05-14 Thread kugan . vivekanandarajah
From: Kugan Vivekanandarajah In PR88834, IVOPT is not selecting the right addressing mode. Inorder to fix thix, we need to add support to add IV uses for IFN_MASK_LOAD_LANES and IFN_MASK_STORE_LANES. In addition, we also need to add IV candidate with scaled by the element or access size if tha

[PATCH 1/2] Add support for IVOPT

2019-05-14 Thread kugan . vivekanandarajah
From: Kugan Vivekanandarajah gcc/ChangeLog: 2019-05-15 Kugan Vivekanandarajah PR target/88834 * tree-ssa-loop-ivopts.c (get_mem_type_for_internal_fn): Handle IFN_MASK_LOAD_LANES and IFN_MASK_STORE_LANES. (find_interesting_uses_stmt): Likewise. (get_ali

  1   2   >