aboutsummaryrefslogtreecommitdiff
path: root/libssp
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-02-13 10:41:51 +0100
committerRichard Biener <rguenther@suse.de>2023-02-13 15:57:08 +0100
commit6436add49ed9ecf74f1f01b4fe18961df4f3e83d (patch)
treef8c986b61112ca8a922355d848271084860e64d3 /libssp
parent452db716d8debb6e09b85e4a0c0e73a047ed5c1d (diff)
downloadgcc-6436add49ed9ecf74f1f01b4fe18961df4f3e83d.zip
gcc-6436add49ed9ecf74f1f01b4fe18961df4f3e83d.tar.gz
gcc-6436add49ed9ecf74f1f01b4fe18961df4f3e83d.tar.bz2
tree-optimization/108691 - indirect calls to setjmp
DCE now chokes on indirect setjmp calls becoming direct because that exposes them too late to be subject to abnormal edge creation. The following patch honors gimple_call_ctrl_altering for those and _not_ treat formerly indirect calls to setjmp as calls to setjmp in notice_special_calls. Unfortunately there's no way to have an indirect call to setjmp properly annotated (the returns_twice attribute is ignored on types). RTL expansion late discovers returns-twice for the purpose of adding REG_SETJMP notes and also sets ->calls_setjmp (instead of asserting it is set). There's no good way to transfer proper knowledge around here so I'm using ->calls_setjmp as a flag to indicate whether gimple_call_ctrl_altering_p was set. PR tree-optimization/108691 * tree-cfg.cc (notice_special_calls): When the CFG is built honor gimple_call_ctrl_altering_p. * cfgexpand.cc (expand_call_stmt): Clear cfun->calls_setjmp temporarily if the call is not control-altering. * calls.cc (emit_call_1): Do not add REG_SETJMP if cfun->calls_setjmp is not set. Do not alter cfun->calls_setjmp. * gcc.dg/pr108691.c: New testcase.
Diffstat (limited to 'libssp')
0 files changed, 0 insertions, 0 deletions