[llvm-bugs] [Bug 46168] New: Pending TODOs in checking semantics of DATA Statement

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 1 22:52:01 PDT 2020


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

            Bug ID: 46168
           Summary: Pending TODOs in checking semantics of DATA Statement
           Product: flang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedbugs at nondot.org
          Reporter: asudhaku at amd.com
                CC: David.Truby at arm.com, jperier at nvidia.com,
                    kirankumartp at gmail.com, llvm-bugs at lists.llvm.org,
                    sscalpone at nvidia.com

There are a few bullets in 8.6.7 (DATA Statement) and some among them may need
to be implemented as constraints in Flang. The identified ones which may
require implementation are listed below: 
1. If a nonpointer variable has default initialization, it shall not appear in
a data-stmt-object-list (bullet 2).
2. A variable that appears in a DATA statement and has not been typed
previously shall not appear in a subsequent type declaration unless that
declaration confirms the implicit typing. An array name, array section, or
array element that appears in a DATA statement shall have had its array
properties established by a previous specification statement (bullet 3).
3. Except for variables in named common blocks, a named variable has the SAVE
attribute if any part of it is initialized in a DATA statement, and this may be
confirmed by explicit specification (bullet 4).
4. The expanded sequences of variables and data-stmt-constants are in
one-to-one correspondence. Each data-stmt-constant specifies the initial value,
initial data target, or null-init for the corresponding variable. The lengths
of the two expanded sequences shall be the same (bullet 8).
5. A data-stmt-constant other than boz-literal-constant, null-init, or
initial-data-target shall be compatible with its corresponding variable
according to the rules of intrinsic assignment (10.2.1.2). The variable is
initially defined with the value specified by the data-stmt-constant; if
necessary, the value is converted according to the rules of intrinsic
assignment (10.2.1.3) to a value that agrees in type, type parameters, and
shape with the variable (bullet 10).
6. If a data-stmt-constant is a boz-literal-constant, the corresponding
variable shall be of type integer. The boz-literal-constant is treated as if it
were converted by the intrinsic function INT (16.9.100) to type integer with
the kind type parameter of the variable (bullet 11).

-- 
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/20200602/f8198c06/attachment.html>


More information about the llvm-bugs mailing list