OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc4/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [explicit72.C] - Rev 519

Compare with Previous | Blame | View Log

// { dg-do assemble  }
// Contributed by Reid M. Pinchback <reidmp@MIT.EDU>
// Adapted by Alexandre Oliva <oliva@dcc.unicamp.br>
// plain char, signed char and unsigned char are distinct types

template <class X, class Y> struct bug {};
template <class X> struct bug<X,char> { typedef char t; };
template <class X> struct bug<X,unsigned char> { typedef unsigned char t; };
template <class X> struct bug<X,signed char> { typedef signed char t; };
template <class X> struct bug<char,X> { typedef char t; };
template <class X> struct bug<unsigned char,X> { typedef unsigned char t; };
template <class X> struct bug<signed char,X> { typedef signed char t; };

void foo() {
  bug<int,char>::t();
  bug<int,signed char>::t();
  bug<int,unsigned char>::t();
  bug<char,int>::t();
  bug<signed char,int>::t();
  bug<unsigned char,int>::t();
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.