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/50585] [4.6/4.7 Regression] ICE with assumed length character array argument


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;


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