[PR42535, fixed in 4.5] -fschedule-insns crashes g++
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc |
Invalid
|
Medium
|
|||
gcc-4.4 (Ubuntu) |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
Binary package hint: gcc-4.4
g++ crashes when -fschedule-insns is activated, possibly because of other optimization options.
brief foreword:
if -O2 or -O3 is specified, while using boost::interprocess (1.40.0), pthread_
details:
I thus tried to specify on my Makefile's CPPFLAGS the flag -O1 and I then added all the optimization switches triggered by -O2 and -O3, as specified by "man gcc". curiously enough, they crashed g++ on compiling the problematic module above (everything's ok with the other project's sources). checking by hand, I found out that simply removing -fschedule-insns both avoid the g++ crash AND solves my mutex problem.
note that something like -O3 -fno-schedule-insns won't give any crash on g++ side, but will yield the described mutex problem.
I'm a bit confused about these strange behaviors (why specifying the switches triggered by -O2 or -O3 is different than actually having -O2 or -O3? why a run-time error depending on the optimization level, but not when the same code is compiled alone elsewhere?), but I hope they can be meaningful for improving gcc.
(I believe the preprocessed input was sent attached this report, please let me know should this not be the case.)
ProblemType: Crash
Architecture: amd64
Date: Wed Nov 11 11:47:42 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/lib/
NonfreeKernelMo
Package: g++-4.4 4.4.1-4ubuntu8
ProcVersionSign
SourcePackage: gcc-4.4
Uname: Linux 2.6.31-14-generic x86_64
Changed in gcc: | |
status: | Unknown → Invalid |
Changed in gcc: | |
importance: | Unknown → Medium |
seen in 4.3 and 4.4, fixed in 4.5