https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96947
Bug ID: 96947 Summary: _gfortran_caf_fail_image called with wrong number of arguments Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: fxcoudert at gcc dot gnu.org Target Milestone: --- Take the source code gfortran.dg/coarray_fail_st.f90 The tree dump shows that _gfortran_caf_fail_image() is called with one argument: _gfortran_caf_fail_image (0B); This call is generated in gfc_trans_fail_image(), which passes a NULL pointer: if (flag_coarray == GFC_FCOARRAY_LIB) return build_call_expr_loc (input_location, gfor_fndecl_caf_fail_image, 1, build_int_cst (pchar_type_node, 0)); But the prototype for the function in libgfortran is clear that it takes no argument: void _gfortran_caf_fail_image (void) __attribute__ ((noreturn)); I do not know which way this should be fixed. It creates runtime issues with coarrays on aarch64-apple-darwin20.