Skip to content

Commit

Permalink
[flang] Enable polymorphic lowering by default (#83285)
Browse files Browse the repository at this point in the history
Polymorphic entity lowering status is good. The main remaining TODO is
to allow lowering of vector subscripted polymorphic entity, but this
does not deserve blocking all application using polymorphism.

Remove experimental option and enable lowering of polymorphic entity by
default.
  • Loading branch information
jeanPerier committed Mar 19, 2024
1 parent d1c3795 commit d0829fb
Show file tree
Hide file tree
Showing 68 changed files with 63 additions and 107 deletions.
5 changes: 0 additions & 5 deletions clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -6441,11 +6441,6 @@ def flang_deprecated_no_hlfir : Flag<["-"], "flang-deprecated-no-hlfir">,
Flags<[HelpHidden]>, Visibility<[FlangOption, FC1Option]>,
HelpText<"Do not use HLFIR lowering (deprecated)">;

def flang_experimental_polymorphism : Flag<["-"], "flang-experimental-polymorphism">,
Flags<[HelpHidden]>, Visibility<[FlangOption, FC1Option]>,
HelpText<"Enable Fortran 2003 polymorphism (experimental)">;


//===----------------------------------------------------------------------===//
// FLangOption + CoreOption + NoXarchOption
//===----------------------------------------------------------------------===//
Expand Down
1 change: 0 additions & 1 deletion clang/lib/Driver/ToolChains/Flang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ void Flang::addCodegenOptions(const ArgList &Args,

Args.addAllArgs(CmdArgs, {options::OPT_flang_experimental_hlfir,
options::OPT_flang_deprecated_no_hlfir,
options::OPT_flang_experimental_polymorphism,
options::OPT_fno_ppc_native_vec_elem_order,
options::OPT_fppc_native_vec_elem_order});
}
Expand Down
3 changes: 0 additions & 3 deletions flang/include/flang/Lower/LoweringOptions.def
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ LOWERINGOPT(Name, Bits, Default)
/// If true, lower transpose without a runtime call.
ENUM_LOWERINGOPT(OptimizeTranspose, unsigned, 1, 1)

/// If true, enable polymorphic type lowering feature. On by default.
ENUM_LOWERINGOPT(PolymorphicTypeImpl, unsigned, 1, 1)

/// If true, lower to High level FIR before lowering to FIR. On by default.
ENUM_LOWERINGOPT(LowerToHighLevelFIR, unsigned, 1, 1)

Expand Down
5 changes: 0 additions & 5 deletions flang/lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1191,11 +1191,6 @@ bool CompilerInvocation::createFromArgs(
invoc.loweringOpts.setLowerToHighLevelFIR(false);
}

if (args.hasArg(
clang::driver::options::OPT_flang_experimental_polymorphism)) {
invoc.loweringOpts.setPolymorphicTypeImpl(true);
}

// -fno-ppc-native-vector-element-order
if (args.hasArg(clang::driver::options::OPT_fno_ppc_native_vec_elem_order)) {
invoc.loweringOpts.setNoPPCNativeVecElemOrder(true);
Expand Down
6 changes: 0 additions & 6 deletions flang/lib/Lower/CallInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,12 +1050,6 @@ class Fortran::lower::CallInterfaceImpl {
Fortran::common::TypeCategory cat = dynamicType.category();
// DERIVED
if (cat == Fortran::common::TypeCategory::Derived) {
// TODO is kept under experimental flag until feature is complete.
if (dynamicType.IsPolymorphic() &&
!getConverter().getLoweringOptions().getPolymorphicTypeImpl())
TODO(interface.converter.getCurrentLocation(),
"support for polymorphic types");

if (dynamicType.IsUnlimitedPolymorphic())
return mlir::NoneType::get(&mlirContext);
return getConverter().genType(dynamicType.GetDerivedTypeSpec());
Expand Down
4 changes: 0 additions & 4 deletions flang/lib/Lower/ConvertType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,6 @@ struct TypeBuilderImpl {
llvm::SmallVector<Fortran::lower::LenParameterTy> params;
translateLenParameters(params, tySpec->category(), ultimate);
ty = genFIRType(context, tySpec->category(), kind, params);
} else if (type->IsPolymorphic() &&
!converter.getLoweringOptions().getPolymorphicTypeImpl()) {
// TODO is kept under experimental flag until feature is complete.
TODO(loc, "support for polymorphic types");
} else if (type->IsUnlimitedPolymorphic()) {
ty = mlir::NoneType::get(context);
} else if (const Fortran::semantics::DerivedTypeSpec *tySpec =
Expand Down
2 changes: 0 additions & 2 deletions flang/test/Driver/driver-help-hidden.f90
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
! CHECK-NEXT: Do not use HLFIR lowering (deprecated)
! CHECK-NEXT: -flang-experimental-hlfir
! CHECK-NEXT: Use HLFIR lowering (experimental)
! CHECK-NEXT: -flang-experimental-polymorphism
! CHECK-NEXT: Enable Fortran 2003 polymorphism (experimental)
! CHECK-NEXT: -flarge-sizes Use INTEGER(KIND=8) for the result type in size-related intrinsics
! CHECK-NEXT: -flogical-abbreviations Enable logical abbreviations
! CHECK-NEXT: -flto=auto Enable LTO in 'full' mode
Expand Down
10 changes: 0 additions & 10 deletions flang/test/Driver/flang-experimental-polymorphism-flag.f90

This file was deleted.

2 changes: 0 additions & 2 deletions flang/test/Driver/frontend-forwarding.f90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
! RUN: -fomit-frame-pointer \
! RUN: -fpass-plugin=Bye%pluginext \
! RUN: -fversion-loops-for-stride \
! RUN: -flang-experimental-polymorphism \
! RUN: -flang-experimental-hlfir \
! RUN: -flang-deprecated-no-hlfir \
! RUN: -fno-ppc-native-vector-element-order \
Expand Down Expand Up @@ -49,7 +48,6 @@
! CHECK: "-fconvert=little-endian"
! CHECK: "-fpass-plugin=Bye
! CHECK: "-fversion-loops-for-stride"
! CHECK: "-flang-experimental-polymorphism"
! CHECK: "-flang-experimental-hlfir"
! CHECK: "-flang-deprecated-no-hlfir"
! CHECK: "-fno-ppc-native-vector-element-order"
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Fir/dispatch.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! RUN: bbc -polymorphic-type -emit-hlfir %s -o - | fir-opt --fir-polymorphic-op | FileCheck %s
! RUN: bbc -polymorphic-type -emit-hlfir %s -o - | FileCheck %s --check-prefix=BT
! RUN: bbc -emit-hlfir %s -o - | fir-opt --fir-polymorphic-op | FileCheck %s
! RUN: bbc -emit-hlfir %s -o - | FileCheck %s --check-prefix=BT

! Tests codegen of fir.dispatch operation. This test is intentionally run from
! Fortran through bbc and tco so we have all the binding tables lowered to FIR
Expand Down
2 changes: 1 addition & 1 deletion flang/test/HLFIR/assumed-type-actual-args.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! Test lowering to FIR of actual arguments that are assumed type
! variables (Fortran 2018 7.3.2.2 point 3).
! RUN: bbc --polymorphic-type -emit-hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

subroutine test1(x)
interface
Expand Down
2 changes: 1 addition & 1 deletion flang/test/HLFIR/boxchar_emboxing.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: bbc -polymorphic-type -emit-hlfir %s -o - | FileCheck %s
! RUN: bbc -emit-hlfir %s -o - | FileCheck %s

! CHECK-LABEL: func.func @_QPtest1(
! CHECK-SAME: %[[VAL_0:.*]]: !fir.class<none> {fir.bindc_name = "x"}) {
Expand Down
2 changes: 1 addition & 1 deletion flang/test/HLFIR/call_with_poly_dummy.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: bbc -polymorphic-type -emit-hlfir %s -o - | FileCheck %s
! RUN: bbc -emit-hlfir %s -o - | FileCheck %s

! Test passing arguments to subprograms with polymorphic dummy arguments.

Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/actual_target_for_dummy_pointer.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test actual TARGET argument association to dummy POINTER:
! RUN: bbc -emit-hlfir --polymorphic-type -o - -I nowhere %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - -I nowhere %s 2>&1 | FileCheck %s

module target_to_pointer_types
type t1
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/allocatable-return.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: bbc -emit-hlfir --polymorphic-type -I nowhere %s -o - | FileCheck %s
! RUN: bbc -emit-hlfir -I nowhere %s -o - | FileCheck %s

! Test allocatable return.
! Allocatable arrays must have default runtime lbounds after the return.
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/array-ctor-derived.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test lowering of derived type array constructors to HLFIR.
! RUN: bbc -emit-hlfir --polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

module types
type simple
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Test lowering of sequence associated arguments (F'2023 15.5.2.12) passed
! by descriptor. The descriptor on the caller side is prepared according to
! the dummy argument shape.
! RUN: bbc -emit-hlfir -polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

module bindc_seq_assoc
interface
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/calls-assumed-shape.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! Test lowering of calls involving assumed shape arrays or arrays with
! VALUE attribute.
! RUN: bbc -emit-hlfir -polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

subroutine test_assumed_to_assumed(x)
interface
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: bbc -emit-hlfir --polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

! Test when constant argument are copied in memory
! and passed to polymorphic arguments.
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/calls-optional.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
! that is syntactically present, but may be absent at runtime (is
! an optional or a pointer/allocatable).
!
! RUN: bbc -emit-hlfir -polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

subroutine optional_copy_in_out(x)
interface
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/calls-poly-to-assumed-type.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! Test passing rank 2 CLASS(*) deferred shape to assumed size assumed type
! This requires copy-in/copy-out logic.
! RUN: bbc -emit-hlfir -polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

subroutine pass_poly_to_assumed_type_assumed_size(x)
class(*), target :: x(:,:)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/convert-mbox-to-value.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test conversion of MutableBoxValue to value.
! RUN: bbc -emit-hlfir -polymorphic-type -I nowhere %s -o - | FileCheck %s
! RUN: bbc -emit-hlfir -I nowhere %s -o - | FileCheck %s

subroutine test_int_allocatable(a)
integer, allocatable :: a
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/designators-component-ref.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test lowering of component reference to HLFIR
! RUN: bbc -emit-hlfir --polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
module comp_ref
type t1
integer :: scalar_i
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test non-contiguous slice of parameter array.
! RUN: bbc -emit-hlfir --polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
subroutine test2(i)
integer, parameter :: a(*,*) = reshape( [ 1,2,3,4 ], [ 2,2 ])
integer :: x(2)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/elemental-array-ops.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test lowering of elemental intrinsic operations with array arguments to HLFIR
! RUN: bbc -emit-hlfir --polymorphic-type -I nowhere -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -I nowhere -o - %s 2>&1 | FileCheck %s

subroutine binary(x, y)
integer :: x(100), y(100)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/elemental-polymorphic-merge.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test that the produced hlfir.elemental had proper result type and the mold.
! RUN: bbc --emit-hlfir --polymorphic-type -I nowhere -o - %s | FileCheck %s
! RUN: bbc --emit-hlfir -I nowhere -o - %s | FileCheck %s

subroutine test_polymorphic_merge(x, y, r, m)
type t
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! Test lowering of user defined elemental procedure reference to HLFIR
! With polymorphic arguments.
! RUN: bbc -emit-hlfir -I nw -polymorphic-type -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -I nw -o - %s 2>&1 | FileCheck %s
module def_some_types
type :: t
integer :: i
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/function-return-as-expr.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: bbc -emit-hlfir --polymorphic-type -o - %s -I nowhere 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s -I nowhere 2>&1 | FileCheck %s

module types
type t1
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/function-return-destroy.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: bbc -emit-hlfir -polymorphic-type %s -o - -I nowhere | FileCheck %s
! RUN: bbc -emit-hlfir %s -o - -I nowhere | FileCheck %s

module types
type t1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! Test passing mismatching rank arguments to unlimited polymorphic
! dummy with IGNORE_TKR(R).
! RUN: bbc -emit-hlfir -polymorphic-type -o - -I nowhere %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - -I nowhere %s 2>&1 | FileCheck %s

module m
interface
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/ignore-type-assumed-shape.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
! dummy has IGNORE_TKR(t). The descriptor should be prepared
! according to the actual argument type, but its bounds and
! attributes should still be set as expected for the dummy.
! RUN: bbc -emit-hlfir --polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

module tkr_ifaces
interface
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! Test that allocatable components of non pointer/non allocatable INTENT(OUT)
! dummy arguments are deallocated.
! RUN: bbc -emit-hlfir -polymorphic-type %s -o - -I nowhere | FileCheck %s
! RUN: bbc -emit-hlfir %s -o - -I nowhere | FileCheck %s

subroutine test_intentout_component_deallocate(a)
type :: t
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/internal-procedures-polymorphic.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! Test lowering of internal procedure capturing OPTIONAL polymorphic
! objects.
! RUN: bbc -emit-hlfir --polymorphic-type -o - %s -I nw | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s -I nw | FileCheck %s


module captured_optional_polymorphic
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/intrinsic-assumed-type.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
! arguments. These are a bit special because semantics do not represent
! assumed types actual arguments with an evaluate::Expr like for usual
! arguments.
! RUN: bbc -emit-hlfir --polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

subroutine assumed_type_to_intrinsic(a)
type(*) :: a(:)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/parent-component-ref.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test lowering of parent component references to HLFIR.
! RUN: bbc -emit-hlfir -polymorphic-type -o - %s -I nw | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s -I nw | FileCheck %s

module pc_types
type t
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/poly_expr_for_nonpoly_dummy.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! Test passing polymorphic expression for non-polymorphic contiguous
! dummy argument:
! RUN: bbc -emit-hlfir --polymorphic-type -o - -I nowhere %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - -I nowhere %s | FileCheck %s

module types
type t
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/polymorphic-expressions.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: bbc -emit-hlfir --polymorphic-type -o - %s -I nowhere | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s -I nowhere | FileCheck %s

module polymorphic_expressions_types
type t
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/proc-pointer-comp-nopass.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test lowering of NOPASS procedure pointers components.
! RUN: bbc -emit-hlfir -polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

module proc_comp_defs
interface
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/proc-pointer-comp-pass.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test lowering of PASS procedure pointers components.
! RUN: bbc -emit-hlfir -polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

module m
type t
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/select-type-selector.f90
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
! (16.9.109) applied to the corresponding dimension of selector. The upper bound of each dimension is one less
! than the sum of the lower bound and the extent.

! RUN: bbc -emit-hlfir -polymorphic-type -I nowhere -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -I nowhere -o - %s | FileCheck %s

subroutine test()
type t
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/transpose.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test lowering of TRANSPOSE intrinsic to HLFIR
! RUN: bbc -emit-hlfir --polymorphic-type -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

subroutine transpose1(m, res)
integer :: m(1,2), res(2, 1)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/type-bound-call-mismatch.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! Test interface that lowering handles small interface mismatch with
! type bound procedures.
! RUN: bbc -emit-hlfir --polymorphic-type %s -o - -I nw | FileCheck %s
! RUN: bbc -emit-hlfir %s -o - -I nw | FileCheck %s

module dispatch_mismatch
type t
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/vector-subscript-as-value.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! Test lowering of vector subscript designators outside of the
! assignment left-and side and input IO context.
! RUN: bbc -emit-hlfir -o - -I nw %s --polymorphic-type 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - -I nw %s 2>&1 | FileCheck %s

subroutine foo(x, y)
integer :: x(100)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/Intrinsics/extends_type_of.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: bbc -emit-fir -hlfir=false -polymorphic-type %s -o - | FileCheck %s
! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s

module extends_type_of_mod

Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/Intrinsics/same_type_as.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: bbc -emit-fir -hlfir=false -polymorphic-type %s -o - | FileCheck %s
! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s

module same_type_as_mod

Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/Intrinsics/sizeof.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test SIZEOF lowering for polymorphic entities.
! RUN: bbc -emit-hlfir --polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

integer(8) function test1(x)
class(*) :: x
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/Intrinsics/spread.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: bbc -emit-fir -hlfir=false -polymorphic-type %s -o - | FileCheck %s
! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s

module spread_mod

Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/Intrinsics/storage_size.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: bbc -emit-fir -hlfir=false -polymorphic-type %s -o - | FileCheck %s
! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s

module storage_size_test
type :: p1
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Lower/allocatable-polymorphic.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! RUN: bbc --use-desc-for-alloc=false -polymorphic-type -emit-hlfir %s -o - | FileCheck %s
! RUN: bbc --use-desc-for-alloc=false -polymorphic-type -emit-hlfir %s -o - | tco | FileCheck %s --check-prefix=LLVM
! RUN: bbc --use-desc-for-alloc=false -emit-hlfir %s -o - | FileCheck %s
! RUN: bbc --use-desc-for-alloc=false -emit-hlfir %s -o - | tco | FileCheck %s --check-prefix=LLVM

module poly
type p1
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/allocatable-return.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: bbc -emit-fir -hlfir=false --polymorphic-type -I nowhere %s -o - | FileCheck %s
! RUN: bbc -emit-fir -hlfir=false -I nowhere %s -o - | FileCheck %s

! Test allocatable return.
! Allocatable arrays must have default runtime lbounds after the return.
Expand Down

0 comments on commit d0829fb

Please sign in to comment.