re PR fortran/32724 (ICE on statement function in specification part of module)

gcc/fortran:
2007-07-14  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/32724
        * parse.c (parse_spec): Emit error on unexpected statement
        function.

gcc/testsuite:
2007-07-14  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/32724
        * gfortran.dg/stfunc_5.f90: New test.

From-SVN: r126638
This commit is contained in:
Daniel Franke 2007-07-14 09:33:51 -04:00
parent 8d1341f797
commit dec9e22db1
4 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-07-14 Paul Thomas <pault@gcc.gnu.org>
PR fortran/32724
* parse.c (parse_spec): Emit error on unexpected statement
function.
2007-07-13 Daniel Franke <franke.daniel@gmail.com>
* invoke.texi: Unified upper- and lower-case in menus.

View File

@ -1902,6 +1902,13 @@ loop:
break;
case ST_STATEMENT_FUNCTION:
if (gfc_current_state () == COMP_MODULE)
{
unexpected_statement (st);
break;
}
default:
break;
}

View File

@ -1,3 +1,8 @@
2007-07-14 Daniel Franke <franke.daniel@gmail.com>
PR fortran/32724
* gfortran.dg/stfunc_5.f90: New test.
2007-07-14 Uros Bizjak <ubizjak@gmail.com>
* lib/target-supports.exp (check_effective_target_vect_aligned_arrays):

View File

@ -0,0 +1,11 @@
! { dg-do compile }
!
! PR fortran/32724
! ICE on statement function in specification part of module
MODULE stmt
f(x) = x**2 ! { dg-error "Unexpected STATEMENT FUNCTION" }
END MODULE
! { dg-final { cleanup-modules "stmt" } }