re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20030907-2.c
1 /* PR optimization/12109
2
3 This would ICE in tree-ssa-dce.c:process_worklist() when
4 the function was expecting an SSA_NAME but found a VAR_DECL. */
5
6 /* { dg-do compile } */
7 /* { dg-options "-O -ftree-dce" } */
8
9 void *do_it(void * dest, const void * src);
10 double *create_float(void);
11
12 void parse_rvalue(void **DataPtr)
13 {
14 double local = 0.0;
15 int terms = 1;
16
17 *DataPtr = create_float();
18
19 switch (terms)
20 {
21 case 1:
22 *((double *)*DataPtr) = local;
23 break;
24
25 case 2:
26 do_it(*DataPtr, &local);
27 break;
28 }
29 }
30