re PR fortran/31540 ([Regression 4.2 only] character((constant expression)) for exter...
authorPaul Thomas <pault@gcc.gnu.org>
Sun, 6 May 2007 15:12:01 +0000 (15:12 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sun, 6 May 2007 15:12:01 +0000 (15:12 +0000)
2007-05-06  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/31540
* resolve.c (resolve_fl_procedure): Resolve constant character
lengths.

2007-05-06  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/31540
* gfortran.dg/char_result_4.f90: New test.

From-SVN: r124475

gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog

index 9435165..361ffcc 100644 (file)
@@ -1,3 +1,9 @@
+2007-05-06  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/31540
+       * resolve.c (resolve_fl_procedure): Resolve constant character
+       lengths.
+
 2007-05-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR fortran/31251
index 55f1390..4ec9a92 100644 (file)
@@ -5812,6 +5812,11 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
   if (sym->ts.type == BT_CHARACTER)
     {
       gfc_charlen *cl = sym->ts.cl;
+
+      if (cl && cl->length && gfc_is_constant_expr (cl->length)
+            && resolve_charlen (cl) == FAILURE)
+       return FAILURE;
+
       if (!cl || !cl->length || cl->length->expr_type != EXPR_CONSTANT)
        {
          if (sym->attr.proc == PROC_ST_FUNCTION)
index bcec964..2b74f7c 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-06  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/31540
+       * gfortran.dg/char_result_4.f90: New test.
+
 2007-06-05  Revital Eres  <eres@il.ibm.com>
        
        PR 30957