<html>
    <head>
      <base href="http://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 --- - Debug information causes assembly errors."
   href="http://llvm.org/bugs/show_bug.cgi?id=17321">17321</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Debug information causes assembly errors.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rich@pennware.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I just updated from r190763 to r191137 and started getting failures in
generated assembly language when debug info is enabled. Here is the test case:

// Compile and run for every target.
// RUN: %ecc -g -o %t %s && %t
// FAIL: %armecc -g -o %t %s && %armrun %t
// FAIL: %armebecc -g -o %t %s && %armebrun %t
// RUN: %i386ecc -g -o %t %s && %i386run %t
// FAIL: %microblazeecc -g -o %t %s && %microblazerun %t
// FAIL: %mipsecc -g -o %t %s && %mipsrun %t
// FAIL: %mipselecc -g -o %t %s && %mipselrun %t
// FAIL: %ppcecc -g -o %t %s && %ppcrun %t
// FAIL: %ppc64ecc -g -o %t %s && %ppc64run %t
// RUN: %x86_64ecc -g -o %t %s && %x86_64run %t

int comm;
int main()
{
    comm = 6;
}

This fails on all but the x86 processors. The typical failure looks like this:
...
        .type   comm,@object            # @comm
        .comm   comm,4,4
        .cfi_sections .debug_frame
        .bss
.L.bss_end:
...
.L.debug_abbrev_end:
        .section        .debug_aranges,"",@progbits
        .long   36                      # Length of ARange Set
        .short  2                       # DWARF Arange version number
        .long   .L.debug_info_begin0    # Offset Into Debug Info Section
        .byte   4                       # Address Size (in bytes)
        .byte   0                       # Segment Size (in bytes)
        .byte   255
        .byte   255
        .byte   255
        .byte   255
        .long   comm
.Lset0 = .L.bss_end-comm
        .long   .Lset0

The typical error message is:
/tmp/debug-8ecf9d.s: Assembler messages:
/tmp/debug-8ecf9d.s: Error: invalid operands (.bss and *COM* sections) for `-'
when setting `.Lset0'

I am using binutils 2.23.1.

Apparently the x86 assemblers are the only ones that allow a .bss - .comm
symbol subtraction. ARM, Microblaze, Mips, and PowerPC all fail.</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>