Red Hat Bugzilla – Bug 113267
g++ segfaults on "cannot resolve address of overloaded function"
Last modified: 2007-11-30 17:10:35 EST
Description of problem:
g++ segfaulted while compiling and finding an overloaded function
whose arguments didn't match any recognized definition.
Version-Release number of selected component (if applicable):
gcc version 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
I was trying to compile a C++ Qt program using gcc 3.3.
The program is attached.
The line I used to compile the program was:
g++ -lqt MainWindow.cpp -o MainWindow
When I invoked this, the following messages were returned:
MainWindow.cpp: In constructor `MyMainWindow::MyMainWindow()':
MainWindow.cpp:51: error: statement cannot resolve address of ov
g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
I tried this again using:
g++ -lqt -c MainWindow.cpp
and got the same error message and segfault.
The line it returned the error on was:
This should have been
since insertSeparator() is a member function of QPopupMenu. If I
change it to
the program compiles and links successfully.
I expected the error message, but not the segfault.
That's about all I know (I'm fairly new to this). If you have any
questions, feel free to mail me at firstname.lastname@example.org.
Created attachment 96882 [details]
C++ Qt progam I was trying to compile when cc1plus segfaulted
Compiling this program will crash cc1plus.
Source (as opposed to preprocessed source) is not much useful.
Anyway, please try first gcc-3.3.2-5 from FC1 testing updates
Howard Clements - 20040113 1832 EST
Recompiled with gcc-3.3.2-6 (3.3.2 20040108), and it still segfaulted.
I'm attaching the output from:
g++ -lqt -E MainWindow.cpp -o preprocessed_output
Created attachment 96956 [details]
Preprocessed output from g++ -lqt -E MainWindow.cpp
Created attachment 104709 [details]
Gcc 3.4 does not ICE and yields
z.cc: In constructor `MyMainWindow::MyMainWindow()':
z.cc:12973: error: statement cannot resolve address of overloaded function