[LLVMbugs] [Bug 8155] New: couldn't get a simple c++ code to compile

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Sep 15 09:25:01 PDT 2010


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

           Summary: couldn't get a simple c++ code to compile
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: gryzman at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


following code causes it to die:

#include <string.h>
#include <string>

#include <stdio.h>
#include <stdlib.h>
#include <iostream>

int main()
{
  const char* f = "dupa";
  std::string dupa = std::string(f);

  std::cout << dupa;

  return 0;
}


I got following output:

 clang++ dupa.cpp 
0  clang 0x0955f658
Stack dump:
0.      Program arguments: /usr/local/bin/clang -cc1 -triple i386-pc-linux-gnu
-S -disable-free -main-file-name dupa.cpp -mrelocation-model static
-mdisable-fp-elim -mconstructor-aliases -target-cpu pentium4
-target-linker-version 2.15.92.0.2 -resource-dir /usr/local/lib/clang/2.9
-ferror-limit 19 -fmessage-length 237 -fexceptions -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-F7fhl6.s -x c++
dupa.cpp 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@main'
clang: error: clang frontend command failed due to signal 11 (use -v to see
invocation)

clang version 2.9 (trunk 113973)
Target: i386-pc-linux-gnu
Thread model: posix
 "/usr/local/bin/clang" -cc1 -triple i386-pc-linux-gnu -S -disable-free
-main-file-name dupa.cpp -mrelocation-model static -mdisable-fp-elim
-mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.15.92.0.2
-v -resource-dir /usr/local/lib/clang/2.9 -ferror-limit 19 -fmessage-length 237
-fexceptions -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/cc-dDpr2o.s -x c++ dupa.cpp
clang -cc1 version 2.9 based upon llvm 2.9svn hosted on i386-pc-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/3.4.6
 /usr/include/c++/3.4.6/i386-redhat-linux
 /usr/include/c++/3.4.6/backward
 /usr/local/include
 /usr/local/lib/clang/2.9/include
 /usr/include
End of search list.
0  clang 0x0955f658
Stack dump:
0.      Program arguments: /usr/local/bin/clang -cc1 -triple i386-pc-linux-gnu
-S -disable-free -main-file-name dupa.cpp -mrelocation-model static
-mdisable-fp-elim -mconstructor-aliases -target-cpu pentium4
-target-linker-version 2.15.92.0.2 -v -resource-dir /usr/local/lib/clang/2.9
-ferror-limit 19 -fmessage-length 237 -fexceptions -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-dDpr2o.s -x c++
dupa.cpp 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@main'
clang: error: clang frontend command failed due to signal 11 (use -v to see
invocation)

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list