Skip to content

Commit 166a794

Browse files
committed
[flang] Set polymorphic entity lowering option on by default
Preliminary patch for llvm#83285 to turn polymorphism on by default. Will give a few days warning for people to remove the flag from their workflow using flang-new. Also easier to revert if issues with the gfortran test suites.
1 parent 634b024 commit 166a794

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

flang/include/flang/Lower/LoweringOptions.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ LOWERINGOPT(Name, Bits, Default)
2424
/// If true, lower transpose without a runtime call.
2525
ENUM_LOWERINGOPT(OptimizeTranspose, unsigned, 1, 1)
2626

27-
/// If true, enable polymorphic type lowering feature. Off by default.
28-
ENUM_LOWERINGOPT(PolymorphicTypeImpl, unsigned, 1, 0)
27+
/// If true, enable polymorphic type lowering feature. On by default.
28+
ENUM_LOWERINGOPT(PolymorphicTypeImpl, unsigned, 1, 1)
2929

3030
/// If true, lower to High level FIR before lowering to FIR. On by default.
3131
ENUM_LOWERINGOPT(LowerToHighLevelFIR, unsigned, 1, 1)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
! Test -flang-experimental-hlfir flag
22
! RUN: %flang_fc1 -flang-experimental-polymorphism -emit-fir -o - %s | FileCheck %s
3-
! RUN: not %flang_fc1 -emit-fir -o - %s 2>&1 | FileCheck %s --check-prefix NO-POLYMORPHISM
3+
! RUN: %flang_fc1 -emit-fir -o - %s 2>&1 | FileCheck %s --check-prefix NO-POLYMORPHISM
44

55
! CHECK: func.func @_QPtest(%{{.*}}: !fir.class<none> {fir.bindc_name = "poly"})
66
subroutine test(poly)
77
class(*) :: poly
88
end subroutine test
99

10-
! NO-POLYMORPHISM: not yet implemented: support for polymorphic types
10+
! NO-POLYMORPHISM: func.func @_QPtest

0 commit comments

Comments
 (0)