Clang Project

clang_source_code/test/CodeGen/statements.c
1// RUN: %clang_cc1 -Wno-error=return-type %s -emit-llvm-only
2// REQUIRES: LP64
3
4// Mismatched type between return and function result.
5int test2() { return; }
6void test3() { return 4; }
7
8
9void test4() {
10bar:
11baz:
12blong:
13bing:
14 ;
15
16// PR5131
17static long x = &&bar - &&baz;
18static long y = &&baz;
19  &&bing;
20  &&blong;
21  if (y)
22    goto *y;
23
24  goto *x;
25}
26
27// PR3869
28int test5(long long b) {
29  static void *lbls[] = { &&lbl };
30  goto *b;
31 lbl:
32  return 0;
33}
34
35