OSDN Git Service

* gcc.dg/vect/vect-105.c: Prevent compiler from hoisting abort
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / pr23455.c
1 /* { dg-do compile } */ 
2 /* { dg-options "-O2 -fdump-tree-pre-stats" } */
3 unsigned long outcnt;
4 extern void flush_outbuf(void);
5
6 void
7 bi_windup(unsigned int *outbuf, unsigned int bi_buf)
8 {
9     unsigned long t1 = outcnt;
10     outbuf[t1] = bi_buf;
11
12     unsigned long t2 = outcnt;
13     if (t2 == 16384)
14       flush_outbuf();
15
16     unsigned long t3 = outcnt;
17     outbuf[t3] = bi_buf;
18 }
19 /* We should eliminate one load of outcnt, which will in turn let us eliminate
20    one multiply of outcnt which will in turn let us eliminate
21    one add involving outcnt and outbuf.  */
22 /* { dg-final { scan-tree-dump-times "Eliminated: 3" 1 "pre"} } */
23 /* { dg-final { cleanup-tree-dump "pre" } } */