* gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
[official-gcc.git] / gcc / testsuite / gcc.dg / pr23911.c
blob3fa041222dec4afcf8f131f2a6d7902304d7285b
1 /* This was a missed optimization in tree constant propagation
2 that CSE would catch later on. */
3 /* { dg-do compile } */
4 /* { dg-options "-O -fdump-tree-dce3" } */
6 double _Complex *a;
7 static const double _Complex b[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
9 void
10 test (void)
12 a[0] = b[0] + b[1];
13 a[1] = b[0] + b[1];
14 return;
17 /* After DCE2 which runs after FRE, the expressions should be fully
18 constant folded. There should be no loads from b left. */
19 /* { dg-final { scan-tree-dump-times "__complex__ \\\(1.0e\\\+0, 0.0\\\)" 2 "dce3" } } */
20 /* { dg-final { scan-tree-dump-times "= b" 0 "dce3" } } */