From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26259 invoked by alias); 26 Apr 2011 18:46:09 -0000 Received: (qmail 26244 invoked by uid 22791); 26 Apr 2011 18:46:08 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 26 Apr 2011 18:45:54 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/48776] New: ICE(segfault) after -std=f95 diagnostic error involving PROCEDURE X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: error-recovery, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 26 Apr 2011 18:46:00 -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 X-SW-Source: 2011-04/txt/msg02666.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48776 Summary: ICE(segfault) after -std=f95 diagnostic error involving PROCEDURE Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: error-recovery, ice-on-invalid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: burnus@gcc.gnu.org Follow up to bug 48279 comment 7 and 48279 comment 11. The following program segfaults with -std=f95 after printing the diagnostic: procedure get1 1 Error: Fortran 2003: PROCEDURE statement at (1) f951: internal compiler error: Segmentation fault Valgrind shows tons of errors, starting with: ==22545== Invalid read of size 8 ==22545== at 0x52FD8C: resolve_symbol (resolve.c:10004) ==22545== by 0x54BA76: traverse_ns (symbol.c:3379) ==22545== by 0x53919B: resolve_types (resolve.c:13261) ==22545== by 0x52E3D3: gfc_resolve (resolve.c:13357) The testcase: interface get procedure get1 end interface integer :: h call set1 (get (h)) contains subroutine set1 (a) integer, intent(in) :: a end subroutine integer function get1 (s) integer :: s end function end