Files
TheRock/compiler/amd-llvm/clang/test/AST/arm-mfp8.cpp
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

91 lines
3.4 KiB
C++

// RUN: %clang_cc1 -std=c++11 -triple aarch64-arm-none-eabi -target-feature -fp8 -ast-dump %s | \
// RUN: FileCheck %s --strict-whitespace
// REQUIRES: aarch64-registered-target || arm-registered-target
/* Various contexts where type __mfp8 can appear. */
/* Namespace */
namespace {
__mfp8 f2n;
__mfp8 arr1n[10];
}
//CHECK: |-NamespaceDecl {{.*}}
//CHECK-NEXT: | |-VarDecl {{.*}} f2n '__mfp8'
//CHECK-NEXT: | `-VarDecl {{.*}} arr1n '__mfp8[10]'
const __mfp8 func1n(const __mfp8 mfp8) {
// this should fail
__mfp8 f1n;
f1n = mfp8;
return f1n;
}
//CHECK: |-FunctionDecl {{.*}} func1n 'const __mfp8 (const __mfp8)'
//CHECK: | `-VarDecl {{.*}} f1n '__mfp8'
//CHECK-NEXT: |-BinaryOperator {{.*}} '__mfp8' lvalue '='
//CHECK-NEXT: | |-DeclRefExpr {{.*}} '__mfp8' lvalue Var {{.*}} 'f1n' '__mfp8'
//CHECK-NEXT: | `-ImplicitCastExpr {{.*}} '__mfp8' <LValueToRValue>
//CHECK-NEXT: | `-DeclRefExpr {{.*}} 'const __mfp8' lvalue ParmVar {{.*}} 'mfp8' 'const __mfp8'
//CHECK-NEXT: `-ReturnStmt {{.*}}
//CHECK-NEXT: `-ImplicitCastExpr {{.*}} '__mfp8' <LValueToRValue>
//CHECK-NEXT: `-DeclRefExpr {{.*}} '__mfp8' lvalue Var {{.*}} 'f1n' '__mfp8'
/* Class */
class C1 {
__mfp8 f1c;
static const __mfp8 f2c;
volatile __mfp8 f3c;
public:
C1(__mfp8 arg) : f1c(arg), f3c(arg) { }
__mfp8 func1c(__mfp8 arg ) {
return arg;
}
static __mfp8 func2c(__mfp8 arg) {
return arg;
}
};
//CHECK: | |-CXXRecordDecl {{.*}} class C1
//CHECK-NEXT: | |-FieldDecl {{.*}} f1c '__mfp8'
//CHECK-NEXT: | |-VarDecl {{.*}} f2c 'const __mfp8' static
//CHECK-NEXT: | |-FieldDecl {{.*}} f3c 'volatile __mfp8'
//CHECK-NEXT: | |-AccessSpecDecl {{.*}}
//CHECK-NEXT: | |-CXXConstructorDecl {{.*}} C1 'void (__mfp8)' implicit-inline
//CHECK-NEXT: | | |-ParmVarDecl {{.*}} arg '__mfp8'
//CHECK-NEXT: | | |-CXXCtorInitializer {{.*}} 'f1c' '__mfp8'
//CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} '__mfp8' <LValueToRValue>
//CHECK-NEXT: | | | `-DeclRefExpr {{.*}} '__mfp8' lvalue ParmVar {{.*}} 'arg' '__mfp8'
//CHECK-NEXT: | | |-CXXCtorInitializer {{.*}} 'f3c' 'volatile __mfp8'
//CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} '__mfp8' <LValueToRValue>
//CHECK-NEXT: | | | `-DeclRefExpr {{.*}} '__mfp8' lvalue ParmVar {{.*}} 'arg' '__mfp8'
//CHECK-NEXT: | | `-CompoundStmt {{.*}}
//CHECK-NEXT: | |-CXXMethodDecl {{.*}} func1c '__mfp8 (__mfp8)' implicit-inline
//CHECK-NEXT: | | |-ParmVarDecl {{.*}} arg '__mfp8'
//CHECK-NEXT: | | `-CompoundStmt {{.*}}
//CHECK-NEXT: | | `-ReturnStmt {{.*}}
//CHECK-NEXT: | | `-ImplicitCastExpr {{.*}} '__mfp8' <LValueToRValue>
//CHECK-NEXT: | | `-DeclRefExpr {{.*}} '__mfp8' lvalue ParmVar {{.*}} 'arg' '__mfp8'
//CHECK-NEXT: | `-CXXMethodDecl {{.*}} func2c '__mfp8 (__mfp8)' static implicit-inline
//CHECK-NEXT: | |-ParmVarDecl {{.*}} arg '__mfp8'
//CHECK-NEXT: | `-CompoundStmt {{.*}}
//CHECK-NEXT: | `-ReturnStmt {{.*}}
//CHECK-NEXT: | `-ImplicitCastExpr {{.*}} '__mfp8' <LValueToRValue>
//CHECK-NEXT: | `-DeclRefExpr {{.*}} '__mfp8' lvalue ParmVar {{.*}} 'arg' '__mfp8'
template <class C> struct S1 {
C mem1;
};
template <> struct S1<__mfp8> {
__mfp8 mem2;
};
//CHECK: |-TemplateArgument type '__mfp8'
//CHECK-NEXT: | `-BuiltinType {{.*}} '__mfp8'
//CHECK-NEXT: |-CXXRecordDecl {{.*}} implicit struct S1
//CHECK-NEXT: `-FieldDecl {{.*}} mem2 '__mfp8'