[Bug fortran/31203] Character length should never be negative

2007-03-19 Thread fxcoudert at gcc dot gnu dot org
--- Comment #6 from fxcoudert at gcc dot gnu dot org 2007-03-19 08:13 --- Subject: Bug 31203 Author: fxcoudert Date: Mon Mar 19 08:13:30 2007 New Revision: 123051 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123051 Log: PR fortran/31203 * trans-expr.c (gfc_tr

[Bug fortran/31203] Character length should never be negative

2007-03-18 Thread fxcoudert at gcc dot gnu dot org
--- Comment #5 from fxcoudert at gcc dot gnu dot org 2007-03-18 23:03 --- When creating a testcase for this one, I found we have a similar problem with character functions: $ cat a.f90 program test print *, len(bar(-1)) contains function bar(i) integer, intent(in) :: i char

[Bug fortran/31203] Character length should never be negative

2007-03-17 Thread fxcoudert at gcc dot gnu dot org
--- Comment #4 from fxcoudert at gcc dot gnu dot org 2007-03-17 20:58 --- A two-lines fix for this bug: Index: gcc/fortran/trans-expr.c === --- gcc/fortran/trans-expr.c(revision 123028) +++ gcc/fortran/trans-expr.c

[Bug fortran/31203] Character length should never be negative

2007-03-16 Thread fxcoudert 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 -- f