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

--- Comment #2 from Vittorio Zecca <zeccav at gmail dot com> ---
g95: complains about deallocated array passed to LBOUND
Intel ifort:
           1           0           0
           1           0           0
           1           0           0
           1           0           0
NAG nagfor:
 -220021792 -220021793 0
 1 0 0
 1 0 0
 1 0 0
Lahey Fujitsu lfc:
 0 0 0
 0 0 0
 1 0 0
 1 0 0
All of them put SIZE to zero that looks to me better than one as gfortran does.
But best behavior is g95's that detects the bug, and displays the
correct line number
as in the following:

rm a.out ; g95 gfbug109.f -ftrace=full -g; ./a.out
At line 8 of file gfbug109.f (Unit 6)
Traceback: not available, compile with -ftrace=frame or -ftrace=full
Fortran runtime error: Deallocated array passed to LBOUND

So it would be an enhancement to sensibly handle
unallocated/unassociated arrays.

Reply via email to