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

* [Bug c++/43648] [4.5 regression] ICE with explicit destructor call and typedef
  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 ` rguenth at gcc dot gnu dot org
  2010-04-05 12:46 ` bangerth at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-05 12:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2010-04-05 12:42 -------
Confirmed on i?86-linux.

gcc$ ./cc1plus -quiet t.Ct.C: In member function 'void dealii::X<dim,
spacedim>::f() [with int dim = 2, int spacedim = 2]':
t.C:20:19:   instantiated from here
t.C:16:8: error: no type named 'ScalarView' in 'struct
dealii::FEValuesViews::Scalar<2, 2>'
t.C:16:8: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-04-05 12:42:10
               date|                            |
   Target Milestone|---                         |4.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43648


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

* [Bug c++/43648] [4.5 regression] ICE with explicit destructor call and typedef
  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
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bangerth at gmail dot com @ 2010-04-05 12:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bangerth at gmail dot com  2010-04-05 12:46 -------
Thanks Richard for the quick confirmation.
I should have mentioned that this worked on previous versions up to at least
4.3.3.

W.


-- 

bangerth at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.5.0
      Known to work|                            |4.3.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43648


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

* [Bug c++/43648] [4.5 regression] ICE with explicit destructor call and typedef
  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
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-04-05 16:17 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-04-05 12:42:10         |2010-04-05 16:16:47
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43648


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

* [Bug c++/43648] [4.5 regression] ICE with explicit destructor call and typedef
  2010-04-05 12:24 [Bug c++/43648] New: [4.5 regression] ICE with explicit destructor call and typedef bangerth at gmail dot com
                   ` (2 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-06 11:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2010-04-06 11:21 -------
GCC 4.5.0 is being released.  Deferring to 4.5.1.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.0                       |4.5.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43648


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

* [Bug c++/43648] [4.5 regression] ICE with explicit destructor call and typedef
  2010-04-05 12:24 [Bug c++/43648] New: [4.5 regression] ICE with explicit destructor call and typedef bangerth at gmail dot com
                   ` (3 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-04-06 16:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jason at gcc dot gnu dot org  2010-04-06 16:12 -------
Subject: Bug 43648

Author: jason
Date: Tue Apr  6 16:12:15 2010
New Revision: 158007

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158007
Log:
        PR c++/43648
        * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.

Added:
    trunk/gcc/testsuite/g++.dg/template/dtor8.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43648


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

* [Bug c++/43648] [4.5/4.6 regression] ICE with explicit destructor call and typedef
  2010-04-05 12:24 [Bug c++/43648] New: [4.5 regression] ICE with explicit destructor call and typedef bangerth at gmail dot com
                   ` (4 preceding siblings ...)
  2010-04-06 16:13 ` jason at gcc dot gnu dot org
@ 2010-04-07 15:03 ` jason at gcc dot gnu dot org
  2010-04-07 16:17 ` bangerth at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-04-07 15:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jason at gcc dot gnu dot org  2010-04-07 15:03 -------
Subject: Bug 43648

Author: jason
Date: Wed Apr  7 15:02:55 2010
New Revision: 158065

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158065
Log:
        PR c++/43648
        * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/g++.dg/template/dtor8.C
Modified:
    branches/gcc-4_5-branch/gcc/cp/ChangeLog
    branches/gcc-4_5-branch/gcc/cp/parser.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43648


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

* [Bug c++/43648] [4.5/4.6 regression] ICE with explicit destructor call and typedef
  2010-04-05 12:24 [Bug c++/43648] New: [4.5 regression] ICE with explicit destructor call and typedef bangerth at gmail dot com
                   ` (5 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: bangerth at gmail dot com @ 2010-04-07 16:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from bangerth at gmail dot com  2010-04-07 16:17 -------
Jason, thanks a lot for the quick turnaround, and my apologies for not
testing this stuff on a more frequent basis so I find earlier than the day 
before branch day :-)

W.


-- 

bangerth at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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).