This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Internal compiler bug using an array of integer(kind=1)
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Sebastian Gallinat <sebastian dot gallinat at arcor dot de>
- Cc: fortran at gcc dot gnu dot org
- Date: Thu, 9 Oct 2008 15:38:10 -0700
- Subject: Re: Internal compiler bug using an array of integer(kind=1)
- References: <48EE8121.3000906@arcor.de>
On Fri, Oct 10, 2008 at 12:09:37AM +0200, Sebastian Gallinat wrote:
>
> c:\silverbox\archiv\lib\libharu\gfortran\demo\mixed>gfortran bug.f95 -o
> bug -Wall
> bug.f95: In function 'bug':
> bug.f95:1: internal compiler error: in gfc_conv_array_initializer, at
> fortran/trans-array.c:3893
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
>
Add -fno-range-check to your compiler options.
troutmask:sgk[216] gfc4x -o z -fno-range-check a.f90
troutmask:sgk[217] ./z
-1 -1
troutmask:sgk[218] cat a.f90
program bug
implicit none
integer(1), dimension(2):: RAW_IMAGE_DATA = (/ Z'FF', Z'FF' /)
print*, RAW_IMAGE_DATA
end program bug
troutmask:sgk[219] gfortran42 -o z a.f90
a.f90: In function 'MAIN__':
a.f90:1: internal compiler error: in gfc_conv_array_initializer, at fortran/trans-array.c:3516
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
troutmask:sgk[220] gfortran42 -o z -fno-range-check a.f90
troutmask:sgk[221] ./z
-1 -1
The problem is Z'FF' overflows a INTEGER(1) variable.
An error message should be issued, but it appears to
be suppressed. gfc_conv_array_initializer is then
given a messed data structure.
--
Steve