[PATCH] PR 83938 Reduce memory consumption in stable_sort/inplace_merge

2020-06-10 Thread François Dumont via Gcc-patches
As we are on patching algos we still have this old one.     From the original patch I only kept the memory optimization part as the new performance test was not showing good result for the other part to change pivot value. I also kept the small change in get_temporary_buffer even if I don't ha

Re: [PATCH 1/2] RISC-V: Describe correct USEs for gpr_save pattern [PR95252]

2020-06-10 Thread Kito Cheng via Gcc-patches
Committed with adding comments for those two functions. On Thu, Jun 11, 2020 at 5:10 AM Jim Wilson wrote: > > On Wed, Jun 10, 2020 at 1:08 AM Kito Cheng wrote: > > * config/riscv/riscv.c (gpr_save_reg_order): New. > > (riscv_expand_prologue): Use riscv_gen_gpr_save_insn to gen >

Re: [PATCH 2/2] RISC-V: Unify the output asm pattern between gpr_save and gpr_restore pattern.

2020-06-10 Thread Kito Cheng via Gcc-patches
Committed. On Thu, Jun 11, 2020 at 5:13 AM Jim Wilson wrote: > > On Wed, Jun 10, 2020 at 1:08 AM Kito Cheng wrote: > > * config/riscv/riscv-protos.h (riscv_output_gpr_save): Remove. > > * config/riscv/riscv-sr.c (riscv_sr_match_prologue): Update > > value. > > * c

Re: collect2.exe errors not pruned

2020-06-10 Thread Alexandre Oliva
On May 26, 2020, Alexandre Oliva wrote: > On May 19, 2020, Joseph Myers wrote: >> Allowing a missing executable name is reasonable enough, but I was >> actually thinking that the messages should print "gcc" or whatever command >> the user ran in place of "collect2". > Should we make the rege

Re: avoid line breaks in -fverbose-asm tree exprs

2020-06-10 Thread Alexandre Oliva
On Jun 9, 2020, Richard Biener wrote: > How about simply unconditionally doing dump_flags | TDF_SLIM here > to have the whole mem_expr on one line. SGTM > OK with that change. Thanks, here's what I'm installing. slim up mem exprs to avoid line breaks in -fverbose-asm From: Alexandre Oliva

RE: [PATCH PR95523] aarch64:ICE in register_tuple_type,at config/aarch64/aarch64-sve-builtins.cc:3434

2020-06-10 Thread Zhanghaijian (A)
Thanks for viewing and pushing this. Thanks, Haijian Zhang > -Original Message- > From: Richard Sandiford [mailto:richard.sandif...@arm.com] > Sent: Thursday, June 11, 2020 12:01 AM > To: Zhanghaijian (A) > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH PR95523] aarch64:ICE in registe

Re: [PATCH V2] Practical Improvement to Double Precision Complex Divide

2020-06-10 Thread Joseph Myers
On Thu, 11 Jun 2020, Patrick McGehearty wrote: > I will study real.c carefully along with the C99 std > to determine if I can find useful values for RMIN2 and RMINSCAL > for each format which are within range for all instances > of that format. A quick skim of real.c shows we have ieee half precis

Re: [PATCH V2] Practical Improvement to Double Precision Complex Divide

2020-06-10 Thread Patrick McGehearty via Gcc-patches
I will study real.c carefully along with the C99 std to determine if I can find useful values for RMIN2 and RMINSCAL for each format which are within range for all instances of that format. A quick skim of real.c shows we have ieee half precision and two arm half precision formats, for example. I

Re: BRIG FE testsuite: Fix all dump-scans

2020-06-10 Thread Alexandre Oliva
On Jun 9, 2020, Martin Jambor wrote: >> Before your changes, GCC produced the expected: >> >> $ ls -1 build-gcc/gcc/testsuite/brig/variables.*???t.* >> build-gcc/gcc/testsuite/brig/variables.hsail.brig.004t.original >> build-gcc/gcc/testsuite/brig/variables.hsail.brig.005t.gimple >> >> Are you

Re: [PATCH] Use GCC_PICFLAG to collect host-specific PICFLAG from ../config/picflag.m4

2020-06-10 Thread Arvind Sankar
On Wed, Jun 10, 2020 at 04:27:27PM -0600, Jeff Law wrote: > On Mon, 2019-07-22 at 12:39 -0400, Arvind Sankar wrote: > > The gcc configure script does not use the config/picflag.m4 macro to > > customize PICFLAG according to the host when using --enable-host-shared. > > > > Fix configure.ac to do s

Re: [PATCH V2] Practical Improvement to Double Precision Complex Divide

2020-06-10 Thread Joseph Myers
On Wed, 10 Jun 2020, Patrick McGehearty wrote: > #ifdef L_divhc3 > #define RBIG  (correct value for half precision) > #define RMIN  (correct value for half precision) > #define RMIN2 ...  (correct value for half precision) > #define RMINSCAL ... (correct value for half precision) > #endif > #ifdef

Re: [PATCH V2] Practical Improvement to Double Precision Complex Divide

2020-06-10 Thread Patrick McGehearty via Gcc-patches
Joseph, Thank you again for your prompt and insightful response. It's now clear that I was engaged in wishful thinking that I only needed to handle double precision in my proposed change. I understand now that the text above the routine: - - - - - #if defined(L_divhc3) || defined(L_divsc3) || def

