Skip to content

[Flang] selected_real_kind (33) returns -1 #158444

@arrowd

Description

@arrowd

Building the DQFUN package from https://www.davidhbailey.com/dhbsoftware/ with Flang, I get the following error:

error: Semantic errors in dqfuna.f90
./dqfuna.f90:54:1: error: REAL(KIND=-1) is not a supported type
  real (dqknd), public, parameter :: dqdpw = 34.016389510029875059152495103867712q0, &
  ^

The problematic code block:

module dqfuna
integer, public, parameter :: dqknd = selected_real_kind (33, 4931), dqldb = 6, &
  dqnbt = 113, dqnwx = 2
real (dqknd), public, parameter :: dqdpw = 34.016389510029875059152495103867712q0, &
  dqlogb = 77.632484222713874654729997603315776q0, dqrdfz = 1.q0 / 2.q0**110

I don't know Fortran, so maybe it isn't really a Flang problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    flang:frontendquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions