gcc/
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / reassoc-19.c
blobc13e1d36fedd56a996e9c3f6dfa48494c9207492
1 /* { dg-do compile } */
2 /* { dg-options "-Os -fdump-tree-reassoc2" } */
4 /* Slightly changed testcase from PR middle-end/40815. */
5 void bar(char*, char*, int);
6 void foo(char* left, char* rite, int element)
8 while (left <= rite)
10 /* This should expand into
11 D.zzzz = D.zzzz - D.xxxx;
12 and NOT to
13 D.D.yyyy = -D.xxxx; D.zzzz = D.zzzz + D.yyyy; */
14 rite -= element;
15 bar(left, rite, element);
19 /* There should be no " + " in the dump. */
20 /* { dg-final { scan-tree-dump-times " \\\+ " 0 "reassoc2" } } */
21 /* { dg-final { cleanup-tree-dump "reassoc2" } } */