[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-fortran
Subject: Re: ICE in write() with gfortran 4.1.2
From: Andrew Pinski <pinskia () gmail ! com>
Date: 2006-11-25 21:47:04
Message-ID: 1164491224.19849.136.camel () celery ! andrew ! com
[Download RAW message or body]
On Sat, 2006-11-25 at 22:40 +0100, FX Coudert wrote:
> > This is my fault, I changed the middle-end to produce an extra
> > NOP_EXPR
> > and we produced a CONST_DECL in the front-end with the NOP_EXPR which
> > caused this bug.
> >
> > I have a fix which I am going to bootstrap and test.
>
> I'm not sure you're the culprit here, it's broken on 4.1.2, 4.2 and
> 4.3 on all targets I could test.
FYI, here is a preview of the fix:
Index: trans-expr.c
===================================================================
--- trans-expr.c (revision 119211)
+++ trans-expr.c (working copy)
@@ -3133,8 +3133,10 @@ gfc_conv_expr_reference (gfc_se * se, gf
/* Create a temporary var to hold the value. */
if (TREE_CONSTANT (se->expr))
{
- var = build_decl (CONST_DECL, NULL, TREE_TYPE (se->expr));
- DECL_INITIAL (var) = se->expr;
+ tree tmp = se->expr;
+ STRIP_TYPE_NOPS (tmp);
+ var = build_decl (CONST_DECL, NULL, TREE_TYPE (tmp));
+ DECL_INITIAL (var) = tmp;
TREE_STATIC (var) = 1;
pushdecl (var);
}
-- Pinski
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic