diff options
author | Mark Mitchell <mark@codesourcery.com> | 2002-11-02 01:03:03 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2002-11-02 01:03:03 +0000 |
commit | bec80a45fd419b66bb7fc6d658e24019b1395575 (patch) | |
tree | 78f9248491b1a67f82cf93b6069e4237f4bcdc6d /gcc/toplev.c | |
parent | a70b59e1dbb2e78812f73edbd960f3fc1f9620d6 (diff) | |
download | gcc-bec80a45fd419b66bb7fc6d658e24019b1395575.zip gcc-bec80a45fd419b66bb7fc6d658e24019b1395575.tar.gz gcc-bec80a45fd419b66bb7fc6d658e24019b1395575.tar.bz2 |
re PR c++/8391 (infinite loop in cp/decl2.c(finish_file))
PR c++/8391
* toplev.c (rest_of_compilation): Do not refuse to output code for
an inline function in a local class.
PR c++/8391
* g++.dg/opt/local1.C: New test.
From-SVN: r58734
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 2f3d1274..9e57576 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2429,6 +2429,9 @@ rest_of_compilation (decl) DECL_INITIAL (decl) = 0; goto exit_rest_of_compilation; } + else if (TYPE_P (parent)) + /* A function in a local class should be treated normally. */ + break; /* If requested, consider whether to make this function inline. */ if ((DECL_INLINE (decl) && !flag_no_inline) |