- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following:
[fortran]PROGRAM BlowMyStack IMPLICIT NONE CALL TestProc CONTAINS SUBROUTINE TestProc CALL Proc2(RESHAPE([INTEGER::], [10], [1])) END SUBROUTINE SUBROUTINE Proc2(arr) INTEGER, INTENT(IN) :: arr(:) PRINT *, arr END SUBROUTINE Proc2 END PROGRAM BlowMyStack [/fortran]
dies with a stack overflow when run after compiling with 12.1.1 with /Od on ia32.
[plain]H:\projects\FortranMisc>ifort /check:all /warn:all /standard-semantics /Od /traceback stack.f90 Intel Visual Fortran Compiler XE for applications running on IA-32, Version 12.1.1.258 Build 20111011 Copyright (C) 1985-2011 Intel Corporation. All rights reserved. Microsoft Incremental Linker Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved. -out:stack.exe -subsystem:console -incremental:no stack.obj H:\projects\FortranMisc>stack forrtl: severe (170): Program Exception - stack overflow Image PC Routine Line Source stack.exe 00E0E957 Unknown Unknown Unknown stack.exe 00DE1021 _MAIN__ 3 stack.f90 stack.exe 00E288F3 Unknown Unknown Unknown stack.exe 00E0EA8F Unknown Unknown Unknown kernel32.dll 761AD309 Unknown Unknown Unknown ntdll.dll 76F716C3 Unknown Unknown Unknown ntdll.dll 76F71696 Unknown Unknown Unknown[/plain]
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Very interesting. The compiler is using an uninitialized value when computing the size of the zero-sized array constructor. Escalated as DPD200175839. Incidentally, I found this very difficult to reproduce (as in get an error) from the command line - even using the same command you did. But I could reproduce it in the debugger and saw what was causing the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This has been fixed for a release later this year.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page