diff options
author | Brooks Moses <brooks.moses@codesourcery.com> | 2007-01-04 17:30:37 +0000 |
---|---|---|
committer | Brooks Moses <brooks@gcc.gnu.org> | 2007-01-04 09:30:37 -0800 |
commit | 3ab7b3def2c04c65ec4054bb4e540fb70b1012b0 (patch) | |
tree | 548e3afae25e554953647125e37c14825130cb42 /gcc/fortran/interface.c | |
parent | 5f9a37a64894dc717cf96c228454f510bc92efe5 (diff) | |
download | gcc-3ab7b3def2c04c65ec4054bb4e540fb70b1012b0.zip gcc-3ab7b3def2c04c65ec4054bb4e540fb70b1012b0.tar.gz gcc-3ab7b3def2c04c65ec4054bb4e540fb70b1012b0.tar.bz2 |
re PR fortran/30235 ([4.1 only] missing alternate return argument with explicit interface causes segfault)
fortran/
PR 30235
* interface.c (compare_actual_formal): check for
alternate returns when iterating over non-present
arguments.
testsuite/
PR 30235
* gfortran.dg/altreturn_2.f90: new test.
From-SVN: r120447
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r-- | gcc/fortran/interface.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index dd1ac69..7b0c423 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -1455,6 +1455,13 @@ compare_actual_formal (gfc_actual_arglist ** ap, { if (new[i] != NULL) continue; + if (f->sym == NULL) + { + if (where) + gfc_error ("Missing alternate return spec in subroutine call at %L", + where); + return 0; + } if (!f->sym->attr.optional) { if (where) |