Commit bec80a45 by Mark Mitchell Committed by Mark Mitchell

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
parent a70b59e1
2002-11-01 Mark Mitchell <mark@codesourcery.com>
PR c++/8391
* toplev.c (rest_of_compilation): Do not refuse to output code for
an inline function in a local class.
2002-11-01 David O'Brien <obrien@FreeBSD.org>
* config/sparc/freebsd.h (CPP_CPU64_DEFAULT_SPEC): Define __arch64__.
......
2002-11-01 Mark Mitchell <mark@codesourcery.com>
PR c++/8391
* g++.dg/opt/local1.C: New test.
2002-10-30 Mark Mitchell <mark@codesourcery.com>
PR c++/8160
......
// { dg-options "-O" }
struct Outer {
struct Inner { virtual bool f() = 0; };
void g(Inner &) const;
};
inline void h(const Outer &o)
{
struct Local : public Outer::Inner {
virtual bool f() {};
};
Local l;
o.g(l);
}
void f(Outer &req) {
h (req);
}
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment