diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2011-04-01 17:40:27 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2011-04-01 17:40:27 +0000 |
commit | c5dd277d0170878d41370afa32b10a56da8b4af6 (patch) | |
tree | 470417dd6bd6addf2579deae3622a95381f34f10 /gcc | |
parent | 722279e41f7d76fc4b3ea8cca0d542c3d5779db2 (diff) | |
download | gcc-c5dd277d0170878d41370afa32b10a56da8b4af6.zip gcc-c5dd277d0170878d41370afa32b10a56da8b4af6.tar.gz gcc-c5dd277d0170878d41370afa32b10a56da8b4af6.tar.bz2 |
ifcvt.c (cond_exec_process_insns): Disallow converting a block that contains the prologue.
* ifcvt.c (cond_exec_process_insns): Disallow converting a block
that contains the prologue.
* gcc.c-torture/compile/20110401-1.c: New test.
From-SVN: r171840
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/ifcvt.c | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20110401-1.c | 22 |
4 files changed, 35 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e9fc81a..b6ab912 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -7,6 +7,9 @@ * final.c (final_start_function): Call the new function rather than using a NULL argument for dwarf2out_frame_debug. + * ifcvt.c (cond_exec_process_insns): Disallow converting a block + that contains the prologue. + 2011-04-01 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> * config/spu/t-spu-elf (dp-bit.c): Use > instead of >>. diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index eee5cc7..3e26799 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -1,5 +1,6 @@ /* If-conversion support. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, + 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -304,6 +305,10 @@ cond_exec_process_insns (ce_if_block_t *ce_info ATTRIBUTE_UNUSED, for (insn = start; ; insn = NEXT_INSN (insn)) { + /* dwarf2out can't cope with conditional prologues. */ + if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_PROLOGUE_END) + return FALSE; + if (NOTE_P (insn) || DEBUG_INSN_P (insn)) goto insn_done; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9c03db4..dcdf555 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-04-01 Bernd Schmidt <bernds@codesourcery.com> + + * gcc.c-torture/compile/20110401-1.c: New test. + 2011-03-31 Ian Lance Taylor <iant@google.com> * go.test/go-test.exp (go-set-goarch): Recognize MIPS ABIs. diff --git a/gcc/testsuite/gcc.c-torture/compile/20110401-1.c b/gcc/testsuite/gcc.c-torture/compile/20110401-1.c new file mode 100644 index 0000000..ee83a41 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20110401-1.c @@ -0,0 +1,22 @@ +void asn1_length_der (unsigned long int len, unsigned char *ans, int *ans_len) +{ + int k; + unsigned char temp[4]; + if (len < 128) { + if (ans != ((void *) 0)) + ans[0] = (unsigned char) len; + *ans_len = 1; + } else { + k = 0; + while (len) { + temp[k++] = len & 0xFF; + len = len >> 8; + } + *ans_len = k + 1; + if (ans != ((void *) 0)) { + ans[0] = ((unsigned char) k & 0x7F) + 128; + while (k--) + ans[*ans_len - 1 - k] = temp[k]; + } + } +} |