]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran : ICE in gfc_trans_label_assign PR50392
authorMark Eggleston <markeggleston@gcc.gnu.org>
Thu, 7 May 2020 07:15:26 +0000 (08:15 +0100)
committerMark Eggleston <markeggleston@gcc.gnu.org>
Thu, 28 May 2020 07:43:30 +0000 (08:43 +0100)
commitc575cd2e0089cf2fcb11ffb7899e5fd472b3780c
tree93b17bd5541bae4b72593092eeae08dda23b35e5
parentbb42c9f52712c7ada6e0f18c82ac353aa76ce857
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  <tobias@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  <markeggleston@gnu.gcc.org>

gcc/testsuite/

PR fortran/50392
* gfortran.dg/pr50392.f: New test.

(cherry picked from commit a7fd43c38f7469a3ef5ee30e889d60e1376d4dfc)
gcc/fortran/trans-decl.c
gcc/testsuite/gfortran.dg/pr50392.f [new file with mode: 0644]