------- Comment #5 from burnus at gcc dot gnu dot org  2008-01-26 21:21 -------
How about the following patch instead (or additionally)?

Index: gcc/fortran/simplify.c
===================================================================
--- gcc/fortran/simplify.c      (Revision 131876)
+++ gcc/fortran/simplify.c      (Arbeitskopie)
@@ -3714,7 +3714,11 @@ gfc_simplify_shape (gfc_expr *source)
   int n;
   try t;

-  if (source->rank == 0 || source->expr_type != EXPR_VARIABLE)
+  if (source->rank == 0)
+    return gfc_start_constructor (BT_INTEGER, gfc_default_integer_kind,
+                                 &source->where);
+
+  if (source->expr_type != EXPR_VARIABLE)
     return NULL;

   result = gfc_start_constructor (BT_INTEGER, gfc_default_integer_kind,


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34980

Reply via email to