public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9712: [3.4 regression][New parser] __PRETTY_FUNCTION__ in function try block causes ICE
@ 2003-02-17 23:48 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-02-17 23:48 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, vlukas

Old Synopsis: __PRETTY_FUNCTION__ in function try block causes ICE
New Synopsis: [3.4 regression][New parser] __PRETTY_FUNCTION__ in function try block causes ICE

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Feb 17 23:48:22 2003
State-Changed-Why:
    Confirmed, a regression from 3.3. Likely due to the new parser.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9712


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/9712: [3.4 regression][New parser] __PRETTY_FUNCTION__ in function try block causes ICE
@ 2003-02-18 23:56 Steven Bosscher
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Bosscher @ 2003-02-18 23:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/9712; it has been noted by GNATS.

From: Steven Bosscher <s.bosscher@student.tudelft.nl>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org,
	gcc-prs@gcc.gnu.org, vlukas@gmx.de
Cc: jason@redhat.com
Subject: Re: c++/9712: [3.4 regression][New parser] __PRETTY_FUNCTION__ in
	function try block causes ICE
Date: 19 Feb 2003 00:46:41 +0100

 --=-e7At5mt/gRPQ//Vd9jC3
 Content-Type: text/plain
 Content-Transfer-Encoding: 7bit
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9712
 
 This bug is apparently not a "New parser" bug.  It disappears if I
 revert the following hunks from a series of patches applied by Jason in
 early January:
 
 2003-01-02  Jason Merrill  <jason@redhat.com>
 
         * c-common.c (finish_fname_decls): Put the DECL_STMTs inside the
         outermost scope.
         * c-decl.c (c_make_fname_decl): Push the decls there, too.
 
         * cp/decl.c (cp_make_fname_decl): Push the decls inside the
         outermost scope.
 
 The segfault happens in finish_fname_decls when it's looking for a
 COMPOUND_STMT that isn't there.
 
 Greetz
 Steven
 
 
 --=-e7At5mt/gRPQ//Vd9jC3
 Content-Disposition: attachment; filename=regression.patch
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/x-patch; name=regression.patch; charset=ISO-8859-15
 
 Index: c-common.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/gcc/gcc/gcc/c-common.c,v
 retrieving revision 1.394
 retrieving revision 1.395
 diff -c -3 -p -r1.394 -r1.395
 *** c-common.c	16 Dec 2002 18:19:00 -0000	1.394
 --- c-common.c	3 Jan 2003 19:29:47 -0000	1.395
 *************** finish_fname_decls ()
 *** 1050,1062 ****
    =20
     if (body)
       {
 !       /* They were called into existence, so add to statement tree.  */
 !       body =3D chainon (body,
 ! 		      TREE_CHAIN (DECL_SAVED_TREE (current_function_decl)));
 !       body =3D build_stmt (COMPOUND_STMT, body);
 !      =20
 !       COMPOUND_STMT_NO_SCOPE (body) =3D 1;
 !       TREE_CHAIN (DECL_SAVED_TREE (current_function_decl)) =3D body;
       }
    =20
     for (ix =3D 0; fname_vars[ix].decl; ix++)
 --- 1050,1067 ----
    =20
     if (body)
       {
 !       /* They were called into existence, so add to statement tree.  Add
 ! 	 the DECL_STMTs inside the outermost scope.  */
 !       tree *p =3D &DECL_SAVED_TREE (current_function_decl);
 !       /* Skip the dummy EXPR_STMT and any EH_SPEC_BLOCK.  */
 !       while (TREE_CODE (*p) !=3D COMPOUND_STMT)
 ! 	p =3D &TREE_CHAIN (*p);
 !       p =3D &COMPOUND_BODY (*p);
 !       if (TREE_CODE (*p) =3D=3D SCOPE_STMT)
 ! 	p =3D &TREE_CHAIN (*p);
 !=20
 !       body =3D chainon (body, *p);
 !       *p =3D body;
       }
    =20
     for (ix =3D 0; fname_vars[ix].decl; ix++)
 Index: decl.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/gcc/gcc/gcc/cp/decl.c,v
 retrieving revision 1.978
 retrieving revision 1.980
 diff -c -3 -p -r1.978 -r1.980
 *** cp/decl.c	1 Jan 2003 03:16:14 -0000	1.978
 --- cp/decl.c	3 Jan 2003 19:48:53 -0000	1.980
 *************** cp_make_fname_decl (id, type_dep)
 *** 6656,6662 ****
     tree init =3D cp_fname_init (name);
     tree decl =3D build_decl (VAR_DECL, id, TREE_TYPE (init));
  =20
 !   /* As we don't push the decl here, we must set the context.  */
     DECL_CONTEXT (decl) =3D current_function_decl;
     DECL_PRETTY_FUNCTION_P (decl) =3D type_dep;
        =20
 --- 6656,6662 ----
     tree init =3D cp_fname_init (name);
     tree decl =3D build_decl (VAR_DECL, id, TREE_TYPE (init));
  =20
 !   /* As we're using pushdecl_with_scope, we must set the context.  */
     DECL_CONTEXT (decl) =3D current_function_decl;
     DECL_PRETTY_FUNCTION_P (decl) =3D type_dep;
        =20
 *************** cp_make_fname_decl (id, type_dep)
 *** 6667,6672 ****
 --- 6667,6680 ----
    =20
     TREE_USED (decl) =3D 1;
  =20
 +   if (current_function_decl)
 +     {
 +       struct cp_binding_level *b =3D current_binding_level;
 +       while (b->level_chain->parm_flag =3D=3D 0)
 + 	b =3D b->level_chain;
 +       pushdecl_with_scope (decl, b);
 +     }=09
 +=20
     cp_finish_decl (decl, init, NULL_TREE, LOOKUP_ONLYCONVERTING);
        =20
     return decl;
 
 --=-e7At5mt/gRPQ//Vd9jC3--
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-18 23:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-17 23:48 c++/9712: [3.4 regression][New parser] __PRETTY_FUNCTION__ in function try block causes ICE bangerth
2003-02-18 23:56 Steven Bosscher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).