diff options
author | obrien <obrien@FreeBSD.org> | 2002-12-04 15:42:16 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-12-04 15:42:16 +0000 |
commit | 7a1080fa5c329ea8a9505e51ce151719955bcfa2 (patch) | |
tree | 78b77287e56e2a87be73638176124be85a8fc6c7 /contrib/gcc/c-objc-common.c | |
parent | ef3bb1318428b8cfb1c8287f61b9b1f23f9bf0b5 (diff) | |
download | FreeBSD-src-7a1080fa5c329ea8a9505e51ce151719955bcfa2.zip FreeBSD-src-7a1080fa5c329ea8a9505e51ce151719955bcfa2.tar.gz |
Gcc 3.2.1 release virgin vendor import. (19-Nov-2002)
Diffstat (limited to 'contrib/gcc/c-objc-common.c')
-rw-r--r-- | contrib/gcc/c-objc-common.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/gcc/c-objc-common.c b/contrib/gcc/c-objc-common.c index 43ec820..d2bc5c1 100644 --- a/contrib/gcc/c-objc-common.c +++ b/contrib/gcc/c-objc-common.c @@ -131,6 +131,22 @@ inline_forbidden_p (nodep, walk_subtrees, fn) break; + case RECORD_TYPE: + case UNION_TYPE: + /* We cannot inline a function of the form + + void F (int i) { struct S { int ar[i]; } s; } + + Attempting to do so produces a catch-22 in tree-inline.c. + If walk_tree examines the TYPE_FIELDS chain of RECORD_TYPE/ + UNION_TYPE nodes, then it goes into infinite recursion on a + structure containing a pointer to its own type. If it doesn't, + then the type node for S doesn't get adjusted properly when + F is inlined, and we abort in find_function_data. */ + for (t = TYPE_FIELDS (node); t; t = TREE_CHAIN (t)) + if (variably_modified_type_p (TREE_TYPE (t))) + return node; + default: break; } |