From: Mark Mitchell Date: Sat, 10 Mar 2007 19:35:03 +0000 (+0000) Subject: re PR target/20924 (inline float divide does not set correct fpu status flags) X-Git-Tag: releases/gcc-4.3.0~6315 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=222725d08ca78dd64283f9df2ac43d4fc661b2c5;p=thirdparty%2Fgcc.git re PR target/20924 (inline float divide does not set correct fpu status flags) PR c++/20924 * tree.c (walk_type_fields): Recurse into the element type of ARRAY_TYPEs if there is a pointer set. PR c++/20924 * g++.dg/template/array18.C: New test. From-SVN: r122801 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 82f2a5a3b8ff..3b1184b9d0e0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-03-10 Mark Mitchell + + PR c++/20924 + * tree.c (walk_type_fields): Recurse into the element type of + ARRAY_TYPEs if there is a pointer set. + 2007-03-10 Dirk Mueller * c-common.c (warn_logical_operator): Fix condition. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2c85175a8564..cd7f311e3f63 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-03-10 Mark Mitchell + + PR c++/20924 + * g++.dg/template/array18.C: New test. + 2007-03-10 Dirk Mueller PR c++/17946 diff --git a/gcc/testsuite/g++.dg/template/array18.C b/gcc/testsuite/g++.dg/template/array18.C new file mode 100644 index 000000000000..8987bce305f8 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/array18.C @@ -0,0 +1,13 @@ +// PR c++/20924 + +template +struct x {}; + +template +struct x {}; + +int main() { + x a; + x b; + return 0; +} diff --git a/gcc/tree.c b/gcc/tree.c index 512240c4fdbf..53cec8f86474 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -7942,10 +7942,12 @@ walk_type_fields (tree type, walk_tree_fn func, void *data, break; case ARRAY_TYPE: - /* Don't follow this nodes's type if a pointer for fear that we'll - have infinite recursion. Those types are uninteresting anyway. */ - if (!POINTER_TYPE_P (TREE_TYPE (type)) - && TREE_CODE (TREE_TYPE (type)) != OFFSET_TYPE) + /* Don't follow this nodes's type if a pointer for fear that + we'll have infinite recursion. If we have a PSET, then we + need not fear. */ + if (pset + || (!POINTER_TYPE_P (TREE_TYPE (type)) + && TREE_CODE (TREE_TYPE (type)) != OFFSET_TYPE)) WALK_SUBTREE (TREE_TYPE (type)); WALK_SUBTREE (TYPE_DOMAIN (type)); break;