This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/55362] [4.6/4.7/4.8 Regression] ICE with size() on character pointer
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 11 Dec 2012 14:46:03 +0000
- Subject: [Bug fortran/55362] [4.6/4.7/4.8 Regression] ICE with size() on character pointer
- Auto-submitted: auto-generated
- References: <bug-55362-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55362
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-12-11 14:46:03 UTC ---
Untested patch. However, I think we need to do more. I think it won't cover the
DIM= argument and other intrinsics are presumably also affected.
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -3593,4 +3593,11 @@ gfc_try
gfc_check_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind)
{
+ if (array->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,
+ &array->where);
+ return FAILURE;
+ }
if (array_check (array, 0) == FAILURE)
return FAILURE;