Merge from mainline (163495:164578).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / torture / pr45709-2.C
blob1f6a2344f04ff70677bfbe093fc28261b2c0c1f9
1 // { dg-do compile }
3 struct Region {
4     int storage[4];
5     int count;
6 };
7 static inline Region subtract(int lhs)
9   Region reg;
10   int* storage = reg.storage;
11   int* storage2 = reg.storage;
12   if (lhs > 0)
13     storage++, storage2--;
14   reg.count = storage - reg.storage + storage2 - reg.storage;
15   return reg;
17 void bar(int a)
19   const Region copyBack(subtract(a));