https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125066
Ted Rodgers <ted.d.rodgers at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ted.d.rodgers at gmail dot com
--- Comment #2 from Ted Rodgers <ted.d.rodgers at gmail dot com> ---
The .ii attached to Bug 125064 also errors with "gimplify.cc:21334...":
When that .ii is reduced to:
struct a;
struct b {
a *operator->();
};
struct [[clang::trivial_abi]] c {
~c();
};
template <typename d> struct e {
e(d) {}
};
struct [[clang::trivial_abi]] f {
c g;
};
template <typename... h> void i(h... k) { e(k...); }
struct a {
f j;
};
void l() {
b j;
i(j->j);
}
it produces:
$ g++-17 -pipe -c base_jumbo_30.ii -o base_jumbo_30.o
base_jumbo_30.ii: In constructor ‘e<d>::e(d) [with d = f]’:
base_jumbo_30.ii:9:9: internal compiler error: in gimplify_expr, at
gimplify.cc:21334
9 | e(d) {}
| ^
0x55e59fa13587 internal_error(char const*, ...)
/usr/src/debug/sys-devel/gcc-17.0.0_p20260426/gcc-17-20260426/gcc/diagnostic-global-context.cc:787
0x55e59cbd82c5 fancy_abort(char const*, int, char const*)
/usr/src/debug/sys-devel/gcc-17.0.0_p20260426/gcc-17-20260426/gcc/diagnostics/context.cc:1813
0x55e59c46b000 gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
/usr/src/debug/sys-devel/gcc-17.0.0_p20260426/gcc-17-20260426/gcc/gimplify.cc:21334
0x55e59d58d83c gimplify_stmt(tree_node**, gimple**)
/usr/src/debug/sys-devel/gcc-17.0.0_p20260426/gcc-17-20260426/gcc/gimplify.cc:8679
0x55e59d5d027f gimplify_statement_list
/usr/src/debug/sys-devel/gcc-17.0.0_p20260426/gcc-17-20260426/gcc/gimplify.cc:2294
0x55e59d5d027f gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
/usr/src/debug/sys-devel/gcc-17.0.0_p20260426/gcc-17-20260426/gcc/gimplify.cc:20930
0x55e59d5d598e gimplify_stmt(tree_node**, gimple**)
/usr/src/debug/sys-devel/gcc-17.0.0_p20260426/gcc-17-20260426/gcc/gimplify.cc:8679
0x55e59d5d598e gimplify_body(tree_node*, bool)
/usr/src/debug/sys-devel/gcc-17.0.0_p20260426/gcc-17-20260426/gcc/gimplify.cc:21786
0x55e59d5d8505 gimplify_function_tree(tree_node*)
/usr/src/debug/sys-devel/gcc-17.0.0_p20260426/gcc-17-20260426/gcc/gimplify.cc:21995
0x55e59d23cc1b cgraph_node::analyze()
/usr/src/debug/sys-devel/gcc-17.0.0_p20260426/gcc-17-20260426/gcc/cgraphunit.cc:691
0x55e59d2434f7 analyze_functions
/usr/src/debug/sys-devel/gcc-17.0.0_p20260426/gcc-17-20260426/gcc/cgraphunit.cc:1270
0x55e59d246afa symbol_table::finalize_compilation_unit()
/usr/src/debug/sys-devel/gcc-17.0.0_p20260426/gcc-17-20260426/gcc/cgraphunit.cc:2593
/usr/libexec/gcc/x86_64-pc-linux-gnu/17/cc1plus -fpreprocessed base_jumbo_30.ii
-quiet -dumpbase base_jumbo_30.ii -dumpbase-ext .ii -mtune=generic
-march=x86-64 -mtls-dialect=gnu2 -foffload-options=-fno-stack-protector
-fcf-protection -foffload-options=-fcf-protection=none -o -
It biulds with gcc-116 with warnings:
$ g++-16 -pipe -c base_jumbo_30.ii -o base_jumbo_30.o
base_jumbo_30.ii:5:31: warning: ‘clang::trivial_abi’ scoped attribute directive
ignored [-Wattributes]
5 | struct [[clang::trivial_abi]] c {
| ^
base_jumbo_30.ii:11:31: warning: ‘clang::trivial_abi’ scoped attribute
directive ignored [-Wattributes]
11 | struct [[clang::trivial_abi]] f {
| ^