1/* Copyright 2019-2020 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 16typedef int my_int_t; 17typedef float my_float_t; 18typedef my_int_t nested_int_t; 19typedef my_float_t nested_float_t; 20 21struct baz_t 22{ 23 float f; 24 double d; 25}; 26 27typedef struct baz_t baz_t; 28typedef struct baz_t baz; 29typedef baz_t nested_baz_t; 30typedef baz nested_baz; 31typedef struct baz_t *baz_ptr; 32 33enum enum_t 34{ 35 AA, BB, CC 36}; 37 38typedef enum enum_t my_enum_t; 39typedef my_enum_t nested_enum_t; 40 41typedef struct 42{ 43 double d; 44 float f; 45} anon_struct_t; 46 47typedef anon_struct_t nested_anon_struct_t; 48 49typedef enum 50{ 51 DD, EE, FF 52} anon_enum_t; 53 54typedef anon_enum_t nested_anon_enum_t; 55 56union union_t 57{ 58 int i; 59 float f; 60}; 61 62typedef union union_t nested_union_t; 63 64typedef union 65{ 66 int i; 67 double d; 68} anon_union_t; 69 70typedef anon_union_t nested_anon_union_t; 71 72volatile int var_a; 73volatile float var_b; 74volatile my_int_t var_c; 75volatile my_float_t var_d; 76volatile nested_int_t var_e; 77volatile nested_float_t var_f; 78volatile struct baz_t var_g; 79volatile baz_t var_h; 80volatile baz var_i; 81volatile nested_baz_t var_j; 82volatile nested_baz var_k; 83volatile baz_ptr var_l; 84volatile enum enum_t var_m; 85volatile my_enum_t var_n; 86volatile nested_enum_t var_o; 87volatile anon_struct_t var_p; 88volatile nested_anon_struct_t var_q; 89volatile anon_enum_t var_r; 90volatile nested_anon_enum_t var_s; 91volatile union union_t var_t; 92volatile nested_union_t var_u; 93volatile anon_union_t var_v; 94volatile nested_anon_union_t var_w; 95 96#ifdef __cplusplus 97 98class CL 99{ 100 int a; 101}; 102 103typedef CL my_cl; 104typedef CL *my_ptr; 105 106volatile CL var_cpp_a; 107volatile my_cl var_cpp_b; 108volatile my_ptr var_cpp_c; 109 110#endif /* __cplusplus */ 111 112int 113main () 114{ 115 asm ("" ::: "memory"); 116 return 0; 117} 118