patch that caused regression PR optimization/4382
Janis Johnson
janis187@us.ibm.com
Thu Dec 19 16:57:00 GMT 2002
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
More information about the Gcc
mailing list