Hi,
this code
program test
implicit none
integer, allocatable :: x(:,:)
write(*,*) x(5,5)
end program test
does not produce a stack trace:
user > ifx -O0 -trace -g -check all -debug all tmp.f90
user > gdb a.out
GNU gdb (GDB) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from a.out...
(gdb) run
Starting program: /tmp/a.out
This GDB supports auto-downloading debuginfo from the following URLs:
<https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
process 92126 is executing new program: /tmp/a.out
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
forrtl: severe (408): fort: (8): Attempt to fetch from allocatable variable X when it is not allocated
Image PC Routine Line Source
a.out 0000000000489F11 test 4 tmp.f90
a.out 000000000040A589 Unknown Unknown Unknown
libc.so.6 00007FFFF7CCFCD0 Unknown Unknown Unknown
libc.so.6 00007FFFF7CCFD8A __libc_start_main Unknown Unknown
a.out 000000000040A455 Unknown Unknown Unknown
[Inferior 1 (process 92126) exited with code 0230]
(gdb) up
No stack.
(gdb)
I have more complicated code with deeply nested function calls where essentially the same happens. Am I missing an appropriate ifx flag, or is this a bug?
Thanks
NB: the ifx version is 2024.0.0 20231017