[flang-commits] [flang] b36d678 - [flang]Fix build failure in tests

Mats Petersson via flang-commits flang-commits at lists.llvm.org
Thu Nov 3 11:54:05 PDT 2022


Author: Mats Petersson
Date: 2022-11-03T18:53:23Z
New Revision: b36d678b8e75ec8eb09d2b7e9513884f99d15f0a

URL: https://github.com/llvm/llvm-project/commit/b36d678b8e75ec8eb09d2b7e9513884f99d15f0a
DIFF: https://github.com/llvm/llvm-project/commit/b36d678b8e75ec8eb09d2b7e9513884f99d15f0a.diff

LOG: [flang]Fix build failure in tests

After submitting the DataLayout fix, some tests fail when they didn't
before. This has to do with the target essentially being ignored when
these tests were run earlier, as the --target x86-unknown-linux-gnu
only has to be correctly formed to be accepted.

Now the target triple is actually being used to get the targetmachine
earlier - before MLIR is generated - so the test that has a valid target
but not available on the platform fails.

Fix is to require x86 registered target when running those tests.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D137335

Added: 
    

Modified: 
    flang/test/Fir/boxchar.fir
    flang/test/Fir/inline.fir

Removed: 
    


################################################################################
diff  --git a/flang/test/Fir/boxchar.fir b/flang/test/Fir/boxchar.fir
index 06d66202ff894..4c5fdec2184ed 100644
--- a/flang/test/Fir/boxchar.fir
+++ b/flang/test/Fir/boxchar.fir
@@ -1,5 +1,5 @@
-// RUN: tco --target=x86_64-unknown-linux-gnu %s | FileCheck %s
-// RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu %s -o - | FileCheck %s
+// RUN: tco %s | FileCheck %s
+// RUN: %flang_fc1 -emit-llvm %s -o - | FileCheck %s
 
 // Test of building and passing boxchar.
 

diff  --git a/flang/test/Fir/inline.fir b/flang/test/Fir/inline.fir
index 48f10c1e85198..c2ed2bf422ead 100644
--- a/flang/test/Fir/inline.fir
+++ b/flang/test/Fir/inline.fir
@@ -1,5 +1,5 @@
-// RUN: tco --target=x86_64-unknown-linux-gnu --inline-all %s -o - | FileCheck %s
-// RUN: %flang_fc1 -triple x86_64-unknown-linux-gnu -mmlir --inline-all -emit-llvm %s -o - | FileCheck %s
+// RUN: tco --inline-all %s -o - | FileCheck %s
+// RUN: %flang_fc1  -mmlir --inline-all -emit-llvm %s -o - | FileCheck %s
 
 // CHECK-LABEL: @add
 func.func @add(%a : i32, %b : i32) -> i32 {


        


More information about the flang-commits mailing list