Daniel Dunbar | 80737ad | 2009-12-15 22:01:24 +0000 | [diff] [blame] | 1 | // RUN: %clang -O3 -emit-llvm -S -o %t %s |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 2 | // RUN: grep 'ret i64 4294967292' %t | count 2 |
| 3 | // RUN: grep 'ret i64 -4' %t | count 1 |
Douglas Gregor | fc24e44 | 2009-05-01 20:41:21 +0000 | [diff] [blame] | 4 | |
| 5 | long long f0(void) { |
| 6 | struct { unsigned f0 : 32; } x = { 18 }; |
| 7 | return (long long) (x.f0 - (int) 22); |
| 8 | } |
| 9 | |
| 10 | long long f1(void) { |
| 11 | struct { unsigned f0 : 31; } x = { 18 }; |
| 12 | return (long long) (x.f0 - (int) 22); |
| 13 | } |
| 14 | |
| 15 | long long f2(void) { |
| 16 | struct { unsigned f0 ; } x = { 18 }; |
| 17 | return (long long) (x.f0 - (int) 22); |
| 18 | } |