Merge reload-branch up to revision 101000
[official-gcc.git] / gcc / testsuite / obj-c++.dg / encode-3.mm
blobc67a972ddceea0c0f3a30731d5b2bdc760848a83
1 /* { dg-do run } */
3 #include <stdlib.h>
4 #include <string.h>
6 template <class T>
7 struct Vec {
8  T x, y;
9  long z;
10  long long zz;
13 Vec<double> dd;
14 const char *enc = @encode(Vec<float>);
15 const char *enc2 = @encode(Vec<double>);
17 int main(void) {
18   char *encode = @encode(long);
20   if (strcmp (encode, "l"))
21     abort();
23   if (strcmp (enc, "{Vec<float>=fflq}"))
24     abort();
26   if (strcmp (enc2, "{Vec<double>=ddlq}"))
27     abort();
29   return 0;