From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28641 invoked by alias); 22 Oct 2008 16:28:44 -0000 Received: (qmail 28040 invoked by uid 48); 22 Oct 2008 16:27:19 -0000 Date: Wed, 22 Oct 2008 16:28:00 -0000 Message-ID: <20081022162719.28039.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/35820] internal compiler error with nested FORALL In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-10/txt/msg01460.txt.bz2 ------- 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 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 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35820