- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 268
Closed
Description
Here is a program with some invalid inline assembly:
void main() {
asm {
"a";
}
}
I compile with
$ ldc2 asm.d
asm.d(3):1:2: error: invalid instruction mnemonic 'a'
a
^
It correctly shows an error, but also produces an executable (it seems like it just removed the inline asm statement and compiled everything else), and the return code from compiling is 0 (success). This could go unnoticed if checking for success is automated based on the shell command's return code. I think the problem is that this error occurs during codegen, and there is no code to handle a codegen error in driver/toobj.cpp
(that I could find).
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Fix regression with LLVM 13+: Return non-zero exit code for inline as…
Fix regression with LLVM 13+: some errors in inline assembly don't st…
Fix regression with LLVM 13+: some errors in inline assembly don't st…