]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/20028 (class and then template class gives an ICE)
authorAlexandre Oliva <aoliva@redhat.com>
Mon, 21 Feb 2005 21:11:51 +0000 (21:11 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Mon, 21 Feb 2005 21:11:51 +0000 (21:11 +0000)
gcc/cp/ChangeLog:
PR c++/20028
* class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
template along with TYPE_SIZE.
gcc/testsuite/ChangeLog:
PR c++/20028
* g++.dg/template/crash34.C: New.

From-SVN: r95350

gcc/cp/ChangeLog
gcc/cp/class.c
gcc/testsuite/ChangeLog

index c3a3ec803a93bdaea5cea351d6eee4961a091fe0..d463c0c80f85c91433cdbd688a45f64d30a458e2 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-21  Alexandre Oliva  <aoliva@redhat.com>
+
+       PR c++/20028
+       * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
+       template along with TYPE_SIZE.
+
 2005-02-14  Mark Mitchell  <mark@codesourcery.com>
 
        * decl.c (reshape_init): Use explicit quotes in error message
index e4deb01f0c2819c2859819741919caeb7c8d3bbf..a7093b174c3ec33214442462f64127b4abb718b0 100644 (file)
@@ -1,6 +1,7 @@
 /* Functions related to building classes and their related objects.
    Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004  Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003, 2004, 2005
+     Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com)
 
 This file is part of GCC.
@@ -5217,6 +5218,7 @@ finish_struct (tree t, tree attributes)
     {
       finish_struct_methods (t);
       TYPE_SIZE (t) = bitsize_zero_node;
+      TYPE_SIZE_UNIT (t) = size_zero_node;
     }
   else
     finish_struct_1 (t);
index d473fff1c42a7f3b1534baab995861bb4c2ecce5..fe0f23b6b396fd04d6f182f3b7d87a7fed70b6df 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-21  Alexandre Oliva  <aoliva@redhat.com>
+
+       PR c++/20028
+       * g++.dg/template/crash34.C: New.
+
 2005-02-16  Eric Christopher  <echristo@redhat.com>
 
        PR preprocessor/19077