diff options
author | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-07 20:39:04 +0000 |
---|---|---|
committer | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-07 20:39:04 +0000 |
commit | ee34b0551fb8a4f7a2f895e817efa7b8c8f70942 (patch) | |
tree | 2f3e0384df7d3b4f15916eb1420fe7fa3b8efbcd /gcc | |
parent | 522e1febb5d3109a76bd9942d535ff1541842622 (diff) | |
download | gcc-ee34b0551fb8a4f7a2f895e817efa7b8c8f70942.tar.gz |
2015-12-07 Steve Ellcey <sellcey@imgtec.com>
* gcc.target/mips/wrap-delay.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231383 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/wrap-delay.c | 42 |
2 files changed, 46 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7088835fe03..9361cee8a70 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-12-07 Steve Ellcey <sellcey@imgtec.com> + + * gcc.target/mips/wrap-delay.c: New test. + 2015-12-07 Jason Merrill <jason@redhat.com> * lib/g++.exp: Also find -std list in GXX_TESTSUITE_STDS diff --git a/gcc/testsuite/gcc.target/mips/wrap-delay.c b/gcc/testsuite/gcc.target/mips/wrap-delay.c new file mode 100644 index 00000000000..1332a6841fe --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/wrap-delay.c @@ -0,0 +1,42 @@ +/* { dg-do compile } */ +/* { dg-options "-g -mframe-header-opt -mbranch-likely" } */ + +/* GCC was generating an ICE with the above options and -Os because + it was putting the save of $31 in two annulled delay slots but + there was only one restore since only one of the two saves could be + executed. This was correct code but it confused dwarf2cfi and + caused it to ICE when using the -g option. */ + + +enum demangle_component_type +{ + DEMANGLE_COMPONENT_TRINARY_ARG2, +}; +struct demangle_component +{ + enum demangle_component_type type; +}; +struct d_info +{ + int next_comp; + int num_comps; +}; +struct demangle_component * d_make_empty (struct d_info *di) +{ + if (di->next_comp >= di->num_comps) return ((void *)0); + ++di->next_comp; +} +struct demangle_component *d_make_comp ( + struct d_info *di, + enum demangle_component_type type, + struct demangle_component *left) +{ + struct demangle_component *p; + switch (type) + { + case DEMANGLE_COMPONENT_TRINARY_ARG2: + if (left == ((void *)0)) return ((void *)0); + } + p = d_make_empty (di); + p->type = type; +} |