diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-14 07:57:49 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-14 07:57:49 +0000 |
commit | fe1302cffc9f963afbea472bb4ac9fce52d759a0 (patch) | |
tree | 1998ac8deccf251adebd1cb63da29b3285bdd37f /gcc/testsuite/gcc.c-torture | |
parent | d4fd22f2e3fbdf417a6e7e8230bfa34a04d75b31 (diff) | |
download | gcc-fe1302cffc9f963afbea472bb4ac9fce52d759a0.tar.gz |
* stor-layout.c (is_pending_size, put_pending_size): New functions.
(variable_size): Call put_pending_size.
* tree.h (is_pending_size, put_pending_size): Add prototypes.
* fold-const.c (extract_muldiv): If SAVE_EXPR is on the pending
sizes list, put newly created SAVE_EXPR there as well.
* gcc.c-torture/execute/20010209-1.c: New test.
* config/ia64/ia64.c (last_group): Only 2 entries are needed.
(errata_find_address_regs): load_group has only 2 entries.
(errata_emit_nops): Likewise. shladd is not problematic.
Clear last_group if nop was emitted.
(fixup_errata): load_group has only 2 entries.
Optimize.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39663 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20010209-1.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010209-1.c b/gcc/testsuite/gcc.c-torture/execute/20010209-1.c new file mode 100644 index 00000000000..e04d605ed63 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20010209-1.c @@ -0,0 +1,21 @@ +int b; +int foo (void) +{ + int x[b]; + int bar (int t[b]) + { + int i; + for (i = 0; i < b; i++) + t[i] = i + (i > 0 ? t[i-1] : 0); + return t[b-1]; + } + return bar (x); +} + +int main () +{ + b = 6; + if (foo () != 15) + abort (); + exit (0); +} |