| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| return __builtin_return_address(0); |
| return __builtin_return_address(x); // expected-error{{argument to '__builtin_return_address' must be a constant integer}} |
| // expected-error@+1 {{argument value 4294967295 is outside the valid range [0, 65535]}} |
| return __builtin_return_address(-1); |
| // expected-error@+1 {{argument value 1048575 is outside the valid range [0, 65535]}} |
| return __builtin_return_address(0xFFFFF); |
| return __builtin_frame_address(0); |
| // expected-error@+1 {{argument to '__builtin_frame_address' must be a constant integer}} |
| return __builtin_frame_address(x); |
| // expected-error@+1 {{argument value 4294967295 is outside the valid range [0, 65535]}} |
| return __builtin_frame_address(-1); |
| // expected-error@+1 {{argument value 1048575 is outside the valid range [0, 65535]}} |
| return __builtin_frame_address(0xFFFFF); |