[PATCH] libstdc++: Add c++2a

2020-10-15 Thread Thomas Rodgers
From: Thomas Rodgers This should address the cumulative comments (modulo the discussion going on on the reflector about specification issues/questions). libstdc++/Changelog: libstdc++-v3/doc/doxygen/user.cfg.in (INPUT): Add new header. libstdc++-v3/include/Makefile.am (std_header

Go patch committed: Don't export function type parameter names

2020-10-15 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend stops exporting function type parameter names. When hashing a function type the parameter names are ignored. Therefore, we should not write them into the export data. Otherwise, minor changes in the order in which we process the types can cause the export data to cha

[RFC] Remove include/precompiled/expc++.h

2020-10-15 Thread Jonathan Wakely via Gcc-patches
Ed, In commit r232377 (aka 2be75957b80b640c0aac4356ab861edd0c2f1b9d in the git repo) you added a new header to the include/precompiled directory. That wasn't mentioned in the ChangeLog, wasn't in the patch posted to https://gcc.gnu.org/legacy-ml/libstdc++/2016-01/msg00016.html and wasn't added to

[PATCH] c++: Fix verify_ctor_sanity ICE [PR96241]

2020-10-15 Thread Marek Polacek via Gcc-patches
The code added in r10-6437 caused us to create a CONSTRUCTOR when we're {}-initializing an aggregate. Then we pass this new CONSTRUCTOR down to cxx_eval_constant_expression which, if the CONSTRUCTOR isn't TREE_CONSTANT or reduced_constant_expression_p, calls cxx_eval_bare_aggregate. In this case

Re: Extend builtin fnspecs

2020-10-15 Thread Marek Polacek via Gcc-patches
On Thu, Oct 15, 2020 at 11:50:28PM +0200, Jan Hubicka wrote: > Hi, > this patch implements the discussed change to fnspecs to make it > possible to specify parameters that are read and written. In addition > to original plan I ended up adding 'b' for functions that are barriers > (since those alia

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2020-10-15 Thread David Malcolm via Gcc-patches
On Thu, 2020-10-15 at 13:39 -0400, Antoni Boucher wrote: > Thanks. I updated the patch with these changes. Thanks for patch; review below. Sorry if it seems excessively nitpicky in places. > 2020-09-1 Antoni Boucher > > gcc/jit/ > PR target/96889 > * docs/topics/c

Extend builtin fnspecs

2020-10-15 Thread Jan Hubicka
Hi, this patch implements the discussed change to fnspecs to make it possible to specify parameters that are read and written. In addition to original plan I ended up adding 'b' for functions that are barriers (since those alias even with local refs) and 'o','O' for parameters that are written onl

libgo patch committed: Correct types in __go_ptrace shim

2020-10-15 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch uses the correct types in the __go_ptrace shim. This makes them match the types declared in Go and the types declared by the C ptrace function, i.e., void*. This avoids a warning about an implicit int-to-pointer cast on some platforms. Bootstrapped and ran Go te

Re: [wwwdocs] Add note about keeping replies on the mailing list

2020-10-15 Thread Jonathan Wakely via Gcc-patches
On 15/10/20 09:34 +0200, Gerald Pfeifer wrote: On Mon, 15 Jun 2020, Jonathan Wakely via Gcc-patches wrote: I can't count the number of times I've tried to help somebody on the gcc-help list and they assume that means I want to be their personal support person in a private email conversation. Th

Re: [RFC] Automatic linking of libatomic via gcc.c or ...? [PR81358] (dependency for libgomp on nvptx dep, configure overriddable, ...)

2020-10-15 Thread Joseph Myers
On Thu, 15 Oct 2020, Tobias Burnus wrote: > Hi Joseph, hi Jakub, > > (a) For the driver route: > > On 10/15/20 12:22 AM, Joseph Myers wrote: > > I think it should be somewhere in the expansion of %(link_gcc_c_sequence) > > (i.e. LINK_GCC_C_SEQUENCE_SPEC, which has various target-specific > > def

libgo patch committed: Fix path to x/net/route package in Makefile

2020-10-15 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch corrects a Makefile typo in the path to the x/net/route package. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 6949fbefe28134744a86c5d7b8d9c17fcf3a16a0 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index c

Go patch committed: Export type for string/bool constants

2020-10-15 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend includes the type in the export data when an inlinable function refers to a string or bool constant. The patch consolidates the identical code for constant type export into a pair of static methods. This fixes https://golang.org/issue/35739. Bootstrapped and ran Go t

Re: [PATCH] libstdc++: Add c++2a

2020-10-15 Thread Jonathan Wakely via Gcc-patches
On 15/10/20 07:46 -0700, Thomas Rodgers wrote: + template , + typename _Alloc = allocator<_CharT>> +class basic_osyncstream : public basic_ostream<_CharT, _Traits> +{ +public: + // Types: + using char_type = _CharT; + using traits_type = _Traits; + using

Re: [PATCH] libgccjit: Handle truncation and extension for casts [PR 95498]

2020-10-15 Thread Antoni Boucher via Gcc-patches
Hi. Sorry for the long delay. I attached the updated patch. For your question, the current code already works with boolean and reals and casts between integers and pointers is currently not supported. The tests now pass: I'm assuming I had to clean the build folder or something to make that

[committed] libstdc++: Fix typos in copyright notice

2020-10-15 Thread Jonathan Wakely via Gcc-patches
It looks like I did a s/a/__a/ substition in one of these headers, and then copied it to the other one. libstdc++-v3/ChangeLog: * include/std/concepts: Fix typos in copyright notice. * include/std/ranges: Likewise. Committed to trunk. I'll backport it to gcc-10 too. commit 7dbf9

Re: [PATCH] libstdc++: Add c++2a

2020-10-15 Thread Jonathan Wakely via Gcc-patches
On 15/10/20 07:46 -0700, Thomas Rodgers wrote: From: Thomas Rodgers * Note: depends on a sufficiently C++20ified basic_stringbuf<>. libstdc++/Changelog: libstdc++-v3/include/Makefile.am (std_headers): Add new header. libstdc++-v3/include/Makefile.in: Regenerate. libstdc

*PING* [PATCH] PR fortran/95979 - [10/11 Regression] ICE in get_kind, at fortran/simplify.c:129

2020-10-15 Thread Harald Anlauf
*ping* > Gesendet: Donnerstag, 08. Oktober 2020 um 20:44 Uhr > Von: "Harald Anlauf" > An: "fortran" , "gcc-patches" > Betreff: [PATCH] PR fortran/95979 - [10/11 Regression] ICE in get_kind, at > fortran/simplify.c:129 > > Dear all, > > the present PR turned out to be fixable rather easily, once

Re: [PATCH] libstdc++: Add c++2a

2020-10-15 Thread Jonathan Wakely via Gcc-patches
On 15/10/20 07:46 -0700, Thomas Rodgers wrote: From: Thomas Rodgers * Note: depends on a sufficiently C++20ified basic_stringbuf<>. libstdc++/Changelog: libstdc++-v3/include/Makefile.am (std_headers): Add new header. libstdc++-v3/include/Makefile.in: Regenerate. libstdc

Re: [PATCH] arm: Implement vceqq_p64, vceqz_p64 and vceqzq_p64 intrinsics

2020-10-15 Thread Andrea Corallo via Gcc-patches
Hi Christophe, I've spotted two very minors. Christophe Lyon via Gcc-patches writes: [...] > +/* For vceqq_p64, we rely on vceq_p64 for each of the two elements. */ > +__extension__ extern __inline uint64x2_t > +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) > +vceqq_p64

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2020-10-15 Thread Andrea Corallo via Gcc-patches
Antoni Boucher writes: > Thanks. I updated the patch with these changes. > > Is there any tool to automatically check the style? Yes, we have in contrib check_GNU_style.sh and check_GNU_style.py. Andrea

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2020-10-15 Thread Antoni Boucher via Gcc-patches
Thanks. I updated the patch with these changes. Is there any tool to automatically check the style? On Thu, Oct 15, 2020 at 06:23:18PM +0200, Andrea Corallo wrote: Antoni Boucher via Jit writes: Hi Antoni, Just had a quick look, please find some quite minor comments in line. From b0edc9eb8

[PATCH] Hashtable refactoring and simplification

2020-10-15 Thread François Dumont via Gcc-patches
I'd like to integrate some of the refactoring I had to do as part of my work on support of custom pointers in unordered containers. Those are of course the abi compatible changes. Thanks to the changes on _Hash_node type definition I was able to get rid of _Hash_code_base partial specializatio

[pushed] c++: Fix [[deprecated]] and implicit operator==. [PR97358]

2020-10-15 Thread Jason Merrill via Gcc-patches
Trying to diagnose the problem with an implicit copy function breaks if the function isn't actually a copy function. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: PR c++/95844 * decl.c (copy_fn_p): Return false for a function that is neither a construct

[PATCH] arm: Implement vceqq_p64, vceqz_p64 and vceqzq_p64 intrinsics

2020-10-15 Thread Christophe Lyon via Gcc-patches
This patch adds implementations for vceqq_p64, vceqz_p64 and vceqzq_p64 intrinsics. vceqq_p64 uses the existing vceq_p64 after splitting the input vectors into their high and low halves. vceqz[q] simply call the vceq and vceqq with a second argument equal to zero. The added (executable) testcase

Re: [PATCH] IPA: compare VRP types.

2020-10-15 Thread Martin Jambor
On Thu, Oct 15 2020, Martin Liška wrote: > Hello. > > As mentioned in the PR, since 74ca1c01d02e548f32aa26f9a887dcc0730703fb we > wrongly > merge a pair of VRP ranges with a different TREE_TYPE (in the PR one is char > and second > one is short). Then we merge 2 ranges and make an anti-range and

Re: [RFC] Automatic linking of libatomic via gcc.c or ...? [PR81358] (dependency for libgomp on nvptx dep, configure overriddable, ...)

2020-10-15 Thread Tobias Burnus
Hi Joseph, hi Jakub, (a) For the driver route: On 10/15/20 12:22 AM, Joseph Myers wrote: I think it should be somewhere in the expansion of %(link_gcc_c_sequence) (i.e. LINK_GCC_C_SEQUENCE_SPEC, which has various target-specific definitions), since that's what expands to something like -lgcc -l

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2020-10-15 Thread Andrea Corallo via Gcc-patches
Antoni Boucher via Jit writes: Hi Antoni, Just had a quick look, please find some quite minor comments in line. > From b0edc9eb8e8d3ba9e1c6a8d061a8627c0b0cf102 Mon Sep 17 00:00:00 2001 > From: Antoni Boucher > Date: Sat, 1 Aug 2020 17:52:17 -0400 > Subject: [PATCH] This patch add some reflecti

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2020-10-15 Thread Antoni Boucher via Gcc-patches
Hi. I added all the functions I need in this new patch. Please tell me if that looks good and I'll add documentation for those functions. Thanks. On Fri, Oct 02, 2020 at 04:24:26PM -0400, David Malcolm wrote: On Fri, 2020-10-02 at 16:17 -0400, David Malcolm wrote: On Tue, 2020-09-01 at 21:01

Re: [PATCH] IPA: compare VRP types.

2020-10-15 Thread Richard Biener via Gcc-patches
On October 15, 2020 5:04:11 PM GMT+02:00, "Martin Liška" wrote: >Hello. > >As mentioned in the PR, since 74ca1c01d02e548f32aa26f9a887dcc0730703fb >we wrongly >merge a pair of VRP ranges with a different TREE_TYPE (in the PR one is >char and second >one is short). Then we merge 2 ranges and make an

Re: [PATCH] c++: Improve printing of pointers-to-members [PR97406, PR85901]

2020-10-15 Thread Jason Merrill via Gcc-patches
On 10/14/20 3:52 PM, Marek Polacek wrote: This PR points out that when printing the parameter mapping for a pointer-to-member-function, the output was truncated: [with T = void (X::*] Fixed by printing the abstract declarator for pointers-to-members in cxx_pretty_printer::type_id. So now we

[PING][PATCH][omp, simt] Handle alternative IV

2020-10-15 Thread Tom de Vries
On 10/2/20 3:21 PM, Tom de Vries wrote: > Hi, > > Consider the test-case libgomp.c/pr81778.c added in this commit, with > this core loop (note: CANARY_SIZE set to 0 for simplicity): > ... > int s = 1; > #pragma omp target simd > for (int i = N - 1; i > -1; i -= s) > a[i] = 1; > ... > whi

[PATCH] IPA: compare VRP types.

2020-10-15 Thread Martin Liška
Hello. As mentioned in the PR, since 74ca1c01d02e548f32aa26f9a887dcc0730703fb we wrongly merge a pair of VRP ranges with a different TREE_TYPE (in the PR one is char and second one is short). Then we merge 2 ranges and make an anti-range and bad things happen. Patch can bootstrap on x86_64-li

[PATCH] aarch64: Add bfloat16 vldN_lane_bf16 + vldNq_lane_bf16 intrisics

2020-10-15 Thread Andrea Corallo via Gcc-patches
Hi all, I'd like to submit the following patch implementing the bfloat16_t neon related load intrinsics: vld2_lane_bf16, vld2q_lane_bf16, vld3_lane_bf16, vld3q_lane_bf16 vld4_lane_bf16, vld4q_lane_bf16. Please see refer to: ACLE ISA

Re: [PATCH] MIPS/libphobos: Fix switchcontext.S assembly for MIPS I ISA

2020-10-15 Thread Maciej W. Rozycki
On Tue, 13 Oct 2020, Richard Biener wrote: > > Jakub, Richard: I should have cc-ed you for the backports to GCC 8/9/10. > > OK to backport as a fatal build failure fix, or shall we leave this as it > > stands? FAOD the L.D and S.D assembly instructions have been supported in > > binutils as

[PATCH] libstdc++: Add c++2a

2020-10-15 Thread Thomas Rodgers
From: Thomas Rodgers * Note: depends on a sufficiently C++20ified basic_stringbuf<>. libstdc++/Changelog: libstdc++-v3/include/Makefile.am (std_headers): Add new header. libstdc++-v3/include/Makefile.in: Regenerate. libstdc++-v3/include/std/streambuf (__detail::__

[committed][nvptx, testsuite] Xfail stack atomics

2020-10-15 Thread Tom de Vries
Hi, Nvptx currently doesn't support atomics if it involves a stack address. PR97444 is open about. Xfail corresponding execution fails in gcc.dg/atomic. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx, testsuite] Xfail stack atomics gcc/testsuite/ChangeLog: 2020-10-15 Tom de Vrie

Re: [PATCH] Fix ICE in vectorizable_live_operation

2020-10-15 Thread Richard Biener
On Thu, 15 Oct 2020, Jeff Law wrote: > > On 10/15/20 3:49 AM, Richard Biener wrote: > > This fixes the case where the insertion iterator for the live stmt > > is the end of a BB by adjusting the dominance query to the definition > > of the def we're substituting. > > > > Bootstrapped and tested o

[committed][nvptx] Remove -m32

2020-10-15 Thread Tom de Vries
Hi, The nvptx port has an -m32 option, but it's not clear whether this was ever build/tested/used. Don't expose to user anymore. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Remove -m32 gcc/ChangeLog: 2020-10-15 Tom de Vries PR target/97436 * config/nvptx/n

Re: [PATCH] Fix ICE in vectorizable_live_operation

2020-10-15 Thread Jeff Law via Gcc-patches
On 10/15/20 3:49 AM, Richard Biener wrote: > This fixes the case where the insertion iterator for the live stmt > is the end of a BB by adjusting the dominance query to the definition > of the def we're substituting. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. > > 2020-10-15

Re: [PATCH] fold x << (n % C) to x << (n & C-1) if C meets power2

2020-10-15 Thread Segher Boessenkool
Hi! On Thu, Oct 15, 2020 at 03:52:01PM +0800, guojiufu wrote: > I just had a check on below patch for PR66552. > https://gcc.gnu.org/pipermail/gcc-patches/2020-February/540930.html > It seems this patch works fine now. This patch fixes PR66552 which > request to optimizes (x shift (n mod C)) to >

Re: Handle POINTER_PLUS_EXPR in jump functions

2020-10-15 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 15, 2020 at 02:39:26PM +0200, Jan Hubicka wrote: > > Both of these tests FAIL everywhere: > > FAIL: gcc.dg/ipa/modref-1.c (test for excess errors) > > FAIL: gcc.dg/ipa/modref-1.c scan-ipa-dump modref "param offset: 1" > > FAIL: gcc.dg/ipa/modref-1.c scan-ipa-dump modref "param offset: 2

Re: libgfortran caf API help needed: Fixing fnspec strings in trans-decl

2020-10-15 Thread Jan Hubicka
> Hi Honza, > > attached is the patch to fix the fnspec-strings for the caf-api. I have tested > it and got no regressions with gcc-testsuite and with the opencoarray's > testsuite. So that seems fine. Hope this helps and again thank you for your > instant support on IRC. Thanks a lot for fixing

Re: Fix toplevel comment in attr-fnspec.h

2020-10-15 Thread Jan Hubicka
> On Thu, 15 Oct 2020, Jan Hubicka wrote: > > > Hi, > > this patch fixes some confussion I managed to introduce into the > > toplevel comment. > > > > OK? > > > > Honza > > * attr-fnspec.h: Fix toplevel comment. > > diff --git a/gcc/attr-fnspec.h b/gcc/attr-fnspec.h > > index 921bb48ae6a..30

Re: libgfortran caf API help needed: Fixing fnspec strings in trans-decl

2020-10-15 Thread Andre Vehreschild
Hi Honza, attached is the patch to fix the fnspec-strings for the caf-api. I have tested it and got no regressions with gcc-testsuite and with the opencoarray's testsuite. So that seems fine. Hope this helps and again thank you for your instant support on IRC. Regards, Andre On Wed, 7 Oc

Re: Fix handling of symbols in other partition in symtab_node::binds_to_current_def_p

2020-10-15 Thread Richard Biener via Gcc-patches
On Thu, Oct 15, 2020 at 2:37 PM Jan Hubicka wrote: > > > On Thu, Oct 15, 2020 at 1:53 PM Jan Hubicka wrote: > > > > > > Hi, > > > this patch makes binds_to_current_def_p to return true when the current > > > def is in other partition. This is needed for modref to propagate info > > > on loads ac

Re: Handle POINTER_PLUS_EXPR in jump functions

2020-10-15 Thread Jan Hubicka
> On Wed, Oct 14, 2020 at 03:40:33PM +0200, Jan Hubicka wrote: > > this patch adds logic to handle POINTER_PLUS_EXPR in compute_parm_map > > that I originally did not since I tought that all such adjustments are > > done by ancestor function. > > > > Bootstrapped/regtested x86_64-linux, will commi

Re: [PATCH] [PR rtl-optimization/97249]Simplify vec_select of paradoxical subreg.

2020-10-15 Thread Richard Sandiford via Gcc-patches
Hongtao Liu via Gcc-patches writes: > + /* Simplify vec_select of a subreg of X to just a vec_select of X > + when X has same component mode as vec_select. */ > + int l2; > + if (GET_CODE (trueop0) == SUBREG > + && GET_MODE_INNER (mode) > + == GET

Re: [PATCH] Add if-chain to switch conversion pass.

2020-10-15 Thread Richard Biener via Gcc-patches
On Mon, Oct 12, 2020 at 3:02 PM Martin Liška wrote: > > On 10/12/20 2:44 PM, Martin Liška wrote: > > On 10/7/20 10:00 AM, Richard Biener wrote: > >> As said I'd have a BB-local pass over BBs recording the index variable > >> and the range covered by the BBs gcond, plus recording how many excess >

Re: Fix handling of symbols in other partition in symtab_node::binds_to_current_def_p

2020-10-15 Thread Jan Hubicka
> On Thu, Oct 15, 2020 at 1:53 PM Jan Hubicka wrote: > > > > Hi, > > this patch makes binds_to_current_def_p to return true when the current > > def is in other partition. This is needed for modref to propagate info > > on loads across partition boundary. > > Hmm, but partitioning shouldn't infl

Re: Fix toplevel comment in attr-fnspec.h

2020-10-15 Thread Richard Biener
On Thu, 15 Oct 2020, Jan Hubicka wrote: > Hi, > this patch fixes some confussion I managed to introduce into the > toplevel comment. > > OK? > > Honza > * attr-fnspec.h: Fix toplevel comment. > diff --git a/gcc/attr-fnspec.h b/gcc/attr-fnspec.h > index 921bb48ae6a..30c0becfdf2 100644 > ---

Re: Fix handling of symbols in other partition in symtab_node::binds_to_current_def_p

2020-10-15 Thread Richard Biener via Gcc-patches
On Thu, Oct 15, 2020 at 1:53 PM Jan Hubicka wrote: > > Hi, > this patch makes binds_to_current_def_p to return true when the current > def is in other partition. This is needed for modref to propagate info > on loads across partition boundary. Hmm, but partitioning shouldn't influence what a def

[PATCH] fix TARGET_MEM_REF dumping

2020-10-15 Thread Richard Biener
This fixes the missing constant offset from TARGET_MEM_REF dumping. Bootstrapped/teste don x86_64-unknown-linux-ngu, pushed. 2020-10-15 Richard Biener * tree-pretty-print.c (dump_mem_ref): Print constant offset also for TARGET_MEM_REF. --- gcc/tree-pretty-print.c | 3 +-- 1 f

[PATCH] tree-optimization/97428 - split SLP groups for loop vectorization

2020-10-15 Thread Richard Biener
This enables SLP store group splitting also for loop vectorization. For the existing testcase gcc.dg/vect/vect-complex-5.c this then generates much better code, likewise for the PR97428 testcase. Both of those have a splitting opportunity splitting the group into two equal (vector-sized) halves, s

Fix toplevel comment in attr-fnspec.h

2020-10-15 Thread Jan Hubicka
Hi, this patch fixes some confussion I managed to introduce into the toplevel comment. OK? Honza * attr-fnspec.h: Fix toplevel comment. diff --git a/gcc/attr-fnspec.h b/gcc/attr-fnspec.h index 921bb48ae6a..30c0becfdf2 100644 --- a/gcc/attr-fnspec.h +++ b/gcc/attr-fnspec.h @@ -30,12 +30,11

Fix handling of symbols in other partition in symtab_node::binds_to_current_def_p

2020-10-15 Thread Jan Hubicka
Hi, this patch makes binds_to_current_def_p to return true when the current def is in other partition. This is needed for modref to propagate info on loads across partition boundary. Bootstrapped/regtsted x86_64-linux, comitted. * symtab.c (symtab_node::binds_to_current_def_p): Also acce

Re: [PATCH 1/2] aarch64: Remove support for extract-based addresses [PR96998]

2020-10-15 Thread Richard Sandiford via Gcc-patches
Alex Coplan writes: > @@ -11707,32 +11638,12 @@ aarch64_branch_cost (bool speed_p, bool > predictable_p) > /* Return true if the RTX X in mode MODE is a zero or sign extract > usable in an ADD or SUB (extended register) instruction. */ > static bool > -aarch64_rtx_arith_op_extract_p (rtx x

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-15 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 15, 2020 at 12:50:18PM +0200, Jakub Jelinek via Gcc-patches wrote: > If nothing of this is valid (i.e. mandatory forbids all the fallback), then > your patch implements it, but if e.g. only if (false) is allowed and nothing > else, then we are ATM in trouble (we pass -2 for if false as

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-15 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 14, 2020 at 09:32:42PM +0100, Kwok Cheung Yeung wrote: > I'm not sure how this can be tested automatically, as the behaviour depends > on whether the compiler has been built with offloading support, and whether > any supported offloading hardware has been installed on the system. I have

Re: [PATCH] [PR rtl-optimization/97249]Simplify vec_select of paradoxical subreg.

2020-10-15 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 15, 2020 at 4:14 PM Hongtao Liu wrote: > > On Thu, Oct 15, 2020 at 1:37 AM Segher Boessenkool > wrote: > > > > Hi! > > > > On Wed, Oct 14, 2020 at 01:43:45PM +0800, Hongtao Liu wrote: > > > On Wed, Oct 14, 2020 at 4:01 AM Segher Boessenkool > > > wrote: > > > > On Tue, Oct 13, 2020 a

[PATCH] Fix ICE in vectorizable_live_operation

2020-10-15 Thread Richard Biener
This fixes the case where the insertion iterator for the live stmt is the end of a BB by adjusting the dominance query to the definition of the def we're substituting. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2020-10-15 Richard Biener * tree-vect-loop.c (vectorizab

[Ada] Get finalization right when a function returns a function call

2020-10-15 Thread Pierre-Marie de Rodat
When a function returns a function call, we want to avoid making an unnecessary copy. This is particularly important because of a bug which had the effect that when a copy was generated, the copied object was never finalized. If, as in the case of the example for this ticket, finalization was being

[Ada] Crash on subtype of fixed-point type

2020-10-15 Thread Pierre-Marie de Rodat
This patch fixes a compiler abort on a subtype of a fixed-point type with a 'Small smaller than one. The bounds of a declared subtype of a fixed-point type where rescaled twice, leading to meaningless values (constraint-violating) for those bounds. Tested on x86_64-pc-linux-gnu, committed on trunk

Re: [PATCH] openmp: Add support for omp_get_supported_active_levels

2020-10-15 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 15, 2020 at 10:38:56AM +0100, Kwok Cheung Yeung wrote: > Okay to apply this patch? Ok, thanks. > commit 3f6f8808f74598e274bfb8245c08a5428ee1b3fd > Author: Kwok Cheung Yeung > Date: Thu Oct 15 02:32:09 2020 -0700 > > Amend documentation for omp_get_max_active_levels and > omp_

[Ada] Refine type from Nat to Pos in Make_Index

2020-10-15 Thread Pierre-Marie de Rodat
Refine types to make the code easier to understand. Semantics is not affected; all the callers have been already respecting the more restrictive type of parameter anyway. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.ads, sem_ch3.adb (Make_Index): Refined type of

[Ada] Do not use maximal values from System in runtime units

2020-10-15 Thread Pierre-Marie de Rodat
This changes a few runtime units to use explicit bounds based on Long_Long_Integer instead of maximal values from System, which may become very large when 128-bit types are supported. They are used for index types and memory byte counts and, therefore, the magnitude provided by Long_Long_Integer i

[Ada] Fix access to uninitialized global variable when emitting error

2020-10-15 Thread Pierre-Marie de Rodat
When calling Error_Msg_FE with a message string that contains "<<" insertion characters, the error reporting machinery was accessing uninitialized Error_Msg_Warn variable to decide whether to emit error or a warning. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.a

[Ada] Ada2020: AI12-0003 Specifying the standard storage pool

2020-10-15 Thread Pierre-Marie de Rodat
The standard storage pool can be specified in a Default_Storage_Pool pragma or aspect. This new feature is documented in AI12-0003-1. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_prag.adb (Analyze_Pragma): Adding semantic support of Standard to Default_Storage

[Ada] Fix range check on constrained array with expanded index name

2020-10-15 Thread Pierre-Marie de Rodat
When detecting a type name we must look for both identifiers and expanded names. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.adb (Analyze_Subtype_Declaration): Recognize both identifiers and expanded names; use high-level Is_Scalar_Type instead of

[Ada] Wrong use of Scope_Depth_Value

2020-10-15 Thread Pierre-Marie de Rodat
We've recently found that Scope_Depth_Value is sometimes called on the wrong nodes. This is fixed by adding proper assertions and updating the problematic call. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * einfo.ads, einfo.adb (Scope_Depth_Value, Set_Scope_Depth_

[Ada] Cleanup defensive guards for Null_Exclusion_Present

2020-10-15 Thread Pierre-Marie de Rodat
In routine Process_Subtype we had two calls to Null_Exclusion_Present (P): one guarded by "Present (P)" and the other by "Nkind (P) in ...". Now both calls are guarded by the conjunction of those guards. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.adb (Process_Su

[Ada] Spurious visibility on private with package

2020-10-15 Thread Pierre-Marie de Rodat
When a generic package has a private with clause, this clause may not be properly uninstalled, causing entities to be visible that shouldn't be. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch10.adb (Install_With_Clause): Fix implementation of Ada 2005 AI-262

[Ada] Bring defensive guard for Null_Exclusion_Present up to date

2020-10-15 Thread Pierre-Marie de Rodat
An expression for May_Have_Null_Exclusion variable mirrors an assertion in Null_Exclusion_Present. The assertion was then extended with another node kind and so May_Have_Null_Exclusion got out of date. The May_Have_Null_Exclusion is just a defensive code, so compilation is not affected. Tested on

[Ada] Remove obsolete DSP comment

2020-10-15 Thread Pierre-Marie de Rodat
Remove a reference to the "depressed stack pointer" method of doing returns of caller-unknown-size subtypes. DSP was removed from the compiler years ago. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch6.adb (Expand_Simple_Function_Return): Remove DSP part of c

[Ada] Double evaluation of predicate

2020-10-15 Thread Pierre-Marie de Rodat
In some case involving a type with a predicate and an inner package with a subprogram referencing the type, GNAT would call Add_Predicate twice on the same pragma node, causing tree sharing conflicts. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Add_Predicat

[Ada] Do not remove side effects from any object declarations in SPARK

2020-10-15 Thread Pierre-Marie de Rodat
In GNATprove mode we special-case the removal of side effect to do nothing for object declarations. However, this special casing applied only to some object declarations; now it applies to all. This patch only affects GNATprove, where it prevents recursive expansion of object declaration of a very

[Ada] Remove excessive defensive calls to Is_Type

2020-10-15 Thread Pierre-Marie de Rodat
It is excessive for Is_Type to guard a call to Is_Discrete_Type, because both are implemented as Ekind membership test and are equally likely to fail or succeed. Part of a cleanup in code related to propagation of subtype predicate flags. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada

[Ada] Ada_2020: Add aspect Aggregate to standard container units

2020-10-15 Thread Pierre-Marie de Rodat
This patch adds the Ada_2020 aspect Aggregate to standard containers (vectors, maps, and sets) that support the new construct. This patch also refines the resolution of record vs. container aggregates, and the resolution of the aggregate primitive Add_Indexed when the given name corresponds to an e

[Ada] Ada2020: AI12-0180 Using subprograms and entries in invariants

2020-10-15 Thread Pierre-Marie de Rodat
This patch implements AI12-0180, so protected subprograms and invariants are directly visible within Invariant aspects. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Visible_Component): Enable this code for task and protected types, as well as record

[Ada] Warn on unknown aspect

2020-10-15 Thread Pierre-Marie de Rodat
Rather than generating a hard error on unknown aspects, generate a warning which is friendlier wrt compatibility across versions and is similar to what is done for unknown pragmas. We keep an error when -gnatd2 is used for now, for strict conformance until the Ada RM is also changed to allow this

[Ada] Add support for compile time evaluation of Shift_Right_Arithmetic

2020-10-15 Thread Pierre-Marie de Rodat
After recent changes to evaluate logical Shift operations at compile time, do the same for the more complicated case of Shift_Right_Arithmetic as well as for Shift_Right/Shift_Left for signed integers. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_eval.adb (Eval_Intrin

Re: [PATCH] openmp: Add support for omp_get_supported_active_levels

2020-10-15 Thread Kwok Cheung Yeung
On 14/10/2020 9:20 am, Jakub Jelinek wrote: On Tue, Oct 13, 2020 at 07:05:10PM +0100, Kwok Cheung Yeung wrote: +* omp_get_supported_active_levels:: Maxiumum number of active levels supported Sorry for not catching it during review, but there is a typo above. Fixed with patch below, committed

[patch] vxworks: allow self configured definition of _WRS_VXWORKS_MAJOR

2020-10-15 Thread Olivier Hainque
Hello, While performing experimental builds for testing purposes, I had occasional uses of the possibility to enforce a _WRS_VXWORKS_MAJOR in an environment where it was not available from the system headers, by way of a self-spec at configuration time. This patch adjusts _vxworks-versions.h to h

Re: [PING][PATCH v2] combine: Don't turn (mult (extend x) 2^n) into extract [PR96998]

2020-10-15 Thread Alex Coplan via Gcc-patches
Hi Segher, On 12/10/2020 12:14, Segher Boessenkool wrote: > On Mon, Oct 12, 2020 at 05:19:58PM +0100, Richard Sandiford wrote: > > > > I agree there's a target bug here. Please see the explanation I posted > > in: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554518.html > > (especial

Re: GCC 9 backports

2020-10-15 Thread Martin Liška
On 10/2/20 1:15 PM, Martin Liška wrote: On 10/2/20 12:05 PM, Martin Liška wrote: There are 2 more I've just tested. Martin and one more. Martin and one more. Martin >From 12c9413228d2955126ff5c45194f8aacf1aa81f6 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 13 Oct 2020 16:44:47

[PATCH 2/2] combine: Don't turn (mult (extend x) 2^n) into extract

2020-10-15 Thread Alex Coplan via Gcc-patches
Currently, make_extraction() identifies where we can emit an ASHIFT of an extend in place of an extraction, but fails to make the corresponding canonicalization/simplification when presented with a MULT by a power of two. Such a representation is canonical when representing a left-shifted address i

[PATCH 1/2] aarch64: Remove support for extract-based addresses [PR96998]

2020-10-15 Thread Alex Coplan via Gcc-patches
This patch fixes a bug in the AArch64 backend. Currently, we accept an odd sign_extract representation of addresses, but don't accept that same odd form of address as an LEA. This is the cause of PR96998. In the testcase given in the PR, combine produces: (insn 9 8 10 3 (set (mem:SI (plus:DI (sig

Re: [PATCH, rs6000] Add non-relative jump table support on Power Linux

2020-10-15 Thread HAO CHEN GUI via Gcc-patches
Segher,     I re-wrote the patch based on parameterized name.     The attachments are the patch diff file and change log file.     Bootstrapped and tested on powerpc64le-linux-gnu with no regressions.  Is this okay for trunk? Any recommendations? Thanks a lot. On 29/9/2020 上午 6:46, Segher B

Re: GCC 10 backports

2020-10-15 Thread Martin Liška
And one more patch I've just tested. Martin >From 13febeded26dd6e00f57b39b48520e049209651b Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 13 Oct 2020 16:44:47 +0200 Subject: [PATCH] IPA: fix profile handling in IRA gcc/ChangeLog: PR ipa/97295 * profile-count.c (profile_count::to_freq

[committed][nvptx, testsuite] Remove dg-skip-if for ptxas oom

2020-10-15 Thread Tom de Vries
Hi, There's a dg-skip-if for nvptx that is related to ptxas oom. If I remove it, the test-case passes for me (with ptxas from cuda 9.1). I've tested it on a range of cudas, from 5.0 to 11.1 and did not manage to reproduce the fail. Remove the dg-skip-if. Tested on nvptx. Committed to trunk.

[committed][nvptx, testsuite] Remove xfail for PR84958

2020-10-15 Thread Tom de Vries
Hi, The xfail in gcc.dg/tree-ssa/pr84512.c for PR84958 has started to xpass, presumably because of commit 744fd446c32 "tree-ssa-sccvn.c (class pass_fre): Add may_iterate pass parameter". Remove the xfail. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx, testsuite] Remove xfail for P

[committed][nvptx, testsuite] Fix xpass with ident-0b.c

2020-10-15 Thread Tom de Vries
Hi, For nvptx, I see: ... XPASS: c-c++-common/ident-0b.c -Wc++-compat scan-assembler-not GCC: ... Fix this by requiring effective target ident_directive. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx, testsuite] Fix xpass with ident-0b.c gcc/testsuite/ChangeLog: 2020-10-15 T

[committed][nvptx, testsuite] Disable default xfails

2020-10-15 Thread Tom de Vries
Hi, For nvptx, I run into a couple of XPASSes due to nvptx not being listed in: ... { xfail { ! { long list of targets } } } ... Add nvptx to the list to get a PASS. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx, testsuite] Disable default xfails gcc/testsuite/ChangeLog: 2020-

[committed][nvptx, testsuite] Remove dg-skip-if for ptxas crashes

2020-10-15 Thread Tom de Vries
Hi, There's a dg-skip-if for nvptx that is related to a ptxas crash. If I remove it, the test-case passes for me (with ptxas from cuda 9.1). I've tested this on a range of cudas, from 5.0 to 11.1 and did not manage to reproduce the fail. Remove the dg-skip-if. Tested on nvptx. Committed to tr

[committed][nvptx, testsuite] Remove dg-skip-if for ptxas crash fixed in cuda 8.0

2020-10-15 Thread Tom de Vries
Hi, The test-case gcc.c-torture/execute/pr68185.c has a dg-skip-if for nvptx due to "ptxas crashes or executes incorrectly". I've managed to reproduce the problem using cuda 7.5: ... FAIL: gcc.c-torture/execute/pr68185.c -O0 (test for excess errors) Excess errors: nvptx-as: ptxas terminated wi

[committed][nvptx, testsuite] Remove xpassing xfails for ptxas crashes

2020-10-15 Thread Tom de Vries
Hi, There's a couple of nvptx xfails that are related to ptxas crashes, which are xpassing for me (with ptxas from cuda 9.1). I've tested these on a range of cudas, from 5.0 to 11.1 and did not manage to reproduce the fails. Remove the xfails. Tested on nvptx. Committed to trunk. Thanks, - To

Re: Handle POINTER_PLUS_EXPR in jump functions

2020-10-15 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 14, 2020 at 03:40:33PM +0200, Jan Hubicka wrote: > this patch adds logic to handle POINTER_PLUS_EXPR in compute_parm_map > that I originally did not since I tought that all such adjustments are > done by ancestor function. > > Bootstrapped/regtested x86_64-linux, will commit it shortly

Re: [PATCH] [PR rtl-optimization/97249]Simplify vec_select of paradoxical subreg.

2020-10-15 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 15, 2020 at 1:37 AM Segher Boessenkool wrote: > > Hi! > > On Wed, Oct 14, 2020 at 01:43:45PM +0800, Hongtao Liu wrote: > > On Wed, Oct 14, 2020 at 4:01 AM Segher Boessenkool > > wrote: > > > On Tue, Oct 13, 2020 at 04:40:53PM +0800, Hongtao Liu wrote: > > > > For rtx like > > > >

*PING^3* [PATCH] doc: gcc.c: Update documentation for spec files

2020-10-15 Thread Armin Brauns via Gcc-patches
On 02/10/2020 19.20, Armin Brauns wrote: > On 06/09/2020 17.23, Armin Brauns wrote: >> There were some differences between the actual code in do_spec_1, its >> source comment, and the documentation in doc/invoke.texi. These should >> now be resolved. > PING: https://gcc.gnu.org/pipermail/gcc-patche

[PATCH] tree-optimization/97482 - fix split_constant_offset of nop-conversions

2020-10-15 Thread Richard Biener
split_constant_offset is confused about a nop-conversion from unsigned long to sizetype and tries to prove non-overflowing of the inner operation. Obviously the conversion could have been elided so make sure split_constant_offset handles this properly. It also makes sure that convert_to_ptrofftyp

[PATCH] fold x << (n % C) to x << (n & C-1) if C meets power2

2020-10-15 Thread guojiufu via Gcc-patches
Hi, I just had a check on below patch for PR66552. https://gcc.gnu.org/pipermail/gcc-patches/2020-February/540930.html It seems this patch works fine now. This patch fixes PR66552 which request to optimizes (x shift (n mod C)) to (x shift (n bit_and (C - 1))) when C is a constant and power of two.

  1   2   >