Bug 113267 - g++ segfaults on "cannot resolve address of overloaded function"
g++ segfaults on "cannot resolve address of overloaded function"
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2004-01-11 11:36 EST by Howard Clements
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-04 04:29:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
C++ Qt progam I was trying to compile when cc1plus segfaulted (2.37 KB, text/plain)
2004-01-11 11:38 EST, Howard Clements
no flags Details
Preprocessed output from g++ -lqt -E MainWindow.cpp (172.65 KB, text/plain)
2004-01-13 18:38 EST, Howard Clements
no flags Details
un (53.92 KB, application/octet-stream)
2004-10-04 04:27 EDT, Richard Henderson
no flags Details

  None (edit)
Description Howard Clements 2004-01-11 11:36:20 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)

How reproducible:

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
erloaded fuction
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.

Actual results:
See above.

Expected results:
I expected the error message, but not the segfault.

Additional info:

That's about all I know (I'm fairly new to this).  If you have any
questions, feel free to mail me at hclements@charter.net.

Howard Clements
Comment 1 Howard Clements 2004-01-11 11:38:20 EST
Created attachment 96882 [details]
C++ Qt progam I was trying to compile when cc1plus segfaulted

Compiling this program will crash cc1plus.
Comment 2 Jakub Jelinek 2004-01-11 13:53:53 EST
Source (as opposed to preprocessed source) is not much useful.
Anyway, please try first gcc-3.3.2-5 from FC1 testing updates
(http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/1/ ).
Comment 3 Howard Clements 2004-01-13 18:32:23 EST
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
Comment 4 Howard Clements 2004-01-13 18:38:04 EST
Created attachment 96956 [details]
Preprocessed output from g++ -lqt -E MainWindow.cpp
Comment 5 Richard Henderson 2004-10-04 04:27:24 EDT
Created attachment 104709 [details]
Comment 6 Richard Henderson 2004-10-04 04:29:15 EDT
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

Note You need to log in before you can comment on or make changes to this bug.