[Bug fortran/31540] [Regression 4.2, 4.3] character((constant expression)) for external function
pault at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Apr 11 19:33:00 GMT 2007
------- Comment #2 from pault at gcc dot gnu dot org 2007-04-11 20:33 -------
(In reply to comment #1)
> Why is "(137)" not an EXPR_CONSTANT
>
Because it is an EXPR_OP. The operator in question is OP_PARENTHESES. This
fixes the problem:
Index: gcc/fortran/resolve.c
===================================================================
*** gcc/fortran/resolve.c (revision 123398)
--- gcc/fortran/resolve.c (working copy)
*************** resolve_fl_procedure (gfc_symbol *sym, i
*** 5756,5761 ****
--- 5756,5765 ----
if (sym->ts.type == BT_CHARACTER)
{
gfc_charlen *cl = sym->ts.cl;
+
+ if (resolve_charlen (cl) == FAILURE)
+ return FAILURE;
+
if (!cl || !cl->length || cl->length->expr_type != EXPR_CONSTANT)
{
if (sym->attr.proc == PROC_ST_FUNCTION)
I have not regtested nor developed a testcase and cannot do so until the
weekend.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2007-04-11 19:56:48 |2007-04-11 20:33:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31540
More information about the Gcc-bugs
mailing list