Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/torture/pr38405.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 run } */ extern void abort (); extern int printf (char *__format, ...); struct vpiBinaryConst { int signed_flag :1; int sized_flag :1; }; int binary_get(int code, struct vpiBinaryConst *rfp) { switch (code) { case 1: return rfp->signed_flag ? 1 : 0; default: printf("error: %d not supported\n", code); return code; } } int main(void) { struct vpiBinaryConst x={1,0}; int y=binary_get(1, &x); if (y!=1) abort (); return 0; }