2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / typeck2.C
blobe1bb8b58490b42d267b95ca24e7dc5b0ce124493
1 // { dg-do assemble  }
2 // GROUPS passed typeck
3 // typeck file
4 // From: Jutta Degener <jutta@cs.tu-berlin.de>
5 // Date:     Wed, 9 Jun 1993 17:58:35 +0200 (MET DST)
6 // Subject:  2.4.3: Type of new <typedef'ed array>
7 // Message-ID: <199306091558.AA19075@mail.cs.tu-berlin.de>
9   typedef int arr[10];
10 int main()
11   {
12         int * p = new int[10];
13         int * q = new arr;              /* g++ complains, but shouldn't     */
14         int (* r)[10] = new arr;        /* g++ doesn't complain, but should */// { dg-error "" } 
15   }