Benjamin Kramer | 0b495cd | 2010-06-25 12:48:07 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -o - -triple x86_64-apple-darwin10 -fblocks %s |
| 2 | // RUN: %clang_cc1 -emit-llvm -o - -triple i386-apple-darwin10 -fblocks %s |
Anders Carlsson | 18be84c | 2009-09-12 02:44:18 +0000 | [diff] [blame] | 3 | typedef int __attribute__((aligned(32))) ai; |
| 4 | |
| 5 | void f() { |
| 6 | __block ai a = 10; |
| 7 | |
| 8 | ^{ |
| 9 | a = 20; |
| 10 | }(); |
| 11 | } |
| 12 | |
Anders Carlsson | e0c8822 | 2009-09-13 17:55:13 +0000 | [diff] [blame] | 13 | void g() { |
| 14 | __block double a = 10; |
| 15 | |
| 16 | ^{ |
| 17 | a = 20; |
| 18 | }(); |
| 19 | } |