Bug 113267 - g++ segfaults on "cannot resolve address of overloaded function"
Summary: g++ segfaults on "cannot resolve address of overloaded function"
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc   
(Show other bugs)
Version: rawhide
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-11 16:36 UTC by Howard Clements
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-04 08:29:15 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 16:38 UTC, Howard Clements
no flags Details
Preprocessed output from g++ -lqt -E MainWindow.cpp (172.65 KB, text/plain)
2004-01-13 23:38 UTC, Howard Clements
no flags Details
un (53.92 KB, application/octet-stream)
2004-10-04 08:27 UTC, Richard Henderson
no flags Details

Description Howard Clements 2004-01-11 16:36:20 UTC
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:

...
file->insertSeparator;
...

This should have been

file->insertSeparator();

since insertSeparator() is a member function of QPopupMenu.  If I
change it to 

file->insertSeparator(); 

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.

Thanks,
Howard Clements

Comment 1 Howard Clements 2004-01-11 16:38:20 UTC
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 18:53:53 UTC
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 23:32:23 UTC
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 23:38:04 UTC
Created attachment 96956 [details]
Preprocessed output from g++ -lqt -E MainWindow.cpp

Comment 5 Richard Henderson 2004-10-04 08:27:24 UTC
Created attachment 104709 [details]
un

Comment 6 Richard Henderson 2004-10-04 08:29:15 UTC
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.