[patch] Adjust LIBGCC2_INCLUDES for VxWorks and augment comment

2022-09-30 Thread Olivier Hainque via Gcc-patches
Hello, Investigating the reasons for libgcc build failures in a canadian context, orthogonally to the recent update of vxcrtstuff, exposed interesting differences in the way include search paths are managed between a regular Linux->VxWorks cross build and a canadian setup building a Windows->VxWor

[PATCH] fixincludes: Deal also with the _Float128x cases [PR107059]

2022-09-30 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 28, 2022 at 08:19:43PM +0200, Jakub Jelinek via Gcc-patches wrote: > Another case are the following 3 snippets: > # if !__GNUC_PREREQ (7, 0) || defined __cplusplus > # error "_Float128X supported but no constant suffix" > # else > # define __f128x(x) x##f128x > # endif > ... > #

RE: [PATCH 1/2]middle-end: RFC: On expansion of conditional branches, give hint if argument is a truth type to backend

2022-09-30 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Gcc-patches bounces+tamar.christina=arm@gcc.gnu.org> On Behalf Of Richard > Biener via Gcc-patches > Sent: Thursday, September 29, 2022 12:09 PM > To: Tamar Christina via Gcc-patches > Cc: Richard Sandiford ; nd > Subject: Re: [PATCH 1/2]middle-end: RFC:

[PATCH] Add first-order recurrence autovectorization

2022-09-30 Thread juzhe . zhong
From: Ju-Zhe Zhong Hi, After fixing previous ICE. I add full implementation (insert permutation to get correct result.) The gimple IR is correct now I think: # t_21 = PHI <_4(6), t_12(9)> # i_22 = PHI # vectp_a.6_26 = PHI # vect_vec_recur_.9_9 = PHI # vectp_b.11_7 = PHI # curr_c

[patch] install.texi: gcn - update llvm reqirements, gcn/nvptx - newlib use version

2022-09-30 Thread Tobias Burnus
That's for https://gcc.gnu.org/install/specific.html [I did notice (just before submitting) that the bullet list was incomplete - hence, I added it. (Also one ref missed a '-x'.) However, main reason for this patch is for GCN:] The listed LLVM version for GCN was outdated. For newlib, I also de

[PATCH] testsuite: Colon is reserved on Windows

2022-09-30 Thread Torbjörn SVENSSON via Gcc-patches
The ':' is reserved in filenames on Windows. Can't find any specification for this, but when there is no filename defined in the map file, GCC will replace the ':' with a '-' in the generated filename for the module. Without this patch, the test case failes with: .../ben-1_a.C:4:8: error: failed t

Re: [PATCH 1/2]middle-end: RFC: On expansion of conditional branches, give hint if argument is a truth type to backend

2022-09-30 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Gcc-patches > bounces+tamar.christina=arm@gcc.gnu.org> On Behalf Of Richard >> Biener via Gcc-patches >> Sent: Thursday, September 29, 2022 12:09 PM >> To: Tamar Christina via Gcc-patches >> Cc: Richard Sandiford ; nd >> Subject:

RE: [PATCH 1/2]middle-end: RFC: On expansion of conditional branches, give hint if argument is a truth type to backend

2022-09-30 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Friday, September 30, 2022 9:29 AM > To: Tamar Christina > Cc: Richard Biener ; Tamar Christina via Gcc-patches > ; nd ; Jeff Law > > Subject: Re: [PATCH 1/2]middle-end: RFC: On expansion of conditional > branches, give hint if argum

Re: [PATCH 1/2]middle-end: RFC: On expansion of conditional branches, give hint if argument is a truth type to backend

2022-09-30 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Richard Sandiford >> Sent: Friday, September 30, 2022 9:29 AM >> To: Tamar Christina >> Cc: Richard Biener ; Tamar Christina via Gcc-patches >> ; nd ; Jeff Law >> >> Subject: Re: [PATCH 1/2]middle-end: RFC: On expansion of condition

RE: [PATCH 1/2]middle-end: RFC: On expansion of conditional branches, give hint if argument is a truth type to backend

2022-09-30 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Friday, September 30, 2022 9:49 AM > To: Tamar Christina > Cc: Richard Biener ; Tamar Christina via Gcc-patches > ; nd ; Jeff Law > > Subject: Re: [PATCH 1/2]middle-end: RFC: On expansion of conditional > branches, give hint if arg

Re: [PATCH] Optimize nested permutation to single VEC_PERM_EXPR [PR54346]

2022-09-30 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Mon, Sep 26, 2022 at 8:58 AM Liwei Xu wrote: >> >> This patch implemented the optimization in PR 54346, which Merges >> >> c = VEC_PERM_EXPR ; >> d = VEC_PERM_EXPR ; >> to >> d = VEC_PERM_EXPR ; >> >> Bootstrapped

Re: [PATCH] rs6000: Rework option -mpowerpc64 handling [PR106680]

2022-09-30 Thread Kewen.Lin via Gcc-patches
Hi Segher & Iain! on 2022/9/30 02:37, Segher Boessenkool wrote: > Hi! > > On Thu, Sep 29, 2022 at 07:25:44PM +0100, Iain Sandoe wrote: >>> On 29 Sep 2022, at 18:04, Segher Boessenkool >>> wrote: >>> On Thu, Sep 29, 2022 at 09:16:33AM +0100, Iain Sandoe wrote: Which means that we do not rep

Re: [Patch] OpenMP, libgomp, gimple: omp_get_max_teams, omp_set_num_teams, and omp_{gs}et_teams_thread_limit on offload devices

2022-09-30 Thread Jakub Jelinek via Gcc-patches
On Sun, Sep 18, 2022 at 10:24:43AM +0200, Marcel Vollweiler wrote: > gcc/ChangeLog: > > * gimplify.cc (optimize_target_teams): Set initial num_teams_upper > to "-2" instead of "1" for non-existing num_teams clause in order to > disambiguate from the case of an existing num_teams

Re: [PATCH] Optimize nested permutation to single VEC_PERM_EXPR [PR54346]

2022-09-30 Thread Xu, Liwei via Gcc-patches
Hi Richard Sure, I’ll also check the VLA case once I’m back from vacation, thank you for your help. Best Regards Liwei > On 30 Sep 2022, at 5:17 pm, Richard Sandiford > wrote: > > Richard Biener writes: >>> On Mon, Sep 26, 2022 at 8:58 AM Liwei Xu wrote: >>> >>>This patch implem

[patch] Refine INITFINI condition for vxworks crtstuff spec

2022-09-30 Thread Olivier Hainque via Gcc-patches
Hello, Working on the reintroduction of shared libraries support (and of modules depending on shared libraries) exposed a few test failures of simple c++ constructor tests on arm-vxworks7r2. Investigation revealed that we were not linking the crtstuff objects as needed from a compiler configured

RE: [PATCH 1/2]middle-end: RFC: On expansion of conditional branches, give hint if argument is a truth type to backend

2022-09-30 Thread Richard Biener via Gcc-patches
On Fri, 30 Sep 2022, Tamar Christina wrote: > > > > -Original Message- > > From: Richard Sandiford > > Sent: Friday, September 30, 2022 9:49 AM > > To: Tamar Christina > > Cc: Richard Biener ; Tamar Christina via Gcc-patches > > ; nd ; Jeff Law > > > > Subject: Re: [PATCH 1/2]middle-e

Re: [PATCH v2] Re: OpenMP: Generate SIMD clones for functions with "declare target"

2022-09-30 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 21, 2022 at 09:17:18PM -0600, Sandra Loosemore wrote: > On 9/14/22 12:12, Jakub Jelinek wrote: > > > If it is pure optimization thing and purely keyed on the definition, > > all the simd clones should be local to the TU, never exported from it. > > OK, here is a revised patch that add

[Patch] Fortran: Update use_device_ptr for OpenMP 5.1 [PR105318]

2022-09-30 Thread Tobias Burnus
While has_device_addr has been implemented (in GCC 12), updating use_device_ptr for Fortran was missed. This patch fixes it: Removing the restrictions and mapping to has_device_addr where applicable. For use_device_ptr something similar was done, albeit I think this has no semantic effect. And

Re: [RFA] Avoid unnecessary load-immediate in coremark

2022-09-30 Thread Richard Sandiford via Gcc-patches
Jeff Law writes: > This is another minor improvement to coremark.   I suspect this only > improves code size as the load-immediate was likely issuing with the ret > statement on multi-issue machines. > > > Basically we're failing to utilize conditional equivalences during the > post-reload CSE

[PATCH] tree-optimization/107095 - fix typo in .MASK_STORE DSE handling

2022-09-30 Thread Richard Biener via Gcc-patches
We were using the size of the mask argument rather than the data argument for the ao_ref. Bootstrap and regtest running on x86_64-unknown-linux-gnu. PR tree-optimization/107095 * tree-ssa-dse.cc (initialize_ao_ref_for_dse): Use data arg for .MASK_STORE size. --- gcc/tree-

Re: [Patch] Fortran: Update use_device_ptr for OpenMP 5.1 [PR105318]

2022-09-30 Thread Tobias Burnus
On 30.09.22 12:41, Tobias Burnus wrote: Fortran: Update use_device_ptr for OpenMP 5.1 [PR105318] The following two lines slipped in – which I have now removed in my version of the patch: --- a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr

Re: [Patch] Fortran: Update use_device_ptr for OpenMP 5.1 [PR105318]

2022-09-30 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 30, 2022 at 12:41:19PM +0200, Tobias Burnus wrote: > While has_device_addr has been implemented (in GCC 12), updating > use_device_ptr for Fortran was missed. > > This patch fixes it: Removing the restrictions and mapping to > has_device_addr where applicable. > > For use_device_ptr s

RE: [PATCH 1/2]middle-end: RFC: On expansion of conditional branches, give hint if argument is a truth type to backend

2022-09-30 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Friday, September 30, 2022 11:17 AM > To: Tamar Christina > Cc: Richard Sandiford ; Tamar Christina via > Gcc-patches ; nd ; Jeff Law > > Subject: RE: [PATCH 1/2]middle-end: RFC: On expansion of conditional > branches, give hint if argu

Re: [PATCH] testsuite: Colon is reserved on Windows

2022-09-30 Thread Nathan Sidwell via Gcc-patches
On 9/30/22 04:18, Torbjörn SVENSSON wrote: The ':' is reserved in filenames on Windows. Can't find any specification for this, but when there is no filename defined in the map file, GCC will replace the ':' with a '-' in the generated filename for the module. Correct (and the specification is i

[PATCH v2] testsuite: [arm] Relax expected register names in MVE tests

2022-09-30 Thread Christophe Lyon via Gcc-patches
These two tests have hardcoded q0 as destination/source of load/store instructions, but this register is actually used only under -mfloat-abi=hard. When using -mfloat-abi=softfp, other registers (eg. q3) can be used to transfer function arguments from core registers to MVE registers, making the exp

Re: [Patch] Fortran: Update use_device_ptr for OpenMP 5.1 [PR105318]

2022-09-30 Thread Tobias Burnus
Hi Jakub, On 30.09.22 13:04, Jakub Jelinek via Fortran wrote: On Fri, Sep 30, 2022 at 12:41:19PM +0200, Tobias Burnus wrote: And 'device(omp_initial_device)' printed a warning in Fortran. (BTW: C/C++ silently accepts any negative value.) I think that is what the standard wants. E.g. in 5.2 d

Re: [PATCH v2] testsuite: [arm] Relax expected register names in MVE tests

2022-09-30 Thread Richard Earnshaw via Gcc-patches
On 30/09/2022 12:19, Christophe Lyon via Gcc-patches wrote: These two tests have hardcoded q0 as destination/source of load/store instructions, but this register is actually used only under -mfloat-abi=hard. When using -mfloat-abi=softfp, other registers (eg. q3) can be used to transfer functi

RE: [PATCH 1/2]middle-end: RFC: On expansion of conditional branches, give hint if argument is a truth type to backend

2022-09-30 Thread Richard Biener via Gcc-patches
On Fri, 30 Sep 2022, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Friday, September 30, 2022 11:17 AM > > To: Tamar Christina > > Cc: Richard Sandiford ; Tamar Christina via > > Gcc-patches ; nd ; Jeff Law > > > > Subject: RE: [PATCH 1/2]middle-end: R

RE: [PATCH v2] testsuite: [arm] Relax expected register names in MVE tests

2022-09-30 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Christophe Lyon > Sent: Friday, September 30, 2022 12:20 PM > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; Andre Simoes Dias Vieira > ; Christophe Lyon > > Subject: [PATCH v2] testsuite: [arm] Relax expected register names in MVE > tests > > These tw

Re: [PATCH] rs6000: Rework option -mpowerpc64 handling [PR106680]

2022-09-30 Thread Kewen.Lin via Gcc-patches
on 2022/9/30 01:11, Segher Boessenkool wrote: > On Thu, Sep 29, 2022 at 01:45:16PM +0800, Kewen.Lin wrote: >> I found this flag is mainly related to tune setting and spotted that we have >> some code >> for tune setting when no explicit cpu is given. >> >> ... >> >> else >> { >> size_

Re: [PATCH] rs6000/test: Adjust pr104992.c with vect_int_mod [PR106516]

2022-09-30 Thread Kewen.Lin via Gcc-patches
Hi Segher! on 2022/9/28 22:55, Segher Boessenkool wrote: > Hi! > > On Wed, Aug 24, 2022 at 04:17:55PM +0800, Kewen.Lin wrote: >> As PR106516 shows, we can get unexpected gimple outputs for >> function thud on some target which supports modulus operation >> for vector int. This patch introduces o

Re: [PATCH] Emit discriminators for inlined call sites.

2022-09-30 Thread Richard Biener via Gcc-patches
On Fri, Sep 30, 2022 at 8:28 AM Eugene Rozenfeld via Gcc-patches wrote: > > This change is based on commit 9fa26998a63d4b22b637ed8702520819e408a694 > by Dehao Chen in vendors/google/heads/gcc-4_8. OK > gcc/ChangeLog: > > * dwarf2out.cc (add_call_src_coords_attributes): Emit discriminator

Re: [PATCH v4] rs6000: Rework ELFv2 support for -fpatchable-function-entry* [PR99888]

2022-09-30 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the review comments! on 2022/9/28 23:22, Segher Boessenkool wrote: > Hi! > > On Thu, Aug 25, 2022 at 01:50:28PM +0800, Kewen.Lin wrote: >> --- a/gcc/config/rs6000/rs6000-internal.h >> +++ b/gcc/config/rs6000/rs6000-internal.h >> @@ -183,10 +183,15 @@ extern tree rs6000_fold

Re: [PATCH] Adjust the symbol for SECTION_LINK_ORDER linked_to section [PR99889]

2022-09-30 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2022/9/30 04:31, Segher Boessenkool wrote: > Hi! > > On Wed, Aug 24, 2022 at 04:17:07PM +0800, Kewen.Lin wrote: >> --- a/gcc/config/rs6000/rs6000.cc >> +++ b/gcc/config/rs6000/rs6000.cc >> @@ -14771,18 +14771,9 @@ rs6000_print_patchable_function_entry (FILE *file, >>

RE: [PATCH 1/2]middle-end: RFC: On expansion of conditional branches, give hint if argument is a truth type to backend

2022-09-30 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Friday, September 30, 2022 12:53 PM > To: Tamar Christina > Cc: Richard Sandiford ; Tamar Christina via > Gcc-patches ; nd ; Jeff Law > > Subject: RE: [PATCH 1/2]middle-end: RFC: On expansion of conditional > branches, give hint if argu

Re: [PATCH] c-family: ICE with [[gnu::nocf_check]] [PR106937]

2022-09-30 Thread Jason Merrill via Gcc-patches
On 9/29/22 18:49, Marek Polacek wrote: When getting the name of an attribute, we ought to use get_attribute_name, which handles both [[ ]] and __attribute__(()) forms. Failure to do so may result in an ICE, like here. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? How do we prin

Re: [PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-30 Thread Julian Brown
On Fri, 23 Sep 2022 14:10:51 +0200 Tobias Burnus wrote: > Hi Julian and Jakub, hi all, > > On 23.09.22 09:29, Julian Brown wrote: > > How about this version? (Re-tested.) > > Some more generic (pre)remarks – not affecting the patch code, > but possibly the commit log message: > > > This foll

C++ ABI

2022-09-30 Thread Nathan Sidwell via Gcc-patches
Hi, I've discovered some mangling problems with lambdas. (a) divergence from clang and (b) manglings that incorrectly demangle. With #a I'm not yet sure who is correct. for #b g++ is definitely wrong. From the docs, it doesn't appear to have been bumped this cycle. Is that correct, and I

[committed] libstdc++: Add missing include to

2022-09-30 Thread Jonathan Wakely via Gcc-patches
From: Arsen Arsenović Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/bitset: Include . --- libstdc++-v3/include/std/bitset | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset inde

Re: [RFC PATCH] c++, i386, arm, aarch64, libgcc: std::bfloat16_t and __bf16 arithmetic support

2022-09-30 Thread Jason Merrill via Gcc-patches
On 9/29/22 11:55, Jakub Jelinek wrote: Hi! Here is more complete patch to add std::bfloat16_t support on x86, AArch64 and (only partially) on ARM 32-bit. No BFmode optabs are added by the patch, so for binops/unops it extends to SFmode first and then truncates back to BFmode. For {HF,SF,DF,XF,T

Re: C++ ABI

2022-09-30 Thread Nathan Sidwell via Gcc-patches
On 9/30/22 09:43, Nathan Sidwell wrote: Hi, I've discovered some mangling problems with lambdas.  (a) divergence from clang and (b) manglings that incorrectly demangle.  With #a I'm not yet sure who is correct.  for #b g++ is definitely wrong. From the docs, it doesn't appear to have been bu

Re: [PATCH] i386, rs6000, ia64, s390: Fix C++ ICEs with _Float64x or _Float128 [PR107080]

2022-09-30 Thread Jason Merrill via Gcc-patches
On 9/29/22 06:01, Jakub Jelinek wrote: Hi! The following testcase ICEs on x86 as well as ppc64le (the latter with -mabi=ieeelongdouble), because _Float64x there isn't mangled as DF64x but e or u9__ieee128 instead. Those are the mangling that should be used for the non-standard types with the sam

Re: [RFC PATCH] c++, i386, arm, aarch64, libgcc: std::bfloat16_t and __bf16 arithmetic support

2022-09-30 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 30, 2022 at 09:49:08AM -0400, Jason Merrill wrote: > The comment from Apple on the ABI mangling proposal suggests to me that we > might want to delay enabling C++ std::bfloat16_t (i.e. defining > __STDCPP_BFLOAT16_T__) until we have that excess precision support? I saw that comment. W

Re: [PATCH 1/2]middle-end: RFC: On expansion of conditional branches, give hint if argument is a truth type to backend

2022-09-30 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Richard Biener >> Sent: Friday, September 30, 2022 12:53 PM >> To: Tamar Christina >> Cc: Richard Sandiford ; Tamar Christina via >> Gcc-patches ; nd ; Jeff Law >> >> Subject: RE: [PATCH 1/2]middle-end: RFC: On expansion of conditio

Re: [PATCH 1/2]middle-end: RFC: On expansion of conditional branches, give hint if argument is a truth type to backend

2022-09-30 Thread Richard Biener via Gcc-patches
> Am 30.09.2022 um 16:29 schrieb Richard Sandiford via Gcc-patches > : > > Tamar Christina writes: >>> -Original Message- >>> From: Richard Biener >>> Sent: Friday, September 30, 2022 12:53 PM >>> To: Tamar Christina >>> Cc: Richard Sandiford ; Tamar Christina via >>> Gcc-patches ;

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-09-30 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 27 Sept 2022 at 01:59, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Fri, 23 Sept 2022 at 21:33, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > On Tue, 20 Sept 2022 at 18:09, Richard Sandiford > >> > wrote: > >> >> > >> >> Prathamesh Kulkarn

Re: [PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-30 Thread Tobias Burnus
Hi Julian, On 30.09.22 15:30, Julian Brown wrote: i = 1; j = 2 map (foo(i)%dt_ptr(1:3), foo(j)%dt_ptr) Good catch! In that gfc_dep_resolver considers those terms to have a dependency, and that triggers the mapping node transformation. But I don't think OpenMP allows you to write this: IIUC

Re: [PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-30 Thread Tobias Burnus
On 30.09.22 15:30, Julian Brown wrote: On Fri, 23 Sep 2022 14:10:51 +0200 Tobias Burnus wrote: ... I added n->expr->expr_type == EXPR_VARIABLE to the condition -- I think that should suffice for now? Yes. A similar mean way to write code would be: integer, ta

Re: [PATCH] i386, rs6000, ia64, s390: Fix C++ ICEs with _Float64x or _Float128 [PR107080]

2022-09-30 Thread Segher Boessenkool
Hi! On Thu, Sep 29, 2022 at 12:01:43PM +0200, Jakub Jelinek via Gcc-patches wrote: > --- gcc/config/i386/i386.cc.jj2022-09-29 09:13:25.713718513 +0200 > +++ gcc/config/i386/i386.cc 2022-09-29 11:29:20.828358152 +0200 > @@ -22725,6 +22725,9 @@ ix86_mangle_type (const_tree type) >&

Re: [PATCH RFC] c++: streamline process for adding new builtin trait

2022-09-30 Thread Patrick Palka via Gcc-patches
On Thu, 29 Sep 2022, Jason Merrill wrote: > On 9/29/22 11:05, Patrick Palka wrote: > > Adding a new builtin trait currently involves some boilerplate (as can > > be seen in r13-2956-g9ca147154074a0) of defining corresponding RID_ and > > CPTK_ enumerators and adding them to various switch statemen

Re: [V2 PATCH] RISC-V:Add '-m[no]-csr-check' option in gcc.

2022-09-30 Thread Kito Cheng via Gcc-patches
Committed, but I decided to take v1 and disable that by default to prevent breaking the existing code :) On Tue, Sep 13, 2022 at 5:37 PM jiawei wrote: > > From: Jiawei > > Add -m[no]-csr-check option in gcc part, when enable -mcsr-check option, > it will add csr-check in .option section and pass

Re: [PATCH] arm: unified syntax for libgcc clear_cache

2022-09-30 Thread Seija Kijin via Gcc-patches
Yes, please! On Tue, Sep 6, 2022 at 10:48 AM Kyrylo Tkachov wrote: > > Hi Seija, > > > -Original Message- > > From: Gcc-patches > bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Seija Kijin via > > Gcc-patches > > Sent: Thursday, August 11, 2022 2:36 PM > > To: gcc-patches@gcc.g

Re: [PATCH] i386, rs6000, ia64, s390: Fix C++ ICEs with _Float64x or _Float128 [PR107080]

2022-09-30 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 30, 2022 at 10:07:59AM -0500, Segher Boessenkool wrote: > Hi! > > On Thu, Sep 29, 2022 at 12:01:43PM +0200, Jakub Jelinek via Gcc-patches wrote: > > --- gcc/config/i386/i386.cc.jj 2022-09-29 09:13:25.713718513 +0200 > > +++ gcc/config/i386/i386.cc 2022-09-29 11:29:20.828358152 +02

[PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Torbjörn SVENSSON via Gcc-patches
libstdc++-v3/testsuite: * 20_util/bind/ref_neg.cc: Prune Windows paths too. Co-Authored-By: Yvan ROUX Signed-off-by: Torbjörn SVENSSON --- libstdc++-v3/testsuite/20_util/bind/ref_neg.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/20_util

Re: [PATCH] i386, rs6000, ia64, s390: Fix C++ ICEs with _Float64x or _Float128 [PR107080]

2022-09-30 Thread Segher Boessenkool
On Fri, Sep 30, 2022 at 05:31:26PM +0200, Jakub Jelinek wrote: > On Fri, Sep 30, 2022 at 10:07:59AM -0500, Segher Boessenkool wrote: > > On Thu, Sep 29, 2022 at 12:01:43PM +0200, Jakub Jelinek via Gcc-patches > > wrote: > > > --- gcc/config/i386/i386.cc.jj2022-09-29 09:13:25.713718513 +0200 >

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-09-30 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > On Tue, 27 Sept 2022 at 01:59, Richard Sandiford > wrote: >> >> Prathamesh Kulkarni writes: >> > On Fri, 23 Sept 2022 at 21:33, Richard Sandiford >> > wrote: >> >> >> >> Prathamesh Kulkarni writes: >> >> > On Tue, 20 Sept 2022 at 18:09, Richard Sandiford >> >> >

[patch] Prevent secondary warning from diagnostic tweak in gthr-vxworks.h

2022-09-30 Thread Olivier Hainque via Gcc-patches
Within gthr-vxworks.h, we prevent C++ errors from missing declarations in some system headers by prepending their inclusion with a #pragma GCC diagnostic ignored "-Wstrict-prototypes" But Wstrict-prototypes is internally registered as valid for C/ObjC only, not C++, and this trick in turn tr

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-09-30 Thread Richard Sandiford via Gcc-patches
Richard Sandiford via Gcc-patches writes: > Prathamesh Kulkarni writes: >> Sorry to ask a silly question but in which case shall we select 2nd vector ? >> For num_poly_int_coeffs == 2, >> a1 /trunc n1 == (a1 + 0x) / (n1.coeffs[0] + n1.coeffs[1]*x) >> If a1/trunc n1 succeeds, >> 0 / n1.coeffs[1] =

Re: [PATCH v2] testsuite: Only run test on target if VMA == LMA

2022-09-30 Thread Richard Sandiford via Gcc-patches
Sorry for the slow reply. Torbjorn SVENSSON writes: > Hi Richard, > > Thanks for your review. > Comments below. > > On 2022-09-23 19:34, Richard Sandiford wrote: >> Torbjörn SVENSSON via Gcc-patches writes: >>> Checking that the triplet matches arm*-*-eabi (or msp430-*-*) is not >>> enough to kn

[PATCH] Introduce DWARF_VERSION_DEFAULT (and redefine for VxWorks)

2022-09-30 Thread Olivier Hainque via Gcc-patches
Hello, This change is a proposal to introduce a target overridable macro to replace the hardcoded value used in common.opt to initialize dwarf_version. The main advantage compared to special code in a target override_options hook is that redefinitions by target config files are visible by both th

Re: PING^1 [PATCH] testsuite: Do not prefix linker script with "-Wl, "

2022-09-30 Thread Richard Sandiford via Gcc-patches
Torbjorn SVENSSON writes: > Hi, > > Ping: https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601831.html OK, thanks. Richard > Kind regards, > Torbjörn > > On 2022-09-19 18:57, Torbjörn SVENSSON wrote: >> The linker script should not be prefixed with "-Wl," - it's not an >> input file and

[PATCH v3] testsuite: Only run test on target if VMA == LMA

2022-09-30 Thread Torbjörn SVENSSON via Gcc-patches
Checking that the triplet matches arm*-*-eabi (or msp430-*-*) is not enough to know if the execution will enter an endless loop, or if it will give a meaningful result. As the execution test only work when VMA and LMA are equal, make sure that this condition is met. gcc/ChangeLog: * doc/s

Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 17:04, Torbjörn SVENSSON wrote: > > libstdc++-v3/testsuite: > > * 20_util/bind/ref_neg.cc: Prune Windows paths too. Please CC the libstdc++ for libstdc++ patches. OK for trunk, thanks. > > Co-Authored-By: Yvan ROUX > Signed-off-by: Torbjörn SVENSSON > --- >

Re: [PATCH v3] testsuite: Only run test on target if VMA == LMA

2022-09-30 Thread Richard Sandiford via Gcc-patches
Torbjörn SVENSSON writes: > Checking that the triplet matches arm*-*-eabi (or msp430-*-*) is not > enough to know if the execution will enter an endless loop, or if it > will give a meaningful result. As the execution test only work when > VMA and LMA are equal, make sure that this condition is me

Re: C++ ABI

2022-09-30 Thread Patrick Palka via Gcc-patches
On Fri, 30 Sep 2022, Nathan Sidwell wrote: > Hi, > I've discovered some mangling problems with lambdas. (a) divergence from > clang and (b) manglings that incorrectly demangle. With #a I'm not yet sure > who is correct. for #b g++ is definitely wrong. > > From the docs, it doesn't appear to ha

[PATCH] undef offsetof before defining it in stddef.h

2022-09-30 Thread Olivier Hainque via Gcc-patches
Hello, The attached patch is a proposal to #undef offsetof before the #define we do in ginclude/stddef.h, which prevents redefinition warnings from dg tests passing -Wsystem-headers on systems which provide a definition in system headers, such as VxWorks. We have been using this for a while with

[PATCH] openmp: Add begin declare target support

2022-09-30 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch adds support for the begin declare target construct, which is another spelling for declare target construct without clauses (where it needs paired end declare target), but unlike that one accepts clauses. This is an OpenMP 5.1 feature, implemented with 5.2 clarification be

[PATCH 00/10] c-family,libstdc++: P1642 and related changes

2022-09-30 Thread Arsen Arsenović via Gcc-patches
Hi, This patchset: - Implements the P1642 WG21 paper, with a fair few extensions, - Fixes libstdc++' build system on systems --without-headers, - Ports (a large chunk of) the libstdc++ testsuite to freestanding, and - Changes the semantics of `int main' in freestanding (!!). Thanks, Arsen Arseno

[PATCH 01/10] libstdc++: Make _GLIBCXX_HOSTED respect -ffreestanding [PR103626]

2022-09-30 Thread Arsen Arsenović via Gcc-patches
From: Jonathan Wakely This allows the library to switch to freestanding mode when compiling with the -ffreestanding flag. This means you don't need a separate libstdc++ build configured with --disable-hosted-libstdcxx in order to compile for a freestanding environment. The testsuite support file

[PATCH 05/10] c-family: Implement new `int main' semantics in freestanding

2022-09-30 Thread Arsen Arsenović via Gcc-patches
>From now, by default, (specifically) `int main' in freestanding will implicitly return 0, as it does for hosted modes. The old behaviour is still accessible via -fno-builtin-main. gcc/c-family/ChangeLog: * c-common.cc (disable_builtin_function): Support special value `main' that,

[PATCH 02/10] libstdc++: Filter out unconditional default include

2022-09-30 Thread Arsen Arsenović via Gcc-patches
_AC_INCLUDES_DEFAULT_REQUIREMENTS including when checking for stdint.h has prevented proper detection of whether stdint.h is present, since it'd poison the cache variables with test results failing due to failing to include. As a solution, for autoconf versions under 2.70, we filter out that bit

[PATCH 03/10] libstdc++: Adjust precompiled headers for freestanding

2022-09-30 Thread Arsen Arsenović via Gcc-patches
From: Jonathan Wakely Co-authored-by: Arsen Arsenović libstdc++-v3/ChangeLog: * include/precompiled/extc++.h [!_GLIBCXX_HOSTED]: Do not include headers that aren't valid for freestanding. * include/precompiled/stdc++.h [!_GLIBCXX_HOSTED]: Likewise. Signed-off-by: Arsen

[PATCH 06/10] libstdc++: Rework how freestanding install works [PR106953]

2022-09-30 Thread Arsen Arsenović via Gcc-patches
In light of there being far more freestanding headers now, ad-hoc maintenance of a subset of the install implementation has become unsustainable. Instead, we gate off a part of the normal install routine so that it works without HOSTED enabled, as well as subdivide lists of headers into freestandin

[PATCH 08/10] libstdc++: Add effective-target 'hosted' for testsuite [PR103626]

2022-09-30 Thread Arsen Arsenović via Gcc-patches
From: Jonathan Wakely PR libstdc++/103626 - _GLIBCXX_HOSTED should respect -ffreestanding libstdc++-v3/ChangeLog: PR libstdc++/103626 * testsuite/lib/libstdc++.exp (check_effective_target_stacktrace): Also require hosted. (check_effective_target_hosted): New proc.

[PATCH 04/10] libstdc++: Mark headers that must be hosted as such [PR103626]

2022-09-30 Thread Arsen Arsenović via Gcc-patches
PR libstdc++/103626 - _GLIBCXX_HOSTED should respect -ffreestanding Co-authored-by: Jonathan Wakely libstdc++-v3/ChangeLog: PR libstdc++/103626 * include/Makefile.am: Add new header. * include/Makefile.in: Regenerate. * include/bits/requires_hosted.h: New header.

[PATCH 09/10] libstdc++: Re-enable std::hash in freestanding [PR103626]

2022-09-30 Thread Arsen Arsenović via Gcc-patches
PR libstdc++/103626 - _GLIBCXX_HOSTED should respect -ffreestanding libstdc++-v3/ChangeLog: PR libstdc++/103626 * include/std/bitset [!_GLIBCXX_HOSTED]: Re-enable std::hash. * testsuite/20_util/bitset/cons/constexpr_c++23.cc: Require ET hosted. * testsuite/2

[PATCH 07/10] libstdc++: Make some tests work on freestanding [PR103626]

2022-09-30 Thread Arsen Arsenović via Gcc-patches
PR libstdc++/103626 - _GLIBCXX_HOSTED should respect -ffreestanding Co-authored-by: Jonathan Wakely libstdc++-v3/ChangeLog: PR libstdc++/103626 * testsuite/17_intro/headers/c++1998/stdc++.cc [!__STDC_HOSTED__]: Do not include C headers that aren't valid for freestanding.

[PATCH] arm, aarch64, csky: Fix C++ ICEs with _Float16 and __fp16 [PR107080]

2022-09-30 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 30, 2022 at 09:54:49AM -0400, Jason Merrill wrote: > > Note, there is one further problem on aarch64/arm, types with HFmode > > (_Float16 and __fp16) are there mangled as Dh (which is standard > > Itanium mangling: > > ::= Dh # IEEE 754r half-precision floating point (

[PATCH] c++: make some cp_trait_kind switch statements exhaustive

2022-09-30 Thread Patrick Palka via Gcc-patches
This replaces the unreachable default case in some cp_trait_kind switches with an exhaustive listing of the _unexpected_ trait codes, so that when adding a new trait we'll get a -Wswitch diagnostic if we forget to handle the trait code in one of these switches. Bootstrappend and regtested on x86_6

Re: [PATCH] c++: make some cp_trait_kind switch statements exhaustive

2022-09-30 Thread Patrick Palka via Gcc-patches
On Fri, 30 Sep 2022, Patrick Palka wrote: > This replaces the unreachable default case in some cp_trait_kind > switches with an exhaustive listing of the _unexpected_ trait codes, > so that when adding a new trait we'll get a -Wswitch diagnostic if we > forget to handle the trait code in one of

Re: [PATCH] arm, aarch64, csky: Fix C++ ICEs with _Float16 and __fp16 [PR107080]

2022-09-30 Thread Richard Sandiford via Gcc-patches
Jakub Jelinek writes: > On Fri, Sep 30, 2022 at 09:54:49AM -0400, Jason Merrill wrote: >> > Note, there is one further problem on aarch64/arm, types with HFmode >> > (_Float16 and __fp16) are there mangled as Dh (which is standard >> > Itanium mangling: >> > ::= Dh # IEEE 754r ha

Re: [GCC13][Patch][V4][PATCH 1/2] Add a new option -fstrict-flex-arrays[=n] and new attribute strict_flex_arrays

2022-09-30 Thread Martin Sebor via Gcc-patches
On 9/28/22 13:17, Qing Zhao wrote: Hi, Martin, Thanks for the comments. And sorry for my late reply till now (I just came back home from LPC, GNU Cauldron and then a one-week vacation after that…) On Sep 12, 2022, at 12:42 PM, Martin Sebor wrote: On 9/6/22 18:28, Qing Zhao wrote: Add the f

Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 17:26, Jonathan Wakely wrote: > > On Fri, 30 Sept 2022 at 17:04, Torbjörn SVENSSON > wrote: > > > > libstdc++-v3/testsuite: > > > > * 20_util/bind/ref_neg.cc: Prune Windows paths too. > > Please CC the libstdc++ for libstdc++ patches. > > OK for trunk, thanks. I'm

Re: [PATCH] Adjust the symbol for SECTION_LINK_ORDER linked_to section [PR99889]

2022-09-30 Thread Segher Boessenkool
On Fri, Sep 30, 2022 at 08:47:53PM +0800, Kewen.Lin wrote: > on 2022/9/30 04:31, Segher Boessenkool wrote: > > Please don't define TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY at all, > > instead, and remove this whole function? > > This hook is still needed for "ELFv2 support rework" which > was jus

Re: [PATCH] arm, aarch64, csky: Fix C++ ICEs with _Float16 and __fp16 [PR107080]

2022-09-30 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 30, 2022 at 06:38:39PM +0100, Richard Sandiford wrote: > OK for the aarch64 part, thanks. But could you add some scan-assemblers > to the test to check for the mangled names? I assume they should be: Ok, about to commit the aarch64 part, will await review of the rest afterwards. > >

Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 30, 2022 at 06:47:07PM +0100, Jonathan Wakely via Gcc-patches wrote: > On Fri, 30 Sept 2022 at 17:26, Jonathan Wakely wrote: > > > > On Fri, 30 Sept 2022 at 17:04, Torbjörn SVENSSON > > wrote: > > > > > > libstdc++-v3/testsuite: > > > > > > * 20_util/bind/ref_neg.cc: Prune Wind

Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 18:55, Jakub Jelinek wrote: > > On Fri, Sep 30, 2022 at 06:47:07PM +0100, Jonathan Wakely via Gcc-patches > wrote: > > On Fri, 30 Sept 2022 at 17:26, Jonathan Wakely wrote: > > > > > > On Fri, 30 Sept 2022 at 17:04, Torbjörn SVENSSON > > > wrote: > > > > > > > > libstdc++

Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 19:04, Jonathan Wakely wrote: > > On Fri, 30 Sept 2022 at 18:55, Jakub Jelinek wrote: > > > > On Fri, Sep 30, 2022 at 06:47:07PM +0100, Jonathan Wakely via Gcc-patches > > wrote: > > > On Fri, 30 Sept 2022 at 17:26, Jonathan Wakely wrote: > > > > > > > > On Fri, 30 Sept 2

Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 19:07, Jonathan Wakely wrote: > > On Fri, 30 Sept 2022 at 19:04, Jonathan Wakely wrote: > > > > On Fri, 30 Sept 2022 at 18:55, Jakub Jelinek wrote: > > > > > > On Fri, Sep 30, 2022 at 06:47:07PM +0100, Jonathan Wakely via Gcc-patches > > > wrote: > > > > On Fri, 30 Sept

Re: [PATCH 00/10] c-family,libstdc++: P1642 and related changes

2022-09-30 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 17:46, Arsen Arsenović via Libstdc++ wrote: > > Hi, > > This patchset: > - Implements the P1642 WG21 paper, with a fair few extensions, > - Fixes libstdc++' build system on systems --without-headers, > - Ports (a large chunk of) the libstdc++ testsuite to freestanding, and

Re: [RFC PATCH] c++, i386, arm, aarch64, libgcc: std::bfloat16_t and __bf16 arithmetic support

2022-09-30 Thread Joseph Myers
On Fri, 30 Sep 2022, Jakub Jelinek via Gcc-patches wrote: > What isn't in the patch but I think we'll need to also change are some > minimal set of __builtin_*bf16 builtins. Seems for _Float16, GCC provides > all the __builtin_*f16 (and for C/ObjC even with *f16 names), but there is > no glibc su

Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Andreas Schwab
On Sep 30 2022, Jonathan Wakely via Gcc-patches wrote: > That fixes the error, but now the regex doesn't match so there are > still excess errors. It needs to be: > > // { dg-prune-output ".*\[/\\](functional|bits\[/\\]invoke.h):.*" } In Tcl "." matches newlines, thus this will prune too much. -

Re: [RFC PATCH] c++, i386, arm, aarch64, libgcc: std::bfloat16_t and __bf16 arithmetic support

2022-09-30 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 30, 2022 at 06:21:04PM +, Joseph Myers wrote: > On Fri, 30 Sep 2022, Jakub Jelinek via Gcc-patches wrote: > > > What isn't in the patch but I think we'll need to also change are some > > minimal set of __builtin_*bf16 builtins. Seems for _Float16, GCC provides > > all the __builti

Re: [RFC PATCH] c++, i386, arm, aarch64, libgcc: std::bfloat16_t and __bf16 arithmetic support

2022-09-30 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 19:38, Jakub Jelinek wrote: > > On Fri, Sep 30, 2022 at 06:21:04PM +, Joseph Myers wrote: > > On Fri, 30 Sep 2022, Jakub Jelinek via Gcc-patches wrote: > > > > > What isn't in the patch but I think we'll need to also change are some > > > minimal set of __builtin_*bf16

Re: [PATCH] x86: Check corrupted return address when unwinding stack

2022-09-30 Thread Jeff Law via Gcc-patches
On 9/21/22 14:42, H.J. Lu via Gcc-patches wrote: If shadow stack is enabled, when unwinding stack, we count how many stack frames we pop to reach the landing pad and adjust shadow stack by the same amount. When counting the stack frame, we compare the return address on normal stack against the

Re: [PATCH] arm, aarch64, csky: Fix C++ ICEs with _Float16 and __fp16 [PR107080]

2022-09-30 Thread Jason Merrill via Gcc-patches
On 9/30/22 13:13, Jakub Jelinek wrote: On Fri, Sep 30, 2022 at 09:54:49AM -0400, Jason Merrill wrote: Note, there is one further problem on aarch64/arm, types with HFmode (_Float16 and __fp16) are there mangled as Dh (which is standard Itanium mangling: ::= Dh # IEEE 754r half

Re: [PATCH] c++: make some cp_trait_kind switch statements exhaustive

2022-09-30 Thread Jason Merrill via Gcc-patches
On 9/30/22 13:37, Patrick Palka wrote: On Fri, 30 Sep 2022, Patrick Palka wrote: This replaces the unreachable default case in some cp_trait_kind switches with an exhaustive listing of the _unexpected_ trait codes, so that when adding a new trait we'll get a -Wswitch diagnostic if we forget to

Re: [PATCH RFC] c++: streamline process for adding new builtin trait

2022-09-30 Thread Jason Merrill via Gcc-patches
On 9/30/22 11:14, Patrick Palka wrote: On Thu, 29 Sep 2022, Jason Merrill wrote: On 9/29/22 11:05, Patrick Palka wrote: Adding a new builtin trait currently involves some boilerplate (as can be seen in r13-2956-g9ca147154074a0) of defining corresponding RID_ and CPTK_ enumerators and adding th

Re: [PATCH] c++, c: Implement C++23 P1774R8 - Portable assumptions [PR106654]

2022-09-30 Thread Jason Merrill via Gcc-patches
On 9/22/22 05:55, Jakub Jelinek wrote: Hi! The following patch implements C++23 P1774R8 - Portable assumptions paper, by introducing support for [[assume (cond)]]; attribute for C++. In addition to that the patch adds [[gnu::assume (cond)]]; and __attribute__((assume (cond))); support to both C

[committed] libstdc++: Optimize operator>> for std::bitset

2022-09-30 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- We can improve performance by using a char buffer instead of basic_string. The loop bound already means we can't overflow the buffer, and we don't need to keep writing a null character after every character written to the buffer. We could just use b

  1   2   >