From: Mark Mitchell Date: Wed, 16 Oct 2002 19:36:29 +0000 (+0000) Subject: re PR c++/8134 (ICE in force_store_init_value on legal code) X-Git-Tag: releases/gcc-3.2.1~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e66522b3bd804f2377d0d0d555eda5b952daf0a8;p=thirdparty%2Fgcc.git re PR c++/8134 (ICE in force_store_init_value on legal code) PR c++/8134. * tree.c (zero_init_p): Always return 1. PR c++/8134 * g++.dg/init/pm1.C: XFAIL it. From-SVN: r58220 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3c3e95ce08f1..3cc4ee584f20 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2002-10-16 Mark Mitchell + 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. diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index fb32a71303df..8868e6cf0b89 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -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; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index be28bfaeb7f8..80f004dd64ac 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2002-10-16 Mark Mitchell + PR c++/8134 + * g++.dg/init/pm1.C: XFAIL it. + PR c++/7524 * g++.dg/init/array7.C: New test. diff --git a/gcc/testsuite/g++.dg/init/pm1.C b/gcc/testsuite/g++.dg/init/pm1.C index c0aed241086b..68178170eca2 100644 --- a/gcc/testsuite/g++.dg/init/pm1.C +++ b/gcc/testsuite/g++.dg/init/pm1.C @@ -1,4 +1,4 @@ -// { dg-do run } +// { dg-do run { xfail *-*-* } } // Copyright 2002 Free Software Foundation // Contributed by Jason Merrill and Alexandre Oliva