<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Label array with unused result results in clang crash"
   href="https://bugs.llvm.org/show_bug.cgi?id=43700">43700</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Label array with unused result results in clang crash
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>9.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>spiritual.dragon.of.ra@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22685" name="attach_22685" title="Attached: Backtrace, preprocessed source and associated run script">attachment 22685</a> <a href="attachment.cgi?id=22685&action=edit" title="Attached: Backtrace, preprocessed source and associated run script">[details]</a></span>
Attached: Backtrace, preprocessed source and associated run script

Overview:
 Declaring a label array with at least 3 labels while not assigning the result
to a variable, causes a segmentation fault to occur.
Attached is the resulting log of the command "clang -v
clang_empty_lbl_array.c".

Steps to reproduce:
 Compile the code shown below (which should result in an empty main()) with the
command "clang clang_empty_lbl_array.c".

int main () {
 (void * []) { &&L3, &&L2, &&L1 };
 L1: ;
 L2: ;
 L3: ;
}

Actual Results:
 clang crashes, resulting in no executable being generated.

Expected Results:
 Generation of executable (with a warning) equivalent to:
int main () {
 L1: ;
 L2: ;
 L3: ;
}

Build Date & Hardware:
 Built 17/Oct/2019 on:
  > clang --version
    clang version 9.0.0 (tags/RELEASE_900/final)
    Target: x86_64-pc-linux-gnu
    Thread model: posix
    InstalledDir: /usr/bin</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>