Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / unreachable.c
blob66a5dbbe2a9af6adcef61507463f4ee5112ccc5e
1 // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
2 // CHECK-NOT: @unreachable
4 extern void abort(void) __attribute__((noreturn));
5 extern int unreachable(void);
7 int f0(void) {
8 return 0;
9 unreachable();
12 int f1(int i) {
13 goto L0;
14 int a = unreachable();
15 L0:
16 return 0;
19 int f2(int i) {
20 goto L0;
21 unreachable();
22 int a;
23 unreachable();
24 L0:
25 a = i + 1;
26 return a;
29 int f3(int i) {
30 if (i) {
31 return 0;
32 } else {
33 abort();
35 unreachable();
36 return 3;