This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFH]: too many trees in the forest


OK, so who's the tree expert among us?

I have written code that parses 

  program a
  integer, allocatable :: i(:)
  allocate(i(4), source=42)
  end program a

gfc_trans_allocate() already correctly allocates the memory for i(:).
I've added 

	/* SOURCE block.  */
	if (code->expr3)
	  {
	    gfc_init_se (&src, NULL);
	    gfc_conv_expr (&src, code->expr3); /*sgk*/
	    gfc_add_expr_to_block (&block, tmp);
	  }

which converts the gfc_expr code->expr3 to a gfc_se.  In scanning
through the trans-*c files, I can't find any function that assigns
src to se.expr (the gfc_se for i(:)).  So, how do I populate i(1:5)
to 42.

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]