#include <stdio.h>

typedef struct _opcode {
	int x;
	int y;
	void * next;
}opcode;

opcode op1 = { 1, 1, NULL};
opcode op2 = { 1, 1, NULL};

int cgoto_jump(opcode * op)
{
	op1.next = &&here;
	op1.x = 1;
	goto there;
here:
	printf("It works !\n");
there:
	if(op->x)
	{
		op->x = 0;
		printf("goto ** (void**)(%p)\n", op->next);
		goto **(void**)(op->next);
	}
	return 0;
}

int main()
{
	cgoto_jump(&op1);
	cgoto_jump(&op2);
	return 0;
}
