Files
clang-p2996/flang/test/Fir/Todo/dispatch.fir
Kiran Chandramohan 7ce8c6fcf1 [Flang] Replace notifyMatchFailure with TODO hard failures
For unimplemented patterns we revert to using TODO hard failures instead of
notifyMatchFailure.

For fir.select_type revert to using mlir::emiterror.
For the fir.embox TODO on a type with len params we cannot add a test since the type cannot be converted to llvm.

Adding negative tests using not and checking for the error message.
TODO exits with an error in a build without assertion but aborts in a
build with assertions. Abort requires using not with the --crash
option. The two different usages of not is handled by using a custom
command %not_todo_cmd which is converted to not or not --crash
depending on the presence or absence of assertions. Using llvm-config
to check the presence of assertions.

Reviewed By: clementval, awarzynski

Differential Revision: https://reviews.llvm.org/D114371
2021-12-02 10:25:02 +00:00

11 lines
381 B
Plaintext

// RUN: %not_todo_cmd fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
// Test `fir.dispatch` conversion to llvm.
// Not implemented yet.
func @dispatch(%arg0: !fir.box<!fir.type<derived3{f:f32}>>) {
// CHECK: not yet implemented fir.dispatch codegen
%0 = fir.dispatch "method"(%arg0) : (!fir.box<!fir.type<derived3{f:f32}>>) -> i32
return
}