1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-06 15:06:07 +00:00
cc65/test/val/cc65091020.c

27 lines
403 B
C
Raw Normal View History

2014-09-24 14:45:10 +00:00
/*
!!DESCRIPTION!! bit field bug
!!ORIGIN!! testsuite
!!LICENCE!! Public Domain
!!AUTHOR!! Johan Kotlinski
*/
2014-11-23 11:50:47 +00:00
#include <stdio.h>
2014-09-24 14:45:10 +00:00
#include <assert.h>
struct {
int foo : 7;
int bar : 4;
} baz = { 0, 2 };
int main() {
char bar = baz.bar;
assert(2 == bar);
printf("it works :)\n");
/* if not assert() */
return 0;
}
/* Assert fails. (SVN rev 4381) */