2 // { dg-options "-O2 -fstrict-aliasing" }
4 // This caused an ICE during placement new.
10 inline Context_t context() {
12 inline int contexts() {
15 template<class DomT, class T, class NewDom1T> struct DomainTraitsScalar {
17 template<class T> struct DomainTraits : public DomainTraitsScalar<T, T, T> {
19 template<int Dim> class Grid;
20 template<class DT> class DomainBase {
22 template<int Dim, class DT> class Domain : public DomainBase<DT> {
25 template<> class Grid<1> : public Domain<1, DomainTraits<Grid<1> > > {
28 class PatchSizeSyncer {
29 typedef Grid<1> Grid_t;
30 PatchSizeSyncer(int contextKey, Grid_t &localGrid);
35 typedef std::pair<int,Grid_t *> Elem_t;
36 std::vector<Elem_t> gridList_m;
40 PatchSizeSyncer::PatchSizeSyncer(int contextKey, Grid_t &localGrid) :
41 myContext_m(Pooma::context()), numContexts_m(Pooma::contexts()),
42 localKey_m(contextKey), localGrid_m(localGrid) {
43 if (myContext_m == 0) gridList_m.reserve(numContexts_m);