Bug 67013 - Internal compiler error in find_function_data, at function.c:328
Summary: Internal compiler error in find_function_data, at function.c:328
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-06-19 15:04 UTC by Sxren Skov
Modified: 2007-04-18 16:43 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-12-15 21:42:10 UTC
Embargoed:


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

Description Sxren Skov 2002-06-19 15:04:00 UTC
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 15:06:45 UTC
Created attachment 61604 [details]
Sample code that results in the error.

Comment 2 Alan Cox 2002-12-15 21:42:10 UTC
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.