Eli Friedman | 8c50c62 | 2008-05-20 08:23:37 +0000 | [diff] [blame^] | 1 | // RUN: clang -fsyntax-only -verify %s |
| 2 | void* a(unsigned x) { |
| 3 | return __builtin_return_address(0); |
| 4 | } |
| 5 | |
| 6 | void b(unsigned x) { |
| 7 | return __builtin_return_address(x); // expected-error{{the level argument for a stack address builtin must be constant}} |
| 8 | } |
| 9 | |
| 10 | void* a(unsigned x) { |
| 11 | return __builtin_frame_address(0); |
| 12 | } |
| 13 | |
| 14 | void b(unsigned x) { |
| 15 | return __builtin_frame_address(x); // expected-error{{the level argument for a stack address builtin must be constant}} |
| 16 | } |