public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] morello: fix selftest::read_rtl_function_c_tests
@ 2022-05-30 11:30 Szabolcs Nagy
0 siblings, 0 replies; only message in thread
From: Szabolcs Nagy @ 2022-05-30 11:30 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:4662bd2ad61743ca6083b9a7fecf169786765827
commit 4662bd2ad61743ca6083b9a7fecf169786765827
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Wed Apr 13 16:28:30 2022 +0100
morello: fix selftest::read_rtl_function_c_tests
Without this patch building a default purecap ABI gcc fails because
current_function_decl is NULL in aarch64_function_arg_regno_p.
Unconditionally return true for r9 with purecap ABI since the arg
regno predicate is not supposed to be context sensitive.
/B/gcc/xgcc -B/B/gcc/ -xc -nostdinc /dev/null -S -o /dev/null -fself-test=/S/gcc/testsuite/selftests
cc1: internal compiler error: Segmentation fault
0xdefe6b crash_signal
/S/gcc/toplev.c:327
0x126ba20 contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*)
/S/gcc/tree.h:3474
0x126ba20 aarch64_current_function_variadic_p
/S/gcc/config/aarch64/aarch64.c:6704
0x126ba20 aarch64_function_arg_regno_p(unsigned int)
/S/gcc/config/aarch64/aarch64.c:6716
0x7cd14b init_alias_target()
/S/gcc/alias.c:3305
0xdf13e7 backend_init_target
/S/gcc/toplev.c:1896
0xdf13e7 initialize_rtl()
/S/gcc/toplev.c:1978
0xd13963 read_rtl_function_body(char const*)
/S/gcc/read-rtl-function.c:1628
0xd9de03 selftest::rtl_dump_test::rtl_dump_test(selftest::location const&, char*)
/S/gcc/selftest-rtl.c:92
0xd1002b test_loading_dump_fragment_1
/S/gcc/read-rtl-function.c:1757
0xd13c63 selftest::read_rtl_function_c_tests()
/S/gcc/read-rtl-function.c:2208
0x1c16827 selftest::run_tests()
/S/gcc/selftest-run-tests.c:90
0xdf1867 toplev::run_self_tests()
/S/gcc/toplev.c:2379
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.
/S/gcc/c/Make-lang.in:124: recipe for target 's-selftest-c' failed
make[2]: *** [s-selftest-c] Error 1
Diff:
---
gcc/config/aarch64/aarch64.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index f49b46fc36b..1e7ab8ef9ac 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -6698,22 +6698,11 @@ aarch64_function_arg_advance (cumulative_args_t pcum_v,
}
}
-static bool
-aarch64_current_function_variadic_p (void)
-{
- tree t = TREE_TYPE (current_function_decl);
- for (t = TYPE_ARG_TYPES (t); t; t = TREE_CHAIN (t))
- if (t == void_list_node)
- return false;
-
- return true;
-}
-
bool
aarch64_function_arg_regno_p (unsigned regno)
{
if (TARGET_CAPABILITY_PURE && regno == R9_REGNUM)
- return aarch64_current_function_variadic_p ();
+ return true;
return ((GP_REGNUM_P (regno) && regno < R0_REGNUM + NUM_ARG_REGS)
|| (FP_REGNUM_P (regno) && regno < V0_REGNUM + NUM_FP_ARG_REGS));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-30 11:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 11:30 [gcc(refs/vendors/ARM/heads/morello)] morello: fix selftest::read_rtl_function_c_tests Szabolcs Nagy
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).