This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/30558] ICE with OpenMP and exceptions



------- Comment #7 from jakub at gcc dot gnu dot org  2007-04-24 12:45 -------
Even more reduced testcase:
static int s = 6;

template <typename T> struct F
{
  ~F () {}
  F (T x) {}
  const T &operator[] (unsigned i) const { return s; }
};

template <typename T> F<T> foo (const F<T> &x)
{
  return F<T> (x[1]);
}

static F<int> z = 6;

struct G
{
  G () { bar (2); }
  F<int> &operator () (F<int> x) { return z; }
  void bar (int);
};

int
main ()
{
  try
  {
    G g;
#pragma omp parallel for
    for (int i = 0; i < 10; ++i)
      {
        F<int> j (i);
        F<int> f = g (j);
        F<int> h = foo (f);
      }
  }
  catch (int &e)
  {
  }
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30558


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]