Mercurial > hg > CbC > CbC_llvm
annotate clang/test/CodeGen/PR2001-bitfield-reload.c @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children | c4bab56944e8 |
rev | line source |
---|---|
150 | 1 // RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm -o - %s | FileCheck %s |
2 // PR2001 | |
3 | |
4 /* Test that the result of the assignment properly uses the value *in | |
5 the bitfield* as opposed to the RHS. */ | |
6 static int foo(int i) { | |
7 struct { | |
8 int f0 : 2; | |
9 } x; | |
10 return (x.f0 = i); | |
11 } | |
12 | |
13 int bar() { | |
14 // CHECK: ret i32 1 | |
15 return foo(-5) == -1; | |
16 } |