This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31203] Character length should never be negative
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Mar 2007 20:57:18 -0000
- Subject: [Bug fortran/31203] Character length should never be negative
- References: <bug-31203-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2007-03-16 20:57 -------
Another testcase, from the duplicate 31208:
$ cat a.f90
SUBROUTINE S1(I,J)
character(len=I-J) :: a
IF (LEN(a)<0) CALL ABORT()
END SUBROUTINE
CALL S1(1,2)
END
$ gfortran -static a.f90 && ./a.out
Aborted
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|wrong code generated with |Character length should
|gfortran |never be negative
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31203