This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] Avoid one place of frontend calling into targetm
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: jh at suse dot cz, gcc-patches at gcc dot gnu dot org
- Cc: dave at hiauly1 dot hia dot nrc dot ca
- Date: Thu, 31 May 2007 11:21:28 -0700 (PDT)
- Subject: Re: [C++] Avoid one place of frontend calling into targetm
Jan,
I am getting a bunch (hundreds) of C++ test failures on HPPA HP-UX since
this checkin:
+2007-05-11 Jan Hubicka <jh@suse.cz>
+
+ * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
+ * decl2.c (start_objects): ctors and dtors are no longer public.
+ (cp_write_global_declarations): Do not call c_build_cdtor_fns.
Using a slightly cutdown version of g++.dg/init/ref4.C as a test case:
int c;
struct Base {
Base() {}
Base(const Base &) { ++c; }
Base & operator = (const Base &);
};
const Base &b = Base();
int main()
{
return c; // No copies should be required.
}
I used to get:
.EXPORT _GLOBAL__I_c,ENTRY,PRIV_LEV=3
i.e. _GLOBAL__I_c was global.
Now I get:
.PARAM _GLOBAL__I_c,PRIV_LEV=3
i.e. _GLOBAL__I_c is local/static.
The problem is that the extra object file that g++ creates for collect2
to handle global constructors/destructors when linking references
_GLOBAL__I_c and now it can't find it. Do you know how we can fix this?
Steve Ellcey
sje@cup.hp.com