summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/arm_function_epilog.cpp
blob: 00895078b1f868c2d51ab6e4fc1139b75bab2099 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple armv7-none-linux-androideabi -target-abi aapcs-linux -mfloat-abi hard -x c++ -emit-llvm %s -o - | FileCheck %s

struct Vec2 {
    union { struct { float x, y; };
            float data[2];
    };
};

// CHECK: define arm_aapcs_vfpcc %struct.Vec2 @_Z7getVec2v()
// CHECK: ret %struct.Vec2
Vec2 getVec2() {
    Vec2 out;
    union { Vec2* v; unsigned char* u; } x;
    x.v = &out;
    return out;
}