[Bug c++/60893] New: Unable to use link time optimizer with profiler
dturnbull at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Apr 19 05:14:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60893
Bug ID: 60893
Summary: Unable to use link time optimizer with profiler
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dturnbull at gmail dot com
The following works with gcc-4.8.2.
It fails with gcc-4.9.0-RC-20140411.
Using this simple main.cpp:
#include <iostream>
#include <vector>
#include <complex>
int main() {
std::vector<std::complex<float> > data(10);
std::cout << "Hello World.\n";
}
Attempt to compile and run as such:
rm main.gcda
g++-4.9 -o profiler main.cpp -flto -O3 -fprofile-generate
./profiler
g++-4.9 -o helloworld main.cpp -flto -O3 -fprofile-use
./helloworld
The linker error output is:
Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse,
file /SourceCache/ld64/ld64-236.4/src/ld/parsers/macho_relocatable_file.cpp,
line 1685.
0 0x10227e0e7 __assert_rtn + 144
1 0x1022a3759
mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions
const&) + 3213
2 0x1022889e2 mach_o::relocatable::Parser<x86_64>::parse(unsigned char
const*, unsigned long long, char const*, long, ld::File::Ordinal,
mach_o::relocatable::ParserOptions const&) + 374
3 0x1022c8303 ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool)
+ 651
4 0x1022c9ff9 ld::tool::InputFiles::parseWorkerThread() + 271
5 0x7fff84598899 _pthread_body + 138
6 0x7fff8459872a _pthread_struct_init + 0
More information about the Gcc-bugs
mailing list