1 // RUN: %clang_cc1 -fsyntax-only -verify %s
4 return __builtin_return_address(0);
8 return __builtin_return_address(x
); // expected-error{{argument to '__builtin_return_address' must be a constant integer}}
12 // expected-error@+1 {{argument value 4294967295 is outside the valid range [0, 65535]}}
13 return __builtin_return_address(-1);
17 // expected-error@+1 {{argument value 1048575 is outside the valid range [0, 65535]}}
18 return __builtin_return_address(0xFFFFF);
22 return __builtin_frame_address(0);
26 // expected-error@+1 {{argument to '__builtin_frame_address' must be a constant integer}}
27 return __builtin_frame_address(x
);
31 // expected-error@+1 {{argument value 4294967295 is outside the valid range [0, 65535]}}
32 return __builtin_frame_address(-1);
36 // expected-error@+1 {{argument value 1048575 is outside the valid range [0, 65535]}}
37 return __builtin_frame_address(0xFFFFF);