]> gcc.gnu.org Git - gcc.git/commitdiff
re PR target/20924 (inline float divide does not set correct fpu status flags)
authorMark Mitchell <mark@codesourcery.com>
Sat, 10 Mar 2007 19:35:03 +0000 (19:35 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sat, 10 Mar 2007 19:35:03 +0000 (19:35 +0000)
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

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/array18.C [new file with mode: 0644]
gcc/tree.c

index 82f2a5a3b8ff11f9a2938b345527635a8c104fa0..3b1184b9d0e058d1cd2ae780bf95fbc1830d0ebc 100644 (file)
@@ -1,3 +1,9 @@
+2007-03-10  Mark Mitchell  <mark@codesourcery.com>
+
+       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  <dmueller@suse.de>
 
        * c-common.c (warn_logical_operator): Fix condition.
index 2c85175a856489ea9b65e2c0c5945fa156f01039..cd7f311e3f6308f8fb7f6203026a42c6028330f8 100644 (file)
@@ -1,3 +1,8 @@
+2007-03-10  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/20924
+       * g++.dg/template/array18.C: New test.
+
 2007-03-10  Dirk Mueller  <dmueller@suse.de>
 
        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 (file)
index 0000000..8987bce
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/20924
+
+template<typename T>
+struct x {};
+
+template<typename T, unsigned N>
+struct x<T*[N]> {};
+
+int main() {
+  x<int> a;
+  x<int*[10]> b;
+  return 0;
+}
index 512240c4fdbf67d0bf09c7caa0ea5f7a39523aff..53cec8f864741a71e0e2840a2c75011a9c44b5d6 100644 (file)
@@ -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;
This page took 0.139072 seconds and 5 git commands to generate.