2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / dfp / mangle-4.C
blob899d5661c0d6126d3431913961d3b8f6cb94a5d1
1 // { dg-do compile }
3 // Mangling of classes from std::decimal are special-cased.
4 // Derived from g++.dg/abi/mangle30.C.
6 namespace std {
7   namespace decimal {
8     class decimal64 {
9       public:
10         typedef float __decfloat64 __attribute__ ((mode (DD)));
11         explicit decimal64 (int __r):__val (__r) {}
12       private:
13         __decfloat64 __val;
14     };
15   }
18 struct A
20   template <class T>
21   struct B
22   {
23     typedef T myT;
24   };
27 template <class T>
28 void f (T t, typename T::template B<std::decimal::decimal64>::myT u, typename T::template B<int>::myT v);
30 void foo ()
32   f (A(), std::decimal::decimal64(0), 1);
35 // { dg-final { scan-assembler "_Z1fI1AEvT_NS1_1BIDdE3myTENS2_IiE3myTE" } }