[flang-commits] [flang] [flang] Make lto-bc.f90 unsupported on Darwin (PR #171693)
Leandro Lupori via flang-commits
flang-commits at lists.llvm.org
Wed Dec 10 12:34:08 PST 2025
https://github.com/luporl created https://github.com/llvm/llvm-project/pull/171693
It fails with the following error:
```
RUN: at line 23
/Users/leandro.lupori/home/git/flang/build/bin/flang -flto /Users/leandro.lupori/home/git/flang/llvm-project/flang/test/Driver/lto-bc.f90 -c -o - | llvm-dis -o - | /Users/leandro.lupori/home/git/flang/build/bin/FileCheck /Users/leandro.lupori/home/git/flang/llvm-project/flang/test/Driver/lto-bc.f90 --check-prefix=FULL
.---command stderr------------
| /Users/leandro.lupori/home/git/flang/llvm-project/flang/test/Driver/lto-bc.f90:27:9: error: FULL: expected string not found in input
| ! FULL: !{{.*}} = !{i32 1, !"ThinLTO", i32 0}
| ^
| ...
| Input was:
| <<<<<<
| ...
| 24: !llvm.ident = !{!0}
| check:27'0 ~~~~~~~~~~~~~~~~~~~~
| 25: !llvm.module.flags = !{!1, !2}
| check:27'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 26:
| check:27'0 ~
| 27: !0 = !{!"flang version 22.0.0 (git at github.com:llvm/llvm-project.git dde1990b01fa13087b0eab77579f528329555968)"}
| check:27'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 28: !1 = !{i32 2, !"Debug Info Version", i32 3}
| check:27'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 29: !2 = !{i32 8, !"PIC Level", i32 2}
| check:27'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| check:27'1 ? possible intended match
| >>>>>>
`-----------------------------
```
>From c019c3b53d1a537c302de41075242b70822dc2b8 Mon Sep 17 00:00:00 2001
From: Leandro Lupori <leandro.lupori at linaro.org>
Date: Wed, 10 Dec 2025 17:28:56 -0300
Subject: [PATCH] [flang] Make lto-bc.f90 unsupported on Darwin
It fails with the following error:
```
RUN: at line 23
/Users/leandro.lupori/home/git/flang/build/bin/flang -flto /Users/leandro.lupori/home/git/flang/llvm-project/flang/test/Driver/lto-bc.f90 -c -o - | llvm-dis -o - | /Users/leandro.lupori/home/git/flang/build/bin/FileCheck /Users/leandro.lupori/home/git/flang/llvm-project/flang/test/Driver/lto-bc.f90 --check-prefix=FULL
.---command stderr------------
| /Users/leandro.lupori/home/git/flang/llvm-project/flang/test/Driver/lto-bc.f90:27:9: error: FULL: expected string not found in input
| ! FULL: !{{.*}} = !{i32 1, !"ThinLTO", i32 0}
| ^
| ...
| Input was:
| <<<<<<
| ...
| 24: !llvm.ident = !{!0}
| check:27'0 ~~~~~~~~~~~~~~~~~~~~
| 25: !llvm.module.flags = !{!1, !2}
| check:27'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 26:
| check:27'0 ~
| 27: !0 = !{!"flang version 22.0.0 (git at github.com:llvm/llvm-project.git dde1990b01fa13087b0eab77579f528329555968)"}
| check:27'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 28: !1 = !{i32 2, !"Debug Info Version", i32 3}
| check:27'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 29: !2 = !{i32 8, !"PIC Level", i32 2}
| check:27'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| check:27'1 ? possible intended match
| >>>>>>
`-----------------------------
```
---
flang/test/Driver/lto-bc.f90 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/flang/test/Driver/lto-bc.f90 b/flang/test/Driver/lto-bc.f90
index 5705fe0cbb929..cca7f8cce739b 100644
--- a/flang/test/Driver/lto-bc.f90
+++ b/flang/test/Driver/lto-bc.f90
@@ -1,6 +1,8 @@
! Test that the output is LLVM bitcode for LTO and not a native objectfile by
! disassembling it to LLVM IR. Also tests that module summaries are emitted for LTO
+! UNSUPPORTED: system-darwin
+
! RUN: %flang %s -c -o - | not llvm-dis -o %t
! RUN: %flang_fc1 %s -emit-llvm-bc -o - | llvm-dis -o - | FileCheck %s
! CHECK: define void @_QQmain()
More information about the flang-commits
mailing list