Component: gcc-3.3.2-1 Reproducible: Always Description of problem: $ g++ --version g++ (GCC) 3.3.2 20031022 (Red Hat Linux 3.3.2-1) $ g++ sshfs.cpp g++: Internal error: Segmentation fault (program cc1plus) this is on file lufs-0.9.7/filesystems/sshfs/sshfs.cpp from http://lufs.sourceforge.net
In that case g++ should have stored preprocessed output to a temporary file and told you where it is. Please attach it here. If it did not create this file, please preprocess it yourself (g++ -save-temps sshfs.cpp) and attach sshfs.ii it creates.
I've distilled the problem down to the following: #include <string> using namespace std; struct S { string str; } v; int main (void) { v = (struct S){string("str")}; } Hope this is enough.
Indeed even this is enough: #include <string> using namespace std; string string_var; struct S { string str; } v; int main () { v = (struct S){string_var}; }
Created attachment 95804 [details] g++ -save-temps z.cpp The z.ii file created by g++ -save-temps z.cpp (which segfaults with an empty z.s) #include <string> using namespace std; string string_var; struct S { string str; } v; int main() { v = (struct S){string_var}; }
This looks badly like http://gcc.gnu.org/PR12726 Will be fixed in gcc-3.3.2-2.