summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr61482.C
blob: 1e186cc5ed6e7e856216bad907764c60acbc4220 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// { dg-do compile }

class A
{
public:
    int m_fn1 ();
};
class B
{
  void m_fn2 (const int &p1);
  A mThebesLayerDataStack;
};
int b, c;
void B::m_fn2 (const int &p1)
{
  if (c && b)
    {
      int i;
      i = mThebesLayerDataStack.m_fn1 ();
      for (; i >= 0;)
	{
	  ++i;
	  break;
	}
      --i;
      for (; i >= 0; --i)
	mThebesLayerDataStack.m_fn1 ();
    }
}