Skip to content
Snippets Groups Projects
Commit bae0ed25 authored by xleroy's avatar xleroy
Browse files

Test bit field of size 32

git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1313 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
parent d966e01e
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ CCOMPFLAGS=-stdlib ../../runtime -dparse -dclight -dasm \
LIBS=$(LIBMATH)
# Can run and have reference output in Results
TESTS=bitfields1 bitfields2 expr1 initializers volatile2 funct3 expr5
TESTS=bitfields1 bitfields2 bitfields3 expr1 initializers volatile2 funct3 expr5
# Other tests: should compile to .s without errors (but expect warnings)
EXTRAS=commaprec expr2 expr3 expr4 extern1 funct2 funptr1 init1 \
......
x = {a = 12345678}
x = {a = deadbeef}
#include <stdio.h>
struct s {
unsigned int a: 32;
};
struct s x = { 0x12345678 };
int main()
{
printf("x = {a = %x}\n", x.a);
x.a = 0xDEADBEEF;
printf("x = {a = %x}\n", x.a);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment