This is the mail archive of the
mailing list for the GCC project.
Re: How to get TYPE_LANG_SPECIFIC initialized
- From: Jason Merrill <jason at redhat dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc at gcc dot gnu dot org, rth at cygnus dot com
- Date: Sun, 12 May 2002 17:44:31 +0100
- Subject: Re: How to get TYPE_LANG_SPECIFIC initialized
- References: <20020512163105.GG4060@atrey.karlin.mff.cuni.cz>
>>>>> "Jan" == Jan Hubicka <firstname.lastname@example.org> writes:
> the new final.c code to output profile-arcs sturcture fails on C++. THis is because
> the tree we construct lacks TYPE_LANG_SPECIFIC nodes and C++ frontend fails when
> it is called via memory aliasing hook.
I thought I sent this to you already. Does this patch fix the problem?
> How can I get the field initialized in generic way? I see there is LANG_HOOKS_MAKE_TYPE,
> but I don't see how it is used at all.
Doesn't look like it is, no.
*** cp-lang.c.~1~ Sun May 12 10:24:55 2002
--- cp-lang.c Sun May 12 00:56:29 2002
*************** ok_to_generate_alias_set_for_type (t)
*** 210,215 ****
--- 212,220 ----
if ((TREE_CODE (t) == RECORD_TYPE) || (TREE_CODE (t) == UNION_TYPE))
+ /* Backend-created structs are safe. */
+ if (! CLASS_TYPE_P (t))
+ return true;
/* PODs are safe. */
if (! CLASSTYPE_NON_POD_P(t))