------- Comment #3 from reichelt at gcc dot gnu dot org  2009-11-30 00:37 
-------
Reduced testcase (crashes with "-O2" on i686-pc-linux-gnu):

==========================================================================
void foo(const char*);

template<int*> struct A
{
  template<typename T> A(const int&, T);
  int i;
};

template<int* X> template<typename T> A<X>::A(const int& j, T) : i(j)
{
  foo(0);
  foo(0);
  foo(__PRETTY_FUNCTION__);
}

int N;

struct B
{
  B();
  A<&N> a;
};

B::B() : a(N, 0) {}
==========================================================================

The crash only happens on the 4.4 branch.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
          Component|c++                         |middle-end
           Keywords|                            |ice-on-valid-code, monitored
      Known to fail|                            |4.4.0 4.4.1 4.4.2
      Known to work|4.5.0                       |4.3.4 4.5.0
            Summary|internal compiler error:    |[4.4 Regression] ICE
                   |Segmentation fault compiling|compiling chromium
                   |chromium                    |
   Target Milestone|---                         |4.4.3


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

Reply via email to