blob: b06610022659d93349c5526b301be4af0344561d [file] [log] [blame]
Duncan P. N. Exon Smith85e349f2014-04-18 01:05:25 +00001// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -emit-llvm -O1 -mdisable-tail-calls -o - < %s | FileCheck %s
2
3typedef struct List {
4 struct List *next;
5 int data;
6} List;
7
8// CHECK-LABEL: define %struct.List* @find
9List *find(List *head, int data) {
10 if (!head)
11 return 0;
12 if (head->data == data)
13 return head;
14 // CHECK: call %struct.List* @find
15 return find(head->next, data);
16}