| 1 |
// { dg-do assemble } |
| 2 |
|
| 3 |
// Copyright (C) 2000 Free Software Foundation, Inc. |
| 4 |
// Contributed by Nathan Sidwell 10 Jan 2001 <[email protected]> |
| 5 |
|
| 6 |
// Bug 1588. We ICE'd on reparsing an absdcl as a cast inside a template |
| 7 |
// function. |
| 8 |
|
| 9 |
class A { |
| 10 |
public: |
| 11 |
template <class T> void f(void *CLUTp); |
| 12 |
}; |
| 13 |
|
| 14 |
template <class T> void A::f(void *CLUTp) |
| 15 |
{ |
| 16 |
void *CLUT; |
| 17 |
|
| 18 |
CLUT = (unsigned char [3][256])CLUTp; // { dg-error "" } cast to array |
| 19 |
|
| 20 |
return; |
| 21 |
} |
| 22 |
|
| 23 |
|
| 24 |
int main() |
| 25 |
{ |
| 26 |
A myobj; |
| 27 |
unsigned char t[3][256]; |
| 28 |
|
| 29 |
myobj.f<unsigned char>(t); |
| 30 |
|
| 31 |
return 0; |
| 32 |
} |