Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/pr42611.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
line wrap: on
line source
/* PR other/42611 */ /* { dg-do compile } */ /* { dg-options "" } */ #define L \ (sizeof (__SIZE_TYPE__) == 1 ? __SCHAR_MAX__ \ : sizeof (__SIZE_TYPE__) == sizeof (short) ? __SHRT_MAX__ \ : sizeof (__SIZE_TYPE__) == sizeof (int) ? __INT_MAX__ \ : sizeof (__SIZE_TYPE__) == sizeof (long) ? __LONG_MAX__ \ : sizeof (__SIZE_TYPE__) == sizeof (long long) ? __LONG_LONG_MAX__ \ : __INTMAX_MAX__) struct S { int a; char b[L]; }; /* { dg-error "type .struct S. is too large" } */ void foo (void) { struct S s; asm volatile ("" : : "r" (&s)); }