1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s 2 3 // This file tests the clang extension which allows initializing the components 4 // of a complex number individually using an initialization list. (There is a 5 // extensive description and test in test/Sema/complex-init-list.c.) 6 7 _Complex float x = { 1.0f, 1.0f/0.0f }; 8 // CHECK: @x = global { float, float } { float 1.000000e+00, float 0x7FF0000000000000 }, align 4 9 10 _Complex float f(float x, float y) { _Complex float z = { x, y }; return z; } 11 // CHECK-LABEL: define <2 x float> @f 12 // CHECK: alloca { float, float } 13 // CHECK: alloca { float, float } 14 15 _Complex float f2(float x, float y) { return (_Complex float){ x, y }; } 16 // CHECK-LABEL: define <2 x float> @f2 17 // CHECK: alloca { float, float } 18 // CHECK: alloca { float, float } 19