[LLVMbugs] [Bug 17958] New: asm constraint "+g" crashes on a double with -m32

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Nov 16 09:33:57 PST 2013


            Bug ID: 17958
           Summary: asm constraint "+g" crashes on a double with -m32
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: marc.glisse at normalesup.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

double f(double x){
  asm volatile ("" : "+g"(x) );
  return x;

stedding /tmp/cl $ /tmp/clang/inst/bin/clang++ -m32 marc.cpp -c -Wall
clang: /data/repos/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:387:
void getCopyToParts(llvm::SelectionDAG&, llvm::SDLoc, llvm::SDValue,
llvm::SDValue*, unsigned int, llvm::MVT, const llvm::Value*,
llvm::ISD::NodeType): Assertion `(PartVT.isInteger() || PartVT == MVT::x86mmx)
&& ValueVT.isInteger() && "Unknown mismatch!"' failed.
0  clang           0x000000000230c5a2 llvm::sys::PrintStackTrace(_IO_FILE*) +
1  clang           0x000000000230c1c4
2  libpthread.so.0 0x00007fd623375210
3  libc.so.6       0x00007fd6223ab1e5 gsignal + 53
4  libc.so.6       0x00007fd6223ae398 abort + 328
5  libc.so.6       0x00007fd6223a4272
6  libc.so.6       0x00007fd6223a4322
7  clang           0x0000000001b5d436
8  clang           0x0000000001b5d690
9  clang           0x0000000001b74fcd
llvm::SelectionDAGBuilder::visitInlineAsm(llvm::ImmutableCallSite) + 12813
10 clang           0x0000000001b62136
llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) + 374
11 clang           0x0000000001b853ca
llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) + 58
12 clang           0x0000000001b98891
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 49
13 clang           0x0000000001b9aa07
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 1799
14 clang           0x0000000001b9bf90
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 752
15 clang           0x000000000229e1df
llvm::FPPassManager::runOnFunction(llvm::Function&) + 655
16 clang           0x000000000229e6ab
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
17 clang           0x000000000229e9ed
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 797
18 clang           0x000000000099d99b
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 2267
19 clang           0x000000000099b44c
20 clang           0x0000000000b1344b clang::ParseAST(clang::Sema&, bool, bool)
+ 507
21 clang           0x00000000009999fc clang::CodeGenAction::ExecuteAction() +
22 clang           0x0000000000822159 clang::FrontendAction::Execute() + 249
23 clang           0x0000000000801220
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 352
24 clang           0x00000000007e9f11
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1857
25 clang           0x00000000007e4fa8 cc1_main(char const**, char const**, char
const*, void*) + 1208
26 clang           0x00000000007c4880 main + 688
27 libc.so.6       0x00007fd622397995 __libc_start_main + 245
28 clang           0x00000000007e3e1d
Stack dump:
0.    Program arguments: /tmp/clang/inst/bin/clang -cc1 -triple
i386-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
marc.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -fuse-init-array -target-cpu pentium4
-target-linker-version -coverage-file /tmp/cl/marc.o
-resource-dir /tmp/clang/inst/bin/../lib/clang/3.4 -internal-isystem
/usr/lib/gcc/i486-linux-gnu/4.8/../../../../include/c++/4.8 -internal-isystem
-internal-isystem /usr/local/include -internal-isystem
/tmp/clang/inst/bin/../lib/clang/3.4/include -internal-externc-isystem
/usr/include/i386-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -Wall -fdeprecated-macro
-fdebug-compilation-dir /tmp/cl -ferror-limit 19 -fmessage-length 381
-mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o marc.o -x c++
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'marc.cpp'.
4.    Running pass 'X86 DAG->DAG Instruction Selection' on function '@_Z1fd'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
clang version 3.4 (trunk 194919)
Target: i386-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: 

Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/marc-db5df6.cpp
clang: note: diagnostic msg: /tmp/marc-db5df6.sh
clang: note: diagnostic msg: 

stedding /tmp/cl $ cat ../marc-db5df6.*
# 1 "<built-in>" 1
# 1 "marc.cpp" 1
double f(double x){
  asm volatile ("" : "+g"(x) );
  return x;
 "/tmp/clang/inst/bin/clang" -cc1 -triple i386-unknown-linux-gnu -emit-obj
-mrelax-all -disable-free -main-file-name marc.cpp -mrelocation-model static
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-fuse-init-array -target-cpu pentium4 -target-linker-version
-Wall -fdeprecated-macro -ferror-limit 19 -fmessage-length 381 -mstackrealign
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-slp -x c++ marc-db5df6.cpp

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/20131116/d0b9c473/attachment.html>

More information about the llvm-bugs mailing list