------- Comment #4 from eedelman at gcc dot gnu dot org  2006-02-04 20:52 
-------
Created an attachment (id=10777)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10777&action=view)
Patch to fix the bug.

We also get into trouble if we try to pass the result of a pointer-to-array
returning funtion as an argument to another procedure (e.g.

   call a_suborutine (x(5))

)

The problem, both for this case and

   print *, x(5)

is that we try to free the temporary used to hold the result. This we mustn't
do, since the temporary will be just a shallow copy of the resulting array.

The attached patch fixes these problems, but is not yet well tested. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25806

Reply via email to