diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr14092-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr14092-1.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr14092-1.c b/gcc/testsuite/gcc.dg/pr14092-1.c new file mode 100644 index 000000000..927ecf6aa --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr14092-1.c @@ -0,0 +1,20 @@ +/* PR c/14092 + * Origin: bonzini@gnu.org + * rejects-valid + */ +/* { dg-do compile } */ + +/* Define this so that we are more portable. The testcase in the + PR failed on 64-bit hosts. */ +typedef int __attribute__ ((mode (__pointer__))) intptr_t; + +typedef struct _PLCI { + unsigned char x; + unsigned char buf[1]; +} PLCI; + +void nl_ind(PLCI * plci) +{ + plci->x = -((intptr_t)(plci->buf)) & 3; +} + |