| 1 |
/* { dg-options "-DCE_EXTRACT_FUNCTIONS=f -DCE_NO_EXTERNALIZATION" }*/ |
| 2 |
|
| 3 |
template<typename _CharT> |
| 4 |
struct _Char_types |
| 5 |
{ |
| 6 |
typedef unsigned long int_type; |
| 7 |
}; |
| 8 |
|
| 9 |
template<typename _CharT> |
| 10 |
struct char_traits |
| 11 |
{ |
| 12 |
typedef typename _Char_types<_CharT>::int_type int_type; |
| 13 |
}; |
| 14 |
|
| 15 |
void* f(void) |
| 16 |
{ |
| 17 |
static struct char_traits<char> x; |
| 18 |
return (void *) &x; |
| 19 |
} |
| 20 |
|
| 21 |
/* { dg-final { scan-tree-dump "typedef typename _Char_types<_CharT>::int_type int_type;" } } */ |
| 22 |
/* { dg-final { scan-tree-dump "typedef unsigned long int_type;" } } */ |
| 23 |
/* { dg-final { scan-tree-dump "return \(void \*\) &x;" } } */ |