This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/59065] questionable bounds for unassociated allocatable/pointer arrays?
- From: "zeccav at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 10 Nov 2013 19:46:55 +0000
- Subject: [Bug fortran/59065] questionable bounds for unassociated allocatable/pointer arrays?
- Auto-submitted: auto-generated
- References: <bug-59065-4 at http dot gcc dot gnu dot org/bugzilla/>
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.