builtin-stackaddress.c revision 6cfda23b3768f93a6eb0b2a9135c8334a20125bb
1// RUN: clang -fsyntax-only -verify %s 2void* a(unsigned x) { 3return __builtin_return_address(0); 4} 5 6void b(unsigned x) { 7return __builtin_return_address(x); // expected-error{{the level argument for a stack address builtin must be constant}} 8} 9 10void* a(unsigned x) { 11return __builtin_frame_address(0); 12} 13 14void b(unsigned x) { 15return __builtin_frame_address(x); // expected-error{{the level argument for a stack address builtin must be constant}} 16} 17