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
This commit is contained in:
parent
89132ebc4c
commit
222725d08c
4 changed files with 30 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
13
gcc/testsuite/g++.dg/template/array18.C
Normal file
13
gcc/testsuite/g++.dg/template/array18.C
Normal file
|
@ -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;
|
||||
}
|
10
gcc/tree.c
10
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue