Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / g++.dg / template / instantiate3.C
blob4644fd02b550862ed7c249ad810e595a60b7752b
1 // { dg-do compile }
2 // Origin: Scott Snyder <snyder@fnal.gov>
4 // PR c++/7639
5 // ICE when accessing member with incomplete type.
7 class ACE_Null_Mutex;   // { dg-error "forward declaration" }
9 template <class TYPE>
10 struct ACE_Cleanup_Adapter
12   TYPE &object ()
13   { return object_; }   // { dg-error "invalid" }
14   TYPE object_;         // { dg-error "incomplete type" }
17 template class ACE_Cleanup_Adapter<ACE_Null_Mutex>; // { dg-error "instantiated from here" }