 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
mecej4
Joined: 31 Oct 2006 Posts: 1823
|
Posted: Sun May 01, 2022 1:33 pm Post subject: Internal compiler error - floating point exception |
|
|
The following program contains only integer variables, but the compiler aborts with "Internal compiler error - floating point exception", possibly because 8-byte integers are processed using the X87 FPU.
Code: | program bugsi
implicit none
integer, parameter :: i8=selected_int_kind(15)
integer(i8), parameter :: mask24 = ishft(1_i8,24)-1
integer(i8), parameter :: mult1 = 44485709377909_i8
integer(i8), parameter :: m11 = iand(mult1,mask24)
integer(i8), parameter :: m12 = iand(ishft(mult1,-24),mask24)
print '(4Z18)',mask24,mult1,m11,m12
end program |
|
|
Back to top |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 7705 Location: Salford, UK
|
Posted: Mon May 02, 2022 10:23 am Post subject: |
|
|
mecej4
Thank you for the bug report.
Roughly speaking, the inline ISHFT is failing for INTEGER*8 values that can't be accommodated in INTEGER*4. It works correctly when not inline as in
Code: | integer,parameter::i8=selected_int_kind(15)
integer(i8) r,v
v = 4294967295_i8
r = ishft(v,-24)
print*, r
end |
But
Code: | r = ishft(4294967295_i8,-24)
|
fails to compile. |
|
Back to top |
|
 |
mecej4
Joined: 31 Oct 2006 Posts: 1823
|
Posted: Mon May 02, 2022 10:33 am Post subject: |
|
|
Thanks, what you wrote gives me ideas for workarounds. I had been thinking of replacing the problematic constant expressions by BOZ constants, but what you suggest is more readable. |
|
Back to top |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 7705 Location: Salford, UK
|
Posted: Sat Jul 16, 2022 10:04 am Post subject: |
|
|
This bug has been fixed for the next release of FTN95 and the DLLs. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|