1// { dg-do run } 2// Creates bad assembly on sparc and x86 3template<unsigned long SIZE> 4struct Array { }; 5 6template<unsigned long SIZE> 7Array<SIZE> test_ok(const Array<SIZE>& a) { 8 Array<SIZE> result; 9 return(result); 10} 11 12template<unsigned long SIZE> 13Array<SIZE + 1> test_error(const Array<SIZE>& a) { 14 Array<SIZE + 1> result; 15 return(result); 16} 17 18int main(int argc, char* argv[]) { 19 Array<2> a; 20 21 test_ok(a); 22 test_error(a); // <<< MARKED LINE! 23 24 return(0); 25} 26