1/* 2 * Copyright (c) 2010 Apple Inc. All rights reserved. 3 * 4 * @APPLE_LLVM_LICENSE_HEADER@ 5 */ 6 7/* 8 * goto.c 9 * testObjects 10 * 11 * Created by Blaine Garst on 10/17/08. 12 * Copyright 2008 __MyCompanyName__. All rights reserved. 13 * 14 */ 15 16// TEST_CONFIG 17// rdar://6289031 18 19#include <stdio.h> 20#include "test.h" 21 22int main() 23{ 24 __block int val = 0; 25 26 ^{ val = 1; }(); 27 28 if (val == 0) { 29 goto out_bad; // error: local byref variable val is in the scope of this goto 30 } 31 32 succeed(__FILE__); 33 34 out_bad: 35 fail("val not updated!"); 36} 37