2 // { dg-options "-O2 -fstrict-aliasing" }
3 // { dg-additional-options "-Wno-return-type" }
5 // This caused an ICE during placement new.
11 inline Context_t context() {
13 inline int contexts() {
16 template<class DomT, class T, class NewDom1T> struct DomainTraitsScalar {
18 template<class T> struct DomainTraits : public DomainTraitsScalar<T, T, T> {
20 template<int Dim> class Grid;
21 template<class DT> class DomainBase {
23 template<int Dim, class DT> class Domain : public DomainBase<DT> {
26 template<> class Grid<1> : public Domain<1, DomainTraits<Grid<1> > > {
29 class PatchSizeSyncer {
30 typedef Grid<1> Grid_t;
31 PatchSizeSyncer(int contextKey, Grid_t &localGrid);
36 typedef std::pair<int,Grid_t *> Elem_t;
37 std::vector<Elem_t> gridList_m;
41 PatchSizeSyncer::PatchSizeSyncer(int contextKey, Grid_t &localGrid) :
42 myContext_m(Pooma::context()), numContexts_m(Pooma::contexts()),
43 localKey_m(contextKey), localGrid_m(localGrid) {
44 if (myContext_m == 0) gridList_m.reserve(numContexts_m);