From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25787 invoked by alias); 24 Jul 2007 18:29:04 -0000 Received: (qmail 25035 invoked by uid 48); 24 Jul 2007 18:28:51 -0000 Date: Tue, 24 Jul 2007 18:29:00 -0000 Message-ID: <20070724182851.25034.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/32884] ICE: Accessing non-local variable in PURE function 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: 2007-07/txt/msg02490.txt.bz2 ------- Comment #2 from burnus at gcc dot gnu dot org 2007-07-24 18:28 ------- Others cannot reproduce it (on i686 & x86_64), but here I can with gfortran-4.1 & 4.2 of SUSE, with the vanilla 4.2 and with 4.3. The problem is for whatever reason the "&code->expr->where" argument to gfc_error(). In error_print the "loc" argument is not NULL, but loc->lb->* point to invalid locations, which gave an memory access error (segfault) in show_locus when accessing lb->file. 484 loc = va_arg (argp, locus *); 486 if (have_l1) (gdb) p loc $8 = (locus *) 0xfdc13a (gdb) p loc->lb $9 = (gfc_linebuf *) 0x610072616200736e (gdb) p loc->lb->file Cannot access memory at address 0x6100726162007376 (gdb) p loc->lb->line Cannot access memory at address 0x610072616200738a (gdb) p loc->lb->file Cannot access memory at address 0x6100726162007376 But no problem for others. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32884