Re: [PATCH] Use GCC_PICFLAG to collect host-specific PICFLAG from ../config/picflag.m4

2020-06-10 Thread Jeff Law via Gcc-patches
On Mon, 2019-07-22 at 12:39 -0400, Arvind Sankar wrote: > The gcc configure script does not use the config/picflag.m4 macro to > customize PICFLAG according to the host when using --enable-host-shared. > > Fix configure.ac to do so. > > Tested bootstrap on x86_64-linux-gnu. > > 2019-07-22 Arvin

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-06-10 Thread Alexandre Oliva
On Jun 9, 2020, Thomas Schwinge wrote: > Are you able to easily create/suggest patches for these? (You're > probably not set up for offloading compilation...) I can try, but I can certainly use help, if not in coding, at least with testing. > Can you suggest > how/where to adjust: producer-si

Re: [PATCH V2] Practical Improvement to Double Precision Complex Divide

2020-06-10 Thread Patrick McGehearty via Gcc-patches
A follow up note relating to use of fused multiply add in complex divide: While reviewing bugs relating to complex divide in libgcc, I rediscovered bug 59714 - complex division is surprising on targets with FMA. The specific concern was when you divide (1.0 + 3.0i) by itself and fused multiply a

Re: [PATCH] libstdc++: Fix some ranges algos optimizations [PR95578]

2020-06-10 Thread Patrick Palka via Gcc-patches
On Wed, 10 Jun 2020, Jonathan Wakely wrote: > On 10/06/20 15:32 -0400, Patrick Palka via Libstdc++ wrote: > > ranges::copy and a number of other ranges algorithms have unwrapping > > optimizations for iterators of type __normal_iterator, move_iterator and > > reverse_iterator. But in the checks t

[PATCH] c++: ICE with IMPLICIT_CONV_EXPR in array subscript [PR95508]

2020-06-10 Thread Marek Polacek via Gcc-patches
Since r10-7096 convert_like, when called in a template, creates an IMPLICIT_CONV_EXPR when we're converting to/from array type. In this test, we have e[f], and we're converting f (of type class A) to int, so convert_like in build_new_op_1 created the IMPLICIT_CONV_EXPR that got into cp_build_array

[PATCH] c++: Fix ICE in check_local_shadow with enum [PR95560]

2020-06-10 Thread Marek Polacek via Gcc-patches
Another indication that perhaps this warning is emitted too early. We crash because same_type_p gets a null type: we have an enumerator without a fixed underlying type and finish_enum_value_list hasn't yet run. So check if the type is null before calling same_type_p. (This is a regression and th

Re: [PATCH 1/2] RISC-V: Describe correct USEs for gpr_save pattern [PR95252]

2020-06-10 Thread Jim Wilson
On Wed, Jun 10, 2020 at 1:08 AM Kito Cheng wrote: > * config/riscv/riscv.c (gpr_save_reg_order): New. > (riscv_expand_prologue): Use riscv_gen_gpr_save_insn to gen gpr_save. > (riscv_gen_gpr_save_insn): New. > ... Looks good to me. Though these two new functions should ha

Re: [PATCH 2/2] RISC-V: Unify the output asm pattern between gpr_save and gpr_restore pattern.

2020-06-10 Thread Jim Wilson
On Wed, Jun 10, 2020 at 1:08 AM Kito Cheng wrote: > * config/riscv/riscv-protos.h (riscv_output_gpr_save): Remove. > * config/riscv/riscv-sr.c (riscv_sr_match_prologue): Update > value. > * config/riscv/riscv.c (riscv_output_gpr_save): Remove. > * config/ris

Re: [PATCH] libstdc++: Fix some ranges algos optimizations [PR95578]

2020-06-10 Thread Jonathan Wakely via Gcc-patches
On 10/06/20 15:32 -0400, Patrick Palka via Libstdc++ wrote: ranges::copy and a number of other ranges algorithms have unwrapping optimizations for iterators of type __normal_iterator, move_iterator and reverse_iterator. But in the checks that guard these optimizations we currently only test that

Re: [PATCH/RFC] How to fix PR95440

2020-06-10 Thread Iain Sandoe
Hi Jason, Jason Merrill wrote: > On Tue, Jun 9, 2020 at 5:04 AM Iain Sandoe wrote: > > /* Don't bother reversing an operator with two identical parameters. > */ > - else if (args->length () == 2 && (flags & LOOKUP_REVERSED)) > + else if (args && args->length () == 2 && (fl

Re: [PR95416] outputs.exp: skip lto tests when not using linker plugin

2020-06-10 Thread Iain Sandoe via Gcc-patches
Hi Alexandre, Alexandre Oliva wrote: On Jun 9, 2020, Iain Sandoe wrote: I have an ugly patch that makes this work for Darwin (essentially, by having two versions of the LTO tests We could deal with that in a similar way to how .dwo files are handled, namely, with explicit handling in th

Re: [PATCH, PR fortran/95503] [9/10/11 Regression] ICE in gfc_is_simply_contiguous, at fortran/expr.c:5844

2020-06-10 Thread Harald Anlauf
Early ping. > Gesendet: Donnerstag, 04. Juni 2020 um 20:47 Uhr > Von: "Harald Anlauf" > An: "fortran" , "gcc-patches" > Betreff: [PATCH, PR fortran/95503] [9/10/11 Regression] ICE in > gfc_is_simply_contiguous, at fortran/expr.c:5844 > > The following patch fixes an almost obvious ICE in inval

[PATCH] libstdc++: Fix some ranges algos optimizations [PR95578]

2020-06-10 Thread Patrick Palka via Gcc-patches
ranges::copy and a number of other ranges algorithms have unwrapping optimizations for iterators of type __normal_iterator, move_iterator and reverse_iterator. But in the checks that guard these optimizations we currently only test that the iterator of the iterator/sentinel pair has the appropriat

Re: [PATCH 5/6] rs6000, Add vector splat builtin support

2020-06-10 Thread Segher Boessenkool
Hi! On Wed, Jun 10, 2020 at 09:14:07AM -0700, Carl Love wrote: > On Wed, 2020-06-10 at 10:46 -0500, will schmidt wrote: > > Compare that to the other predicates (config/rs6000/predicates.md) > > > > Those have explicit checks against both ends of the valid range of > > values. i.e. > > > > ;;

Re: [PATCH 5/6] rs6000, Add vector splat builtin support

2020-06-10 Thread Segher Boessenkool
Hi! On Tue, Jun 09, 2020 at 05:01:45PM -0700, Carl Love wrote: > On Fri, 2020-06-05 at 16:28 -0500, Segher Boessenkool wrote: > > > +;; Return 1 if op is a 32-bit constant signed integer > > > +(define_predicate "s32bit_cint_operand" > > > + (and (match_code "const_int") > > > + (match_test

Re: [PATCH resend] rs6000, pr 94833: fix vec_first_match_index for nulls

2020-06-10 Thread Segher Boessenkool
Hi Carl, On Wed, Jun 10, 2020 at 09:05:36AM -0700, Carl Love wrote: > I committed this patch to mainline and backported to GCC 9. > > I have looked at GCC 8. The functional issue is there, i.e. the > vcmpnez is used instead of vcmpne. However the test case > builtins-8-p9-runnable.c does not

Re: [PR95416] outputs.exp: skip lto tests when not using linker plugin

2020-06-10 Thread Alexandre Oliva
On Jun 9, 2020, Iain Sandoe wrote: > That means that the intermediate objects proceed all the way to .s > output - and thus the ‘final’ pass is run (producing the extra files seen). > You can mimic this with x86 Linux by appending -ffat-lto-objects to an > LTO command line. I see, thanks. >

Re: [PR95416] outputs.exp: skip lto tests when not using linker plugin

2020-06-10 Thread Alexandre Oliva
On Jun 9, 2020, Rainer Orth wrote: > this is wrong unfortunately: braces are the Tcl equivalent of single > quotes so you're setting skip_lto to the string inside. Aah, thanks. So when $skip_lto is expanded in the ifs, the whole thing is evaluated, and that's why it works anyway? > While this

Re: libstdc++: Extend memcmp optimization in std::lexicographical_compare

2020-06-10 Thread Jonathan Wakely via Gcc-patches
On 10/06/20 18:40 +0200, François Dumont wrote: On 10/06/20 4:49 pm, Jonathan Wakely wrote: On 10/06/20 08:18 +0200, François Dumont via Libstdc++ wrote: On 09/06/20 10:53 pm, Jonathan Wakely wrote: This reminds me that I was going to extend the condition for using memcmp to also apply to

Re: [PATCH] Testsuite: Mark check_effective_target_exceptions_enabled test as C++ test input.

2020-06-10 Thread Richard Sandiford
Tamar Christina writes: > Hi All, > > The test in check_effective_target_exceptions_enabled uses a C++ keyword > `throw` > and the test fails with a syntax error on any non-g++ test. I now tell the > testsuite driver that this is a C++ input file so it runs it as such in all > the > drivers. N

Re: [PATCH] AArch64: Don't check for amdgcn-amdhsa at all on arm targets.

2020-06-10 Thread Andrew Pinski via Gcc-patches
On Wed, Jun 10, 2020 at 9:57 AM Tamar Christina wrote: > > Hi All, > > The amdgcn-amdhsa test seems to be running for all targets unconditionally > while > only really makes sense for certain targets. This patch adds an opt-out list > and opts out arm targets. > > Regtested on aarch64-none-linux

[PATCH] Testsuite: Mark check_effective_target_exceptions_enabled test as C++ test input.

2020-06-10 Thread Tamar Christina
Hi All, The test in check_effective_target_exceptions_enabled uses a C++ keyword `throw` and the test fails with a syntax error on any non-g++ test. I now tell the testsuite driver that this is a C++ input file so it runs it as such in all the drivers. Regtested on aarch64-none-linux-gnu and no

Re: [PATCH 4/4] vect: Factor out and rename some functions/macros

2020-06-10 Thread Richard Sandiford
"Kewen.Lin" writes: > diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c > index ca68d04a919..1fac5898525 100644 > --- a/gcc/tree-vect-loop-manip.c > +++ b/gcc/tree-vect-loop-manip.c > @@ -420,8 +420,8 @@ vect_set_loop_controls_directly (class loop *loop, > loop_vec_info loop_vi

[PATCH] AArch64: Don't check for amdgcn-amdhsa at all on arm targets.

2020-06-10 Thread Tamar Christina
Hi All, The amdgcn-amdhsa test seems to be running for all targets unconditionally while only really makes sense for certain targets. This patch adds an opt-out list and opts out arm targets. Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/testsuite/ChangeL

Re: libstdc++: Extend memcmp optimization in std::lexicographical_compare

2020-06-10 Thread François Dumont via Gcc-patches
On 10/06/20 4:49 pm, Jonathan Wakely wrote: On 10/06/20 08:18 +0200, François Dumont via Libstdc++ wrote: On 09/06/20 10:53 pm, Jonathan Wakely wrote: This reminds me that I was going to extend the condition for using memcmp to also apply to unsigned integers with sizeof(T) > 1 on big endian t

Re: [PATCH PR95570] vect: ICE: Segmentation fault in vect_loop_versioning

2020-06-10 Thread Richard Sandiford
"Yangfei (Felix)" writes: > Hi, > > PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95570 > > Here, we are doing loop versioning for alignment. The only dr here is a > gather-statter operation: x[start][i]. > Scalar evolution analysis for this dr failed, so DR_STEP is NULL_TREE, which >

Re: [PATCH] wwwdocs: Document devel/omp/gcc-10 branch

2020-06-10 Thread Kwok Cheung Yeung
The inactive development branches are sorted alphabetically except for the openacc-gcc-*-branch entries, which are grouped with the gomp*-branch entries. Would it be better to place devel/omp/gcc-9 alphabetically (in which case it will go between debuglocus and dwarf4), or by topic (in which cas

Re: 1-800-GIT-HELP

2020-06-10 Thread Nathan Sidwell
On 6/10/20 12:00 PM, Andreas Schwab wrote: On Jun 10 2020, Nathan Sidwell wrote: needed 'origin' -- eg 'git merge origin master' That's an octopus merge. I don't think you want that. ah. Somehow I convinced myself that was how to merge from master, but I guess my formulation resulted in o

RE: [PATCH 5/6] rs6000, Add vector splat builtin support

2020-06-10 Thread Carl Love via Gcc-patches
On Wed, 2020-06-10 at 10:46 -0500, will schmidt wrote: > > On Fri, 2020-06-05 at 16:28 -0500, Segher Boessenkool wrote: > > > > +;; Return 1 if op is a 32-bit constant signed integer > > > > +(define_predicate "s32bit_cint_operand" > > > > + (and (match_code "const_int") > > > > + (match_t

Re: [PATCH] diagnostics: Add options to control the column units [PR49973] [PR86904]

2020-06-10 Thread David Malcolm via Gcc-patches
On Fri, 2020-05-08 at 15:35 -0400, Lewis Hyatt wrote: > On Fri, Jan 31, 2020 at 03:31:59PM -0500, David Malcolm wrote: > > On Fri, 2020-01-31 at 14:31 -0500, Lewis Hyatt wrote: > > > Hello- > > > > > > Here is the second patch that I mentioned when I submitted the > > > other > > > related > > > p

[PATCH] avoid stmt-info allocation for debug stmts

2020-06-10 Thread Richard Biener
The following avoids allocating stmt info structs for debug stmts. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. 2020-06-10 Richard Biener * tree-vect-loop.c (vect_determine_vectorization_factor): Skip debug stmts. (_loop_vec_info::_loop_vec_info): Like

[PATCH] tree-optimization/95576 - fix compare-debug issue with SLP vectorization

2020-06-10 Thread Richard Biener
The following avoids leading debug stmts in BB vectorizer regions. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. 2020-06-10 Richard Biener PR tree-optimization/95576 * tree-vect-slp.c (vect_slp_bb): Skip leading debug stmts. * g++.dg/vect/pr95576.cc: N

RE: [PATCH resend] rs6000, pr 94833: fix vec_first_match_index for nulls

2020-06-10 Thread Carl Love via Gcc-patches
Segher, Bill: I committed this patch to mainline and backported to GCC 9. I have looked at GCC 8. The functional issue is there, i.e. the vcmpnez is used instead of vcmpne. However the test case builtins-8-p9-runnable.c does not exist in GCC 8. The patch consists of the functional fix: ---

Re: [PATCH PR95523] aarch64:ICE in register_tuple_type,at config/aarch64/aarch64-sve-builtins.cc:3434

2020-06-10 Thread Richard Sandiford
Hi, "Zhanghaijian (A)" writes: > This is a simple fix for pr95523. > When registering the tuple type in register_tuple_type, the TYPE_ALIGN > (tuple_type) will be changed by -fpack-struct=n. > We need to maintain natural alignment in handle_arm_sve_h. > Bootstrap and tested on aarch64 Linux plat

Re: 1-800-GIT-HELP

2020-06-10 Thread Andreas Schwab
On Jun 10 2020, Nathan Sidwell wrote: > needed 'origin' -- eg 'git merge origin master' That's an octopus merge. I don't think you want that. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something compl

Re: Automatic vs. manual 'ChangeLog' files updates for devel/ branches etc. (was: [PATCH] wwwdocs: Document devel/omp/gcc-10 branch)

2020-06-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 10, 2020 at 05:47:54PM +0200, Thomas Schwinge wrote: > The automated system runs once a day. I guess it's generally deemed > acceptable if the source code state (commits) and the 'ChangeLog' files > state is out of sync for one day. There surely must be some mechanism in > place to ma

Re: 1-800-GIT-HELP

2020-06-10 Thread H.J. Lu via Gcc-patches
On Wed, Jun 10, 2020 at 8:38 AM Nathan Sidwell wrote: > > I'm trying to merge master to devel/c++-modules, as I usually do. But > there's an ICE creeping in, so I'm attempting incremental merges to > figure out what happened. > > I thought 'git merge --no-commit origin $HASH' would do that, pulli

Re: 1-800-GIT-HELP

2020-06-10 Thread Nathan Sidwell
On 6/10/20 11:38 AM, Nathan Sidwell wrote: I'm trying to merge master to devel/c++-modules, as I usually do.  But there's an ICE creeping in, so I'm attempting incremental merges to figure out what happened. I thought 'git merge --no-commit origin $HASH' would do that, pulling $HASH out of ma

Re: [EXTERNAL] Re: [PATCH 5/6] rs6000, Add vector splat builtin support

2020-06-10 Thread will schmidt via Gcc-patches
On Tue, 2020-06-09 at 17:01 -0700, Carl Love wrote: > Segher: > > So I have been looking at the predicate definitions that I had > created. > > On Fri, 2020-06-05 at 16:28 -0500, Segher Boessenkool wrote: > > > +;; Return 1 if op is a 32-bit constant signed integer > > > +(define_predicate "s32bi

Automatic vs. manual 'ChangeLog' files updates for devel/ branches etc. (was: [PATCH] wwwdocs: Document devel/omp/gcc-10 branch)

2020-06-10 Thread Thomas Schwinge
Hi! On 2020-06-10T17:15:41+0200, Tobias Burnus wrote: > On 6/10/20 3:34 PM, Kwok Cheung Yeung wrote: >> This patch updates the previous entry on the website for >> devel/omp/gcc-9 to refer to the new branch instead. This removes >> references to the old branch, as new development should occur on

1-800-GIT-HELP

2020-06-10 Thread Nathan Sidwell
I'm trying to merge master to devel/c++-modules, as I usually do. But there's an ICE creeping in, so I'm attempting incremental merges to figure out what happened. I thought 'git merge --no-commit origin $HASH' would do that, pulling $HASH out of master's commit history (git tree --first-pare

Re: [PATCH] wwwdocs: Document devel/omp/gcc-10 branch

2020-06-10 Thread Tobias Burnus
On 6/10/20 3:34 PM, Kwok Cheung Yeung wrote: This patch updates the previous entry on the website for devel/omp/gcc-9 to refer to the new branch instead. This removes references to the old branch, as new development should occur on the newer branch. Can you move the old entry to "Inactive Devel

RE: [IMPORTANT] ChangeLog related changes

2020-06-10 Thread Tamar Christina
Thanks both! Cheers, Tamar > -Original Message- > From: Martin Liška > Sent: Wednesday, June 10, 2020 2:41 PM > To: Tamar Christina ; Jonathan Wakely > > Cc: Jakub Jelinek ; g...@gcc.gnu.org; gcc-patches patc...@gcc.gnu.org> > Subject: Re: [IMPORTANT] ChangeLog related changes > > On

Re: libstdc++: Extend memcmp optimization in std::lexicographical_compare

2020-06-10 Thread Jonathan Wakely via Gcc-patches
On 10/06/20 08:18 +0200, François Dumont via Libstdc++ wrote: On 09/06/20 10:53 pm, Jonathan Wakely wrote: This reminds me that I was going to extend the condition for using memcmp to also apply to unsigned integers with sizeof(T) > 1 on big endian targets. This illustrates what I tried to avo

Re: [PATCH] Implement no_stack_protect attribute.

2020-06-10 Thread Martin Sebor via Gcc-patches
On 6/10/20 2:12 AM, Martin Liška wrote: PING^1 The exclusion changes are just what I was suggesting, thanks. Martin On 5/25/20 3:10 PM, Martin Liška wrote: On 5/21/20 4:53 PM, Martin Sebor wrote: On 5/21/20 5:28 AM, Martin Liška wrote: On 5/18/20 10:37 PM, Martin Sebor wrote: I know the

[Ada] AI12-0364 Add a modular atomic arithmetic package

2020-06-10 Thread Pierre-Marie de Rodat
This new Ada 202x AI introduces a new package Modular_Arithmetic. Related discussion also suggested to rename the recently introduced Arithmetic package -> Integer_Arithmetic, for consistency, so this is done at the same time. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-10 Arnaud C

[PATCH] gcc-changelog: fix parse_git_name_status for renames.

2020-06-10 Thread Martin Liška
Renamed files are listed in the following format: M gcc/ada/Makefile.rtl M gcc/ada/impunit.adb R097gcc/ada/libgnat/s-atopar.adbgcc/ada/libgnat/s-aoinar.adb R095gcc/ada/libgnat/s-atopar.adsgcc/ada/libgnat/s-aoinar.ads A gcc/ada/libgnat/s-aomoar.adb A gcc/ada

[DOC] gcc-changelog: document additional authors

2020-06-10 Thread Martin Liška
Hello. I've just pushed the documentation improvement about Co-Authored-By. Martin --- htdocs/codingconventions.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/codingconventions.html b/htdocs/codingconventions.html index 6ae962ea..a08ddcbb 100644 --- a/htdocs/

Re: [IMPORTANT] ChangeLog related changes

2020-06-10 Thread Martin Liška
On 6/10/20 3:34 PM, Tamar Christina wrote: Hi All, Hello. We've been wondering since we no longer list authors in the changelog (at least mklog doesn't generate it), You are right, it's preferred solution and it's documented here: https://gcc.gnu.org/codingconventions.html#ChangeLogs '''

Re: [IMPORTANT] ChangeLog related changes

2020-06-10 Thread Marek Polacek via Gcc-patches
On Wed, Jun 10, 2020 at 01:34:54PM +, Tamar Christina wrote: > Hi All, > > We've been wondering since we no longer list authors in the changelog (at > least mklog doesn't generate it), > How do we handle multi author patches nowadays? > > Tried searching for it on the website but couldn’t fi

[Ada] Ada 202x AI12-0192 "requires late initialization"

2020-06-10 Thread Pierre-Marie de Rodat
Working on this AI it appeared that GNAT wasn't implementing the Ada 2012 notion of "require late initialization", so plug this hole and implement the new rule from AI12-0192 at the same time. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-10 Arnaud Charlet gcc/ada/ * exp_

[Ada] Don't build equivalent record aggregate if type has predicates

2020-06-10 Thread Pierre-Marie de Rodat
Building equivalent record aggregates when the type of the aggregate has predicate functions can result in Gigi crashes if the type hasn't been frozen yet. Since Build_Equivalent_Record_Aggregate is an optimization, it's ok to disable it when encountering aggregates with predicates. Tested on x86_

[Ada] Additional warnings on overlapping actuals of composite types

2020-06-10 Thread Pierre-Marie de Rodat
This patch enhances the warnings on overlapping actuals of composite types when only one of them is writable. If these parameters are passed by reference it is the case that assignment to one could have the undesirable effect of modifying the other inside the called subprogram. Tested on x86_64-pc

[Ada] AI12-0311 New checks for language-defined units

2020-06-10 Thread Pierre-Marie de Rodat
This Ada 202x AI defines among other things new check names. Recognize them as no-ops for now. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-10 Arnaud Charlet gcc/ada/ * snames.ads-tmpl (Name_Characters_Assertion_Check, Name_Containers_Assertion_Check, Na

[Ada] Implement AI12-0162 Memberships and Unchecked_Unions

2020-06-10 Thread Pierre-Marie de Rodat
This makes sure that the semantics specified by this AI is observed by using an expression with actions in order to insert the PE raise statement in a membership context with multiple choices. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-10 Eric Botcazou gcc/ada/ * exp_c

[Ada] Add missing Sloc on new explicit dereferences

2020-06-10 Thread Pierre-Marie de Rodat
This makes sure that a Sloc is put on the dereferences inserted by the new procedure Copy_And_Maybe_Dereference. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-10 Eric Botcazou gcc/ada/ * sem_util.adb (Copy_And_Maybe_Dereference): Temporarily copy

[Ada] Insert explicit dereferences when building actual subtype

2020-06-10 Thread Pierre-Marie de Rodat
This plugs the only loophole in the front-end through which implicit dereferences can reach the code generator without having being turned into explicit ones. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-10 Eric Botcazou gcc/ada/ * sem_util.adb (C

[Ada] Remove obsolete code in Resolve_Call

2020-06-10 Thread Pierre-Marie de Rodat
This removes a block of code in Resolve_Call that inserts an explicit dereference for a call whose prefix is an access-to-subprogram type, but this processing is already done earlier in Analyze_Call. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-10 Eric Botcaz

[Ada] Remove Determine_License

2020-06-10 Thread Pierre-Marie de Rodat
The routine Determine_License is brittle and doesn't e.g. handle properly wide characters. Furthermore this is just a heuristic, which isn't really needed, so remove it to simplify maintenance and remove latent issues with wide characters. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06

[Ada] Fold Enum_Rep attribute in evaluation and not in expansion

2020-06-10 Thread Pierre-Marie de Rodat
Folding of Enum_Rep attribute was partly done in evaluation (for expressions like "Typ'Enum_Rep (Enum_Literal)") and partly in expansion (for expressions like "Enum_Literal'Enum_Rep". Moreover, some of the code in evaluation was dead and some of the code in expansion was violating internal assertio

[Ada] Revert workaround for expansion of Enum_Rep in GNATprove mode

2020-06-10 Thread Pierre-Marie de Rodat
A workaround for a bug in expansion of Enum_Rep attribute in the GNATprove mode was to expand First and Last attributes. Now with handling of Enum_Rep fixed we don't need this workaround anymore. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-10 Piotr Trojanek gcc/ada/ * e

[Ada] Ada_2020 AI12-0220: Pre/Postconditions on Access_To_Subprogram types

2020-06-10 Thread Pierre-Marie de Rodat
This patch implements AI12-0220, which adds contracts to Access_To_Subprogram types so that pre/postconditions are applied to all indirect calls through such an access type. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-10 Ed Schonberg gcc/ada/ * einfo.ads (Access_Subprog

[Ada] Improve code generated for dynamic discriminated aggregate

2020-06-10 Thread Pierre-Marie de Rodat
This changes the way some assignments of aggregates of dynamic discriminated record types are expanded by the front-end: they used to always give rise to the creation of a temporary, which is unnecessary if the by-copy semantics can be guaranteed. This also puts the treatment of qualified aggregat

[Ada] Disable unwanted warnings in Assertion_Policy(Ignore) mode

2020-06-10 Thread Pierre-Marie de Rodat
This patch fixes a bug where if pragma Assertion_Policy(Ignore) is in effect, if the only reference to a given declaration is in an Invariant, spurious warnings about unused entities are given. For example, if a compilation unit says "with X;", and the only reference to X is in an invariant, the co

[Ada] Simplify detection of static membership choices

2020-06-10 Thread Pierre-Marie de Rodat
Membership test operators (i.e. "in" and "not in") have either the right operand present (when there is just one choice) or the list of alternatives present (when there are many choices), as documented in sinfo.ads. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-10 Piotr Trojanek g

[Ada] Fix incorrect insertion of post-call actions in if-expression

2020-06-10 Thread Pierre-Marie de Rodat
When post-call actions need to be inserted in an expression context, an N_Expression_With_Actions node is used. That's not done here for the condition of an if-expression, so the change adds this case. It also deals with the case of a call to a primitive of a tagged type written in prefixed notat

[Ada] Classwide controlled obj not dispatching

2020-06-10 Thread Pierre-Marie de Rodat
Overriding dispatching primitives Initialize, Adjust or Finalize of a controlled type by means of a subprogram body that has no specification causes the frontend to initialize incorrectly the dispatch table slots of these primitives. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-10 J

[Ada] Fix assertion failure on functions with contracts

2020-06-10 Thread Pierre-Marie de Rodat
This commit fixes a bug introduced in a previous commit that attempted to detect illegal body definitions on null procedures but did not account for the fact that function definitions such as `function F return Integer with Global => null is` could use the same path. This would result in an asserti

[Ada] Incorrect accessibility checks on functions calls

2020-06-10 Thread Pierre-Marie de Rodat
This patch corrects an issue whereby the compiler would issue incorrect accessibility errors and checks for objects initialized by functions returning anonymous access types or type conversions where the operand is a function returning an anonymous access type. Tested on x86_64-pc-linux-gnu, commi

[Ada] Reject illegal bodies for null procedures

2020-06-10 Thread Pierre-Marie de Rodat
The `if Token = ...` condition was added when aspect specifications were introduced in GNAT: aspect specification parsing is done as part of subprogram declaration parsing, and so once aspect specifications are parsed, it is necessary to re-start the subprogram declaration-parsing autotmata. But re

[Ada] Remove unreferenced GNATprove utility routine Get_Low_Bound

2020-06-10 Thread Pierre-Marie de Rodat
Routine Get_Low_Bound was added to frontend while moving utility routines from the GNATprove backend, but it is no longer referenced. (Surprisingly, there is no Get_High_Bound routine anywhere). Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-10 Piotr Trojanek gcc/ada/ * se

RE: [IMPORTANT] ChangeLog related changes

2020-06-10 Thread Tamar Christina
Hi All, We've been wondering since we no longer list authors in the changelog (at least mklog doesn't generate it), How do we handle multi author patches nowadays? Tried searching for it on the website but couldn’t find anything. Thanks, Tamar > -Original Message- > From: Gcc-patches

[PATCH] wwwdocs: Document devel/omp/gcc-10 branch

2020-06-10 Thread Kwok Cheung Yeung
Hello The devel/omp/gcc-10 branch was pushed yesterday as the new development branch for OpenMP/OpenACC/offloading functionality, based on the GCC 10 release. This patch updates the previous entry on the website for devel/omp/gcc-9 to refer to the new branch instead. This removes references t

[PATCH] tree-optimization/95576 - fix compare-debug issue with SLP vectorization

2020-06-10 Thread Richard Biener
The following avoids leading debug stmts in BB vectorizer regions. Bootstrap and regtest running on x86_64-unknown-linux-gnu. 2020-06-10 Richard Biener PR tree-optimization/95576 * tree-vect-slp.c (vect_slp_bb): Skip leading debug stmts. * g++.dg/vect/pr95576.cc: New

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-10 Thread Martin Liška
On 6/10/20 2:27 PM, Martin Liška wrote: /home/marxin/Programming/testcases/vect-low.c: In function ‘v2df foo(v2df,  v2df, v2df, v2df)’: /home/marxin/Programming/testcases/vect-low.c:3:6: error: BB 2 is missing an EH  edge Ok, I was missing copying of the EH edges: FOR_EACH_EDGE (e, ei, g

[PATCH 2/7 V3] rs6000: lenload/lenstore optab support

2020-06-10 Thread Kewen.Lin via Gcc-patches
V3: Update the define_expand as optab changes. gcc/ChangeLog: 2020-MM-DD Kewen Lin * config/rs6000/vsx.md (lenload): New define_expand. (lenstore): Likewise. --- gcc/config/rs6000/vsx.md | 32 1 file changed, 32 insertions(+) diff --git a/

[PATCH 1/7 V3] ifn/optabs: Support vector load/store with length

2020-06-10 Thread Kewen.Lin via Gcc-patches
on 2020/6/10 下午5:22, Richard Sandiford wrote: > "Kewen.Lin" writes: >> @@ -2497,6 +2499,9 @@ expand_mask_load_optab_fn (internal_fn, gcall *stmt, >> convert_optab optab) >> >>if (optab == vec_mask_load_lanes_optab) >> icode = get_multi_vector_move (type, optab); >> + else if (optab ==

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-10 Thread Martin Liška
On 6/10/20 12:50 PM, Richard Biener wrote: with -fnon-call-exceptions should trigger it. Thanks, that works! We start with: foo (v2df a, v2df b, v2df c, v2df d) Eh tree: 1 try land:{1,} catch:{} { void * _1; v2df _2; v2df _8; [local count: 1073741824]: [LP 1] _8 = VEC_COND_EXPR

Re: [committed] gcc-changelog: Use non-zero exit status on error

2020-06-10 Thread Jonathan Wakely via Gcc-patches
On 10/06/20 13:13 +0100, Jonathan Wakely wrote: On 10/06/20 09:43 +0200, Martin Liška wrote: On 6/9/20 9:46 PM, Jonathan Wakely wrote: Is this worth adding to contrib/prepare-commit-msg? I like the idea and I would make it conditional based on an environment variable? Similarly to GCC_GIT_DIF

[PATCH] Make {SLP_TREE,STMT_VINFO}_VEC_STMTS a vector of gimple *

2020-06-10 Thread Richard Biener
This makes {SLP_TREE,STMT_VINFO}_VEC_STMTS a vector of gimple * and not allocate a stmt_vec_info for vectorizer generated stmts since this is now possible after removing the only use which was chaining of vector stmts via STMT_VINFO_RELATED_STMT. This also removes all stmt_vec_info allocations d

Re: [committed] gcc-changelog: Use non-zero exit status on error

2020-06-10 Thread Jonathan Wakely via Gcc-patches
On 10/06/20 13:13 +0100, Jonathan Wakely wrote: On 10/06/20 09:43 +0200, Martin Liška wrote: On 6/9/20 9:46 PM, Jonathan Wakely wrote: Is this worth adding to contrib/prepare-commit-msg? I like the idea and I would make it conditional based on an environment variable? Similarly to GCC_GIT_DIF

Re: [committed] gcc-changelog: Use non-zero exit status on error

2020-06-10 Thread Jonathan Wakely via Gcc-patches
On 10/06/20 09:43 +0200, Martin Liška wrote: On 6/9/20 9:46 PM, Jonathan Wakely wrote: Is this worth adding to contrib/prepare-commit-msg? I like the idea and I would make it conditional based on an environment variable? Similarly to GCC_GIT_DIFF_FILE? With this patch you can use the gcc-con

Re: [PATCH] Add missing store in emission of asan_stack_free.

2020-06-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 10, 2020 at 01:14:59PM +0200, Martin Liška wrote: > >From 4d2e0b1e87b08ec21fd82144f00d364687030706 Mon Sep 17 00:00:00 2001 > From: Martin Liska > Date: Tue, 19 May 2020 16:57:56 +0200 > Subject: [PATCH] Add missing store in emission of asan_stack_free. > > gcc/ChangeLog: > > 2020-05

Re: [PATCH] Add missing store in emission of asan_stack_free.

2020-06-10 Thread Martin Liška
On 6/10/20 12:08 PM, Jakub Jelinek wrote: On Wed, Jun 10, 2020 at 11:49:01AM +0200, Martin Liška wrote: - store_by_pieces (shadow_mem, sz, builtin_memset_read_str, &c, -BITS_PER_UNIT, true, RETURN_BEGIN); + { + /* Emit: + memset(ShadowBase

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-10 Thread Richard Biener via Gcc-patches
On Wed, Jun 10, 2020 at 10:51 AM Martin Liška wrote: > > On 6/9/20 3:42 PM, Richard Biener wrote: > > On Mon, Jun 8, 2020 at 1:04 PM Martin Liška wrote: > >> > >> Hello. > >> > >> Thank you for the approval. There's the patch that defines 4 new > >> DEF_INTERNAL_OPTAB_FN. > >> > >> Patch can boo

Re: [PATCH] libsanitizer: use gnu++14

2020-06-10 Thread Richard Biener via Gcc-patches
On Tue, Jun 9, 2020 at 9:16 PM Martin Liška wrote: > > On 6/9/20 6:32 PM, Richard Biener wrote: > > On Tue, Jun 9, 2020 at 10:09 AM Martin Liška wrote: > >> > >> On 6/8/20 4:53 PM, Martin Liška wrote: > >>> Hi. > >>> > >>> Thank you for the report. It's caused by fact that LLVM switch in > >>> 4

Re: [PATCH] Add missing store in emission of asan_stack_free.

2020-06-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 10, 2020 at 11:49:01AM +0200, Martin Liška wrote: > - store_by_pieces (shadow_mem, sz, builtin_memset_read_str, &c, > - BITS_PER_UNIT, true, RETURN_BEGIN); > + { > + /* Emit: > +memset(ShadowBase, kAsanStackAfterReturnMagic, ShadowSize); >

Re: [PATCH] Add missing store in emission of asan_stack_free.

2020-06-10 Thread Martin Liška
On 6/10/20 10:42 AM, Jakub Jelinek wrote: E.g. we just shouldn't reuse MEMs (even after adjusting them) from different indirection levels because we risk some attributes (alias set, MEM_EXPR, whatever else) will stay around from the different indirection level. All right, what about the updated

  1   2   >