This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
patch that caused regression PR optimization/4382
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: gcc at gcc dot gnu dot org, rth at redhat dot com
- Cc: rodrigc at attbi dot com, bangerth at ticam dot utexas dot edu
- Date: Thu, 19 Dec 2002 15:25:13 -0800
- Subject: patch that caused regression PR optimization/4382
The regression reported in PR optimization/4382 showed up starting
with this patch:
2000-12-20 Richard Henderson <rth@redhat.com>
* rtl.h (REG_NON_LOCAL_GOTO): New.
* rtl.c (reg_note_name): Update.
* stmt.c (expand_goto): Emit a REG_NON_LOCAL_GOTO note.
* builtins.c (expand_builtin_longjmp): Likewise.
* flow.c (make_edges): Check for REG_NON_LOCAL_GOTO and do
not emit an edge.
Here's the test case I used, which is in the PR. There's also a
smaller one in the PR that causes the same ICE.
-------------------
struct jmp_buf {
void *p[5];
};
static void jumpaway(struct jmp_buf *ptr)
{
__builtin_longjmp(ptr ,1);
abort();
}
int main(void)
{
struct jmp_buf buf;
if (__builtin_setjmp(&buf) == 0) {
} else
return 0;
jumpaway(&buf);
abort();
return 0;
}
-------------------
Output from the compiler when compiled with -O3 using mainline:
4382.c: In function `main':
4382.c:20: error: Wrong amount of branch edges after unconditional jump 0
4382.c:20: internal compiler error: verify_flow_info failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
I'll add this information to the PR.
Janis