Bug 113267

Summary: g++ segfaults on "cannot resolve address of overloaded function"
Product: [Fedora] Fedora Reporter: Howard Clements <hclements>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
C++ Qt progam I was trying to compile when cc1plus segfaulted
none
Preprocessed output from g++ -lqt -E MainWindow.cpp
none
un none

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.

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