view gcc/testsuite/g++.dg/pr79091.C @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR 79091 ICE mangling an unnamed enum in a tempate instantiation.

enum  {
  One = 1
};

template<int Options>
class Matrix {};

template<int Dim>
Matrix<Dim ? One : 0> *Bar ()
{
  return 0;
}

template<int Opt> 
Matrix<Opt> *Baz ()
{
  return 0;
}

bool Foo ()
{
  return Baz<1> () == Bar<1> ();
}