re PR fortran/20467 (Bad fortran code causes ICE)

fortran/
PR fortran/20467
* symbol.c (check_conflict): A dummy argument can't be a statement
function.

testsuite/
PR fortran/20467
* gfortran.dg/stfunc_2.f90: New test.

From-SVN: r96443
This commit is contained in:
Tobias Schlüter 2005-03-14 20:55:02 +01:00 committed by Tobias Schlüter
parent 55b18c19ec
commit 2bb02bf01b
4 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/20467
* symbol.c (check_conflict): A dummy argument can't be a statement
function.
2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
* fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert

View File

@ -369,6 +369,7 @@ check_conflict (symbol_attribute * attr, const char * name, locus * where)
{
case PROC_ST_FUNCTION:
conf2 (in_common);
conf2 (dummy);
break;
case PROC_MODULE:

View File

@ -1,3 +1,8 @@
2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/20467
* gfortran.dg/stfunc_2.f90: New test.
2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
* gcc.dg/tree-ssa/phi-opt-5.c: New test.

View File

@ -0,0 +1,6 @@
! { dg-do compile }
! PR 20467 : we didn't check if a statement function had the dummy attribute.
SUBROUTINE a(b)
b(c) = 0 ! { dg-error "Unclassifiable statement" }
END SUBROUTINE a