[pushed] c++: array temporary at file scope [PR104182]

2022-01-22 Thread Jason Merrill via Gcc-patches
This is the same issue as PR104031, but that patch doesn't fix this testcase because in this case, current_function_decl isn't set when we get to cp_genericize_target_expr. But there seems to be no need for is_local_temp to check for function scope; !TREE_STATIC should be enough. Tested

[pushed] c++: constexpr and -fno-elide-constructors [PR101072]

2022-01-22 Thread Jason Merrill via Gcc-patches
We've been trying for a while to avoid TARGET_EXPRs in template code, but there were still a few that snuck through, and the one in this case broke the code that tried to handle it. Fixed by using IMPLICIT_CONV_EXPR, as we have done elsewhere. I also noticed that finish_compound_literal was

Re: [PATCH] x86: Also check VALID_BCST_MODE_P on memory broadcast

2022-01-22 Thread H.J. Lu via Gcc-patches
On Sat, Jan 22, 2022 at 2:24 PM H.J. Lu wrote: > > Return false for invalid broadcast mode in bcst_mem_operand on memory > broadcast: > > (vec_duplicate:V16SF (mem/j:V4SF (reg/v/f:DI 109 [ b ]))) > > gcc/ > > PR target/104188 > * config/i386/predicates.md (bcst_mem_operand): Also

Re: Difference between 32-bit SPARCv9 and SPARCv8+?

2022-01-22 Thread John Paul Adrian Glaubitz
Hi! On 1/21/22 15:00, John Paul Adrian Glaubitz wrote: > While playing around with the compiler options trying to find a solution, I > made an interesting > discovery which is that GCC support 64-bit compare and swap on SPARCv8plus > but not on 32-bit > SPARCv9: > > glaubitz@gcc202:~$ echo |

Re: [PATCH] libgccjit: Add support for register variables [PR104072]

2022-01-22 Thread Antoni Boucher via Gcc-patches
Hi. Le mardi 18 janvier 2022 à 18:49 -0500, David Malcolm a écrit : > On Mon, 2022-01-17 at 19:46 -0500, Antoni Boucher via Gcc-patches > wrote: > > I missed the comment about the new define, so here's the updated > > patch. > > Thanks for the patch. > > > > Le lundi 17 janvier 2022 à 19:24

Re: [PATCH][GCC13?] RISC-V: Replace `smin'/`smax' RTL patterns with `fmin'/`fmax'

2022-01-22 Thread Maciej W. Rozycki
On Thu, 20 Jan 2022, Joseph Myers wrote: > > The old formulation of the instructions were never ratified as a > > RISC-V standard. I don't think we need to hamstring ourselves here by > > assuming the possibility of their implementation. > > If you ignore the old version, then the instructions

[PATCH] x86: Also check VALID_BCST_MODE_P on memory broadcast

2022-01-22 Thread H.J. Lu via Gcc-patches
Return false for invalid broadcast mode in bcst_mem_operand on memory broadcast: (vec_duplicate:V16SF (mem/j:V4SF (reg/v/f:DI 109 [ b ]))) gcc/ PR target/104188 * config/i386/predicates.md (bcst_mem_operand): Also check VALID_BCST_MODE_P on memory broadcast.

[PATCH] c++: value category of compound object expr [PR104173]

2022-01-22 Thread Patrick Palka via Gcc-patches
Here the call to the &&-qualified toLower() is incorrectly rejected because the object expression is deemed to be an lvalue, even though it's really a prvalue. The object expression, instance()->applicationName(), is expressed as an INDIRECT_REF of a COMPOUND_EXPR *(*instance ();, _EXPR ;);

[PATCH] Fix build issues for *-linux-android and add aarch64-linux-android support. [PR101785, PR99499]

2022-01-22 Thread cqwrteur via Gcc-patches
I have add aarch64-linux-android target support and fix build issues with libstdc++ for android. Several small issues like no libpthread.a (since android does not need libpthread.a) + 'ifunc' is not supported on this target, i will leave other people to fix. --- gcc/config.gcc

Re: [PATCH] Fortran: detect signaling NaNs on targets without issignaling macro in libc

2022-01-22 Thread Mikael Morin
Hello, Le 17/01/2022 à 00:11, FX via Fortran a écrit : This patch is the third in my “signaling NaN” series. For targets with IEEE support but without the issignaling macro in libc (i.e., everywhere except glibc), this allows us to provide a fallback implementation. In order to keep the code

Re: [PATCH] Disable -fsplit-stack support on non-glibc targets

2022-01-22 Thread Jakub Jelinek via Gcc-patches
On Sat, Jan 22, 2022 at 01:16:38PM +0100, Jakub Jelinek via Gcc-patches wrote: > Actually, I suspect we either need something like following patch, > or need to change gcc/config/{linux,rs6000/linux{,64},alpha/linux}.h > so that next to those OPTION_GLIBC etc. macros it also defines versions > of

Re: [PATCH] bootstrap: Fix bootstrap with --disable-plugin [PR104176]

2022-01-22 Thread Richard Biener via Gcc-patches
> Am 22.01.2022 um 13:00 schrieb Jakub Jelinek via Gcc-patches > : > > Hi! > > With --disable-plugin, bootstrap fails on x86_64-linux or probably > all other targets with: > ../../gcc/opts-global.cc: In function ‘void handle_common_deferred_options()’: > ../../gcc/opts-global.cc:420:62:

[committed] testsuite: guard usage of _Float16 in analyzer test [PR104150]

2022-01-22 Thread David Malcolm via Gcc-patches
Committed to trunk as r12-6818-ga1fb81bda97014ba14d55c4c2e143d31ffe2e264. gcc/testsuite/ChangeLog: PR analyzer/104150 * gcc.dg/analyzer/pr104089.c: Add "dg-add-options float16" and "dg-require-effective-target float16" directives. Signed-off-by: David Malcolm ---

Re: [PATCH] PR fortran/104127 - [9/10/11/12 Regression] ICE in get_array_charlen, at fortran/trans-array.c:7244

2022-01-22 Thread Thomas Koenig via Gcc-patches
Hello Harald, when simplifying TRANSFER with a MOLD argument of type character and with SIZE=0 we lose the character length. This happens in all gfortran versions and results in wrong code. The purported regression is that at some point in the 9-development this lead to a (previously possibly

Re: [PATCH] Disable -fsplit-stack support on non-glibc targets

2022-01-22 Thread Jakub Jelinek via Gcc-patches
On Sat, Jan 22, 2022 at 10:32:21AM +0100, Martin Liška wrote: > I've just noticed the patch broke a few cross compilers: > > s390x-ibm-tpf: > > /home/marxin/buildworker/zen2-cross-compilers/build/gcc/common/config/s390/s390-common.cc: > In function ‘bool s390_supports_split_stack(bool,

[PATCH] bootstrap: Fix bootstrap with --disable-plugin [PR104176]

2022-01-22 Thread Jakub Jelinek via Gcc-patches
Hi! With --disable-plugin, bootstrap fails on x86_64-linux or probably all other targets with: ../../gcc/opts-global.cc: In function ‘void handle_common_deferred_options()’: ../../gcc/opts-global.cc:420:62: error: unquoted option name ‘--enable-plugin’ in format [-Werror=format-diag] 420 |

Re: Re: [PATCH v5 02/12] LoongArch Port: gcc build

2022-01-22 Thread 程璐璐
-原始邮件- 发件人: "Jakub Jelinek" 发送时间: 2022-01-22 17:31:40 (星期六) 收件人: "Xi Ruoyao" 抄送: "程璐璐" , "Chenghua Xu" , gcc-patches@gcc.gnu.org, jos...@codesourcery.com 主题: Re: [PATCH v5 02/12] LoongArch Port: gcc build On Sat, Jan 22, 2022 at 05:05:00PM +0800, Xi Ruoyao wrote: On Sat,

Re: [PATCH] Disable -fsplit-stack support on non-glibc targets

2022-01-22 Thread Jakub Jelinek via Gcc-patches
On Sat, Jan 22, 2022 at 10:32:21AM +0100, Martin Liška wrote: > Hello. > > I've just noticed the patch broke a few cross compilers: > > s390x-ibm-tpf: > > /home/marxin/buildworker/zen2-cross-compilers/build/gcc/common/config/s390/s390-common.cc: > In function ‘bool

Re: [PATCH] Disable -fsplit-stack support on non-glibc targets

2022-01-22 Thread Martin Liška
Hello. I've just noticed the patch broke a few cross compilers: s390x-ibm-tpf: /home/marxin/buildworker/zen2-cross-compilers/build/gcc/common/config/s390/s390-common.cc: In function ‘bool s390_supports_split_stack(bool, gcc_options*)’:

Re: [PATCH v5 02/12] LoongArch Port: gcc build

2022-01-22 Thread Jakub Jelinek via Gcc-patches
On Sat, Jan 22, 2022 at 05:05:00PM +0800, Xi Ruoyao wrote: > On Sat, 2022-01-22 at 16:56 +0800, 程璐璐 wrote: > > > Under the MIPS architecture, *.opt files are also generated in > > $(srcdir). > > Well, but then you should put the commands for generating those files > into contrib/gcc_update

Re: [PATCH v5 02/12] LoongArch Port: gcc build

2022-01-22 Thread Andreas Schwab
On Jan 22 2022, Xi Ruoyao via Gcc-patches wrote: > Well, but then you should put the commands for generating those files > into contrib/gcc_update instead of Makefile.in, just like MIPS. contrib/gcc_update doesn't regenerate any files, it only updates timestamps. -- Andreas Schwab,

Re: [PATCH v5 02/12] LoongArch Port: gcc build

2022-01-22 Thread 程璐璐
在 2022/1/22 下午5:05, Xi Ruoyao 写道: On Sat, 2022-01-22 at 16:56 +0800, 程璐璐 wrote: Under the MIPS architecture, *.opt files are also generated in $(srcdir). Well, but then you should put the commands for generating those files into contrib/gcc_update instead of Makefile.in, just like MIPS.

Re: [PATCH v5 02/12] LoongArch Port: gcc build

2022-01-22 Thread Xi Ruoyao via Gcc-patches
On Sat, 2022-01-22 at 16:56 +0800, 程璐璐 wrote: > Under the MIPS architecture, *.opt files are also generated in > $(srcdir). Well, but then you should put the commands for generating those files into contrib/gcc_update instead of Makefile.in, just like MIPS. -- Xi Ruoyao School of Aerospace

Re: [PATCH v5 02/12] LoongArch Port: gcc build

2022-01-22 Thread 程璐璐
在 2022/1/22 下午4:46, Xi Ruoyao 写道: On Sat, 2022-01-22 at 09:41 +0100, Jakub Jelinek wrote: On Sat, Jan 22, 2022 at 04:33:08PM +0800, Xi Ruoyao via Gcc-patches wrote: On Sat, 2022-01-22 at 15:55 +0800, Chenghua Xu wrote: +$(srcdir)/config/loongarch/loongarch.opt: \ +   

Re: [PATCH v5 02/12] LoongArch Port: gcc build

2022-01-22 Thread Xi Ruoyao via Gcc-patches
On Sat, 2022-01-22 at 09:41 +0100, Jakub Jelinek wrote: > On Sat, Jan 22, 2022 at 04:33:08PM +0800, Xi Ruoyao via Gcc-patches > wrote: > > On Sat, 2022-01-22 at 15:55 +0800, Chenghua Xu wrote: > > > +$(srcdir)/config/loongarch/loongarch.opt: \ > > > +   

Re: [PATCH v5 02/12] LoongArch Port: gcc build

2022-01-22 Thread Xi Ruoyao via Gcc-patches
On Sat, 2022-01-22 at 15:55 +0800, Chenghua Xu wrote: > +mstrict-align > +Target Var(TARGET_STRICT_ALIGN) Init(0) > +Do not generate unaligned memory accesses. Section 2.1.8 of LoongArch spec says "load/store instruction *may* be implemented to allow unaligned memory access". As it's not a

Re: [PATCH v5 02/12] LoongArch Port: gcc build

2022-01-22 Thread Jakub Jelinek via Gcc-patches
On Sat, Jan 22, 2022 at 04:33:08PM +0800, Xi Ruoyao via Gcc-patches wrote: > On Sat, 2022-01-22 at 15:55 +0800, Chenghua Xu wrote: > > +$(srcdir)/config/loongarch/loongarch.opt: \ > > +   $(srcdir)/config/loongarch/genopts/genstr.sh \ > > +   

Re: [PATCH v5 02/12] LoongArch Port: gcc build

2022-01-22 Thread Xi Ruoyao via Gcc-patches
On Sat, 2022-01-22 at 15:55 +0800, Chenghua Xu wrote: > +   Copyright (C) 2021 Free Software Foundation, Inc. All of those should be 2021 - 2022 (or just 2022?) now. -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University

Re: [PATCH v5 02/12] LoongArch Port: gcc build

2022-01-22 Thread Xi Ruoyao via Gcc-patches
On Sat, 2022-01-22 at 15:55 +0800, Chenghua Xu wrote: > +$(srcdir)/config/loongarch/loongarch.opt: \ > +   $(srcdir)/config/loongarch/genopts/genstr.sh \ > +   $(srcdir)/config/loongarch/genopts/loongarch.opt.in > +   $(SHELL) $< opt > $@ > + > +$(LA_STR_H): \ > +   

Re: [PATCH] fortran: Extend -fconvert= option for ppc64le r16_ieee and r16_ibm

2022-01-22 Thread Thomas Koenig via Gcc-patches
Hi Jakub, This patch on top of the previously posted option handling changes patch allows specifying -fconvert=swap,r16_ieee etc. (but will error on it when not on powerpc64le because in the library such swapping is only implemented for HAVE_REAL_17). Bootstrapped/regtested on x86_64-linux

[PATCH v5 12/12] LoongArch Port: Add doc.

2022-01-22 Thread Chenghua Xu
From: chenglulu * contrib/config-list.mk: Add LoongArch triplet. * gcc/doc/install.texi: Add LoongArch options section. * gcc/doc/invoke.texi: Add LoongArch options section. * gcc/doc/md.texi: Add LoongArch options section. --- contrib/config-list.mk | 5 +-

[PATCH v5 08/12] LoongArch Port: libgcc

2022-01-22 Thread Chenghua Xu
From: chenglulu libgcc/ * config/loongarch/crtfastmath.c: New file. * config/loongarch/crti.S: Like wise. * config/loongarch/crtn.S: Like wise. * config/loongarch/lib2funcs.c: Like wise. * config/loongarch/linux-unwind.h: Like wise. *

[PATCH v5 11/12] LoongArch Port: gcc/testsuite

2022-01-22 Thread Chenghua Xu
From: chenglulu gcc/testsuite/ * g++.dg/cpp0x/constexpr-rom.C: Add build options for LoongArch. * g++.old-deja/g++.abi/ptrmem.C: Add LoongArch support. * g++.old-deja/g++.pt/ptrmem6.C: xfail for LoongArch. * gcc.dg/20020312-2.c: Add LoongArch support. *

[PATCH v5 06/12] LoongArch Port: Builtin functions.

2022-01-22 Thread Chenghua Xu
From: chenglulu gcc/ * config/loongarch/larchintrin.h: New file. * config/loongarch/loongarch-builtins.cc: New file. --- gcc/config/loongarch/larchintrin.h | 413 + gcc/config/loongarch/loongarch-builtins.cc | 511 + 2 files changed,