https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50392
--- Comment #21 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-8 branch has been updated by Mark Eggleston <markeggles...@gcc.gnu.org>: https://gcc.gnu.org/g:83b84b6ef84ffc0ca25aef5c91720d8f82212a5c commit r8-10280-g83b84b6ef84ffc0ca25aef5c91720d8f82212a5c Author: Mark Eggleston <markeggles...@gcc.gnu.org> Date: Thu May 7 08:15:26 2020 +0100 Fortran : ICE in gfc_trans_label_assign PR50392 A function may contain an assigned goto. If the the return variable is an integer a statement can be assigned to it. Prior to this fix this resulted in an ICE. 2020-05-28 Tobias Burnus <tob...@codesourcery.com> gcc/fortran/ PR fortran/50392 * trans-decl.c (gfc_get_symbol_decl): Remove unnecessary block delimiters. Add auxiliary variables if a label is assigned to a return variable. (gfc_gat_fake_result): If the symbol has an assign attribute set declaration from the symbol's backend declaration. 2020-05-28 Mark Eggleston <markeggles...@gnu.gcc.org> gcc/testsuite/ PR fortran/50392 * gfortran.dg/pr50392.f: New test. (cherry picked from commit a7fd43c38f7469a3ef5ee30e889d60e1376d4dfc)