OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [new18.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-O2 -fstrict-aliasing" }
3
 
4
// This caused an ICE during placement new.
5
 
6
namespace Pooma {
7
   typedef int Context_t;
8
   namespace Arch {
9
   }
10
   inline Context_t context() {
11
  }
12
   inline int contexts() {
13
  }
14
 }
15
template struct DomainTraitsScalar {
16
  };
17
template struct DomainTraits : public DomainTraitsScalar {
18
  };
19
template class Grid;
20
template class DomainBase {
21
  };
22
template class Domain : public DomainBase
{
23
  };
24
#include 
25
template<> class Grid<1> : public Domain<1, DomainTraits > > {
26
  };
27
namespace Pooma {
28
 class PatchSizeSyncer {
29
    typedef Grid<1> Grid_t;
30
    PatchSizeSyncer(int contextKey, Grid_t &localGrid);
31
    int myContext_m;
32
    int numContexts_m;
33
    int localKey_m;
34
    Grid_t localGrid_m;
35
    typedef std::pair Elem_t;
36
    std::vector gridList_m;
37
  };
38
 }
39
namespace Pooma {
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);
44
  }
45
 }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.