public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/98147] New: [11 Regression] ICE in emit_library_call_value_1, at calls.c:5296 since r11-5725-g442b6fb7c09a39577261de90413cc4db366f1c5f
@ 2020-12-04 15:24 marxin at gcc dot gnu.org
2020-12-04 15:24 ` [Bug target/98147] " marxin at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-04 15:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98147
Bug ID: 98147
Summary: [11 Regression] ICE in emit_library_call_value_1, at
calls.c:5296 since
r11-5725-g442b6fb7c09a39577261de90413cc4db366f1c5f
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: aoliva at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-linux
Target: aarch64-linux-gnu
Since the revision, the following fails:
$ cat clear_cache.c
char buffer[32] = "Bla bla";
int main() {
__builtin___clear_cache(buffer, buffer+32);
return 0;
}
$ aarch64-linux-gnu-gcc clear_cache.c -c -mabi=ilp32
during RTL pass: expand
clear_cache.c: In function ‘main’:
clear_cache.c:3:3: internal compiler error: in emit_library_call_value_1, at
calls.c:5296
3 | __builtin___clear_cache(buffer, buffer+32);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x65f200 emit_library_call_value_1(int, rtx_def*, rtx_def*, libcall_type,
machine_mode, int, std::pair<rtx_def*, machine_mode>*)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/calls.c:5296
0x791810 emit_library_call(rtx_def*, libcall_type, machine_mode, rtx_def*,
machine_mode, rtx_def*, machine_mode)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/rtl.h:4195
0x791810 default_emit_call_builtin___clear_cache(rtx_def*, rtx_def*)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/builtins.c:7782
0x7a1747 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/builtins.c:9729
0x8be8df expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/expr.c:11249
0x7c256e expand_expr
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/expr.h:282
0x7c256e expand_call_stmt
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/cfgexpand.c:2831
0x7c256e expand_gimple_stmt_1
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/cfgexpand.c:3835
0x7c256e expand_gimple_stmt
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/cfgexpand.c:3999
0x7c80f7 expand_gimple_basic_block
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/cfgexpand.c:6040
0x7c80f7 execute
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc/cfgexpand.c:6724
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/98147] [11 Regression] ICE in emit_library_call_value_1, at calls.c:5296 since r11-5725-g442b6fb7c09a39577261de90413cc4db366f1c5f
2020-12-04 15:24 [Bug target/98147] New: [11 Regression] ICE in emit_library_call_value_1, at calls.c:5296 since r11-5725-g442b6fb7c09a39577261de90413cc4db366f1c5f marxin at gcc dot gnu.org
@ 2020-12-04 15:24 ` marxin at gcc dot gnu.org
2020-12-05 13:53 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-04 15:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98147
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.0
Priority|P3 |P1
Last reconfirmed| |2020-12-04
Known to work| |10.2.0
Known to fail| |11.0
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/98147] [11 Regression] ICE in emit_library_call_value_1, at calls.c:5296 since r11-5725-g442b6fb7c09a39577261de90413cc4db366f1c5f
2020-12-04 15:24 [Bug target/98147] New: [11 Regression] ICE in emit_library_call_value_1, at calls.c:5296 since r11-5725-g442b6fb7c09a39577261de90413cc4db366f1c5f marxin at gcc dot gnu.org
2020-12-04 15:24 ` [Bug target/98147] " marxin at gcc dot gnu.org
@ 2020-12-05 13:53 ` jakub at gcc dot gnu.org
2020-12-07 18:21 ` cvs-commit at gcc dot gnu.org
2020-12-14 9:59 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-05 13:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98147
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49689
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49689&action=edit
gcc11-pr98147.patch
Untested fix. I don't have a way to test this though, no access to ilp32-ish
POINTER_EXTEND_UNSIGNED environments.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/98147] [11 Regression] ICE in emit_library_call_value_1, at calls.c:5296 since r11-5725-g442b6fb7c09a39577261de90413cc4db366f1c5f
2020-12-04 15:24 [Bug target/98147] New: [11 Regression] ICE in emit_library_call_value_1, at calls.c:5296 since r11-5725-g442b6fb7c09a39577261de90413cc4db366f1c5f marxin at gcc dot gnu.org
2020-12-04 15:24 ` [Bug target/98147] " marxin at gcc dot gnu.org
2020-12-05 13:53 ` jakub at gcc dot gnu.org
@ 2020-12-07 18:21 ` cvs-commit at gcc dot gnu.org
2020-12-14 9:59 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-07 18:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98147
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:b737b70fad398728f6006e8397d1bb31ccea4ce7
commit r11-5831-gb737b70fad398728f6006e8397d1bb31ccea4ce7
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Dec 7 19:20:25 2020 +0100
builtins: Avoid ICE with __builtin_clear_padding on
POINTERS_EXTEND_UNSIGNED targets [PR98147]
The function that calls targetm.emit_call_builtin___clear_cache
asserts that each of the begin and end operands has either ptr_mode or
Pmode.
On most targets that is the same mode, but e.g. on aarch64 -mabi=ilp32
or a few others it is different. When a target has a clear cache
non-library handler, it will use create_address_operand which will do the
conversion to the right mode automatically, but when emitting a library
call, we just say the operands are ptr_mode even when they can be Pmode
too; in that case we need to convert explicitly.
2020-12-07 Jakub Jelinek <jakub@redhat.com>
PR target/98147
* builtins.c (default_emit_call_builtin___clear_cache): Call
convert_memory_address to ptr_mode on both begin and end.
* gcc.dg/pr98147.c: New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/98147] [11 Regression] ICE in emit_library_call_value_1, at calls.c:5296 since r11-5725-g442b6fb7c09a39577261de90413cc4db366f1c5f
2020-12-04 15:24 [Bug target/98147] New: [11 Regression] ICE in emit_library_call_value_1, at calls.c:5296 since r11-5725-g442b6fb7c09a39577261de90413cc4db366f1c5f marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2020-12-07 18:21 ` cvs-commit at gcc dot gnu.org
@ 2020-12-14 9:59 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-14 9:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98147
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-14 9:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 15:24 [Bug target/98147] New: [11 Regression] ICE in emit_library_call_value_1, at calls.c:5296 since r11-5725-g442b6fb7c09a39577261de90413cc4db366f1c5f marxin at gcc dot gnu.org
2020-12-04 15:24 ` [Bug target/98147] " marxin at gcc dot gnu.org
2020-12-05 13:53 ` jakub at gcc dot gnu.org
2020-12-07 18:21 ` cvs-commit at gcc dot gnu.org
2020-12-14 9:59 ` jakub at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).