aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-02-06 15:05:21 +0000
committerJakub Jelinek <jakub@redhat.com>2006-02-06 15:05:21 +0000
commit7dfedb18cbe66c363ce01885d797097bea627017 (patch)
treee5975b988e23040beefb10635bf421051ea0d75e
parente987c68493acd4d3021e9d4948eb2c4cce69a20d (diff)
* trans-decl.c (create_function_arglist): Handle dummy functions.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gomp-20050608-branch@110648 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fortran/ChangeLog.gomp4
-rw-r--r--gcc/fortran/trans-decl.c12
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog.gomp b/gcc/fortran/ChangeLog.gomp
index 7fadf6c1b5b..cde780f095f 100644
--- a/gcc/fortran/ChangeLog.gomp
+++ b/gcc/fortran/ChangeLog.gomp
@@ -1,3 +1,7 @@
+2006-02-06 Jakub Jelinek <jakub@redhat.com>
+
+ * trans-decl.c (create_function_arglist): Handle dummy functions.
+
2006-01-26 Diego Novillo <dnovillo@redhat.com>
* trans-openmp.c: Call build_omp_clause instead of
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index fbecd578d2e..6d720a25850 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -1423,7 +1423,10 @@ create_function_arglist (gfc_symbol * sym)
gfc_create_string_length (f->sym);
/* Make sure PARM_DECL type doesn't point to incomplete type. */
- type = gfc_sym_type (f->sym);
+ if (f->sym->attr.flavor == FL_PROCEDURE)
+ type = build_pointer_type (gfc_get_function_type (f->sym));
+ else
+ type = gfc_sym_type (f->sym);
}
}
@@ -1435,7 +1438,12 @@ create_function_arglist (gfc_symbol * sym)
&& GFC_ARRAY_TYPE_P (type)
&& f->sym->as->type != AS_ASSUMED_SIZE
&& ! COMPLETE_TYPE_P (TREE_TYPE (type)))
- type = gfc_sym_type (f->sym);
+ {
+ if (f->sym->attr.flavor == FL_PROCEDURE)
+ type = build_pointer_type (gfc_get_function_type (f->sym));
+ else
+ type = gfc_sym_type (f->sym);
+ }
/* Build a the argument declaration. */
parm = build_decl (PARM_DECL, gfc_sym_identifier (f->sym), type);