Bug 11061 - Internal Compiler Error in g++-2.95.4 while using multiple templates
Summary: Internal Compiler Error in g++-2.95.4 while using multiple templates
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 2.95.4
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-02 08:26 UTC by Heiko Lippmann
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-linux-pc-gnu
Target: i686-linux-pc-gnu
Build: i686-linux-pc-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Lippmann 2003-06-02 08:26:58 UTC
While compiling the following code:

---

template <class T, template <class> class C> class derived : public C<T> {

public:
  derived(int dim) : C<T> (dim) {  }
};


int main(int argc, char *argv[]) {
  return 0;
}

---

with the command:

~/src/bugs$ g++ -o bug bug.cc

I get the error message:

bug.cc: In method `derived<T,C>::derived(int)':
bug.cc:5: Internal compiler error.
bug.cc:5: Please submit a full bug report.
bug.cc:5: Internal compiler error:
bug.cc:5: See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

my gcc -v reports:

Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs gcc version 2.95.4
20011002 (Debian prerelease)

Note: The same code works fine with gcc-3.2.3!
Comment 1 Dara Hazeghi 2003-06-02 10:23:54 UTC
Hello,

gcc 2.X is quite old, and is no longer maintained at this point. Do you have this problem with a 
current version of gcc? If not, then it is a bug that has been fixed since 2.95.4, and we will close 
the bug report, since this is a database for unfixed bugs, not fixed ones.
Thank you,

Dara
Comment 2 Wolfgang Bangerth 2003-06-02 15:17:52 UTC
Confirmed with 2.95, but already fixed since 3.0. Time to upgrade.