This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30611] New: Confusing error message for negative ncopies in REPEAT
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jan 2007 16:41:11 -0000
- Subject: [Bug fortran/30611] New: Confusing error message for negative ncopies in REPEAT
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The code is invalid (13.14.89 says about NCOPIES
"Its value should not be negative), but the
error message could definitely be improved :-)
$ cat rep.f90
program main
integer :: i
character(len=10) :: from
from = "-1"
read(unit=from, fmt="(I10)") i
print *,repeat ("a", i)
end program main
$ gfortran rep.f90
$ ./a.out
Fortran runtime error: Attempt to allocate a negative amount of memory.
--
Summary: Confusing error message for negative ncopies in REPEAT
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: enhancement
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tkoenig at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30611