[Bug fortran/104313] [9/10/11/12 Regression] ICE verify_gimple failed with -ff2c since r10-2279-ge0af8f52b10385d8
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 1 15:52:51 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104313
--- Comment #2 from kargl at gcc dot gnu.org ---
diff --git a/gcc/fortran/trans-decl.cc b/gcc/fortran/trans-decl.cc
index 6493cc2f6b1..908a4c6d42e 100644
--- a/gcc/fortran/trans-decl.cc
+++ b/gcc/fortran/trans-decl.cc
@@ -6474,7 +6474,7 @@ gfc_generate_return (void)
NULL_TREE, and a 'return' is generated without a variable.
The following generates a 'return __result_XXX' where XXX is
the function name. */
- if (sym == sym->result && sym->attr.function)
+ if (sym == sym->result && sym->attr.function && !flag_f2c)
{
result = gfc_get_fake_result_decl (sym, 0);
result = fold_build2_loc (input_location, MODIFY_EXPR,
More information about the Gcc-bugs
mailing list