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.

AIO Assertion: Unexpected statement

nooj
Beginner
975 Views
This one's fun: I found a bug! The following test code causes an ifort crash:

program cause_AIO_assertion

integer D1,D2

if(D1)
& if(D2) write(*,*) "D1 .and. D2"

end program cause_AIO_assertion


version info (3 platforms: mac, ubuntu, ubuntu):

mac:
uname -a:Darwin xx.xx.xx.xx 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
ifort --version: ifort (IFORT) 11.1 20090624

ununtu1:
uname -a:Linux yy.yy.yy.yy 2.6.24-24-generic #1 SMP Tue Aug 18 16:22:17 UTC 2009 x86_64 GNU/Linux
ifort --version:ifort (IFORT) 10.1 20080602

ubuntu2:
uname -a:Linux zz.zz.zz.zz 2.6.24-24-server #1 SMP Tue Aug 18 16:51:43 UTC 2009 x86_64 GNU/Linux
ifort --version:ifort (IFORT) 11.1 20090511


compile line and result:
notice that the current ifort release (11.1) doesn't give a line number!
it's a good thing the previous release (10.0) did, or this would have been a very complicated bug report.

mac and ubuntu2 (my other code caused a "(537)" instead of "(10)", if that matters):
nooj$ ifort AIO-error.f
(10): catastrophic error: Internal Compiler Error: Unexpected statement
compilation aborted for AIO-error.f (code 1)
nooj$

ubuntu1 (the caret is positioned at column 1):
(r893) cozumel:~/v/test/AIO-assertion-error nooj$ ifort AIO-error.f

AIO assertion: Unexpected statement
fortcom: Severe: AIO-error.f, line 7: Please report this error along with the circumstances in which it occurred in a Software Problem Report
& if(D2) write(*,*) "D1 .and. D2"
^
[ Aborting due to internal error. ]
compilation aborted for AIO-error.f (code 1)
nooj$

0 Kudos
1 Solution
Steven_L_Intel1
Employee
975 Views
I think this one is already reported as DPD200139149.

View solution in original post

0 Kudos
5 Replies
Kevin_D_Intel
Employee
975 Views

Thanks for the interesting issue. I have reproduced this and will report it to Development.

The (10) in the error is the number of lines in the file+1. Very bizarre.

I will post updates as I learn more.
0 Kudos
Steven_L_Intel1
Employee
976 Views
I think this one is already reported as DPD200139149.
0 Kudos
nooj
Beginner
975 Views
I think this one is already reported as DPD200139149.

i think you're right.

also, you're only 45 posts shy of 100,000!
0 Kudos
Steven_L_Intel1
Employee
975 Views
Quoting - nooj
also, you're only 45 posts shy of 100,000!
Not any more! Note that it's points, not posts.
0 Kudos
Hirchert__Kurt_W
New Contributor II
975 Views
Quoting - nooj
This one's fun: I found a bug! The following test code causes an ifort crash:

program cause_AIO_assertion

integer D1,D2

if(D1)
& if(D2) write(*,*) "D1 .and. D2"

end program cause_AIO_assertion

This is a bug in the sense that the compiler should never fail, but if the compiler were working correctly, it would tell you this is not a legal program (because you can't "nest" logical IF statements). [In a standard program, D1 and D2 would also have to be LOGICAL, but this part of it I think may be an extension supported by ifort.]

If you are looking for a workaround to make your original program work, change the "outer" IF to a block IF:

if (D1) then
if (D2) write(*,*) "D1.and.D2"
endif

-Kurt
0 Kudos
Reply