brintos

brintos / llvm-project-archived public Read only

0
0
Text · 465 B · e006441 Raw
18 lines · cpp
1// REQUIRES: arm-registered-target2// RUN: %clang_cc1 -triple armv7-none-linux-androideabi -target-abi aapcs-linux -mfloat-abi hard -x c++ -emit-llvm %s -o - | FileCheck %s3 4struct Vec2 {5    union { struct { float x, y; };6            float data[2];7    };8};9 10// CHECK: define{{.*}} arm_aapcs_vfpcc %struct.Vec2 @_Z7getVec2v()11// CHECK: ret %struct.Vec212Vec2 getVec2() {13    Vec2 out;14    union { Vec2* v; unsigned char* u; } x;15    x.v = &out;16    return out;17}18