pr17423

Jerry DeLisle jvdelisle@verizon.net
Thu May 5 03:01:00 GMT 2005


I picked this problem to work on as a focus point for my study.  I have 
been able to dig into this enough to find what looks like a sort of type 
mismatch in:

trans-stmt.c:gfc_trans_label_assign().

By changing pchar_type_node to pvoid_type_node I can get past the ICE on 
the ASSIGN statement, but then WRITE is broken. The original ICE is 
occurring in the last statement of this piece.

-- snip --

   if (code->label->defined == ST_LABEL_TARGET)
     {
       label_tree = gfc_build_addr_expr (pvoid_type_node, label_tree);
       len_tree = integer_minus_one_node;
     }
   else
     {
       label_str = code->label->format->value.character.string;
       label_len = code->label->format->value.character.length;
       len_tree = build_int_cst (NULL_TREE, label_len);
       label_tree = gfc_build_string_const (label_len, label_str);

	/* I modified the following statement */

       label_tree = gfc_build_addr_expr (pvoid_type_node, label_tree);
     }

   gfc_add_modify_expr (&se.pre, len, len_tree);
   gfc_add_modify_expr (&se.pre, addr, label_tree);

I think I may be getting close here.  I am using this test program:

       PROGRAM TESTIT
C
       ASSIGN 12 TO I
C      write(*, I)
  0012 FORMAT (" **** ASSIGN FORMAT NUMBER TO INTEGER VARIABLE ****" )
       END

I am dumping the namespace tree after parse and after resolve and that 
seems to look ok.  So I think the problem is here.

Any discussion/suggestions?  Forgive me for my ignorance, the workings 
of this are starting to soak in :) slowly.

Jerry



More information about the Fortran mailing list