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

[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

[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: [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. > *

[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

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,

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] 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:

[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

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

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

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,

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: [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

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

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

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

[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

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

[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

[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

[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: 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

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

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

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

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 > >

Re: [RFC] SHIFT_COUNT_TRUNCATED and shift_truncation_mask

2019-05-14 Thread Richard Biener
On Mon, May 13, 2019 at 8:29 PM Jeff Law wrote: > > On 5/13/19 1:32 AM, Richard Sandiford wrote: > > > > IMO we should only consider deprecating the macro. I'm not sure how > > much practical effect that will have though. cc0 was deprecated ages > > ago but we're a still a long way from getting

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

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: [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 v2 2/3] Add predict_doloop_p target hook

2019-05-14 Thread Kewen.Lin
on 2019/5/14 下午3:24, Richard Biener wrote:> > Most of the rs6000 target hook checks look general > (can we compute niter, etc.), IVOPTs would have a hard > time adding a counter IV w/o being able to compute niters. Do you mean to reuse them? Yes, IVOPTs has already checked niter. At the

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

2019-05-14 Thread Kewen.Lin
on 2019/5/15 上午10:40, Bin.Cheng wrote: > I wonder if you can factor out generic part into GIMPLE and leave > target hook as specific as possible? > Good suggestion! Yes, most of the checks are common as you pointed out. I hope the other targets won't have more customization needs excepting

[PATCH GCC]Correct cand_chain and stmt_cand_map for copy/cast

2019-05-14 Thread bin.cheng
Hi, I noticed that cand_chain (first_interp/next_interp) is not maintained correctly in slsr_process_copy/slsr_process_cast (now slsr_process_copycast). This one fixes the issue, as well as records the "first" cand in stmt_cand_map. Hi Bill, is this correct or I misunderstood the code? Bootstrap

[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

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

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

[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.

[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

New Documents For(gcc-patches@gcc.gnu.org)Your Shipment (Shipping SF Electronic Invoice Notification)

2019-05-14 Thread SF Express
\0Ae6Cv84�7AN30�1F�D0[A2b37�1A `A8Y7D gcc-patches@gcc.gnu.org a1F�22`A8�09bE9�7AN30�1F�D0N3A`A8cD0O9Bv84e36m3Eg0DRA1002 `A8u33�F7v84u35[50SD1y68]F2b10R9F_00Q77�01SD1y68�E6`C5Y82N0B�1A SD1y68NE3x01�1A019093877133873SD1y68SF7x01�1A5123338323SD1y68�D1�9D�1A639.9Q43 S05T2Bv84�D0S55SF7�1A

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

2019-05-14 Thread Kewen.Lin
on 2019/5/15 上午11:34, Kewen.Lin wrote: > > on 2019/5/15 上午10:40, Bin.Cheng wrote: >> I wonder if you can factor out generic part into GIMPLE and leave >> target hook as specific as possible? >> > > Good suggestion! Yes, most of the checks are common as you > pointed out. I hope the other

[PATCH GCC]refactor process of copy and cast in slsr

2019-05-14 Thread bin.cheng
Hi, I noticed that slsr_process_copy and slsr_process_cast are almost identical and called only once. This patch refactor the two functions into one. For copies, it also passes lhs' type to creation of new cand assuming that lhs, rhs and base_cand have the same/compatible type. I will keep an

[PATCH 2/2] aarch64 back-end changes

2019-05-14 Thread kugan . vivekanandarajah
From: Kugan Vivekanandarajah gcc/ChangeLog: 2019-05-15 Kugan Vivekanandarajah PR target/88834 * config/aarch64/aarch64.c (aarch64_classify_address): Relax allow_reg_index_p. gcc/testsuite/ChangeLog: 2019-05-15 Kugan Vivekanandarajah PR target/88834

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

2019-05-14 Thread Bin.Cheng
I wonder if you can factor out generic part into GIMPLE and leave target hook as specific as possible? On Tue, May 14, 2019 at 11: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

[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

[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.

[PATCH] Refactor away an obsolete is_unsigned distinction in is_value_included_in

2019-05-14 Thread Vladislav Ivanishin
Hi! This is just a clean-up. During the course of past refactorings, the then and else branches of `if (is_unsigned)` in is_value_included_in() became semantically equivalent and almost textually identical. This patch removes the conditional altogether. Regtested and bootstrapped with

[PATCH PR57534]Support strength reduction for MEM_REF in slur

2019-05-14 Thread bin.cheng
Hi, As noted in PR57534 comment #33, SLSR currently doesn't strength reduce memory references in reported cases, which conflicts with its comment at the beginning of file. The main reason is in functions slsr_process_ref and restructure_reference which rejects MEM_REF by handled_compoenent_p in

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,

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

2019-05-14 Thread Kewen.Lin
on 2019/5/14 下午3:26, Richard Biener wrote: > 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

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

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: >

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

[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

[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):

[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

[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

[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

[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. *

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 > >

[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.

[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

[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

[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,

[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

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

[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

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

[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

[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:

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

[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.

[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

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][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 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

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] 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. *

[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

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. *

[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/

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)

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][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

[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

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

[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

[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

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

[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

[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

[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 +++

[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

[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

[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

[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./

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,

  1   2   >