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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-10-01
     Ever Confirmed|0                           |1

--- Comment #3 from janus at gcc dot gnu.org 2011-10-01 10:09:56 UTC ---
Simple fix:

Index: gcc/fortran/interface.c
===================================================================
--- gcc/fortran/interface.c     (revision 179412)
+++ gcc/fortran/interface.c     (working copy)
@@ -1959,7 +1959,7 @@
            {
              /* The string length is the substring length.
                 Set now to full string length.  */
-             if (ref->u.ss.length == NULL
+             if (!ref->u.ss.length || !ref->u.ss.length->length
                  || ref->u.ss.length->length->expr_type != EXPR_CONSTANT)
                return 0;

Reply via email to