From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128468 invoked by alias); 5 Apr 2015 13:59:38 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 128437 invoked by uid 48); 5 Apr 2015 13:59:37 -0000 From: "jan.kratochvil at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug compile/18202] New: [compile] cv-qualified self-references crash Date: Sun, 05 Apr 2015 13:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: compile X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jan.kratochvil at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot 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 attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q2/txt/msg00009.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18202 Bug ID: 18202 Summary: [compile] cv-qualified self-references crash Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: compile Assignee: unassigned at sourceware dot org Reporter: jan.kratochvil at redhat dot com Created attachment 8225 --> https://sourceware.org/bugzilla/attachment.cgi?id=8225&action=edit reproducer for GDB gdb/testsuite/gdb.compile/compile.c struct struct_type { - struct struct_type *selffield; + volatile struct struct_type *selffield; -> compile code struct_object.selffield = &struct_object gdb command line:1:1: internal compiler error: Segmentation fault This is because selffield has !COMPLETE_TYPE_P as at that time struct struct_type is not yet complete and the cv-qualifier creates a copy (not reference) of the type inside GCC. I guess cv-qualified self-references will need to create opaque type inside GCC. -- You are receiving this mail because: You are on the CC list for the bug.