This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/57067] Missing control flow edges for setjmp/longjmp
- From: "gretay at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 17 May 2013 14:03:54 +0000
- Subject: [Bug rtl-optimization/57067] Missing control flow edges for setjmp/longjmp
- Auto-submitted: auto-generated
- References: <bug-57067-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57067
gretay at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gretay at gcc dot gnu.org
--- Comment #6 from gretay at gcc dot gnu.org ---
I tried the proposed patch (after fixing a typo: calls_setjmp / calls_stjmp).
It causes an ICE on the attached testcase (and some regressions):
$ /work/apr-builds/pr57067/install/bin/arm-none-eabi-gcc -O1 -mcpu=cortex-a15
pr57067.c -o pr57067.elf
pr57067.c: In function 'main':
pr57067.c:18:7: warning: incompatible implicit declaration of built-in function
'malloc' [enabled by default]
p = malloc (0x1000);
^
pr57067.c:22:7: warning: incompatible implicit declaration of built-in function
'printf' [enabled by default]
printf ("\nFAIL\n");
^
pr57067.c:23:7: warning: incompatible implicit declaration of built-in function
'exit' [enabled by default]
exit (1);
^
pr57067.c:32:3: warning: incompatible implicit declaration of built-in function
'printf' [enabled by default]
printf ("\nPASS\n");
^
pr57067.c:34:1: error: in basic block 2:
}
^
pr57067.c:34:1: error: flow control insn inside a basic block
(call_insn 8 7 9 2 (parallel [
(set (reg:SI 0 r0)
(call (mem:SI (symbol_ref:SI ("malloc") [flags 0x41]
<function_decl 0x7f0cc7362900 malloc>) [0 __builtin_malloc S4 A32])
(const_int 0 [0])))
(use (const_int 0 [0]))
(clobber (reg:SI 14 lr))
]) pr57067.c:18 -1
(expr_list:REG_EH_REGION (const_int 0 [0])
(nil))
(expr_list:REG_CFA_WINDOW_SAVE (use (reg:SI 0 r0))
(nil)))
pr57067.c:34:1: internal compiler error: in rtl_verify_flow_info_1, at
cfgrtl.c:2321
0x7cc383 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/work/local-checkouts/gcc-fsf/gcc/rtl-error.c:109
0x52ed65 rtl_verify_flow_info_1
/work/local-checkouts/gcc-fsf/gcc/cfgrtl.c:2321
0x52efb2 rtl_verify_flow_info
/work/local-checkouts/gcc-fsf/gcc/cfgrtl.c:2345
0x51ef49 verify_flow_info()
/work/local-checkouts/gcc-fsf/gcc/cfghooks.c:258
0xc02464 try_optimize_cfg
/work/local-checkouts/gcc-fsf/gcc/cfgcleanup.c:2812
0xc02464 cleanup_cfg(int)
/work/local-checkouts/gcc-fsf/gcc/cfgcleanup.c:2974
0x51c7dd gimple_expand_cfg
/work/local-checkouts/gcc-fsf/gcc/cfgexpand.c:4781