<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 - fatal error: error in backend: 'main' label emitted multiple times to assembly file"
   href="https://bugs.llvm.org/show_bug.cgi?id=46332">46332</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>fatal error: error in backend: 'main' label emitted multiple times to assembly file
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>7.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>C
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>rspoerri@yuhsbstudents.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I was doing some evil things in C, and I wrote the following code:

asm("main:");
int main() {
  return 0;
}

I compiled it:

$ clang-7 -pthread -lm -o main main.c
fatal error: error in backend: 'main' label emitted multiple
      times to assembly file
clang-7: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 7.0.0 (<a href="mailto:git@github.com">git@github.com</a>:apple/swift-clang.git
5c9d04dc0697297a47b5edb0c1a581b306a42bdb) (<a href="mailto:git@github.com">git@github.com</a>:apple/swift-llvm.git
34250a6eef79ee8a83c5cfb4deb1583176dcbb63)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-7: note: diagnostic msg: PLEASE submit a bug report to
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.
clang-7: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-7: note: diagnostic msg: /tmp/main-e9d39a.c
clang-7: note: diagnostic msg: /tmp/main-e9d39a.sh
clang-7: note: diagnostic msg: 

********************
compiler exit status 70

However, when I did:

asm("x:x:");
int main() {
  return 0;
}

I got a normal, external error:

$ clang-7 -pthread -lm -o main main.c
<inline asm>:1:3: error: invalid symbol redefinition
x:x:
  ^
1 error generated.
compiler exit status 1</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>