https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61959

--- Comment #4 from Botond Ballo <botond at mozilla dot com> ---
Reduced code that triggers the ICE:


template <class T, class Sub, class Coord>
struct BasePoint {
  Coord x, y;

  constexpr BasePoint(Coord aX, Coord aY) : x(aX), y(aY) {}
};

template <class T, class Sub>
struct BaseCoord {
  T value;

  explicit constexpr BaseCoord(T aValue) : value(aValue) {}
};

template<class units>
struct IntCoordTyped :
  public BaseCoord< int, IntCoordTyped<units> >,
  public units {

  typedef BaseCoord< int, IntCoordTyped<units> > Super;

  constexpr IntCoordTyped(int aValue) : Super(aValue) {}
};

template<class units>
struct IntPointTyped :
  public BasePoint< int, IntPointTyped<units>, IntCoordTyped<units> >,
  public units {

  typedef IntCoordTyped<units> Coord;
  typedef BasePoint< int, IntPointTyped<units>, IntCoordTyped<units> > Super;

  constexpr IntPointTyped(int aX, int aY) : Super(Coord(aX), Coord(aY)) {}
};

struct LayoutDevicePixel {};
typedef IntPointTyped<LayoutDevicePixel> LayoutDeviceIntPoint;

static const LayoutDeviceIntPoint kInvalidRefPoint =
LayoutDeviceIntPoint(-1,-1);

Reply via email to