Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gcc.dg/pr33667.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 (2017-10-27) |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/gcc.dg/pr33667.c Fri Oct 27 22:46:09 2017 +0900 @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +__extension__ typedef __SIZE_TYPE__ size_t; +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; +typedef unsigned long long int uint64_t; +struct magic { + uint8_t mask_op; + union { + uint64_t _mask; + } _u; + union VALUETYPE { + uint16_t h; + } value; +}; +void cvt_16(union VALUETYPE *p, const struct magic *m) +{ + if (m->_u._mask) + p->h %= (uint16_t) m->_u._mask; +}