This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix representation of gcov_info_type
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 8 Jul 2014 22:40:30 +0200
- Subject: Re: Fix representation of gcov_info_type
- Authentication-results: sourceware.org; auth=none
- References: <20140628182230 dot GA2531 at kam dot mff dot cuni dot cz> <CAFiYyc0E6O=86FwEUVzgrOewOUXQ3DYnm64wd_Br7Y6+xcHEGA at mail dot gmail dot com> <20140708002540 dot GE12716 at kam dot mff dot cuni dot cz> <CAFiYyc3d6EptDN9bG1QoZ8D3yPecRr6frXNtKScHmxvzA0QyUA at mail dot gmail dot com> <20140708140304 dot GD27691 at kam dot mff dot cuni dot cz> <b54ac08b-9b8b-4ae1-a8da-872cc860c65a at email dot android dot com>
> You probably can't. But check what the C frontend ends up producing with
>
> Struct x { const struct x *p; };
>
> Doesn't it use an incomplete copy during the definition of x?
I was poking around this last week with the type identification. C frontend seems
always make the type complete by copying the fields in c-decl.c:finish_struct.
I tried to add check that types are complete when main variant is and learnt that
C++ FE seems in some cases leave the type incomplete even if main variant is complete
but not in such a simple cases. I will look into it a bit more after arrival - but
that is my recollection. The finish_builtin_struct was only case where we set
DECL_SIZE but not DECL_FIELDS
Honza
>
> Richard.
>
> >Thanks,
> >Honza
>