[llvm-bugs] [Bug 47666] New: Transfer can be constant value, but not now

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 28 01:54:27 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47666

            Bug ID: 47666
           Summary: Transfer can be constant value, but not now
           Product: flang
           Version: trunk
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedbugs at nondot.org
          Reporter: i.s.ger at ya.ru
                CC: David.Truby at arm.com, jperier at nvidia.com,
                    kirankumartp at gmail.com, llvm-bugs at lists.llvm.org,
                    sscalpone at nvidia.com

I have tried to compile the following code: 

real(8), parameter :: zero_int = transfer(0,0D0)
end

And I have got message:

:1:34: error: Must be a constant value
  real(8), parameter :: zero_int = transfer(0,0D0)
                                   ^^^^^^^^^^^^^^^

But in reality, it is a constant value. ifort and gcc can compile this code
(See here: https://godbolt.org/z/r83ves)

Locally tested version is commit d2166076b882e38becf3657ea830ffd2b6a5695e of
llvm-project.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200928/5fc0cee0/attachment.html>


More information about the llvm-bugs mailing list