This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35820] internal compiler error with nested FORALL
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Oct 2008 16:27:19 -0000
- Subject: [Bug fortran/35820] internal compiler error with nested FORALL
- References: <bug-35820-15620@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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