This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29820] ICE in fold_convert, at fold-const.c:2146
- 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: 13 Nov 2006 21:18:57 -0000
- Subject: [Bug fortran/29820] ICE in fold_convert, at fold-const.c:2146
- References: <bug-29820-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from burnus at gcc dot gnu dot org 2006-11-13 21:18 -------
Funny enough, gfortran does not crash when one reverts the order of point and
plane.
Debug information:
In trans-expr.c's gfc_trans_scalar_assign
gfc_add_block_to_block (&block, &lse->pre);
gfc_add_block_to_block (&block, &rse->pre);
gfc_add_modify_expr (&block, lse->expr,
fold_convert (TREE_TYPE (lse->expr), rse->expr));
Where TREE_TYPE (lse->expr) and TREE_TYPE (rse->expr) are:
(gdb) p rse->expr->common.type->common.code
$4 = RECORD_TYPE
(gdb) p lse->expr->common.type->common.code
$5 = RECORD_TYPE
And in fold_convert:
fold_convert (tree type, tree arg)
{
tree orig = TREE_TYPE (arg);
tree tem;
if (type == orig)
return arg;
(gdb) p arg->common.type # TREE_TYPE (arg) == orig
$14 = (tree) 0x2b3117d25c60
(gdb) p type # type
$15 = (tree) 0x2b3117d25a50
Thus the first "if" does not match. As RECORD_TYPE is not supported (except for
that if), the ICE happens.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Keywords| |ice-on-valid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29820