This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53308] New: AIX 5.3 segmentation fault with basic_ofstream, pthread and -O2
- From: "askees at appfluent dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 May 2012 16:34:36 +0000
- Subject: [Bug c++/53308] New: AIX 5.3 segmentation fault with basic_ofstream, pthread and -O2
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53308
Bug #: 53308
Summary: AIX 5.3 segmentation fault with basic_ofstream,
pthread and -O2
Classification: Unclassified
Product: gcc
Version: 4.4.7
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: askees@appfluent.com
Created attachment 27365
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27365
This is the preprocessed file
On AIX 5.3, this program has a segmentation fault when built using both pthread
and O2. It runs normally when that particular combination is not used.
Source file: t.cpp
#include <fstream>
int main(int argc, char** argv)
{
std::basic_ofstream<char> f("a.txt", std::ios::out);
return 0;
}
g++ -v
Using built-in specs.
Target: powerpc-ibm-aix5.3.0.0
Configured with: /home/askees/gcc/gcc-4.4.7/configure
--prefix=/usr/local/gnu/gcc/gcc-4.4.7 --with-gmp=/usr/local/gnu/gmp/gmp-5.0.1
--with-mpfr=/usr/local/gnu/mpfr/mpfr-2.4.2 --enable-threads=posix
--enable-languages=c,c++ --with-as=/usr/bin/as --with-ld=/usr/bin/ld
--host=powerpc-ibm-aix5.3.0.0 --target=powerpc-ibm-aix5.3.0.0
--build=powerpc-ibm-aix5.3.0.0
Thread model: aix
gcc version 4.4.7 (GCC)
Compile
g++ t.cpp -O2 -L/usr/lib/threads -pthread