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 have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
29326 Discussions

Access Violation with ifx /O3 /Qipo (single-file MRE attached)

Nishimura
Beginner
273 Views

Hello,

I have a reproducible runtime crash in Intel Fortran (ifx) when compiling with optimization and IPO enabled.

Environment:
- Compiler: Intel Fortran Compiler for Intel(R) 64, Version 2025.2.0 Build 20250605
- OS: Windows 11 Pro
- Build environment: cmd.exe

Reproduction:
1) Save attached file as `scat-bug.f90` (single-file MRE).
2) Compile and link:
ifx /fpp /O3 /Qipo /traceback scat-bug.f90
3) Run:
scat-bug.exe

Observed:
- Program crashes with "forrtl: severe (157): Program Exception - access violation".
- run.log (tail) shows:
ALLOCATED(NSTIC)= T
LBOUND= 1 1
UBOUND= 40000 20
i,n= 34 1
forrtl: severe (157): Program Exception - access violation

Additional notes:
- The crash occurs only with `/O3 /Qipo`. Disabling IPO (`/Qipo-`) or compiling with `/Od` avoids the crash.
- The crash occurs at assignment `NSTIC(I,N)=J` while `allocated(NSTIC)` is true.
- Optimization reports (attached) contain `INLINE: MDLPDB_V2` and multiple `DELETE: llvm.memset.*` / `DELETE: llvm.memcpy.*`.
This suggests the compiler removed initialization/copy sequences after inlining/IPO.

Attachments: scat-bug.zip (scat-bug.f90, compile_opt.txt, link_opt.txt, run.log, ifx_version.txt)

Please let me know if you need further details.

Thanks,
T. Nishimura

0 Kudos
3 Replies
Nishimura
Beginner
146 Views

Update (follow-up):

Following up on my previous post — I confirmed that the error still occurs on the latest Intel compiler (Intel Fortran Compiler for Intel(R) 64, Version 2025.3.0).

I reduced the test case further; the shorter example below still reproduces the crash when compiled with:

 

ifx /O3 /Qipo /traceback scat-bug-v2.f90

 

I hope this helps the ifx team when investigating and improving future compiler releases.

Thanks,

T. Nishimura

0 Kudos
jonejames235
Beginner
116 Views

Thanks for sharing the detailed report. Since the crash happens only with /O3 /Qipo, it looks like an IPO optimization issue. As a quick workaround, try compiling with /Qipo- or /O2 until Intel releases a patch. You can also report this to Intel via Online Service Center with your attached MRE — it will help them reproduce and fix the bug.

 

 

0 Kudos
Nishimura
Beginner
70 Views

Thanks for your suggestion.
Unfortunately, I don’t have access to the Intel Online Service Center since I’m using the free (non-priority) edition of the compiler.
I’ll keep the report here so that Intel engineers can review it — hopefully they can reproduce it and file it internally.
Thanks again for confirming it’s likely IPO-related!

T. Nishimura

0 Kudos
Reply