return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}}
@@ -33,3+35,8 @@ void* compound_literal(int x, int y) {
return p; // expected-warning{{Address of stack memory}}
}
+void* alloca_test() {
+ void* p = alloca(10);
+ return p; // expected-warning{{Address of stack memory}}