OSDN Git Service

* g++.old-deja/g++.pt/static11.C: Add xtensa-*-elf* to the
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / cast2.C
1 // Build don't link:
2
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 10 Jan 2001 <nathan@codesourcery.com>
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; // 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 }