With mainline from 20100107, the following code fails on Mac OS X: ---------------------------------- namespace dealii { namespace FEValuesViews { template <int dim, int spacedim> struct Scalar {}; }
template <int dim, int spacedim> struct X { FEValuesViews::Scalar<dim,spacedim> scalars[dim*spacedim]; void f() { typedef dealii::FEValuesViews::Scalar<dim,spacedim> ScalarView; scalars[0].ScalarView::~ScalarView (); } }; template struct X<2,2>; } ----------------------------- >From what I can gather from the person who told me this, the error message looks along the lines (line numbers/function names/file names are wrong, though): source/fe/fe_values.cc: In constructor ‘dealii::internal::FEValuesViews::Cache<dim, spacedim>::Cache(const dealii::FEValuesBase<dim, spacedim>&) [with int dim = 1, int spacedim = 1]’: source/fe/fe_values.cc:1486:31: instantiated from ‘dealii::FEValuesBase<dim, spacedim>::FEValuesBase(unsigned int, unsigned int, dealii::UpdateFlags, const dealii::Mapping<dim, spacedim>&, const dealii::FiniteElement<dim, spacedim>&) [with int dim = 1, int spacedim = 1]’ source/fe/fe_values.cc:3941:16: instantiated from here source/fe/fe_values.cc:1057:4: error: no type named ‘ScalarView’ in ‘class dealii::FEValuesViews::Scalar<1>’ source/fe/fe_values.cc:1057:4: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. The problem is that the code was written with the typedef, rather than explicitly spelling out the full qualified class name, since some other compilers do not grok it any other way. Best W. -- Summary: [4.5 regression] ICE with explicit destructor call and typedef Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bangerth at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43648