Internal compiler bug using an array of integer(kind=1)
Steve Kargl
sgk@troutmask.apl.washington.edu
Sat Oct 11 02:49:00 GMT 2008
On Fri, Oct 10, 2008 at 09:28:06AM +0200, Tobias Burnus wrote:
> Hi Sebastian,
>
> Steve Kargl wrote:
> > 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.f95:1: internal compiler error: in gfc_conv_array_initializer, at
> >>
> Thanks for the bug report, I opened
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37792.
>
Given the reduced testcase
program bug
implicit none
integer(1) :: a(2) = (/ Z'FF', Z'FF' /)
print*, a
end program bug
The attached patch gives
troutmask:sgk[216] gfc4x -o z a.f90
a.f90:3.23:
integer(1) :: a(2) = (/ Z'FF', Z'FF' /)
1
Error: Arithmetic overflow converting INTEGER(16) to INTEGER(1) at (1).
This check can be disabled with the option -fno-range-check
troutmask:sgk[217] gfc4x -o z -fno-range-check a.f90
troutmask:sgk[218] ./z
-1 -1
The regession test reports
=== gfortran Summary ===
# of expected passes 28266
# of unexpected successes 23
# of expected failures 27
# of unsupported tests 42
2008-10-10 Steven G. Kargl <kargls@comcast.net>
* trans-array.c (gfc_conv_array_initializer): Overflowing BOZ conversion
can interfere with array initialization expressions.
PS: I don't have commit access.
--
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: abc.diff
Type: text/x-diff
Size: 733 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20081011/ffbfe89a/attachment.bin>
More information about the Fortran
mailing list