This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/5638: Compiler said: Internal compiler error
- From: daniel_wilkerson at yahoo dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 9 Feb 2002 06:29:46 -0000
- Subject: c++/5638: Compiler said: Internal compiler error
- Reply-to: daniel_wilkerson at yahoo dot com
>Number: 5638
>Category: c++
>Synopsis: Compiler said: Internal compiler error
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 08 22:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: daniel_wilkerson@yahoo.com
>Release: egcs-2.91.66
>Organization:
>Environment:
Red Hat 6.2
>Description:
I tried to compile the following (erronious) C++ file, and
g++ said it had an internal error and I should report it.
Here is the error message.
---------------------------
g++ template.cxx
template.cxx:10: Internal compiler error.
template.cxx:10: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
template.cxx:10: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
Compilation exited abnormally with code 1 at Fri Feb 8 23:03:23
---------------------------
Here is the input file.
---------------------------
// Test templates.
#include <iostream>
template <class TYPE>
TYPE min(TYPE x, TYPE y) {
return x < y ? x : y;
}
TYPE max(TYPE x, TYPE y) {
return x < y ? y : x;
}
int main(int argc, char **argv) {
int a = 1;
int b = 2;
cout << "min == "<< min(a, b)<< endl;
cout << "max == "<< max(a, b)<< endl;
}
-----------------------------
Have fun.
Daniel
>How-To-Repeat:
Try to compile the file.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: