Re: [PATCH v2] [MIPS]: add .module mipsREV to all output asm file

2021-08-28 Thread Xi Ruoyao via Gcc-patches
On Fri, 2021-08-27 at 15:36 -0600, Jeff Law wrote: > It's easier when someone has to debug the code later.  > enums show up in debug output by default, while #defines do not. > > > > switch (mips_isa) > >    { > > case MIPS_ISA_MIPS1: return "mips1"; > > // ... > >    } > > > > It lo

Committed: [PATCH] MIPS: use N64 ABI by default if the triple end with -gnuabi64

2021-08-28 Thread Xi Ruoyao via Gcc-patches
On Fri, 2021-08-27 at 15:38 -0600, Jeff Law wrote: > > > On 8/26/2021 10:20 PM, Xi Ruoyao via Gcc-patches wrote: > > On Thu, 2021-08-26 at 23:56 -0400, YunQiang Su wrote: > > > gcc/ChangeLog: > > > > > >  PR target/102089 > > >  * config.gcc: MIPS: use N64 ABI by default if the t

Re: [PATCH] libffi: Fix MIPS r6 support

2021-08-28 Thread Xi Ruoyao via Gcc-patches
On Fri, 2021-08-27 at 15:28 -0600, Jeff Law via Gcc-patches wrote: > > > On 8/26/2021 10:58 PM, YunQiang Su wrote: > > for some instructions, MIPS r6 uses different encoding other than > > the previous releases. > > > > 1. mips/n32.S disable .set mips4: since it casuses old insn encoding > >    

[r12-3159 Regression] FAIL: gfortran.dg/pr68251.f90 -O (test for excess errors) on Linux/x86_64

2021-08-28 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, f075b8c5adcf9cb6336563c472c8d624c54184db is the first bad commit commit f075b8c5adcf9cb6336563c472c8d624c54184db Author: Jan Hubicka Date: Thu Aug 26 15:33:56 2021 +0200 Fix off-by-one error in try_merge_with caused FAIL: 20_util/to_address/debug.cc (test for excess erro

Re: [PATCH] PR fortran/87737 - ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923

2021-08-28 Thread Paul Richard Thomas via Gcc-patches
Hi Harald, It looks good to me. OK for mainline. You might even consider backporting to 11-branch. Best regards Paul On Fri, 27 Aug 2021 at 21:15, Harald Anlauf via Fortran wrote: > Dear all, > > the ICE in the original testcase does no longer occur but leads to an > error in a later stage o

Re: [PATCH v2] [MIPS]: add .module mipsREV to all output asm file

2021-08-28 Thread YunQiang Su
Xi Ruoyao via Gcc-patches 于2021年8月28日周六 下午3:09写道: > > On Fri, 2021-08-27 at 15:36 -0600, Jeff Law wrote: > > > It's easier when someone has to debug the code later. > > enums show up in debug output by default, while #defines do not. > > > > > > > switch (mips_isa) > > >{ > > > case MIPS_

Re: [PATCH] Fix inline versioned namespace bootstrap

2021-08-28 Thread Jonathan Wakely via Gcc-patches
On Fri, 27 Aug 2021 at 22:17, Jonathan Wakely wrote: > > On Fri, 27 Aug 2021 at 21:58, François Dumont via Libstdc++ > wrote: > > > > Since std::allocator is not specialized anymore in > > _GLIBCXX_INLINE_VERSION mode _ExtPtr_allocator specialization do > > not compile > > > > because std::alloca

Re: [PATCH] Fix inline versioned namespace bootstrap

2021-08-28 Thread Jonathan Wakely via Gcc-patches
On Sat, 28 Aug 2021 at 10:26, Jonathan Wakely wrote: > > On Fri, 27 Aug 2021 at 22:17, Jonathan Wakely wrote: > > > > On Fri, 27 Aug 2021 at 21:58, François Dumont via Libstdc++ > > wrote: > > > > > > Since std::allocator is not specialized anymore in > > > _GLIBCXX_INLINE_VERSION mode _ExtPtr_a

[PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-08-28 Thread nick huang via Gcc-patches
Reference with cv-qualifiers should be ignored instead of causing an error because standard accepts cv-qualified references introduced by typedef which is ignored. Therefore, the fix prevents GCC from reporting error by not setting variable "bad_quals" in case the reference is introduced by typed

[PATCH 1/3] md/define_c_enum: support value assignation

2021-08-28 Thread YunQiang Su
Currently, the enums from define_c_enum and define_enum can only has values one by one from 0. In fact we can support the behaviour just like C, aka like (define_enum "mips_isa" [mips1=1 mips2 mips32=32 mips32r2]), then we can get enum mips_isa { MIPS_ISA_MIPS1 = 1, MIPS_ISA_MIPS2 = 2,

[PATCH 2/3] MIPS: use mips_isa enum instead hardcoded numbers

2021-08-28 Thread YunQiang Su
Currently mips-cpu.defs and mips.h are using hardcoded numbers for isa level. Let's replace them with more readable enum mips_isa. gcc/ChangeLog: * config/mips/mips.md: define_enum "mips_isa". * config/mips/mips.h (struct mips_cpu_info): use enum instead of int for 'isa'

[PATCH 3/3] MIPS: add .module mipsREV to all output asm file

2021-08-28 Thread YunQiang Su
Currently, the asm output file for MIPS has no rev info. It can make some trouble, for example: assembler is mips1 by default, gcc is fpxx by default. To assemble the output of gcc -S, we have to pass -mips2 to assembler. gcc/ChangeLog: * gcc/config/mips/mips.c (mips_module_isa_name): New

Re: [committed] libstdc++: Avoid a move in std::function construction (LWG 2447)

2021-08-28 Thread Jonathan Wakely via Gcc-patches
On 27/08/21 00:13 +0100, Jonathan Wakely wrote: This makes the std::function constructor use perfect forwarding, to avoid an unnecessary move-construction of the target. This means we need to rewrite the _Function_base::_Base_manager::_M_init_functor function to use a forwarding reference, and so

Re: [PATCH] libffi: Fix MIPS r6 support

2021-08-28 Thread YunQiang Su
Xi Ruoyao via Gcc-patches 于2021年8月28日周六 下午3:25写道: > > On Fri, 2021-08-27 at 15:28 -0600, Jeff Law via Gcc-patches wrote: > > > > > > On 8/26/2021 10:58 PM, YunQiang Su wrote: > > > for some instructions, MIPS r6 uses different encoding other than > > > the previous releases. > > > > > > 1. mips/n3

[committed] libstdc++: Fix inefficiency in filesystem::absolute [PR99876]

2021-08-28 Thread Jonathan Wakely via Gcc-patches
When the path is already absolute, the call to current_path() is wasteful, because operator/ will ignore the left operand anyway. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: PR libstdc++/99876 * src/c++17/fs_ops.cc (fs::absolute): Call non-throwing form, to av

[PATCH v2] libffi: Fix MIPS r6 support

2021-08-28 Thread YunQiang Su
for some instructions, MIPS r6 uses different encoding other than the previous releases. 1. mips/n32.S disable .set mips4: since it casuses old insn encoding is used. https://github.com/libffi/libffi/pull/396 has been accepted as: 94c102aa69b04337f63498e0e6551fcdce549ae5 2. mips/ffi.c:

[committed] libstdc++: Fix std::allocator for versioned namespace

2021-08-28 Thread Jonathan Wakely via Gcc-patches
Removing the allocator specialization for the versioned namespace breaks _Extptr_allocator because the allocator specialization was still declared in , making it an incomplete type. It wrong to remove that specialization anyway, because it is still needed pre-C++20. This removes the #if ! _GLIBCX

Re: [PATCH] Only simplify TRUNCATE to SUBREG on TRULY_NOOP_TRUNCATION targets

2021-08-28 Thread Segher Boessenkool
Hi! On Fri, Aug 27, 2021 at 05:20:22PM -0600, Jeff Law via Gcc-patches wrote: > On 8/27/2021 3:57 PM, Roger Sayle wrote: > >As recently remarked by Jeff Law, SUBREGs are the "forever chemicals" > >of GCC's RTL; once created they persist in the environment. The problem, > >according to the comment

Re: fix latent bootstrap-debug issue (modref, tree-inline, tree jump-threading)

2021-08-28 Thread Jan Hubicka
> On Aug 22, 2021, Jan Hubicka wrote: > > > OK, thanks for looking into this issue! > > Thanks, I've finally installed it in the trunk. > > > It seems that analye_stmt indeed does not skip debug stmts. It is very > > odd we got so far without hitting build difference. > > Indeed. That got me

Improve merging of modref_access_node

2021-08-28 Thread Jan Hubicka
Hi, this should be final bit of the fancy access merging. We limit number of accesses to 16 and on the overflow we currently just throw away the whole table. This patch instead looks for closest pair of entries in the table and merge them (losing some precision). This is not very often during no

Re: [PATCH 1/3] md/define_c_enum: support value assignation

2021-08-28 Thread Xi Ruoyao via Gcc-patches
On Sat, 2021-08-28 at 08:05 -0400, YunQiang Su wrote: > Currently, the enums from define_c_enum and define_enum can only > has values one by one from 0. > > In fact we can support the behaviour just like C, aka like >   (define_enum "mips_isa" [mips1=1 mips2 mips32=32 mips32r2]), > then we can get

Re: [PATCH 2/3] MIPS: use mips_isa enum instead hardcoded numbers

2021-08-28 Thread Xi Ruoyao via Gcc-patches
On Sat, 2021-08-28 at 08:05 -0400, YunQiang Su wrote: > Currently mips-cpu.defs and mips.h are using hardcoded numbers > for isa level. > > Let's replace them with more readable enum mips_isa. Good, but there is something like "mips_isa_rev >= 32 && mips_isa_rev < 64" in mips.h and netbsd.h. Not

[pushed] testsuite, Darwin : Skip a test requiring strndup in libc.

2021-08-28 Thread Iain Sandoe
Hi Before Darwin11 there is no strndup in libc. This test fails with warning output because of that - so skip it on these versions (since they are not able to use strndup anyway). tested across the Darwin range and on x86_64, powerpc64 linux. pushed to master, thanks Iain gcc/testsuite/ChangeLog