This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]