http://llvm.org/bugs/show_bug.cgi?id=15549

            Bug ID: 15549
           Summary: "b = a + 1" doesn't work right
           Product: libraries
           Version: trunk
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: MC
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

$ cat t.s
a:
  .byte 0, 1, 2, 3

b = a + 1
$ clang -c t.s -no-integrated-as
$ readelf -sW t.o

Symbol table '.symtab' contains 6 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 SECTION LOCAL  DEFAULT    1 
     2: 0000000000000000     0 SECTION LOCAL  DEFAULT    2 
     3: 0000000000000000     0 SECTION LOCAL  DEFAULT    3 
     4: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT    1 a
     5: 0000000000000001     0 NOTYPE  LOCAL  DEFAULT    1 b
$ clang -c t.s 
$ readelf -sW t.o

Symbol table '.symtab' contains 6 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT    1 a
     2: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  ABS b
     3: 0000000000000000     0 SECTION LOCAL  DEFAULT    1 
     4: 0000000000000000     0 SECTION LOCAL  DEFAULT    2 
     5: 0000000000000000     0 SECTION LOCAL  DEFAULT    3 

With the integrated assembler, b's section index is ABS when it should be a's
section index, and its value is 0 when it should be 1.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to