1// { dg-do assemble } 2// 3// Copyright (C) 2001 Free Software Foundation, Inc. 4// Contributed by Nathan Sidwell 25 April 2001 <nathan@codesourcery.com> 5// Origin:pcarlini@unitus.it 6 7// Bug 2559. We hadn't implemented code to mangle numbers bigger than 8// HOST_WIDE_INT. 9 10template<class T, T min_val, T max_val> 11class integer_traits_base 12{ 13public: 14static const bool is_integral = true; 15}; 16 17template<class T> 18class integer_traits 19{ 20public: 21static const bool is_integral = false; 22}; 23 24template<> 25class integer_traits<long long> 26: public integer_traits_base<long long, (-9223372036854775807LL - 1), 279223372036854775807LL> 28{ }; 29 30integer_traits<long long> f; 31 32template <class T, T value> T foo () 33{ 34 return value; 35} 36 37void x () 38{ 39 foo<long long, -9223372036854775807LL> (); 40} 41