------- Comment #7 from pault at gcc dot gnu dot org  2010-06-19 12:30 -------
(In reply to comment #6)

> The program below should print twice "10 10 10 10 10" but due to the bug, it
> prints zeros for the first print and the tens only for the second print

Yes, indeed.  This goes back to gcc-4.3 at least.

> The check is done in trans-expr.c's gfc_trans_arrayfunc_assign - here an extra
> check (expr2->value.function.esym && expr2->value.function.esym->attr.pure)
> seems to be needed.
> 

I wonder if it is sufficient to test if there are any host associated
variables?

I have my thinking cap on:

(i) Is this standard violating?  I guess so, since the result is aliasing the
host associated symbol 'a'.
(ii) Is this only an issue for host association?
(iii) Is it sufficient to check if the lhs is host associated into the function
call?

Many thanks for flagging this up to us. It's really nice to know that the
leader of the Absoft fortran team is helping us out :-)

Cheers

Paul Thomas


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu dot org


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

Reply via email to