diff options
author | Claudiu Zissulescu <claziss@synopsys.com> | 2017-11-21 12:37:42 +0100 |
---|---|---|
committer | Claudiu Zissulescu <claziss@gcc.gnu.org> | 2017-11-21 12:37:42 +0100 |
commit | 13f5d5e0828e1c2ccba67f9a5f0f8d50f5b42a77 (patch) | |
tree | ffbea3856ef8325931ae3fa7fd5db723090c8877 /gcc | |
parent | 6fe5e235f962f8ac1ab95446de1f18f1c05524b2 (diff) | |
download | gcc-13f5d5e0828e1c2ccba67f9a5f0f8d50f5b42a77.zip gcc-13f5d5e0828e1c2ccba67f9a5f0f8d50f5b42a77.tar.gz gcc-13f5d5e0828e1c2ccba67f9a5f0f8d50f5b42a77.tar.bz2 |
Don't split call from its call arg location.
gcc/
2017-11-21 Claudiu Zissulescu <claziss@synopsys.com>
* cfgrtl.c (force_nonfallthru_and_redirect): Don't split a call
and its corresponding call arg location note.
testsuite/
2017-11-21 Claudiu Zissulescu <claziss@synopsys.com>
* gcc.target/arc/loop-5.cpp: New test.
From-SVN: r254998
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cfgrtl.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/arc/loop-5.cpp | 20 |
4 files changed, 34 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7fa8572..bc50425 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,9 @@ 2017-11-21 Claudiu Zissulescu <claziss@synopsys.com> + + * cfgrtl.c (force_nonfallthru_and_redirect): Don't split a call + and its corresponding call arg location note. + +2017-11-21 Claudiu Zissulescu <claziss@synopsys.com> Andrew Burgess <andrew.burgess@embecosm.com> * config/arc/arc-protos.h (arc_compute_frame_size): Delete diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index ae46908..d6e5ac0 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -1626,6 +1626,11 @@ force_nonfallthru_and_redirect (edge e, basic_block target, rtx jump_label) else new_head = BB_END (e->src); new_head = NEXT_INSN (new_head); + /* Make sure we don't split a call and its corresponding + CALL_ARG_LOCATION note. */ + if (new_head && NOTE_P (new_head) + && NOTE_KIND (new_head) == NOTE_INSN_CALL_ARG_LOCATION) + new_head = NEXT_INSN (new_head); jump_block = create_basic_block (new_head, NULL, e->src); jump_block->count = count; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 70926dc..8d64a22 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2017-11-21 Claudiu Zissulescu <claziss@synopsys.com> + + * gcc.target/arc/loop-5.cpp: New test. + 2017-11-21 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/83047 diff --git a/gcc/testsuite/gcc.target/arc/loop-5.cpp b/gcc/testsuite/gcc.target/arc/loop-5.cpp new file mode 100644 index 0000000..b9b188d --- /dev/null +++ b/gcc/testsuite/gcc.target/arc/loop-5.cpp @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -g" } */ + +/* Check if gcc splits a call from its CALL_ARG_LOCATION note. If so, + we get an ICE in dwarf2out_var_location. */ + +typedef void Trans_NS_std_new_handler(); +void *operator new(unsigned) +{ + void *p; + while (__builtin_expect(p == 0, false)) + { + Trans_NS_std_new_handler handler; + try { + handler(); + } catch (int) { + } + } + return (void*) 0xdead; +} |