[LLVMbugs] [Bug 18593] New: MachineCSE crash on invalid inline asm
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jan 23 09:49:49 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18593
Bug ID: 18593
Summary: MachineCSE crash on invalid inline asm
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: rnk at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
$ cat t.cpp
int main(int argc, char **argv) {
unsigned char __result;
__asm__ ("mov %%fs:(%1), %0" : "=r" (__result) : "i,r" (argc));
return __result;
}
$ ../../build_debug/bin/clang -cc1 t.cpp -O2 -S -o -
t.cpp:3:12: error: invalid operand for inline asm constraint 'i'
__asm__ ("mov %%fs:(%1), %0" : "=r" (__result) : "i,r" (argc));
^
Stack dump:
0. Program arguments: D:\src\llvm\build_debug\bin\clang.exe -cc1 t.cpp -O2
-S -o -
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 't.cpp'.
4. Running pass 'Machine Common Subexpression Elimination' on function
'@main'
Short trace:
llvm::MachineInstr::getOpcode()
llvm::MachineInstr::isCopy()
`anonymous namespace'::MachineCSE::PerformTrivialCoalescing()
`anonymous namespace'::MachineCSE::ProcessBlock()
`anonymous namespace'::MachineCSE::PerformCSE()
`anonymous namespace'::MachineCSE::runOnMachineFunction()
llvm::MachineFunctionPass::runOnFunction()
llvm::FPPassManager::runOnFunction()
llvm::FPPassManager::runOnModule()
`anonymous namespace'::MPPassManager::runOnModule()
llvm::legacy::PassManagerImpl::run()
llvm::legacy::PassManager::run()
`anonymous namespace'::EmitAssemblyHelper::EmitAssembly()
clang::EmitBackendOutput()
clang::BackendConsumer::HandleTranslationUnit()
clang::ParseAST()
clang::ASTFrontendAction::ExecuteAction()
clang::CodeGenAction::ExecuteAction()
clang::FrontendAction::Execute()
clang::CompilerInstance::ExecuteAction()
clang::ExecuteCompilerInvocation()
cc1_main()
with line numbers:
llvm::MachineInstr::getOpcode()
d:\src\llvm\include\llvm\codegen\machineinstr.h, line 261 + 0x11 byte(s)
llvm::MachineInstr::isCopy() d:\src\llvm\include\llvm\codegen\machineinstr.h,
line 670 + 0x8 byte(s)
`anonymous namespace'::MachineCSE::PerformTrivialCoalescing()
d:\src\llvm\lib\codegen\machinecse.cpp, line 129 + 0x8 byte(s)
`anonymous namespace'::MachineCSE::ProcessBlock()
d:\src\llvm\lib\codegen\machinecse.cpp, line 464 + 0x13 byte(s)
`anonymous namespace'::MachineCSE::PerformCSE()
d:\src\llvm\lib\codegen\machinecse.cpp, line 661 + 0x16 byte(s)
`anonymous namespace'::MachineCSE::runOnMachineFunction()
d:\src\llvm\lib\codegen\machinecse.cpp, line 676
llvm::MachineFunctionPass::runOnFunction()
d:\src\llvm\lib\codegen\machinefunctionpass.cpp, line 33 + 0x13 byte(s)
llvm::FPPassManager::runOnFunction() d:\src\llvm\lib\ir\legacypassmanager.cpp,
line 1537 + 0x17 byte(s)
llvm::FPPassManager::runOnModule() d:\src\llvm\lib\ir\legacypassmanager.cpp,
line 1557 + 0x15 byte(s)
`anonymous namespace'::MPPassManager::runOnModule()
d:\src\llvm\lib\ir\legacypassmanager.cpp, line 1615 + 0x17 byte(s)
llvm::legacy::PassManagerImpl::run() d:\src\llvm\lib\ir\legacypassmanager.cpp,
line 1710 + 0x1B byte(s)
llvm::legacy::PassManager::run() d:\src\llvm\lib\ir\legacypassmanager.cpp, line
1746
`anonymous namespace'::EmitAssemblyHelper::EmitAssembly()
d:\src\llvm\tools\clang\lib\codegen\backendutil.cpp, line 605
clang::EmitBackendOutput() d:\src\llvm\tools\clang\lib\codegen\backendutil.cpp,
line 620
clang::BackendConsumer::HandleTranslationUnit()
d:\src\llvm\tools\clang\lib\codegen\codegenaction.cpp, line 154 + 0x55 byte(s)
clang::ParseAST() d:\src\llvm\tools\clang\lib\parse\parseast.cpp, line 153 +
0x18 byte(s)
clang::ASTFrontendAction::ExecuteAction()
d:\src\llvm\tools\clang\lib\frontend\frontendaction.cpp, line 477 + 0x30
byte(s)
clang::CodeGenAction::ExecuteAction()
d:\src\llvm\tools\clang\lib\codegen\codegenaction.cpp, line 434
clang::FrontendAction::Execute()
d:\src\llvm\tools\clang\lib\frontend\frontendaction.cpp, line 379 + 0xF byte(s)
clang::CompilerInstance::ExecuteAction()
d:\src\llvm\tools\clang\lib\frontend\compilerinstance.cpp, line 706
clang::ExecuteCompilerInvocation()
d:\src\llvm\tools\clang\lib\frontendtool\executecompilerinvocation.cpp, line
238 + 0x11 byte(s)
cc1_main() d:\src\llvm\tools\clang\tools\driver\cc1_main.cpp, line 101 + 0xE
byte(s)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140123/2bee68bc/attachment.html>
More information about the llvm-bugs
mailing list