1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify %s a(unsigned x)2*f4a2713aSLionel Sambucvoid* a(unsigned x) { 3*f4a2713aSLionel Sambuc return __builtin_return_address(0); 4*f4a2713aSLionel Sambuc } 5*f4a2713aSLionel Sambuc b(unsigned x)6*f4a2713aSLionel Sambucvoid b(unsigned x) { 7*f4a2713aSLionel Sambuc return __builtin_return_address(x); // expected-error{{argument to '__builtin_return_address' must be a constant integer}} 8*f4a2713aSLionel Sambuc } 9*f4a2713aSLionel Sambuc c(unsigned x)10*f4a2713aSLionel Sambucvoid* c(unsigned x) { 11*f4a2713aSLionel Sambuc return __builtin_frame_address(0); 12*f4a2713aSLionel Sambuc } 13*f4a2713aSLionel Sambuc d(unsigned x)14*f4a2713aSLionel Sambucvoid d(unsigned x) { 15*f4a2713aSLionel Sambuc return __builtin_frame_address(x); // expected-error{{argument to '__builtin_frame_address' must be a constant integer}} 16*f4a2713aSLionel Sambuc } 17