[multiple changes]
2003-06-10 Andrew Pinski <pinskia@physics.uc.edu> * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY. (start_cleanup_cnt): New. 2003-06-10 Geoffrey Keating <geoffk@apple.com> * g++.dg/pch/static-1.C: New file. * g++.dg/pch/static-1.Hs: New file. From-SVN: r67719
This commit is contained in:
parent
4db8f48aca
commit
d192828ab6
|
@ -1,3 +1,8 @@
|
|||
2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
* decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
|
||||
(start_cleanup_cnt): New.
|
||||
|
||||
2003-06-10 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/11131
|
||||
|
|
|
@ -8347,10 +8347,11 @@ get_dso_handle_node (void)
|
|||
/* Begin a new function with internal linkage whose job will be simply
|
||||
to destroy some particular variable. */
|
||||
|
||||
static GTY(()) int start_cleanup_cnt;
|
||||
|
||||
static tree
|
||||
start_cleanup_fn (void)
|
||||
{
|
||||
static int counter = 0;
|
||||
int old_interface_only = interface_only;
|
||||
int old_interface_unknown = interface_unknown;
|
||||
char name[32];
|
||||
|
@ -8377,7 +8378,7 @@ start_cleanup_fn (void)
|
|||
/* Build the function type itself. */
|
||||
fntype = build_function_type (void_type_node, parmtypes);
|
||||
/* Build the name of the function. */
|
||||
sprintf (name, "__tcf_%d", counter++);
|
||||
sprintf (name, "__tcf_%d", start_cleanup_cnt++);
|
||||
/* Build the function declaration. */
|
||||
fndecl = build_lang_decl (FUNCTION_DECL, get_identifier (name), fntype);
|
||||
/* It's a function with internal linkage, generated by the
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2003-06-10 Geoffrey Keating <geoffk@apple.com>
|
||||
|
||||
* g++.dg/pch/static-1.C: New file.
|
||||
* g++.dg/pch/static-1.Hs: New file.
|
||||
|
||||
2003-06-10 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* gcc.dg/asm-7.c: Adjust expected warning text.
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#include "static-1.H"
|
||||
int LocalStaticTest()
|
||||
{
|
||||
static A sa;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
A::StaticTest();
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
class A
|
||||
{
|
||||
public:
|
||||
int val;
|
||||
|
||||
~A() {
|
||||
int i = 2;
|
||||
}
|
||||
|
||||
static void StaticTest() {
|
||||
static A a;
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue