http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50685
Bug #: 50685
Summary: Compiler segmentation fault on AIX when constructors
and destructors are implemented in the implementation
file (non-inline).
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: barry_mathe...@yahoo.com
Created attachment 25453
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25453
detailed output for the good.cpp and bad.cpp compile runs
username@aixhost:~/code/aix1-->cat good.cpp
#include
#include
using namespace std;
class MyClass
{
public:
int x;
MyClass(){ x = 0;};
int GetX();
};
int MyClass::GetX()
{
return x;
}
int main()
{
cout << "Hello world!" << endl;
return 0;
}
username@aixhost:~/code/aix1-->g++ -v -save-temps good.cpp
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/lto-wrapper
Target: powerpc-ibm-aix5.3.0.0
Configured with: ../gcc-4.6.1/configure --with-as=/usr/bin/as
--with-ld=/usr/bin/ld --enable-languages=c,c++,fortran --prefix=/opt/freeware
--mandir=/opt/freeware/man --infodir=/opt/freeware/info --enable-threads
--enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd
--host=powerpc-ibm-aix5.3.0.0
Thread model: aix
gcc version 4.6.1 (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-shared-libgcc'
/opt/freeware/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/cc1plus -E -quiet -v
-D_ALL_SOURCE good.cpp -fpch-preprocess -o good.ii
ignoring nonexistent directory
"/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/../../../../powerpc-ibm-aix5.3.0.0/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/include/c++
/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/include/c++/powerpc-ibm-aix5.3.0.0
/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/include/c++/backward
/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/include
/usr/local/include
/opt/freeware/include
/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/include-fixed
/usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-shared-libgcc'
/opt/freeware/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/cc1plus -fpreprocessed
good.ii -quiet -dumpbase good.cpp -auxbase good -version -o good.s
GNU C++ (GCC) version 4.6.1 (powerpc-ibm-aix5.3.0.0)
compiled by GNU C version 4.6.1, GMP version 4.3.2, MPFR version
2.4.2-p1, MPC version 0.8.1
warning: MPC header version 0.8.1 differs from library version 0.9.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=32768
GNU C++ (GCC) version 4.6.1 (powerpc-ibm-aix5.3.0.0)
compiled by GNU C version 4.6.1, GMP version 4.3.2, MPFR version
2.4.2-p1, MPC version 0.8.1
warning: MPC header version 0.8.1 differs from library version 0.9.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=32768
Compiler executable checksum: 68e3d0057093920041387ac67e49bcf7
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-shared-libgcc'
/usr/bin/as -u -mppc -o good.o good.s
COMPILER_PATH=/opt/freeware/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/:/opt/freeware/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/:/opt/freeware/libexec/gcc/powerpc-ibm-aix5.3.0.0/:/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/:/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/
LIBRARY_PATH=/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/:/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-shared-libgcc'
/opt/freeware/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/collect2
-bpT:0x1000 -bpD:0x2000 -btextro -bnodelcsect /lib/crt0.o
-L/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.6.1
-L/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/../../.. good.o -lstdc++
-lm -lgcc_s /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/libgcc.a -lc
-lgcc_s /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/libgcc.a
username@aixhost:~/code/aix1-->cat bad.cpp
#include
#include
using namespace std;
class MyClass
{
public:
int x;
MyClass();
int GetX();
};
MyClass::MyClass()
{
x = 0;
}
int MyClass::GetX()
{
return x;
}
int main()
{
cout << "Hello world!" << endl;
return 0;
}
username@aixhost:~/code/aix1-->g++ -v -save-temps bad.cpp
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.6.1/lto-wrapper
Target: powerpc-ibm-aix5.3.0.0
Configured with: ../gcc-4.6.1/configure --with-as=/usr/bin/as
--with-ld=/usr/bin/ld --enable-languages=c,c++,fortran --prefix=/opt/freeware
--mandir=/opt/freeware/man --infodir=/opt/freeware/info --enable-threads
--enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd
--host=powerpc-ibm-aix5.3.0.0
Thread m