Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

int8()

gryvon
Beginner
1,131 Views

The code below compiles OK. I'd be grateful for an explanation of the reason for a run-time error. However, it is executed normallywithout int8(1) in the array lower bound.

program bpro
implicit none
call bsub()
stop
end program bpro
c
subroutine bsub()
include 'binc.inc'
integer*8 :: i
i = 1
t(i) = 1.0d+0
write(6, *) t(i)
end subroutine bsub

The file 'binc.inc' contains 2 lines:

integer*8, parameter :: N = 10
real*8, dimension(int8(1):N) :: t

At run-time the result is:

forrtl: severe (157): Program Exception - access violation
Image PC Routine Line Source
t.exe 0040110F _BSUB 11 bpro.f
t.exe 0040101F _MAIN__ 3 bpro.f

0 Kudos
3 Replies
Intel_C_Intel
Employee
1,131 Views
Really sorry to break in -

I am trying to sign in as a MAC user with a NEW thread, but for the life of me, can't find a "new post" button. Any clues?

I joined and was logged in at the time.

Thanks; Bill
0 Kudos
Steven_L_Intel1
Employee
1,131 Views
gryvon, that's truly bizarre. It's the use of the INT8 in the DIMENSION that triggers the problem - though INT4 would do it too. I don't understand why. I'll pass this on to the developers. Instead of INT8(1), use 1_8 - that works.

Bill, there should be a big "New Post" button at the top of the forum section, just above the listing of posts.
0 Kudos
Steven_L_Intel1
Employee
1,131 Views
INT(1,8) works too (and would be standard-conformung use). Still a bug regaring INT8 and INT4....
0 Kudos
Reply