view gcc/testsuite/gcc.dg/torture/pr46216.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-require-effective-target label_values } */

typedef int Embryo_Cell;
int
embryo_program_run(Embryo_Cell *cip)
{
    unsigned char op;
    Embryo_Cell offs;
    static const void *switchtable[256] = {
	&&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_LOAD_PRI
    };
    for (;;)
      {
	op = *cip++;
	while (1) {
	    goto *switchtable[op];
SWITCHTABLE_EMBRYO_OP_LOAD_PRI:
	    offs = *(Embryo_Cell *)cip++;
SWITCHTABLE_EMBRYO_OP_NONE:
	    break;
	};
      }
    return offs;
}