Commit 8111a921 by Paul Thomas

re PR fortran/31540 ([Regression 4.2 only] character((constant expression)) for external function)

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
parent e7a5fbdc
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> 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/31251 PR fortran/31251
......
...@@ -5812,6 +5812,11 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag) ...@@ -5812,6 +5812,11 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
if (sym->ts.type == BT_CHARACTER) if (sym->ts.type == BT_CHARACTER)
{ {
gfc_charlen *cl = sym->ts.cl; 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 (!cl || !cl->length || cl->length->expr_type != EXPR_CONSTANT)
{ {
if (sym->attr.proc == PROC_ST_FUNCTION) if (sym->attr.proc == PROC_ST_FUNCTION)
......
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> 2007-06-05 Revital Eres <eres@il.ibm.com>
PR 30957 PR 30957
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment