https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123548
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Known to fail| |16.0
Ever confirmed|0 |1
Last reconfirmed| |2026-01-12
CC| |acoplan at gcc dot gnu.org
--- Comment #1 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Confirmed. Here is a backtrace:
$ gcc/xgcc -B gcc -c t.c -S -o /dev/null
In file included from t.c:1:
In function ‘__pldx’,
inlined from ‘test’ at t.c:6:3:
gcc/include/arm_acle.h:108:10: error: Constant-type argument expected
108 | return __builtin_aarch64_pldx (__access, __cache, __rettn, __addr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
during RTL pass: expand
gcc/include/arm_acle.h:108:10: internal compiler error: tree check: expected
integer_cst, have ssa_name in get_val, at tree.h:6671
0x3a0f203 internal_error(char const*, ...)
$GCC/gcc/diagnostic-global-context.cc:787
0x2045243 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
$GCC/gcc/tree.cc:9204
0x1049853 tree_int_cst_elt_check(tree_node const*, int, char const*, int, char
const*)
$GCC/gcc/tree.h:3980
0x1054b03 wi::extended_tree<131072>::get_val() const
$GCC/gcc/tree.h:6671
0x10537d7 wi::int_traits<generic_wide_int<wi::extended_tree<131072> >
>::decompose(long*, unsigned int, generic_wide_int<wi::extended_tree<131072> >
const&)
$GCC/gcc/wide-int.h:1050
0x1050f5b wide_int_ref_storage<true,
false>::wide_int_ref_storage<generic_wide_int<wi::extended_tree<131072> >
>(generic_wide_int<wi::extended_tree<131072> > const&, unsigned int)
$GCC/gcc/wide-int.h:1099
0x104d99b generic_wide_int<wide_int_ref_storage<true, false>
>::generic_wide_int<generic_wide_int<wi::extended_tree<131072> >
>(generic_wide_int<wi::extended_tree<131072> > const&, unsigned int)
$GCC/gcc/wide-int.h:855
0x235a2ef bool wi::lts_p<generic_wide_int<wi::extended_tree<131072> >,
long>(generic_wide_int<wi::extended_tree<131072> > const&, long const&)
$GCC/gcc/wide-int.h:2296
0x2359d9b wi::binary_traits<generic_wide_int<wi::extended_tree<131072> >, long,
wi::int_traits<generic_wide_int<wi::extended_tree<131072> > >::precision_type,
wi::int_traits<long>::precision_type>::signed_predicate_result operator<
<generic_wide_int<wi::extended_tree<131072> >,
long>(generic_wide_int<wi::extended_tree<131072> > const&, long const&)
$GCC/gcc/wide-int.h:3811
0x23483ab require_const_argument
$GCC/gcc/config/aarch64/aarch64-builtins.cc:3655
0x23485cf aarch64_expand_prefetch_builtin(tree_node*, int)
$GCC/gcc/config/aarch64/aarch64-builtins.cc:3705
0x234c21b aarch64_general_expand_builtin(unsigned int, tree_node*, rtx_def*,
int)
$GCC/gcc/config/aarch64/aarch64-builtins.cc:4579
0x215ac8b aarch64_expand_builtin
$GCC/gcc/config/aarch64/aarch64.cc:16794
0x12ac49b expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
$GCC/gcc/builtins.cc:7851
0x14fdee7 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
$GCC/gcc/expr.cc:12645
0x14efdff expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
$GCC/gcc/expr.cc:9602
0x12bf4b3 expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier)
$GCC/gcc/expr.h:323
0x12f6f37 expand_call_stmt
$GCC/gcc/cfgexpand.cc:3205
0x12fa7d7 expand_gimple_stmt_1
$GCC/gcc/cfgexpand.cc:4236
0x12fae8f expand_gimple_stmt
$GCC/gcc/cfgexpand.cc:4383
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Without looking too closely, I suspect this sort of problem could be fixed by
making the public intrinsic defined directly by the compiler instead of having
the wrapper in the header file.