This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/2410: ICE caused by mismatched class types on externs



>Number:         2410
>Category:       c++
>Synopsis:       ICE caused by mismatched class types on externs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 27 20:16:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Matt Emmerton
>Release:        2.95.2
>Organization:
>Environment:
FreeBSD 4.2-STABLE (Wed Feb 28 02:25:07 EST 2001)
>Description:
global data of one type erroneously referenced via 'extern' as another type causes g++ to ICE.
>How-To-Repeat:
Compile this code:

#include <list>
#include <vector>

list<int> adt;
extern vector<int> adt;

int main(void)
{
}

and get this output:

test1.c:5: conflicting types for 'class vector<int,allocator<int> > adt'
test1.c:4: previous declaraction as 'class list<int,allocator<int> > adt'
test1.c:4: Internal compiler error in `make_decl_rtl', at varasm.c:738
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]