repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Merge reload-branch up to revision 101000
[official-gcc.git]
/
gcc
/
testsuite
/
obj-c++.dg
/
encode-3.mm
blob
c67a972ddceea0c0f3a30731d5b2bdc760848a83
1
/* { dg-do run } */
2
3
#include <stdlib.h>
4
#include <string.h>
5
6
template <class T>
7
struct Vec {
8
T x, y;
9
long z;
10
long long zz;
11
};
12
13
Vec<double> dd;
14
const char *enc = @encode(Vec<float>);
15
const char *enc2 = @encode(Vec<double>);
16
17
int main(void) {
18
char *encode = @encode(long);
19
20
if (strcmp (encode, "l"))
21
abort();
22
23
if (strcmp (enc, "{Vec<float>=fflq}"))
24
abort();
25
26
if (strcmp (enc2, "{Vec<double>=ddlq}"))
27
abort();
28
29
return 0;
30
}