diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2007-06-22 20:51:28 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2007-06-22 20:51:28 +0200 |
commit | 58f7fcc3628dbe04c9cfd53da71351c21e6bf03c (patch) | |
tree | 6600ebacfc0a26ca7afe0a15a806c900c5ca85bd | |
parent | 23bc73b56313bcae5095f1258710bd1485ead15d (diff) | |
download | gcc-58f7fcc3628dbe04c9cfd53da71351c21e6bf03c.zip gcc-58f7fcc3628dbe04c9cfd53da71351c21e6bf03c.tar.gz gcc-58f7fcc3628dbe04c9cfd53da71351c21e6bf03c.tar.bz2 |
re PR middle-end/32374 (internal compiler error: in reload_cse_simplify_operands, at postreload.c:396)
PR middle-end/32374
* expr.c (store_constructor): Do not clobber non-zeroed memory.
testsuite/ChangeLog:
PR middle-end/32374
* gcc.dg/pr32374.c: New test.
From-SVN: r125955
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/expr.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr32374.c | 20 |
4 files changed, 31 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 349272b..09f2576 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-06-19 Uros Bizjak <ubizjak@gmail.com> + + PR middle-end/32374 + * expr.c (store_constructor): Do not clobber non-zeroed memory. + 2007-06-22 Uros Bizjak <ubizjak@gmail.com> PR target/32413 @@ -5062,7 +5062,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) cleared = 1; } - if (! cleared) + if (REG_P (target) && !cleared) emit_insn (gen_rtx_CLOBBER (VOIDmode, target)); /* Store each element of the constructor into the diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 658ac0c..d8ae75c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-06-22 Uros Bizjak <ubizjak@gmail.com> + + PR middle-end/32374 + * gcc.dg/pr32374.c: New test. + 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/32360 diff --git a/gcc/testsuite/gcc.dg/pr32374.c b/gcc/testsuite/gcc.dg/pr32374.c new file mode 100644 index 0000000..de15d55 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr32374.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +extern int *stderr; + +void f (int *, const char *, ...); + +void g (const char *conf_name) +{ + typedef struct + { + const char *label; + const int value; + } Section; + + const Section sections[2] = { {"", 0}, {"", 1} }; + + f (stderr, "", "", conf_name, 0, sections[0]); + f (stderr, "", "", conf_name, 0, sections[0]); +} |