blob: c50d1d5664c9b0f9a3ce891655a6406912f060fc [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc < %s -emit-llvm
Chris Lattner1e0a3902008-01-16 19:17:22 +00002
Chris Lattnerc8edf6b2008-02-06 21:20:34 +00003void test1(int x) {
Chris Lattner1e0a3902008-01-16 19:17:22 +00004switch (x) {
5case 111111111111111111111111111111111111111:
6bar();
7}
8}
9
Chris Lattnerc8edf6b2008-02-06 21:20:34 +000010// Mismatched type between return and function result.
11int test2() { return; }
12void test3() { return 4; }
13
Chris Lattnerf3b18622009-10-13 06:52:43 +000014
15void test4() {
16bar:
17baz:
18blong:
19bing:
20 ;
21static long x = &&bar; // - &&baz;
22static long y = &&baz;
23 &&bing;
24 &&blong;
25 if (y)
26 goto *y;
27
28 goto *x;
29}
30
31// PR3869
32int test5(long long b) { goto *b; }
33