blob: 80ccc4a0ea3a5ae50ccfe1a16e0db977bec5a904 [file] [log] [blame]
Devang Patel36375ee2009-02-17 21:23:59 +00001// Check bitfields.
Dan Gohman8a3f6442009-12-05 00:02:37 +00002// RUN: %llvmgcc -S -O0 -g %s -o - | \
Dan Gohmanfea1dd02009-08-25 15:38:29 +00003// RUN: llc --disable-fp-elim -o 2009-02-17-BitField-dbg.s
Devang Patel36375ee2009-02-17 21:23:59 +00004// RUN: %compile_c 2009-02-17-BitField-dbg.s -o 2009-02-17-BitField-dbg.o
5// RUN: echo {ptype mystruct} > %t2
6// RUN: gdb -q -batch -n -x %t2 2009-02-17-BitField-dbg.o | \
7// RUN: tee 2009-02-17-BitField-dbg.out | grep "int a : 4"
Bill Wendlingb25846e2009-11-30 22:23:29 +00008//
Devang Patel36375ee2009-02-17 21:23:59 +00009
10struct {
11 int a:4;
12 int b:2;
13} mystruct;
14