Skip to content

[flang] Long compile time with large array constructor #153197

@DanielCChen

Description

@DanielCChen

Consider the following code

  PROGRAM main
  IMPLICIT NONE

  INTEGER(2), PARAMETER :: I2Max=32767
  INTEGER(2), PARAMETER :: I2Min=-32768

  TYPE :: DT0
  END TYPE

  INTEGER, TARGET  :: I

  TYPE(DT0), TARGET  :: I1Arr(I2Min:I2Max)=(/(DT0(),I=I2Min, I2Max)/)
  END

Flang took long time to compile it.
All ifort, gfortran and XLF used much less time.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions