From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65805 invoked by alias); 21 Jul 2015 06:05:10 -0000 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 Received: (qmail 64421 invoked by uid 48); 21 Jul 2015 06:05:06 -0000 From: "zeccav at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/66942] trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec' Date: Tue, 21 Jul 2015 06:05:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 5.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zeccav at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg01769.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942 --- Comment #2 from Vittorio Zecca --- 1) No explicit options, just the default ones, -S will suffice. 2) Sorry, I did not specify the target is x86-64, but I got the same with -m32 3) sub is not needed, the code should just be compiled to exhibit the bug I have a sanitized (-fsanitize=address -fsanitize=undefined) version of gfortran. In the comments I put the output message from the sanitizer during compilation. What happens is that the pointer retargs is NULL. I believe this is bad. This fragment of code from gfc_conv_procedure_call is thus erroneous because it dereferences a null pointer. I did double check it by putting gcc_assert(retargs); immediately before its dereferencing. I then got an ICE at that line.