[Bug fortran/35820] internal compiler error with nested FORALL
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Oct 22 16:28:00 GMT 2008
------- Comment #8 from burnus at gcc dot gnu dot org 2008-10-22 16:27 -------
> > Confirm. While I do not get any crash like Dominique, valgrind shows that
> > there is a problem:
>
> How do you extract this diagnostic from valgrind? I have never used it before
> but found it rolled into FC9.
Well, that is simple: Run gfortran with the -v option, search for the line
where f951 is called, copy that line and run
valgrind <insert the copied line here>
That's all what is needed, you might try some special options, but most of the
time the defaults are sufficient.
(Note: Whether writes/reads are diagnosed to be invalid depend on the exact
memory layout, sometimes small changes on a program make valgrind fail to
detect a problem, though most of the time the diagnosis is quite stable.)
==31901== Invalid write of size 8
==31901== at 0x470F8E: gfc_resolve_forall (resolve.c:6264)
==31901== by 0x47204C: resolve_code (resolve.c:6523)
The line in question is:
/* Record the current FORALL index. */
var_expr[nvar] = gfc_copy_expr (fa->var);
To run f951 in the debugger, one simply run then
gdb --args <copy f951 line here>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35820
More information about the Gcc-bugs
mailing list