1/* { dg-do assemble } */
2/* { dg-options "-save-temps" } */
3
4template <class T>
5struct Vec {
6 T x, y;
7 int z;
8};
9
10typedef struct {
11  Vec<double> dvec;
12  Vec<float> fvec;
13  float fscalar;
14  double dscalar;
15  Vec<signed char> chVec;
16  int iscalar;
17} anonymous;
18
19Vec<double> dd;
20
21const char *enc = @encode(Vec<float>);
22const char *enc2 = @encode(Vec<double>);
23const char *enc3 = @encode(anonymous);
24
25/* { dg-final { scan-assembler "{Vec<float>=ffi}" } }  */
26/* { dg-final { scan-assembler "{Vec<double>=ddi}" } }  */
27/* { dg-final { scan-file "encode-2.o" "{?={Vec<double>=ddi}{Vec<float>=ffi}fd{Vec<signed char>=cci}i}" } } */
28