public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: "Pop Sébastian" <pop@gauvain.u-strasbg.fr> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c++/8067: g++ 3.2 internal error: Segmentation fault Date: Mon, 30 Sep 2002 10:36:00 -0000 [thread overview] Message-ID: <20020930173603.8216.qmail@sources.redhat.com> (raw) The following reply was made to PR c++/8067; it has been noted by GNATS. From: =?iso-8859-1?Q?Pop_S=E9bastian?= <pop@gauvain.u-strasbg.fr> To: Reichelt <reichelt@igpm.rwth-aachen.de> Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, y_fedor@ciam.ru, gcc-patches@gcc.gnu.org Subject: Re: c++/8067: g++ 3.2 internal error: Segmentation fault Date: Mon, 30 Sep 2002 19:28:44 +0200 On Mon, Sep 30, 2002 at 07:35:23PM +0200, Reichelt wrote: > Hi, > > the problem can be demonstated with just a single line of (legal) code: > > ------------------snip here--------------------- > void foo() { for ( __PRETTY_FUNCTION__ ; ; ) ; } > ------------------snip here--------------------- > Thanks for your simplified version of the bug report. The following trivial patch solves the ICE for PR#8067. Sebastian. Index: decl.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/cp/decl.c,v retrieving revision 1.937 diff -d -c -p -r1.937 decl.c *** decl.c 29 Sep 2002 11:53:48 -0000 1.937 --- decl.c 30 Sep 2002 17:11:01 -0000 *************** maybe_inject_for_scope_var (decl) *** 8006,8022 **** Otherwise, we need to preserve the temp slot for decl to last into the outer binding level. */ ! tree outer_binding ! = TREE_CHAIN (IDENTIFIER_BINDING (DECL_NAME (decl))); ! ! if (outer_binding && BINDING_LEVEL (outer_binding) == outer ! && (TREE_CODE (BINDING_VALUE (outer_binding)) ! == VAR_DECL) ! && DECL_DEAD_FOR_LOCAL (BINDING_VALUE (outer_binding))) { ! BINDING_VALUE (outer_binding) ! = DECL_SHADOWED_FOR_VAR (BINDING_VALUE (outer_binding)); ! current_binding_level->is_for_scope = 0; } else if (DECL_IN_MEMORY_P (decl)) preserve_temp_slots (DECL_RTL (decl)); --- 8006,8026 ---- Otherwise, we need to preserve the temp slot for decl to last into the outer binding level. */ ! tree ib, outer_binding; ! ib = IDENTIFIER_BINDING (DECL_NAME (decl)); ! if (ib) { ! outer_binding = TREE_CHAIN (ibdn); ! ! if (outer_binding && BINDING_LEVEL (outer_binding) == outer ! && (TREE_CODE (BINDING_VALUE (outer_binding)) ! == VAR_DECL) ! && DECL_DEAD_FOR_LOCAL (BINDING_VALUE (outer_binding))) ! { ! BINDING_VALUE (outer_binding) ! = DECL_SHADOWED_FOR_VAR (BINDING_VALUE (outer_binding)); ! current_binding_level->is_for_scope = 0; ! } } else if (DECL_IN_MEMORY_P (decl)) preserve_temp_slots (DECL_RTL (decl));
next reply other threads:[~2002-09-30 17:36 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-09-30 10:36 Pop Sébastian [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-10-23 17:14 mmitchel 2002-10-23 15:06 mmitchel 2002-10-07 14:26 Pop Sébastian 2002-10-06 12:16 Gabriel Dos Reis 2002-10-06 12:06 Pop Sébastian 2002-10-04 11:46 Jason Merrill 2002-09-30 13:06 Pop Sébastian 2002-09-30 9:56 Reichelt 2002-09-28 6:32 lerdsuwa 2002-09-27 0:06 y_fedor
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020930173603.8216.qmail@sources.redhat.com \ --to=pop@gauvain.u-strasbg.fr \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).