| 1 | /* Copyright 2019 Free Software Foundation, Inc. |
| 2 | |
| 3 | This program is free software; you can redistribute it and/or modify |
| 4 | it under the terms of the GNU General Public License as published by |
| 5 | the Free Software Foundation; either version 3 of the License, or |
| 6 | (at your option) any later version. |
| 7 | |
| 8 | This program is distributed in the hope that it will be useful, |
| 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | GNU General Public License for more details. |
| 12 | |
| 13 | You should have received a copy of the GNU General Public License |
| 14 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 15 | |
| 16 | typedef int my_int_t; |
| 17 | typedef float my_float_t; |
| 18 | typedef my_int_t nested_int_t; |
| 19 | typedef my_float_t nested_float_t; |
| 20 | |
| 21 | struct baz_t |
| 22 | { |
| 23 | float f; |
| 24 | double d; |
| 25 | }; |
| 26 | |
| 27 | typedef struct baz_t baz_t; |
| 28 | typedef struct baz_t baz; |
| 29 | typedef baz_t nested_baz_t; |
| 30 | typedef baz nested_baz; |
| 31 | typedef struct baz_t *baz_ptr; |
| 32 | |
| 33 | enum enum_t |
| 34 | { |
| 35 | AA, BB, CC |
| 36 | }; |
| 37 | |
| 38 | typedef enum enum_t my_enum_t; |
| 39 | typedef my_enum_t nested_enum_t; |
| 40 | |
| 41 | typedef struct |
| 42 | { |
| 43 | double d; |
| 44 | float f; |
| 45 | } anon_struct_t; |
| 46 | |
| 47 | typedef anon_struct_t nested_anon_struct_t; |
| 48 | |
| 49 | typedef enum |
| 50 | { |
| 51 | DD, EE, FF |
| 52 | } anon_enum_t; |
| 53 | |
| 54 | typedef anon_enum_t nested_anon_enum_t; |
| 55 | |
| 56 | union union_t |
| 57 | { |
| 58 | int i; |
| 59 | float f; |
| 60 | }; |
| 61 | |
| 62 | typedef union union_t nested_union_t; |
| 63 | |
| 64 | typedef union |
| 65 | { |
| 66 | int i; |
| 67 | double d; |
| 68 | } anon_union_t; |
| 69 | |
| 70 | typedef anon_union_t nested_anon_union_t; |
| 71 | |
| 72 | volatile int var_a; |
| 73 | volatile float var_b; |
| 74 | volatile my_int_t var_c; |
| 75 | volatile my_float_t var_d; |
| 76 | volatile nested_int_t var_e; |
| 77 | volatile nested_float_t var_f; |
| 78 | volatile struct baz_t var_g; |
| 79 | volatile baz_t var_h; |
| 80 | volatile baz var_i; |
| 81 | volatile nested_baz_t var_j; |
| 82 | volatile nested_baz var_k; |
| 83 | volatile baz_ptr var_l; |
| 84 | volatile enum enum_t var_m; |
| 85 | volatile my_enum_t var_n; |
| 86 | volatile nested_enum_t var_o; |
| 87 | volatile anon_struct_t var_p; |
| 88 | volatile nested_anon_struct_t var_q; |
| 89 | volatile anon_enum_t var_r; |
| 90 | volatile nested_anon_enum_t var_s; |
| 91 | volatile union union_t var_t; |
| 92 | volatile nested_union_t var_u; |
| 93 | volatile anon_union_t var_v; |
| 94 | volatile nested_anon_union_t var_w; |
| 95 | |
| 96 | #ifdef __cplusplus |
| 97 | |
| 98 | class CL |
| 99 | { |
| 100 | int a; |
| 101 | }; |
| 102 | |
| 103 | typedef CL my_cl; |
| 104 | typedef CL *my_ptr; |
| 105 | |
| 106 | volatile CL var_cpp_a; |
| 107 | volatile my_cl var_cpp_b; |
| 108 | volatile my_ptr var_cpp_c; |
| 109 | |
| 110 | #endif /* __cplusplus */ |
| 111 | |
| 112 | int |
| 113 | main () |
| 114 | { |
| 115 | asm ("" ::: "memory"); |
| 116 | return 0; |
| 117 | } |