public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: bangerth@dealii.org To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, gdr@integrable-solutions.net, jason@gcc.gnu.org, nobody@gcc.gnu.org, olivier.leclant@netcreek.com Subject: Re: c++/10401: [3.3/3.4 regression] Seg fault with "-pedantic -Wunreachable-code" Date: Mon, 14 Apr 2003 17:04:00 -0000 [thread overview] Message-ID: <20030414170422.1049.qmail@sources.redhat.com> (raw) Old Synopsis: internal error: Segmentation fault using std::vector with "-pedantic -Wunreachable-code" New Synopsis: [3.3/3.4 regression] Seg fault with "-pedantic -Wunreachable-code" Responsible-Changed-From-To: unassigned->jason Responsible-Changed-By: bangerth Responsible-Changed-When: Mon Apr 14 17:04:22 2003 Responsible-Changed-Why: Likely associated with a patch that led to this State-Changed-From-To: open->analyzed State-Changed-By: bangerth State-Changed-When: Mon Apr 14 17:04:22 2003 State-Changed-Why: [Gaby, I add you to the list of listeners to this report, since it may be a 3.2 branch regression for - C++ standard headers - a common combination of flags.] Confirmed. Here's a redux: ----------------- template <typename T> struct X { X() throw() {} }; template class X<int>; ------------------------- g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -pedantic -Wunreachable-code -c y.cc y.cc: In constructor `X<T>::X() [with T = int]': y.cc:3: instantiated from `X<T>::X() [with T = int]' y.cc:5: instantiated from here y.cc:3: internal compiler error: Segmentation fault It fails with both 3.3 and mainline (3.4). I doesn't fail with the lates 3.2.3pre I have on my disk, which is 2003-03-29, but according to the submitter it also fails on this branch. Since the code in question is in a standard header and the flags used are a rather usual combination, this is a quite severe combination. On mainline, here's a backtrace: #0 never_reached_warning (avoided_insn=0x40180c34, finish=0x40180c34) at ../../gcc-3.4-CVS/gcc/jump.c:1916 #1 0x08189b7c in flow_delete_block_noexpunge (b=0x85d1ae0) at ../../gcc-3.4-CVS/gcc/cfgrtl.c:379 #2 0x08189c57 in flow_delete_block (b=0x85d1ae0) at ../../gcc-3.4-CVS/gcc/cfgrtl.c:415 #3 0x083d01eb in try_optimize_cfg (mode=16) at ../../gcc-3.4-CVS/gcc/cfgcleanup.c:1775 #4 0x083d05bc in cleanup_cfg (mode=16) at ../../gcc-3.4-CVS/gcc/cfgcleanup.c:1930 It fails in this code /* Back up to the first of any NOTEs preceding avoided_insn; flow passes us the head of a block, a NOTE_INSN_BASIC_BLOCK, which often follows the line note. */ for (insn = PREV_INSN (avoided_insn); ; insn = PREV_INSN (insn)) if (GET_CODE (insn) != NOTE) { insn = NEXT_INSN (insn); break; } since insn==NULL, which doesn't play nice in the GET_CODE. This code was added by Jason in 1.221 here: revision 1.221 date: 2003/04/04 01:21:56; author: jason; state: Exp; lines: +12 -2 PR c/10175 * jump.c (never_reached_warning): Revert patch of 2002-11-02. Look backwards for a line note. This patch also appears on the 3.2 branch. Jason, can you take a look what happens here? W. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10401
next reply other threads:[~2003-04-14 17:04 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-04-14 17:04 bangerth [this message] 2003-04-14 17:26 Giovanni Bajo
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=20030414170422.1049.qmail@sources.redhat.com \ --to=bangerth@dealii.org \ --cc=gcc-bugs@gcc.gnu.org \ --cc=gcc-gnats@gcc.gnu.org \ --cc=gcc-prs@gcc.gnu.org \ --cc=gdr@integrable-solutions.net \ --cc=jason@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ --cc=olivier.leclant@netcreek.com \ /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).