From 7bf0c0fb11af04d50cf7c374a44aa6101cca9c9d Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Mon, 5 Jul 2021 22:26:52 -0700 Subject: qbe: Fix bitfield sign extension with types shorter than int --- test/bitfield-short.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/bitfield-short.c (limited to 'test/bitfield-short.c') diff --git a/test/bitfield-short.c b/test/bitfield-short.c new file mode 100644 index 0000000..b0be6fd --- /dev/null +++ b/test/bitfield-short.c @@ -0,0 +1,7 @@ +struct { + short x : 7; +} s = {.x = -64}; + +int main(void) { + return s.x > 0; +} -- cgit v1.2.3