[PATCH v4] LoongArch: Fixed a compilation failure with '%c' in inline assembly [PR107731].

2022-12-26 Thread Lulu Cheng
Co-authored-by: Yang Yujie gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_classify_address): Add precessint for CONST_INT. (loongarch_print_operand_reloc): Operand modifier 'c' is supported. (loongarch_print_operand): Increase the processing of '%c'.

[PATCH] xtensa: Apply a few minor fixes

2022-12-26 Thread Takayuki 'January June' Suwa via Gcc-patches
Almost cosmetic and no functional changes. gcc/ChangeLog: * config/xtensa/*: Tabify, and trim trailing spaces. * config/xtensa/xtensa.h (GP_RETURN, GP_RETURN_REG_COUNT): Change to GP_RETURN_FIRST and GP_RETURN_LAST, respectively. * config/xtensa/xtensa.cc (xtensa_f

[13/13] hash-map: reject empty-looking insertions

2022-12-26 Thread Alexandre Oliva via Gcc-patches
Check, after inserting entries, that they don't look empty. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/ChangeLog * hash-map.h (put, get_or_insert): Check that entry does not look empty after insertion. --- gcc/hash-map.h |4 +++- 1 file changed, 3 insertion

[12/13] hash set: reject attempts to add empty values

2022-12-26 Thread Alexandre Oliva via Gcc-patches
Check, after adding a key to a hash set, that the entry does not look empty. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/ChangeLog * hash-set.h (add): Check that the inserted entry does not look empty. --- gcc/hash-set.h |6 +- 1 file changed, 5 insertio

[11/13] ada: don't map NULL decl to locus

2022-12-26 Thread Alexandre Oliva via Gcc-patches
When decl is NULL, don't record its mapping in the decl_to_instance_map. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/ada/ChangeLog * gcc-interface/trans.cc (Sloc_to_locus): Don't map NULL decl. --- gcc/ada/gcc-interface/trans.cc |2 +- 1 file changed, 1 insertion(+)

[10/13] lto: drop dummy partition mapping

2022-12-26 Thread Alexandre Oliva via Gcc-patches
When adding a catch-all partition, we map NULL to it. That mapping is ineffective and unnecessary. Drop it. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/lto/ChangeLog * lto-partition.cc (lto_1_to_1_map): Drop NULL partition mapping. --- gcc/lto/lto-partition.cc

[09/13] [C++] constexpr: request insert iff depth is ok

2022-12-26 Thread Alexandre Oliva via Gcc-patches
cxx_eval_call_expression requests an INSERT even in cases when it would later decide not to insert. This could break double-hashing chains. Arrange for it to use NO_INSERT when the insertion would not be completed. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/cp/ChangeLog

[08/13] tm: complete tm_restart insertion

2022-12-26 Thread Alexandre Oliva via Gcc-patches
Insertion of a tm_restart_node in tm_restart failed to record the newly-allocated node in the hash table. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/ChangeLog * trans-mem.cc (split_bb_make_tm_edge): Record new node in tm_restart. --- gcc/trans-mem.cc |2 +-

[06/13] tree-inline decl_map: skip mapping result's NULL default def

2022-12-26 Thread Alexandre Oliva via Gcc-patches
If a result doesn't have a default def, don't attempt to remap it. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/ChangeLog * tree-inline.cc (declare_return_variable): Don't remap NULL default def of result. --- gcc/tree-inline.cc |9 + 1 file changed,

[07/13] postreload-gcse: no insert on mere lookup

2022-12-26 Thread Alexandre Oliva via Gcc-patches
lookup_expr_in_table is not used for insertions, but it mistakenly used INSERT rather than NO_INSERT. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/ChangeLog * postreload-gcse.cc (lookup_expr_in_table): Use NO_INSERT. --- gcc/postreload-gcse.cc |2 +- 1 file changed,

[05/13] ssa-loop-niter: skip caching of null operands

2022-12-26 Thread Alexandre Oliva via Gcc-patches
When a TREE_OPERAND is NULL, do not cache it. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/ChangeLog * tree-ssa-loop-niter.cc (expand_simple_operands): Refrain from caching NULL TREE_OPERANDs. --- gcc/tree-ssa-loop-niter.cc |2 ++ 1 file changed, 2 insertions

[04/13] [C++] constraint: insert norm entry once

2022-12-26 Thread Alexandre Oliva via Gcc-patches
Use NO_INSERT to test whether inserting should be attempted. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/cp/ChangeLog * constraint.cc (normalize_concept_check): Use NO_INSERT for pre-insertion check. --- gcc/cp/constraint.cc |8 +--- 1 file changed, 5 in

[03/13] tree-inline decl_map: skip mapping NULL to itself

2022-12-26 Thread Alexandre Oliva via Gcc-patches
Mapping a NULL key is no use, skip it. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/ChangeLog * tree-inline.cc (insert_decl_map): Skip mapping a NULL decl as value to itself. --- gcc/tree-inline.cc |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[02/13] varpool: do not add NULL vnodes to referenced

2022-12-26 Thread Alexandre Oliva via Gcc-patches
Avoid adding NULL vnodes to referenced tables. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/ChangeLog * varpool.c (symbol_table::remove_unreferenced_decls): Do not add NULL vnodes to referenced table. --- gcc/varpool.cc |4 +++- 1 file changed, 3 insertions(+

[01/13] scoped tables: insert before further lookups

2022-12-26 Thread Alexandre Oliva via Gcc-patches
Avoid hash table lookups between requesting an insert and storing the inserted value in avail_exprs_stack. Lookups before the insert is completed could fail to find double-hashed elements. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/ChangeLog * tree-ssa-scopedtables.cc

[00/13] check hash table counts

2022-12-26 Thread Alexandre Oliva via Gcc-patches
While looking into another issue that corrupted hash tables, I added code to check consistency of element counts, and hit numerous issues that were concerning, of three kinds: insertion of entries that seem empty, dangling insertions, and lookups during insertions. These problems may all have th

[RFC] Introduce -finline-memset-loops

2022-12-26 Thread Alexandre Oliva via Gcc-patches
try_store_by_multiple_pieces was added not long ago, enabling variable-sized memset to be expanded inline when the worst-case in-range constant length would, using conditional blocks with powers of two to cover all possibilities of length and alignment. This patch extends the memset expansion to

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-26 Thread Jiufu Guo via Gcc-patches
Hi, Segher Boessenkool writes: > On Fri, Dec 23, 2022 at 08:13:48PM +0100, Richard Biener wrote: >> > Am 23.12.2022 um 17:55 schrieb Segher Boessenkool >> > : >> > There are at least six very different kinds of subreg: >> > >> > 0) Lvalue subregs. Most archs have no use for it, and it can be

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-26 Thread Jiufu Guo via Gcc-patches
Hi, Segher Boessenkool writes: > Hi! > > On Fri, Dec 23, 2022 at 08:36:36PM +0800, Jiufu Guo wrote: >> It seems some limitations there. e.g. 1. "subreg:DF on DI register" >> may not work well on pseudo, > > It is perfectly normal: > A hard register may be accessed in various modes throughout o

[patch, fortran] ICE in attr_decl1, at fortran/decl.c:8691

2022-12-26 Thread Jerry DeLisle via Gcc-patches
The attached patch was provided by Steve Kargl. After exploring for possible other checks I settled on leaving the patch intact. Two existing test cases updated as different but sensible error messages resulted. Regression tested on main line. OK to commit? Regards, Jerry Author: Steve Kargl

Bugzilla 88860 - Clarify gcc online manual attribute format printf example

2022-12-26 Thread Jonny Grant
2022-12-26 Jonathan Grant * gcc/doc/extend.texi: Bugzilla 88860 - Add attribute format printf example >From 1668dc58206428ee92ff142bafb5f545dba029ae Mon Sep 17 00:00:00 2001 From: Jonathan Grant Date: Mon, 26 Dec 2022 21:02:35 + Subject: [PATCH] Bugzilla 88860 - Clarify gcc onlin

[PATCHJ]: Bugzilla 88860 - Clarify online manual infelicities

2022-12-26 Thread Jonny Grant
2022-12-26 Jonathan Grant * gcc/doc/extend.texi: Bugzilla 88860 - Clarify online manual infelicities >From 8b142ad8973dc67289e197e30966490a944e4819 Mon Sep 17 00:00:00 2001 From: Jonathan Grant Date: Mon, 26 Dec 2022 20:58:29 + Subject: [PATCH] Bugzilla 88860 - Clarify g

Bugzilla Bug 81649 [PATCH]: Clarify LeakSanitizer in documentation

2022-12-26 Thread Jonny Grant
My ticket, but text change proposed by Jakub Jelinek. 2022-12-26 Jonathan Grant * gcc/doc/invoke.texi: Clarify LeakSanitizer in documentation >From 2d70a3728536151c4c2f78b6c5d5281ce2233d43 Mon Sep 17 00:00:00 2001 From: Jonathan Grant Date: Mon, 26 Dec 2022 20:46:23 + Subj

Re: [PATCH modula2] PR-108142 Remove empty directories created in the build directory

2022-12-26 Thread Iain Sandoe
Hi Gaius, I’m finding it hard to figure out how the configuration is supposed to work for cross compilers (and more so for Canadian/native crosses). Apologies if this is already answered in other review (but maybe some notes would help in that case). questions in-line, thanks Iain > On 26 De

[PATCH] Add support for x86_64-*-gnu-* targets to build x86_64 gnumach/hurd

2022-12-26 Thread Flavio Cruz via Gcc-patches
Tested by building a toolchain and compiling gnumach for x86_64 [1]. This is the basic version without unwind support which I think is only required to implement exceptions. [1] https://github.com/flavioc/cross-hurd/blob/master/bootstrap-kernel.sh. --- gcc/config.gcc | 5 -

[PATCH modula2] PR-108142 Remove empty directories created in the build directory

2022-12-26 Thread Gaius Mulley via Gcc-patches
Hello, Bootstrapped on amd64 GNU/Linux. Ok for trunk? regards, Gaius --- 8< --- PR-108142 Remove empty directories created in the build directory. This patch removes empty directories created in the build directory. Directories are only created if required and all modula-2 build output is c

Re: Re: [PATCH] RISC-V: Add testcases for VSETVL PASS

2022-12-26 Thread 钟居哲
This is another issue and I have no idea. I think palmer or kito may have know how to solve it. It seems this patch https://gcc.gnu.org/pipermail/gcc-patches/2022-December/609045.html fixed previous issue which is more important. I think it's time to merge it. juzhe.zh...@rivai.ai From:

Re: [Bug c/108224] [PATCH] add srandom random initstate setstate

2022-12-26 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 26 Dec 2022 at 14:25, Jonny Grant wrote: > > > > From 6ff344979af46dbcd739dd9068d6d595547e4c27 Mon Sep 17 00:00:00 2001 > From: Jonathan Grant > Date: Sun, 25 Dec 2022 22:38:44 + > Subject: [PATCH] add srandom random initstate setstate > > --- > gcc/c-family/known-headers.cc | 4

Re: [PATCH] RISC-V: Add testcases for VSETVL PASS

2022-12-26 Thread Andreas Schwab
FAIL: gcc.target/riscv/rvv/vsetvl/dump-1.c -O0 (test for excess errors) Excess errors: /usr/include/gnu/stubs.h:8:11: fatal error: gnu/stubs-ilp32.h: No such file or directory compilation terminated. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552

[Bug c/108224] [PATCH] add srandom random initstate setstate

2022-12-26 Thread Jonny Grant
>From 6ff344979af46dbcd739dd9068d6d595547e4c27 Mon Sep 17 00:00:00 2001 From: Jonathan Grant Date: Sun, 25 Dec 2022 22:38:44 + Subject: [PATCH] add srandom random initstate setstate --- gcc/c-family/known-headers.cc | 4 1 file changed, 4 insertions(+) diff --git a/gcc/c-family/know