diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2005-08-31 13:46:06 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2005-08-31 06:46:06 -0700 |
commit | 793244425118c9eda89e63ef666e2bd67a1692d7 (patch) | |
tree | a2b11b5bf0e81f044ac467f6c07aa374c52d7b3d /gcc/cp/decl2.c | |
parent | ee5426a488f8b28099c6f462aef34b157182d2ac (diff) | |
download | gcc-793244425118c9eda89e63ef666e2bd67a1692d7.zip gcc-793244425118c9eda89e63ef666e2bd67a1692d7.tar.gz gcc-793244425118c9eda89e63ef666e2bd67a1692d7.tar.bz2 |
re PR objc++/23640 (obj-c++ does not call __objc_exec_class for the classes)
2005-08-31 Andrew Pinski <pinskia@physics.uc.edu>
PR obj-c++/23640
* decl2.c (cp_finish_file): If this is obj-c++ and we need a static
init, call generate_ctor_or_dtor_function.
2005-08-31 Andrew Pinski <pinskia@physics.uc.edu>
PR obj-c++/23640
* obj-c++.dg/gnu-runtime-3.mm: New test.
From-SVN: r103673
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index b08bac8..3821ab0 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -3078,8 +3078,9 @@ cp_finish_file (void) /*data=*/&locus); else { - - if (static_ctors) + /* If we have a ctor or this is obj-c++ and we need a static init, + call generate_ctor_or_dtor_function. */ + if (static_ctors || (c_dialect_objc () && objc_static_init_needed_p ())) generate_ctor_or_dtor_function (/*constructor_p=*/true, DEFAULT_INIT_PRIORITY, &locus); if (static_dtors) |