This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix partition WRT static variables taking address of labels
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, jason at redhat dot com
- Date: Mon, 30 Mar 2015 11:07:14 +0200
- Subject: Re: Fix partition WRT static variables taking address of labels
- Authentication-results: sourceware.org; auth=none
- References: <20150330073201 dot GA42058 at kam dot mff dot cuni dot cz>
Hi,
unforutnately the patch ICE on:
int i;
struct C
{
C();
};
C::C()
{
static void *labelref = &&label;
goto *labelref;
label: i = 1;
}
int main()
{
C c;
return (i != 1);
}
The problem is that decl_function_context of labelref is not C::C
itself but an abstract function that is abstract origin of C::C.
Jaosn, I suppose this is an artefact of constructor clonning?
Function like this can not be clonned without duplicating label,
is the decl_function_context really intended to be the abstract one?
Honza