This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/55362] [4.6/4.7/4.8 Regression] ICE with size() on character pointer


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]