<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - gcc -g outputs assembly that raises an assertion in MCMachOStreamer.cpp"
href="https://bugs.llvm.org/show_bug.cgi?id=41840">41840</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>gcc -g outputs assembly that raises an assertion in MCMachOStreamer.cpp
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>LLVM assembly language parser
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ken.cunningham.webuse@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>any source file compiled with "gcc -g" generates assembly that raises an
assertion as above when sent to clang to assemble:
$ cat kentest.cpp
#include <iostream>
using namespace std;
int main()
{
cout << "Hello, World!";
return 0;
}
$ g++ -g -v kentest.cpp
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin18/8.3.0/lto-wrapper
Target: x86_64-apple-darwin18
Configured with:
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc8/gcc8/work/gcc-8.3.0/configure
--prefix=/opt/local --build=x86_64-apple-darwin18
--enable-languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc8
--includedir=/opt/local/include/gcc8 --infodir=/opt/local/share/info
--mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-8
--with-local-prefix=/opt/local --with-system-zlib --disable-nls
--program-suffix=-mp-8 --with-gxx-include-dir=/opt/local/include/gcc8/c++/
--with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local
--with-isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto
--enable-libstdcxx-time --with-build-config=bootstrap-debug
--with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld
--with-ar=/opt/local/bin/ar --with-bugurl=<a href="https://trac.macports.org/newticket">https://trac.macports.org/newticket</a>
--disable-tls --with-pkgversion='MacPorts gcc8 8.3.0_4'
--with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
Thread model: posix
gcc version 8.3.0 (MacPorts gcc8 8.3.0_4)
COLLECT_GCC_OPTIONS='-g' '-v' '-mmacosx-version-min=10.14.0'
'-asm_macosx_version_min=10.14' '-shared-libgcc' '-mtune=core2'
/opt/local/libexec/gcc/x86_64-apple-darwin18/8.3.0/cc1plus -quiet -v
-D__DYNAMIC__ kentest.cpp -fPIC -feliminate-unused-debug-symbols -quiet
-dumpbase kentest.cpp -mmacosx-version-min=10.14.0 -mtune=core2 -auxbase
kentest -g -version -o
/var/folders/hp/684rvltd0c127nmt0bh3bpzm0000gn/T//ccUg49DE.s
GNU C++14 (MacPorts gcc8 8.3.0_4) version 8.3.0 (x86_64-apple-darwin18)
compiled by GNU C version 8.3.0, GMP version 6.1.2, MPFR version 4.0.2,
MPC version 1.1.0, isl version isl-0.21-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/opt/local/include"
ignoring nonexistent directory
"/opt/local/lib/gcc8/gcc/x86_64-apple-darwin18/8.3.0/../../../../../x86_64-apple-darwin18/include"
ignoring nonexistent directory
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/opt/local/include/gcc8/c++/
/opt/local/include/gcc8/c++//x86_64-apple-darwin18
/opt/local/include/gcc8/c++//backward
/opt/local/lib/gcc8/gcc/x86_64-apple-darwin18/8.3.0/include
/opt/local/lib/gcc8/gcc/x86_64-apple-darwin18/8.3.0/include-fixed
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks
End of search list.
GNU C++14 (MacPorts gcc8 8.3.0_4) version 8.3.0 (x86_64-apple-darwin18)
compiled by GNU C version 8.3.0, GMP version 6.1.2, MPFR version 4.0.2,
MPC version 1.1.0, isl version isl-0.21-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 0f0e48f60b7ffdb4cc6cc10429e3fc62
COLLECT_GCC_OPTIONS='-g' '-v' '-mmacosx-version-min=10.14.0' '-shared-libgcc'
'-mtune=core2'
/opt/local/bin/as -arch x86_64 -v -force_cpusubtype_ALL
-mmacosx-version-min=10.14 -o
/var/folders/hp/684rvltd0c127nmt0bh3bpzm0000gn/T//ccpPmfZZ.o
/var/folders/hp/684rvltd0c127nmt0bh3bpzm0000gn/T//ccUg49DE.s
clang version 9.0.0 (trunk 357237)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-devel/bin
"/opt/local/libexec/llvm-devel/bin/clang" -cc1as -triple
x86_64-apple-macosx10.14.0 -filetype obj -main-file-name ccUg49DE.s -target-cpu
penryn -fdebug-compilation-dir /Users/cunningh -dwarf-debug-producer clang
version 9.0.0 (trunk 357237) -dwarf-version=4 -mrelocation-model pic -o
/var/folders/hp/684rvltd0c127nmt0bh3bpzm0000gn/T//ccpPmfZZ.o
/var/folders/hp/684rvltd0c127nmt0bh3bpzm0000gn/T//ccUg49DE.s
Assertion failed: (!CreatedADWARFSection && "Creating regular section after
DWARF"), function ChangeSection, file
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-devel/llvm-devel/work/trunk/lib/MC/MCMachOStreamer.cpp,
line 158.
Stack dump:
0. Program arguments: /opt/local/libexec/llvm-devel/bin/clang -cc1as
-triple x86_64-apple-macosx10.14.0 -filetype obj -main-file-name ccUg49DE.s
-target-cpu penryn -fdebug-compilation-dir /Users/cunningh
-dwarf-debug-producer clang version 9.0.0 (trunk 357237) -dwarf-version=4
-mrelocation-model pic -o
/var/folders/hp/684rvltd0c127nmt0bh3bpzm0000gn/T//ccpPmfZZ.o
/var/folders/hp/684rvltd0c127nmt0bh3bpzm0000gn/T//ccUg49DE.s
0 libLLVM.dylib 0x000000010971aed8
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1 libLLVM.dylib 0x000000010971b2c9 SignalHandler(int) + 200
2 libsystem_platform.dylib 0x00007fff79f5bb5d _sigtramp + 29
3 libsystem_platform.dylib 0x00000001095e4938 _sigtramp + 2405993976
4 libsystem_c.dylib 0x00007fff79e1b6a6 abort + 127
5 libsystem_c.dylib 0x00007fff79de420d basename_r + 0
6 libLLVM.dylib 0x000000010a3d3a57 (anonymous
namespace)::MCMachOStreamer::ChangeSection(llvm::MCSection*, llvm::MCExpr
const*) + 793
7 libLLVM.dylib 0x000000010a3e17d9
llvm::MCStreamer::SwitchSection(llvm::MCSection*, llvm::MCExpr const*) + 97
8 libLLVM.dylib 0x000000010a41cb1d (anonymous
namespace)::DarwinAsmParser::parseSectionSwitch(llvm::StringRef,
llvm::StringRef, unsigned int, unsigned int, unsigned int) + 201
9 libLLVM.dylib 0x000000010a41d2f4 bool
llvm::MCAsmParserExtension::HandleDirective<(anonymous
namespace)::DarwinAsmParser, &((anonymous
namespace)::DarwinAsmParser::parseSectionDirectiveModInitFunc(llvm::StringRef,
llvm::SMLoc))>(llvm::MCAsmParserExtension*, llvm::StringRef, llvm::SMLoc) + 44
10 libLLVM.dylib 0x000000010a405fe1 (anonymous
namespace)::AsmParser::parseStatement((anonymous
namespace)::ParseStatementInfo&, llvm::MCAsmParserSemaCallback*) + 3833
11 libLLVM.dylib 0x000000010a401877 (anonymous
namespace)::AsmParser::Run(bool, bool) + 389
12 clang 0x000000010719dbc6 cc1as_main(llvm::ArrayRef<char
const*>, char const*, void*) + 10730
13 clang 0x0000000107198df0 main + 7865
14 libdyld.dylib 0x00007fff79d763d5 start + 1
15 libdyld.dylib 0x0000000000000014 start + 2250808384
clang: error: unable to execute command: Abort trap: 6
clang: error: clang integrated assembler command failed due to signal (use -v
to see invocation)
clang version 9.0.0 (trunk 357237)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-devel/bin
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>