g++ (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
を使っているのですが

template <typename T> struct NumericTypeInfo {};
template <> struct NumericTypeInfo<int> { typedef long LongerType; typedef short ShorterType; };
template <> struct NumericTypeInfo<short> { typedef int LongerType; typedef char ShorterType; };
template <> struct NumericTypeInfo<long> { typedef long long LongerType; typedef int ShorterType; };

template <typename T>
T TestFunc(T val)
{
#if 0
NumericTypeInfo<int>::LongerType tmp = val; // これは大丈夫
#else
NumericTypeInfo<T>::LongerType tmp = val; // コンパイルエラーになる...
#endif
tmp << 8;
tmp >> 8;
return tmp;
}

これでコンパイルエラーになります。コンパイラのバグでしょうか?