https://llvm.org/bugs/show_bug.cgi?id=30817
Bug ID: 30817 Summary: Negative line number on 'expected relocation error' Product: new-bugs Version: 3.9 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: pmatos@linki.tools CC: llvm-bugs@lists.llvm.org Classification: Unclassified test.S: .4byte ~foo #include "foo.h" foo.h: is an empty file. Then run: $ clang -cc1as -filetype obj -main-file-name test.S -dwarf-version=4 -fdebug-compilation-dir /home/pmatos/Clients/embecosm/BUGS/b447/asm-lineno -mrelocation-model static -dwarf-version=4 -o test.o test.s test.S:-2:8: error: expected relocatable expression .4byte ~foo ^ I very much doubt there's a line -2 in the file. However, I know what the problem is. At this point the parsing of the asm has finished. However the error handler calls DiagHandler which assumes the parsing is ongoing and uses CppHashLoc variables. These variable are however of no more use because they all now point to the last Hash line seen in the file, not the one before the error. I will submit a patch to fix this soon. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs