aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/intrinsic.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2006-12-28 18:41:25 +0000
committerPaul Thomas <pault@gcc.gnu.org>2006-12-28 18:41:25 +0000
commitc5bfb0451df393fe3daedd21ed2619eb5f7f5f20 (patch)
treea28afc0cc08c6dc17b6c44c8ed834075cf7263b5 /gcc/fortran/intrinsic.c
parent975a4fc1a3818c84aafa85aa49915426305f7ae5 (diff)
downloadgcc-c5bfb0451df393fe3daedd21ed2619eb5f7f5f20.zip
gcc-c5bfb0451df393fe3daedd21ed2619eb5f7f5f20.tar.gz
gcc-c5bfb0451df393fe3daedd21ed2619eb5f7f5f20.tar.bz2
re PR fortran/30034 ([4.1 only] pure subroutine requires intent for procedure argument)
2006-12-28 Paul Thomas <pault@gcc.gnu.org> PR fortran/30034 * resolve.c (resolve_formal_arglist): Exclude the test for pointers and procedures for subroutine arguments as well as functions. PR fortran/30237 * intrinsic.c (remove_nullargs): Do not pass up arguments with a label. If the actual has a label and the formal has a type then emit an error. 2006-12-28 Paul Thomas <pault@gcc.gnu.org> PR fortran/30034 * gfortran.dg/pure_formal_proc_1.f90: New test. PR fortran/30237 * gfortran.dg/intrinsic_actual_3.f90: New test. From-SVN: r120244
Diffstat (limited to 'gcc/fortran/intrinsic.c')
-rw-r--r--gcc/fortran/intrinsic.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
index ea68d69..2ed4291 100644
--- a/gcc/fortran/intrinsic.c
+++ b/gcc/fortran/intrinsic.c
@@ -2782,7 +2782,7 @@ remove_nullargs (gfc_actual_arglist ** ap)
{
next = head->next;
- if (head->expr == NULL)
+ if (head->expr == NULL && !head->label)
{
head->next = NULL;
gfc_free_actual_arglist (head);
@@ -2898,6 +2898,12 @@ do_sort:
for (f = formal; f; f = f->next)
{
+ if (f->actual && f->actual->label != NULL && f->ts.type)
+ {
+ gfc_error ("ALTERNATE RETURN not permitted at %L", where);
+ return FAILURE;
+ }
+
if (f->actual == NULL)
{
a = gfc_get_actual_arglist ();