<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [DebugInfo] Array of complete structure which was declared incomplete first is does not have size assigned to its debug info metadata."
   href="https://llvm.org/bugs/show_bug.cgi?id=28303">28303</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[DebugInfo] Array of complete structure which was declared incomplete first is does not have size assigned to its debug info metadata.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>amjad.aboud@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>There is a bug in the front-end where an array of a structure, which was
declared as incomplete structure first, ends up not getting a size assigned to
it.


Example - t.cpp:
  struct A(*p)[3];
  struct A { int f; } a[3];

command: clang -g -c -S -emit-llvm -o - -x c++ -gcodeview t.cpp

!6 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, elements: !11)
!7 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !1,
line: 2, size: 32, align: 32, elements: !8, identifier: ".?AUA@@")
!8 = !{!9}
!9 = !DIDerivedType(tag: DW_TAG_member, name: "f", scope: !7, file: !1, line:
2, baseType: !10, size: 32, align: 32)
!10 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!11 = !{!12}
!12 = !DISubrange(count: 3)


Where it should be: 
!6 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 96, align:
32, elements: !11)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>