From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21035 invoked by alias); 29 Sep 2002 09:16:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 21021 invoked by uid 71); 29 Sep 2002 09:16:02 -0000 Date: Sun, 29 Sep 2002 02:16:00 -0000 Message-ID: <20020929091602.21020.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: =?iso-8859-1?Q?Pop_S=E9bastian?= Subject: Re: c++/7788: g++-3.2 internal error: Segmentation fault Reply-To: =?iso-8859-1?Q?Pop_S=E9bastian?= X-SW-Source: 2002-09/txt/msg00814.txt.bz2 List-Id: The following reply was made to PR c++/7788; it has been noted by GNATS. From: =?iso-8859-1?Q?Pop_S=E9bastian?= To: nathan@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, jerrysiebe@mindspring.com, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Cc: nathan@codesourcery.com Subject: Re: c++/7788: g++-3.2 internal error: Segmentation fault Date: Sun, 29 Sep 2002 11:08:53 +0200 On Fri, Sep 13, 2002 at 08:39:32PM -0000, nathan@gcc.gnu.org wrote: > Synopsis: g++-3.2 internal error: Segmentation fault > > State-Changed-From-To: open->analyzed > State-Changed-By: nathan > State-Changed-When: Fri Sep 13 13:39:32 2002 > State-Changed-Why: > confirmed as a regression > > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7788 The problem comes from cp/rtti.c in unemitted_tinfo_decl_p (). Associated patch with these changes is: Date: Fri, 21 Jun 2002 12:20:51 +0100 From: Nathan Sidwell Organization: Codesourcery LLC X-Accept-Language: en To: jason@redhat.com Cc: gcc-patches@gcc.org Subject: [C++ PATCH]: Rework typeinfo objects 2002-06-20 Nathan Sidwell int ! tinfo_decl_p (t, data) tree t; void *data ATTRIBUTE_UNUSED; { ! return TREE_CODE (t) == VAR_DECL ! && IDENTIFIER_GLOBAL_VALUE (DECL_NAME (t)) == (t) ! && TREE_TYPE (t) == tinfo_decl_type ! && TREE_TYPE (DECL_NAME (t)); } Changed into int ! unemitted_tinfo_decl_p (t, data) tree t; void *data ATTRIBUTE_UNUSED; { ! if (/* It's a var decl */ ! TREE_CODE (t) == VAR_DECL ! /* whos name points back to itself */ ! && IDENTIFIER_GLOBAL_VALUE (DECL_NAME (t)) == t ! /* whos name's type is non-null */ ! && TREE_TYPE (DECL_NAME (t)) ! /* and whos type is a struct */ ! && TREE_CODE (TREE_TYPE (t)) == RECORD_TYPE ! /* with a first field of our pseudo type info */ ! && TREE_TYPE (TYPE_FIELDS (TREE_TYPE (t))) == ti_desc_type_node) ! return 1; ! return 0; } I rewrote the condition as : int unemitted_tinfo_decl_p (t, data) tree t; void *data ATTRIBUTE_UNUSED; { /* It's a var decl */ if (TREE_CODE (t) == VAR_DECL) { tree dnt = DECL_NAME (t); /* whos name points back to itself */ if (IDENTIFIER_GLOBAL_VALUE (dnt) == t) /* whos name's type is non-null */ if (TREE_TYPE (dnt)) { tree ttt = TREE_TYPE (t); /* and whos type is a struct */ if (TREE_CODE (ttt) == RECORD_TYPE) { tree tfttt = TYPE_FIELDS (ttt); /* with a first field of our pseudo type info */ => if (TREE_TYPE (tfttt) == ti_desc_type_node) return 1; } } } return 0; } The problem is here => since tfttt is NULL in this bug-report example. Nathan could you review this patch and the associated bug-report please? Thanks, Sebastian