This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: gfortran bug
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- Cc: fortran at gcc dot gnu dot org
- Date: Fri, 10 Feb 2006 20:06:13 -0800
- Subject: Re: gfortran bug
- References: <20060211025346.D9031110011@bromo.msbb.uc.edu>
On Fri, Feb 10, 2006 at 09:53:46PM -0500, Jack Howarth wrote:
> The following code is miscompiled by gfortran from tonight's gcc 4.1
> branch resulting in the a segfault...
>
> ../../../gcc-4.1-20060210/libgfortran/intrinsics/date_and_time.c:298: failed assertion `__time_len >= TIME_LEN'
> Abort
>
> The code is...
>
> C=====================================================================
> SUBROUTINE VTIME(A,AMAX,ALEN)
> C
> C this routine returns day time
> C
> IMPLICIT NONE
> C input/output
> CHARACTER*(*) A
> INTEGER AMAX, ALEN
> C local
> CHARACTER DSTR*8, TSTR*9
^^^^^^
> C begin
> IF (AMAX.LT.8) THEN
> WRITE(6,'(A)') ' %VTIME-ERR: string to small'
> ELSE
> CALL DATE_AND_TIME(DSTR, TSTR)
^^^^
TIME (optional) shall be scalar and of type default character, and shall
be of length at least 10 in order to contain the complete
value. It is an INTENT (OUT) argument. Its leftmost 10
characters are assigned a value of the form hhmmss.sss,
where hh is the hour of the day, mm is the minutes of the
--
Steve