2012-02-03 09:49:51 +08:00
|
|
|
// RUN: %clang_cc1 -Wno-error=return-type %s -emit-llvm-only
|
2012-09-12 18:45:40 +08:00
|
|
|
// REQUIRES: LP64
|
2008-01-17 03:17:22 +08:00
|
|
|
|
2008-02-07 05:20:34 +08:00
|
|
|
void test1(int x) {
|
2008-01-17 03:17:22 +08:00
|
|
|
switch (x) {
|
|
|
|
case 111111111111111111111111111111111111111:
|
|
|
|
bar();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-02-07 05:20:34 +08:00
|
|
|
// Mismatched type between return and function result.
|
|
|
|
int test2() { return; }
|
|
|
|
void test3() { return 4; }
|
|
|
|
|
2009-10-13 14:52:43 +08:00
|
|
|
|
|
|
|
void test4() {
|
|
|
|
bar:
|
|
|
|
baz:
|
|
|
|
blong:
|
|
|
|
bing:
|
|
|
|
;
|
2009-10-13 15:14:16 +08:00
|
|
|
|
|
|
|
// PR5131
|
|
|
|
static long x = &&bar - &&baz;
|
2009-10-13 14:52:43 +08:00
|
|
|
static long y = &&baz;
|
|
|
|
&&bing;
|
|
|
|
&&blong;
|
|
|
|
if (y)
|
|
|
|
goto *y;
|
|
|
|
|
|
|
|
goto *x;
|
|
|
|
}
|
|
|
|
|
|
|
|
// PR3869
|
2010-08-01 08:26:45 +08:00
|
|
|
int test5(long long b) {
|
|
|
|
static void *lbls[] = { &&lbl };
|
|
|
|
goto *b;
|
|
|
|
lbl:
|
|
|
|
return 0;
|
|
|
|
}
|
2009-10-13 14:52:43 +08:00
|
|
|
|