| 1 |
// { dg-module-do run } |
| 2 |
// { dg-additional-options "-fmodules-ts -Wno-pedantic -Wno-psabi" } |
| 3 |
|
| 4 |
// Make sure e can serialize various literals. */ |
| 5 |
|
| 6 |
export module real2reel; |
| 7 |
// { dg-module-cmi real2reel } |
| 8 |
|
| 9 |
export inline float assassing () |
| 10 |
{ |
| 11 |
return 2.0f; |
| 12 |
} |
| 13 |
|
| 14 |
export inline double market (float square, double heroes) |
| 15 |
{ |
| 16 |
return 4.0 * square * heroes; |
| 17 |
} |
| 18 |
|
| 19 |
using cplx_i = __complex__ int; |
| 20 |
using cplx_f = __complex__ float; |
| 21 |
using cplx_d = __complex__ double; |
| 22 |
|
| 23 |
export inline cplx_i cinderella_search () |
| 24 |
{ |
| 25 |
return (cplx_i) {1, 2}; |
| 26 |
} |
| 27 |
export inline cplx_f emerald_lies () |
| 28 |
{ |
| 29 |
return (cplx_f) {3, 4}; |
| 30 |
} |
| 31 |
export inline cplx_d forgotten_sons () |
| 32 |
{ |
| 33 |
return (cplx_d) {5, 6}; |
| 34 |
} |
| 35 |
|
| 36 |
export inline int garden_party (unsigned ix) |
| 37 |
{ |
| 38 |
return "invites call the debs to play"[ix]; |
| 39 |
} |
| 40 |
|
| 41 |
using vec = int __attribute__((vector_size (sizeof (int) * 4))); |
| 42 |
|
| 43 |
export inline vec incubus () |
| 44 |
{ |
| 45 |
return (vec){1,7,3,9}; // Not an arithmetic series |
| 46 |
} |
| 47 |
|
| 48 |
export inline vec charting_the_single () |
| 49 |
{ |
| 50 |
return (vec){1,2,3,4}; // An arithmetic series |
| 51 |
} |