[Bug c++/20428] ICE for local class in a function template

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Mar 11 18:39:00 GMT 2005


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-11 18:39 -------
Confirmed, reduced testcase:
struct buggy_i
{
    virtual void release() = 0;
    ~buggy_i();
};
template <int>
buggy_i *test()
{
    struct test_t : public buggy_i
    {
        void release() {delete this;}
    };
    return new test_t;
}
buggy_i *p = test<1>();

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |2.95.3 3.2.3 3.3.1 3.3.4
                   |                            |3.4.3 4.0.0
   Last reconfirmed|0000-00-00 00:00:00         |2005-03-11 18:39:21
               date|                            |


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



More information about the Gcc-bugs mailing list