[Bug fortran/38887] New: run-time abort for MVBITS with run-time zero sized array arguments
dick dot hendrickson at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jan 16 21:11:00 GMT 2009
The following program gives a run-time abort. If either of the array arguments
to MVBITS has an explicit (ie (5,1) or (6,1) ) zero size, the program does not
abort.
It aborts differently on Windows, depending on how it is run.
Dick Hendrickson
program try_ya0013
! fails on Windows XP
! gcc version 4.4.0 20081219 (experimental) [trunk revision 142842] (GCC)
integer ida(9)
call ya0013(ida,1,5,6)
end
SUBROUTINE YA0013(IDA,nf1,nf5,nf6)
INTEGER IDA(9)
IDA = 1
CALL MVBITS(IDA(NF5:NF1), 0, 1, IDA(NF6:NF1),2)
END SUBROUTINE
C:gfortran>gfortran try_ya0013.f
C:gfortran>a
When run as a simple stand-alone test, an alert box appears. The first part
is:
"a.exe has encountered a problem and needs to close. We are sorry for the
inconvenience."
The box then offers to send a report to Microsoft!
When the subroutine is run as part of a larger program this text message
appears:
"This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information."
and the program terminates.
--
Summary: run-time abort for MVBITS with run-time zero sized array
arguments
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dick dot hendrickson at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38887
More information about the Gcc-bugs
mailing list