[Bug c++/15183] g++ crash on input file

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Apr 30 15:03:00 GMT 2004


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-04-30 14:44 -------
* Concerning the ICE in 3.4.0 and mainline, that Andrew mentioned:

  The code is actually invalid, since it tries to define the function

    template<class T>
    void VFixedLen<T>::DifferentialTmp::serialize_type(XMLWriter &)

  in line 49678, but there's no class DifferentialTmp in VFixedLen.
  Alas 3.4.0 and mainline ICE in this situation.

  Here's a short testcase to illustrate this:

  =============================================
  template<typename> struct A {};

  template<typename T> void A<T>::B::foo() {}
  =============================================

  GCC 2.95.3 correctly rejects the code,
  gcc 3.1 - 3.3.4 wrongly accept it,
  gcc 3.0.x, 3.4.0 and mainline segfault.

  Since this has almost nothing to do with the original bug report,
  I'll open a new PR for this.

* Concerning the compiler-crash/memory-hog in 3.3.2:

  The memory consumption is about 560 MB at "-O3" for gcc 3.3.x.
  If you have less memory available, the compiler crashes as seen
  above. So the crash is not a bug per se.

  The question is: Is 560 MB an inappropriate amount of memory for this
  program? Given that you use "-O3" and that the source file is about
  5.3 MB, this is hardly a bug. Given the release policies for the
  3.3.x release series, this won't get fixed in gcc 3.3.x.

  Since the code is buggy, it's not well suited as a testcase for
  gcc 3.4.0 and newer. So I'm closing this PR for good.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
           Keywords|ice-on-valid-code           |
         Resolution|                            |WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15183



More information about the Gcc-bugs mailing list