Bug 28942 - [4.2 Regression] Dependent deconstrcutors
Summary: [4.2 Regression] Dependent deconstrcutors
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.2.0
: P3 blocker
Target Milestone: 4.2.0
Assignee: Nathan Sidwell
URL:
Keywords: ice-on-valid-code, rejects-valid
Depends on:
Blocks: 23287
  Show dependency treegraph
 
Reported: 2006-09-03 17:45 UTC by Andrew Pinski
Modified: 2006-09-04 16:42 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-09-03 18:26:32


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2006-09-03 17:45:07 UTC
we just reject now but it is
valid code as far as I can tell:
template< class other>
  struct bin_search_tree_data_ 
{
  typedef typename other::node node;
  typedef node *node_pointer;
  ~bin_search_tree_data_()
  {
    m_p_head->~node();
  }
  node_pointer m_p_head;
};
struct blowup
{
  typedef int node;
};
bin_search_tree_data_< blowup >  r;

------------------------------ Here is one that ICEs also and closer to
the original code:
template< class other>
  struct bin_search_tree_data_
{
  typedef typename other::node node;
  typedef node *node_pointer;
  ~bin_search_tree_data_()
  {
    m_p_head->~node();
  }
  node_pointer m_p_head;
};
struct blowup2{};
struct blowup
{
  typedef blowup2 node;
};
bin_search_tree_data_< blowup >  r;
------
I am creating this after 15 hours of no activity on fixing the problem.
Comment 1 Andrew Pinski 2006-09-03 17:45:32 UTC
Note this was from:
http://gcc.gnu.org/ml/gcc/2006-09/msg00048.html
Comment 2 Nathan Sidwell 2006-09-03 18:26:32 UTC
I'll look at this tomorrow.  If I can't figure out a solution I'll revert 23287
Comment 3 Andrew Pinski 2006-09-04 16:42:42 UTC
Fixed.