summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/pr34036.C
blob: ecf6cf745be1440775e5d5e7a423668211ef851b (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
30
31
32
/* { dg-do compile } */
/* { dg-options "-O2 -fnon-call-exceptions -ffast-math -fsignaling-nans" } */
/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 1 } */

template <class T>
class ggStaticArray {
public:
  ~ggStaticArray();
};

template <class T>
class ggGrid {
public:
  ggGrid() : grid() { }
  ggStaticArray<T> grid;
};

class mrGrid {
public:
  mrGrid(void);
protected:
  ggGrid<int*> grid;
  double multiplier;
};

mrGrid::mrGrid(void)
{
  double xMeasure, yMeasure, zMeasure;
  double cellDimension;

  cellDimension = multiplier * (xMeasure * yMeasure * zMeasure);
}