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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tkoenig at gcc dot gnu.org

--- Comment #12 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-01-08 
23:35:40 UTC ---
(In reply to comment #11)
> (In reply to comment #10)
> > Can this be closed? Is there something left to do here?
> > 
> As of gfortran 4.4.4 (and 4.5.1) the program in comment #7 does not compile 
> but
> gives the same error:
> 
> Error: CHARACTER argument 'buf' to 'c_loc' at (1) must have a length of 1

This might be sufficient to fix it.

Index: resolve.c
===================================================================
--- resolve.c   (Revision 168596)
+++ resolve.c   (Arbeitskopie)
@@ -2547,9 +2547,7 @@ is_scalar_expr_ptr (gfc_expr *expr)
       switch (ref->type)
         {
         case REF_SUBSTRING:
-          if (ref->u.ss.length != NULL
-              && ref->u.ss.length->length != NULL
-              && ref->u.ss.start
+          if (ref->u.ss.start
               && ref->u.ss.start->expr_type == EXPR_CONSTANT
               && ref->u.ss.end
               && ref->u.ss.end->expr_type == EXPR_CONSTANT)

Reply via email to