Skip to content

[Flang] Using BOZ constant as the SOURCE= argument of intrinsic TRANSFER triggered a compile time error. #125769

Open
@DanielCChen

Description

@DanielCChen

Consider the following code

real(4), parameter :: r4_ep = transfer (Z'34000000', 1.0_4)
end

This seems to be a reasonable extension to use BOZ constant.

Flang is currently disallowing it as

error: Semantic errors in t.f
./t.f:1:41: error: Typeless (BOZ) not allowed for 'source=' argument
  real(4), parameter :: r4_ep = transfer (Z'34000000', 1.0_4)
                                          ^^^^^^^^^^^

Both ifort and XLF compile the code successfully.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions