Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
      2 
      3 int f();
      4 int h();
      5 
      6 void t1() {
      7   _Atomic(typeof((int (*)[f()]) h())) v;
      8   // CHECK:      [[N:%.*]] = alloca i32*, align 4
      9   // CHECK-NEXT: [[P:%.*]] = call i32 bitcast (i32 (...)* @f to i32 ()*)()
     10   // CHECK-NEXT: [[P:%.*]] = call i32 bitcast (i32 (...)* @h to i32 ()*)()
     11 }
     12 
     13 void t2() {
     14   typeof(typeof((int (*)[f()]) h())) v;
     15   // CHECK:      [[N:%.*]] = alloca i32*, align 4
     16   // CHECK-NEXT: [[P:%.*]] = call i32 bitcast (i32 (...)* @f to i32 ()*)()
     17   // CHECK-NEXT: [[P:%.*]] = call i32 bitcast (i32 (...)* @h to i32 ()*)()
     18 }
     19 
     20 void t3(typeof((int (*)[f()]) h()) v) {
     21   // CHECK:      store i32* %v, i32** %{{[.0-9A-Za-z]+}}, align 4
     22   // CHECK-NEXT: [[P:%.*]] = call i32 bitcast (i32 (...)* @f to i32 ()*)()
     23   // CHECK-NEXT: [[P:%.*]] = call i32 bitcast (i32 (...)* @h to i32 ()*)()
     24 }
     25