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++ ICE 20000521 with new-abi & nested template specilization


uname -a
Linux localhost.localdomain 2.2.13-4mdk #1 Tue Sep 7 18:23:11 CEST 1999
i586 unknown
g++ -v
Reading specs from
/home/evansl/prog_dev/gcc_all/gcc-2.96/snap-20000626/lib/gcc-lib/i586-pc-linux/2.96/specs

gcc version 2.96 20000626 (experimental)
-------------------
g++ -c -fnew-abi  GcspFlags.cpp 2>&1 | c++filt
GcspFlags.cpp:30: Internal compiler error 20000521.
GcspFlags.cpp:30: Please submit a full bug report.
GcspFlags.cpp:30: See <URL:http://www.gnu.org/software/gcc/bugs.html>
for instructions.
-------------------
cat GcspFlags.cpp
  struct
GcspFlags
  {
      enum
    Enum
      { OffYes
      , OffNo
      , Root
      };
        static
      char const*
    name(Enum flag)
      ;
    template
      <Enum GCSP_FLAG
      >
      struct
    btmFlag
      { static Enum const f=OffNo
      ;};
  };
    template
      <
      >
      struct
GcspFlags::
    btmFlag
      <GcspFlags::OffYes
      >
      { static Enum const f=OffYes
      ;};

-------------------
Without -fnew-abi this compiles fine.  The specialization must be
placed outside the class; otherwise, the following error occurs:

  GcspFlags.cpp:23: explicit specialization in non-namespace scope
  `struct GcspFlags'

The 20000521 ICE occurs in gcc/cp/mangle.c (write_unscoped_name) after
parsing the specialization.



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