public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18539] New: Tru64 - runtime error with -ve memory for assumed shape arrays
@ 2004-11-18 11:24 paul dot richard dot thomas at cea dot fr
2004-11-18 12:33 ` [Bug fortran/18539] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2004-11-18 11:24 UTC (permalink / raw)
To: gcc-bugs
Note that this seems to be unique to the Tru64 build with gcc-3.3.2 (TWW)
It occurs with or without -fbounds-check
OSF1 V5.1 2650 alpha (BUT NOT CYGWIN_NT-5.0 1.5.7(0.109/3/2) 2004-01-30 19:32
i686)
GNU Fortran 95 (GCC 4.0.0 20041114 (experimental))
built with gcc-3.3.2 (TWW)
Index range, y(start:end) produce runtime error for start>end ,when used
for an assumed shape array.
program negmem
integer, parameter :: N = 3
integer :: i
real(kind = 8), dimension(N) :: y = (/ (real(i) , i = 1 , N) /)
real(kind = 8) :: scale = 2.0
! This part is OK
do i = 1 , N
print * , ' y(' , i+1 , ':' , N , ')'
y( i + 1 : N ) = y( i + 1 : N ) / scale
print * , y( i + 1 : N )
end do
! This part causes the runtime error
call scaler( y , scale , N)
print *, 'output from scalar'
print * , y
stop
contains
subroutine scaler( y , scale , N )
real(kind =8), dimension(:) :: y
real(kind =8) :: scale
integer :: N , i
do i = 1 , N
y( i + 1 : N ) = y( i + 1 : N ) / scale
end do
return
end subroutine scaler
end program negmem
Produces:
y( 2 : 3 )
1.00000000000000 1.50000000000000
y( 3 : 3 )
0.750000000000000
y( 4 : 3 )
Fortran runtime error: Attempt to allocate a non-positive amount of memory.
--
Summary: Tru64 - runtime error with -ve memory for assumed shape
arrays
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: paul dot richard dot thomas at cea dot fr
CC: gcc-bugs at gcc dot gnu dot org,paulthomas2 at wanadoo
dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18539
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug fortran/18539] Tru64 - runtime error with -ve memory for assumed shape arrays
2004-11-18 11:24 [Bug fortran/18539] New: Tru64 - runtime error with -ve memory for assumed shape arrays paul dot richard dot thomas at cea dot fr
@ 2004-11-18 12:33 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-18 12:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-18 12:33 -------
*** This bug has been marked as a duplicate of 15335 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
Summary|Tru64 - runtime error with -|Tru64 - runtime error with -
|ve memory for assumed shape |ve memory for assumed shape
|arrays |arrays
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18539
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-11-18 12:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-18 11:24 [Bug fortran/18539] New: Tru64 - runtime error with -ve memory for assumed shape arrays paul dot richard dot thomas at cea dot fr
2004-11-18 12:33 ` [Bug fortran/18539] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).