You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
399 B

// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -emit-llvm -O1 -mdisable-tail-calls -o - < %s | FileCheck %s
typedef struct List {
struct List *next;
int data;
} List;
// CHECK-LABEL: define %struct.List* @find
List *find(List *head, int data) {
if (!head)
return 0;
if (head->data == data)
return head;
// CHECK: call %struct.List* @find
return find(head->next, data);
}