summaryrefslogtreecommitdiff
path: root/gcc/fortran/check.c
diff options
context:
space:
mode:
authorjanus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-19 22:05:23 +0000
committerjanus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-19 22:05:23 +0000
commite77cbaa7d7f2b8c777ead31c46ae19889d130980 (patch)
tree7bb1b66ecb7f8dab68864953e87af67e4240c434 /gcc/fortran/check.c
parent1b1800c7cc1b34fd79ae103778e501f53e4cc6c2 (diff)
downloadgcc-e77cbaa7d7f2b8c777ead31c46ae19889d130980.tar.gz
2011-10-19 Janus Weil <janus@gcc.gnu.org>
PR fortran/47023 * check.c (gfc_check_sizeof): Reject procedures as argument of SIZEOF. * intrinsinc.texi (SIZEOF): Document it. (STORAGE_SIZE): Fix special characters. Fix line breaks. 2011-10-19 Janus Weil <janus@gcc.gnu.org> PR fortran/47023 * gfortran.dg/sizeof_proc.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180210 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r--gcc/fortran/check.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index eb8b3e1b2a2..bf4559203b1 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -3444,8 +3444,15 @@ gfc_check_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind)
gfc_try
-gfc_check_sizeof (gfc_expr *arg ATTRIBUTE_UNUSED)
+gfc_check_sizeof (gfc_expr *arg)
{
+ if (arg->ts.type == BT_PROCEDURE)
+ {
+ gfc_error ("'%s' argument of '%s' intrinsic at %L may not be a procedure",
+ gfc_current_intrinsic_arg[0]->name, gfc_current_intrinsic,
+ &arg->where);
+ return FAILURE;
+ }
return SUCCESS;
}