This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/43591] PPC: internal compiler error: in gfc_traverse_expr, at fortran/expr.c:3604
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Apr 2010 20:58:39 -0000
- Subject: [Bug fortran/43591] PPC: internal compiler error: in gfc_traverse_expr, at fortran/expr.c:3604
- References: <bug-43591-17857@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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