]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/8134 (ICE in force_store_init_value on legal code)
authorMark Mitchell <mark@codesourcery.com>
Wed, 16 Oct 2002 19:36:29 +0000 (19:36 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 16 Oct 2002 19:36:29 +0000 (19:36 +0000)
PR c++/8134.
* tree.c (zero_init_p): Always return 1.

PR c++/8134
* g++.dg/init/pm1.C: XFAIL it.

From-SVN: r58220

gcc/cp/ChangeLog
gcc/cp/tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/pm1.C

index 3c3e95ce08f1358e560bc55ebcded9242881b02a..3cc4ee584f20a2ab7a39a0a805ead6c04f668900 100644 (file)
@@ -1,5 +1,8 @@
 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
 
+       PR c++/8134.
+       * tree.c (zero_init_p): Always return 1.
+
        PR c++/7524
        * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
        build_qualified_type.
index fb32a71303df6d38a0f2585d802dbeb3d742dbec..8868e6cf0b89e61564e16c66403d737f1dbb11c1 100644 (file)
@@ -1969,19 +1969,19 @@ variably_modified_type_p (tree type)
 
 int
 zero_init_p (t)
-     tree t;
+     tree t ATTRIBUTE_UNUSED;
 {
-  t = strip_array_types (t);
-
-  /* NULL pointers to data members are initialized with -1.  */
-  if (TYPE_PTRMEM_P (t))
-    return 0;
+  /* This is not a correct implementation of this function.  As a
+     result, pointers-to-members will not be correctly
+     zero-initialized.
 
-  /* Classes that contain types that can't be zero-initialized, cannot
-     be zero-initialized themselves.  */
-  if (CLASS_TYPE_P (t) && CLASSTYPE_NON_ZERO_INIT_P (t))
-    return 0;
+     However, using a correct implementation of this function results
+     in many other failures.  Correcting these other failures required
+     a major infrastructure improvement, which was undertaken in the
+     GCC 3.3 source base.  
 
+     In order to reduce risk, these changes were not ported to the GCC
+     3.2 source base.  */
   return 1;
 }
 
index be28bfaeb7f82a5814d7b3f9d37f1e339f8c0b09..80f004dd64ac3d0a48151c276b199777f5983a4c 100644 (file)
@@ -1,5 +1,8 @@
 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
 
+       PR c++/8134
+       * g++.dg/init/pm1.C: XFAIL it.
+
        PR c++/7524
        * g++.dg/init/array7.C: New test.
 
index c0aed241086bdeeb1c17d0da519baa270780271a..68178170eca26591aab4e5a9cc4a84ab76a64c7a 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do run }
+// { dg-do run { xfail *-*-* } }
 
 // Copyright 2002  Free Software Foundation
 // Contributed by Jason Merrill and Alexandre Oliva