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
This commit is contained in:
Paul Thomas 2007-05-06 15:12:01 +00:00
parent e7a5fbdc2b
commit 8111a921e9
3 changed files with 16 additions and 0 deletions

View 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

View 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)

View 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