[Bug fortran/59398] Wrong bounds for allocatable result and for

loximann at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Dec 9 13:47:00 GMT 2013


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

--- Comment #5 from Sergio Losilla <loximann at gmail dot com> ---
(In reply to Harald Anlauf from comment #3)

OK, so we seem to agree that gfortran is not assigning the correct bounds,
right?

> shape(-3:3) == shape (-2:4) == shape(1:7)
> 
> Shape is UBOUND-LBOUND+1.

Hm, you are right. This is funny though, as the result of the allocation is not
predictable. The workaround should be deallocating ALWAYS, if this is the
wished behaviour.

> > By the way, the Intel compiler is quite crazy. Version 11 something works as
> > expected in a platform I have access to, but 12 and 13 fail one or both
> > assignments!
> 
> Funny!  Would you please report to the Intel forum?

http://software.intel.com/en-us/forums/topic/495378



More information about the Gcc-bugs mailing list