Bug 67013 - Internal compiler error in find_function_data, at function.c:328
Internal compiler error in find_function_data, at function.c:328
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.2
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-06-19 11:04 EDT by Sxren Skov
Modified: 2007-04-18 12:43 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-15 16:42:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Sample code that results in the error. (446 bytes, text/plain)
2002-06-19 11:06 EDT, Sxren Skov
no flags Details

  None (edit)
Description Sxren Skov 2002-06-19 11:04:00 EDT
Description of Problem:

g++ and g++3 reports: Internal compiler error in find_function_data, at
function.c:328

How Reproducible: Every time

Steps to Reproduce:
1.  compile the code with g++ or g++3

Actual Results:
~/cache/src/funnelHeap> g++3 error.cpp
error.cpp: In constructor `priority_queue<T, Compare>::priority_queue() [with T 
   = int, Compare = int]':
error.cpp:21:   instantiated from `priority_queue<T, Compare>::priority_queue()
[with T = int, Compare = int]'
error.cpp:26:   instantiated from here
error.cpp:21: Internal compiler error in find_function_data, at function.c:328
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
~/cache/src/funnelHeap> 


Expected Results:
Compilation of the file.

Additional Information:
The code that gives the problem is:
int K[1] = {8};


template<class T, class Compare>
class Buf {
public:
  Buf(T* start_) {
  }
};

template<class T, class Compare = int>
class priority_queue {
public:
  T B[K[0]]; 
  // if K[0] is replaced by its value 8, the error is removed.

  Buf<T, Compare>* I; 
  // if I is defined localy in the constructor, the error is removed.

  priority_queue() {
    I = new Buf<T, Compare>(B); 
  }
};

int main() {
  priority_queue<int> test;
}
Comment 1 Sxren Skov 2002-06-19 11:06:45 EDT
Created attachment 61604 [details]
Sample code that results in the error.
Comment 2 Alan Cox 2002-12-15 16:42:10 EST
Verified works ok in g++ 2.3 / 8.0

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