resdecl,
build_int_cst (TREE_TYPE (resdecl), 0));
}
- else if (!is_gimple_reg_type (restype))
+ else if (aggregate_value_p (resdecl, TREE_TYPE (thunk_fndecl)))
{
- if (aggregate_value_p (resdecl, TREE_TYPE (thunk_fndecl)))
+ restmp = resdecl;
+
+ if (VAR_P (restmp))
{
- restmp = resdecl;
-
- if (VAR_P (restmp))
- {
- add_local_decl (cfun, restmp);
- BLOCK_VARS (DECL_INITIAL (current_function_decl))
- = restmp;
- }
+ add_local_decl (cfun, restmp);
+ BLOCK_VARS (DECL_INITIAL (current_function_decl))
+ = restmp;
}
- else
- restmp = create_tmp_var (restype, "retval");
}
else
restmp = create_tmp_reg (restype, "retval");
--- /dev/null
+/* PR middle-end/113406 */
+/* { dg-do compile { target bitint } } */
+/* { dg-options "-std=c23 -fstrub=internal" } */
+/* { dg-require-effective-target strub } */
+
+#if __BITINT_MAXWIDTH__ >= 146
+_BitInt(146)
+#else
+_BitInt(16)
+#endif
+foo (void)
+{
+ return 0;
+}