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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [pseudodtor3.C] - Rev 693

Compare with Previous | Blame | View Log

// PR c++/32241
// { dg-do compile }

struct A
{
  typedef int T;
  T &foo ();
  A () { foo.~T (); }   // { dg-error "does not have class type|expected" }
};

template <typename T> struct B
{
  T &foo ();
  B () { foo.~T (); }   // { dg-error "invalid use of member" }
};

B<int> b;

template <typename T, typename S> struct C
{
  T t;
  C () { t.~S (); }     // { dg-error "is not of type" }
};

C<int, long int> c;

template <typename T> struct D
{
  T t;
  typedef long int U;
  D () { t.~U (); }     // { dg-error "is not of type" }
};

D<int> d;

template <typename T> struct E
{
  T &foo ();
  typedef long int U;
  E () { foo.~U (); }   // { dg-error "is not of type" }
};

E<int> e;

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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