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
This commit is contained in:
parent
af3b1b47fb
commit
e66522b3bd
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
/* This is not a correct implementation of this function. As a
|
||||
result, pointers-to-members will not be correctly
|
||||
zero-initialized.
|
||||
|
||||
/* NULL pointers to data members are initialized with -1. */
|
||||
if (TYPE_PTRMEM_P (t))
|
||||
return 0;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// { dg-do run }
|
||||
// { dg-do run { xfail *-*-* } }
|
||||
|
||||
// Copyright 2002 Free Software Foundation
|
||||
// Contributed by Jason Merrill and Alexandre Oliva
|
||||
|
|
Loading…
Reference in New Issue