[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Driver / embed.f90
blob60d532a8a94fdfc454c1130913dcec98ed7fb8ed
2 !----------
3 ! RUN lines
4 !----------
5 ! Embed something that can be easily checked
6 ! RUN: %flang_fc1 -emit-llvm -o - -fembed-offload-object=%S/Inputs/hello.f90 %s 2>&1 | FileCheck %s
8 ! RUN: %flang_fc1 -emit-llvm-bc -o %t.bc %s 2>&1
9 ! RUN: %flang_fc1 -emit-llvm -o - -fembed-offload-object=%S/Inputs/hello.f90 %t.bc 2>&1 | FileCheck %s
11 ! CHECK: @[[OBJECT_1:.+]] = private constant [61 x i8] c"program hello\0A write(*,*), \22Hello world!\22\0Aend program hello\0A", section ".llvm.offloading", align 8, !exclude !0
12 ! CHECK: @llvm.compiler.used = appending global [1 x ptr] [ptr @[[OBJECT_1]]], section "llvm.metadata"
15 ! CHECK: !llvm.embedded.objects = !{![[METADATA_1:[0-9]+]]}
16 ! CHECK: ![[METADATA_1]] = !{ptr @[[OBJECT_1]], !".llvm.offloading"}
18 parameter(i=1)
19 integer :: j
20 end program