xref: /llvm-project/flang/test/Driver/mlink-builtin-bc.f90 (revision b75e7c61ffc4adea0ec5fca63ba3feba845c8303)
1*b75e7c61SJan Leyonberg! Test -mlink-builtin-bitcode flag
2*b75e7c61SJan Leyonberg! RUN: %flang -emit-llvm -c -o %t.bc %S/Inputs/libfun.f90
3*b75e7c61SJan Leyonberg! RUN: %flang_fc1 -emit-llvm -o - -mlink-builtin-bitcode %t.bc %s 2>&1 | FileCheck %s
4*b75e7c61SJan Leyonberg
5*b75e7c61SJan Leyonberg! CHECK: define internal void @libfun_
6*b75e7c61SJan Leyonberg
7*b75e7c61SJan Leyonberg! RUN: not %flang_fc1 -emit-llvm -o - -mlink-builtin-bitcode %no-%t.bc %s 2>&1 | FileCheck %s --check-prefix=ERROR
8*b75e7c61SJan Leyonberg
9*b75e7c61SJan Leyonberg! ERROR: error: could not open {{.*}}.bc
10*b75e7c61SJan Leyonberg
11*b75e7c61SJan Leyonbergexternal libfun
12*b75e7c61SJan Leyonbergparameter(i=1)
13*b75e7c61SJan Leyonberginteger :: j
14*b75e7c61SJan Leyonbergcall libfun(j)
15*b75e7c61SJan Leyonbergend program
16