------- Comment #12 from burnus at gcc dot gnu dot org  2010-04-06 20:58 -------
(In reply to comment #11)
> Internal Error at (1):
> gfc_is_constant_expr(): Unknown expression type

Try the following patch; however, as written in comment 8 the PURE attribute is
lost somewhere thus the patch is not sufficient.

Index: gcc/fortran/expr.c
===================================================================
--- gcc/fortran/expr.c  (Revision 158016)
+++ gcc/fortran/expr.c
@@ -782,6 +782,8 @@ gfc_is_constant_expr (gfc_expr *e)
       break;

     case EXPR_FUNCTION:
+    case EXPR_PPC:
+    case EXPR_COMPCALL:
       /* Specification functions are constant.  */
       if (check_specification_function (e) == MATCH_YES)
        {
@@ -3560,6 +3562,8 @@ gfc_traverse_expr (gfc_expr *expr, gfc_s

   switch (expr->expr_type)
     {
+    case EXPR_PPC:
+    case EXPR_COMPCALL:
     case EXPR_FUNCTION:
       for (args = expr->value.function.actual; args; args = args->next)
        {


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43591

Reply via email to