The following variables control the runtime environment for programs compiled with the NAG Fortran Compiler.
Option | Effect |
show_dangling | Enable tracing of dangling pointers; this only |
affects code compiled with -C=dangling |
The show_dangling option causes messages to be produced on the runtime error file when a dangling pointer is created, reassociated with something else, nullified, or ceases to exist. For example,
[a.f90, line 20: Dangling pointer P detected (number 1), associated at b.f90, line 18] [c.f90, line 7: Dangling pointer P (number 1) has been reassociated] [c.f90, line 9: Dangling pointer Q (number 2) has been nullified] [file.f90, line 21: Dangling pointer R (number 3) no longer exists]The dangling pointer number is incremented every time a dangling pointer is detected. If an array with dangling pointer components ceases to exist, a message will be produced for each dangling pointer component of each element; however, the element subscripts will not be shown, instead ‘(...)’ will be produced to indicate that it is an array element, e.g.
[file.f90, line 44: Dangling pointer X(...)%A (number 8) no longer exists]