brintos

brintos / llvm-project-archived public Read only

0
0
Text · 356 B · 9795a1b Raw
17 lines · c
1// RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm -o - %s | FileCheck %s2// PR20013 4/* Test that the result of the assignment properly uses the value *in5   the bitfield* as opposed to the RHS. */6static int foo(int i) {7  struct {8    int f0 : 2;9  } x;10  return (x.f0 = i);11}12 13int bar(void) {14  // CHECK: ret i32 115  return foo(-5) == -1;16}17