From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29861 invoked by alias); 28 Oct 2013 14:55:13 -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 29825 invoked by uid 48); 28 Oct 2013 14:55:07 -0000 From: "kimwooyoung at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/58904] New: ICE: accessing a component field of an unavailable type results in a seg fault Date: Mon, 28 Oct 2013 14:55:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kimwooyoung at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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: 2013-10/txt/msg02010.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58904 Bug ID: 58904 Summary: ICE: accessing a component field of an unavailable type results in a seg fault Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: kimwooyoung at gmail dot com The following code causes gfortran 4.8.2 to die with a seg fault. (Ubuntu 12.10, intel64 (i.e., 64-bit x86) ) MODULE mymod CONTAINS TYPE(mytype) FUNCTION create_sort_range(b) result(r) INTEGER b r%b = b END FUNCTION create_sort_range END MODULE mymod The compiler produces the correct error message if the statement 'r%b = b' is commented out. $ gfortran -c repro.F90 f951: internal compiler error: Segmentation fault 0x869cbf crash_signal ../../gcc-4.8.2/gcc/toplev.c:332 0x555765 gfc_match_varspec(gfc_expr*, int, bool, bool) ../../gcc-4.8.2/gcc/fortran/primary.c:1944 0x555d31 match_variable ../../gcc-4.8.2/gcc/fortran/primary.c:3304 0x537eb9 gfc_match(char const*, ...) ../../gcc-4.8.2/gcc/fortran/match.c:1115 0x53925c gfc_match_assignment() ../../gcc-4.8.2/gcc/fortran/match.c:1292 0x54cb69 match_word ../../gcc-4.8.2/gcc/fortran/parse.c:65 0x54db6b match_word ../../gcc-4.8.2/gcc/fortran/parse.c:327 0x54db6b decode_statement ../../gcc-4.8.2/gcc/fortran/parse.c:327 0x54f154 next_free ../../gcc-4.8.2/gcc/fortran/parse.c:783 0x54f154 next_statement ../../gcc-4.8.2/gcc/fortran/parse.c:976 0x54f8ed parse_spec ../../gcc-4.8.2/gcc/fortran/parse.c:2760 0x551738 parse_progunit ../../gcc-4.8.2/gcc/fortran/parse.c:4124 0x551ac0 parse_contained ../../gcc-4.8.2/gcc/fortran/parse.c:4063 0x552c7f parse_module ../../gcc-4.8.2/gcc/fortran/parse.c:4322 0x552c7f gfc_parse_file() ../../gcc-4.8.2/gcc/fortran/parse.c:4593 0x58e365 gfc_be_parse_file ../../gcc-4.8.2/gcc/fortran/f95-lang.c:189 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.