public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43648]  New: [4.5 regression] ICE with explicit destructor call and typedef
@ 2010-04-05 12:24 bangerth at gmail dot com
  2010-04-05 12:42 ` [Bug c++/43648] " rguenth at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: bangerth at gmail dot com @ 2010-04-05 12:24 UTC (permalink / raw)
  To: gcc-bugs

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
&#8216;dealii::internal::FEValuesViews::Cache<dim, spacedim>::Cache(const
dealii::FEValuesBase<dim, spacedim>&) [with int dim = 1, int spacedim =
1]&#8217;:
source/fe/fe_values.cc:1486:31:   instantiated from
&#8216;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]&#8217;
source/fe/fe_values.cc:3941:16:   instantiated from here
source/fe/fe_values.cc:1057:4: error: no type named &#8216;ScalarView&#8217; in
&#8216;class dealii::FEValuesViews::Scalar<1>&#8217;
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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-04-07 16:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-05 12:24 [Bug c++/43648] New: [4.5 regression] ICE with explicit destructor call and typedef bangerth at gmail dot com
2010-04-05 12:42 ` [Bug c++/43648] " rguenth at gcc dot gnu dot org
2010-04-05 12:46 ` bangerth at gmail dot com
2010-04-05 16:17 ` jason at gcc dot gnu dot org
2010-04-06 11:28 ` rguenth at gcc dot gnu dot org
2010-04-06 16:13 ` jason at gcc dot gnu dot org
2010-04-07 15:03 ` [Bug c++/43648] [4.5/4.6 " jason at gcc dot gnu dot org
2010-04-07 16:17 ` bangerth at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).