File: | build/gcc/cp/cp-gimplify.cc |
Warning: | line 1056, column 4 Value stored to 'stmt' is never read |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
1 | /* C++-specific tree lowering bits; see also c-gimplify.cc and gimple.cc. |
2 | |
3 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
4 | Contributed by Jason Merrill <jason@redhat.com> |
5 | |
6 | This file is part of GCC. |
7 | |
8 | GCC is free software; you can redistribute it and/or modify it under |
9 | the terms of the GNU General Public License as published by the Free |
10 | Software Foundation; either version 3, or (at your option) any later |
11 | version. |
12 | |
13 | GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
14 | WARRANTY; without even the implied warranty of MERCHANTABILITY or |
15 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
16 | for more details. |
17 | |
18 | You should have received a copy of the GNU General Public License |
19 | along with GCC; see the file COPYING3. If not see |
20 | <http://www.gnu.org/licenses/>. */ |
21 | |
22 | #include "config.h" |
23 | #include "system.h" |
24 | #include "coretypes.h" |
25 | #include "target.h" |
26 | #include "basic-block.h" |
27 | #include "cp-tree.h" |
28 | #include "gimple.h" |
29 | #include "predict.h" |
30 | #include "stor-layout.h" |
31 | #include "tree-iterator.h" |
32 | #include "gimplify.h" |
33 | #include "c-family/c-ubsan.h" |
34 | #include "stringpool.h" |
35 | #include "attribs.h" |
36 | #include "asan.h" |
37 | #include "gcc-rich-location.h" |
38 | #include "memmodel.h" |
39 | #include "tm_p.h" |
40 | #include "output.h" |
41 | #include "file-prefix-map.h" |
42 | #include "cgraph.h" |
43 | #include "omp-general.h" |
44 | #include "opts.h" |
45 | |
46 | /* Flags for cp_fold and cp_fold_r. */ |
47 | |
48 | enum fold_flags { |
49 | ff_none = 0, |
50 | /* Whether we're being called from cp_fold_function. */ |
51 | ff_genericize = 1 << 0, |
52 | /* Whether we're folding a point where we know we're |
53 | definitely not in a manifestly constant-evaluated |
54 | context. */ |
55 | ff_mce_false = 1 << 1, |
56 | }; |
57 | |
58 | using fold_flags_t = int; |
59 | |
60 | /* Forward declarations. */ |
61 | |
62 | static tree cp_genericize_r (tree *, int *, void *); |
63 | static tree cp_fold_r (tree *, int *, void *); |
64 | static void cp_genericize_tree (tree*, bool); |
65 | static tree cp_fold (tree, fold_flags_t); |
66 | |
67 | /* Genericize a TRY_BLOCK. */ |
68 | |
69 | static void |
70 | genericize_try_block (tree *stmt_p) |
71 | { |
72 | tree body = TRY_STMTS (*stmt_p)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*stmt_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 72, __FUNCTION__, (TRY_BLOCK)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 72, __FUNCTION__))))); |
73 | tree cleanup = TRY_HANDLERS (*stmt_p)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*stmt_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 73, __FUNCTION__, (TRY_BLOCK)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 73, __FUNCTION__))))); |
74 | |
75 | *stmt_p = build2 (TRY_CATCH_EXPR, void_type_nodeglobal_trees[TI_VOID_TYPE], body, cleanup); |
76 | } |
77 | |
78 | /* Genericize a HANDLER by converting to a CATCH_EXPR. */ |
79 | |
80 | static void |
81 | genericize_catch_block (tree *stmt_p) |
82 | { |
83 | tree type = HANDLER_TYPE (*stmt_p)((contains_struct_check (((tree_check ((*stmt_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 83, __FUNCTION__, (HANDLER)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 83, __FUNCTION__))->typed.type); |
84 | tree body = HANDLER_BODY (*stmt_p)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*stmt_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 84, __FUNCTION__, (HANDLER)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 84, __FUNCTION__))))); |
85 | |
86 | /* FIXME should the caught type go in TREE_TYPE? */ |
87 | *stmt_p = build2 (CATCH_EXPR, void_type_nodeglobal_trees[TI_VOID_TYPE], type, body); |
88 | } |
89 | |
90 | /* A terser interface for building a representation of an exception |
91 | specification. */ |
92 | |
93 | static tree |
94 | build_gimple_eh_filter_tree (tree body, tree allowed, tree failure) |
95 | { |
96 | tree t; |
97 | |
98 | /* FIXME should the allowed types go in TREE_TYPE? */ |
99 | t = build2 (EH_FILTER_EXPR, void_type_nodeglobal_trees[TI_VOID_TYPE], allowed, NULL_TREE(tree) nullptr); |
100 | append_to_statement_list (failure, &EH_FILTER_FAILURE (t)(*((const_cast<tree*> (tree_operand_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 100, __FUNCTION__, (EH_FILTER_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 100, __FUNCTION__)))))); |
101 | |
102 | t = build2 (TRY_CATCH_EXPR, void_type_nodeglobal_trees[TI_VOID_TYPE], NULL_TREE(tree) nullptr, t); |
103 | append_to_statement_list (body, &TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 103, __FUNCTION__)))))); |
104 | |
105 | return t; |
106 | } |
107 | |
108 | /* Genericize an EH_SPEC_BLOCK by converting it to a |
109 | TRY_CATCH_EXPR/EH_FILTER_EXPR pair. */ |
110 | |
111 | static void |
112 | genericize_eh_spec_block (tree *stmt_p) |
113 | { |
114 | tree body = EH_SPEC_STMTS (*stmt_p)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*stmt_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 114, __FUNCTION__, (EH_SPEC_BLOCK)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 114, __FUNCTION__))))); |
115 | tree allowed = EH_SPEC_RAISES (*stmt_p)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*stmt_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 115, __FUNCTION__, (EH_SPEC_BLOCK)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 115, __FUNCTION__))))); |
116 | tree failure = build_call_n (call_unexpected_fncp_global_trees[CPTI_CALL_UNEXPECTED_FN], 1, build_exc_ptr ()); |
117 | |
118 | *stmt_p = build_gimple_eh_filter_tree (body, allowed, failure); |
119 | suppress_warning (*stmt_p); |
120 | suppress_warning (TREE_OPERAND (*stmt_p, 1)(*((const_cast<tree*> (tree_operand_check ((*stmt_p), ( 1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 120, __FUNCTION__)))))); |
121 | } |
122 | |
123 | /* Return the first non-compound statement in STMT. */ |
124 | |
125 | tree |
126 | first_stmt (tree stmt) |
127 | { |
128 | switch (TREE_CODE (stmt)((enum tree_code) (stmt)->base.code)) |
129 | { |
130 | case STATEMENT_LIST: |
131 | if (tree_statement_list_node *p = STATEMENT_LIST_HEAD (stmt)((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 131, __FUNCTION__, (STATEMENT_LIST)))->stmt_list.head)) |
132 | return first_stmt (p->stmt); |
133 | return void_nodeglobal_trees[TI_VOID]; |
134 | |
135 | case BIND_EXPR: |
136 | return first_stmt (BIND_EXPR_BODY (stmt)((*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 136, __FUNCTION__, (BIND_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 136, __FUNCTION__))))))); |
137 | |
138 | default: |
139 | return stmt; |
140 | } |
141 | } |
142 | |
143 | /* Genericize an IF_STMT by turning it into a COND_EXPR. */ |
144 | |
145 | static void |
146 | genericize_if_stmt (tree *stmt_p) |
147 | { |
148 | tree stmt, cond, then_, else_; |
149 | location_t locus = EXPR_LOCATION (*stmt_p)((((*stmt_p)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((*stmt_p))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((*stmt_p))->base.code))]) <= tcc_expression)) ? (*stmt_p)->exp.locus : ((location_t) 0 )); |
150 | |
151 | stmt = *stmt_p; |
152 | cond = IF_COND (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 152, __FUNCTION__, (IF_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 152, __FUNCTION__))))); |
153 | then_ = THEN_CLAUSE (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 153, __FUNCTION__, (IF_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 153, __FUNCTION__))))); |
154 | else_ = ELSE_CLAUSE (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 154, __FUNCTION__, (IF_STMT)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 154, __FUNCTION__))))); |
155 | |
156 | if (then_ && else_) |
157 | { |
158 | tree ft = first_stmt (then_); |
159 | tree fe = first_stmt (else_); |
160 | br_predictor pr; |
161 | if (TREE_CODE (ft)((enum tree_code) (ft)->base.code) == PREDICT_EXPR |
162 | && TREE_CODE (fe)((enum tree_code) (fe)->base.code) == PREDICT_EXPR |
163 | && (pr = PREDICT_EXPR_PREDICTOR (ft)((enum br_predictor)tree_to_shwi ((*((const_cast<tree*> (tree_operand_check (((tree_check ((ft), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 163, __FUNCTION__, (PREDICT_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 163, __FUNCTION__)))))))) == PREDICT_EXPR_PREDICTOR (fe)((enum br_predictor)tree_to_shwi ((*((const_cast<tree*> (tree_operand_check (((tree_check ((fe), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 163, __FUNCTION__, (PREDICT_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 163, __FUNCTION__))))))) |
164 | && (pr == PRED_HOT_LABEL || pr == PRED_COLD_LABEL)) |
165 | { |
166 | gcc_rich_location richloc (EXPR_LOC_OR_LOC (ft, locus)((((IS_ADHOC_LOC (((((ft)) && ((tree_code_type_tmpl < 0>::tree_code_type[(int) (((enum tree_code) ((ft))->base .code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((ft))-> base.code))]) <= tcc_expression)) ? (ft)->exp.locus : ( (location_t) 0)))) ? get_location_from_adhoc_loc (line_table, ((((ft)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((ft))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((ft))->base.code))]) <= tcc_expression )) ? (ft)->exp.locus : ((location_t) 0))) : (((((ft)) && ((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((ft))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((ft))->base.code))]) <= tcc_expression)) ? (ft)->exp.locus : ((location_t) 0)))) != ((location_t) 0) ) ? (ft)->exp.locus : (locus))); |
167 | richloc.add_range (EXPR_LOC_OR_LOC (fe, locus)((((IS_ADHOC_LOC (((((fe)) && ((tree_code_type_tmpl < 0>::tree_code_type[(int) (((enum tree_code) ((fe))->base .code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((fe))-> base.code))]) <= tcc_expression)) ? (fe)->exp.locus : ( (location_t) 0)))) ? get_location_from_adhoc_loc (line_table, ((((fe)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((fe))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((fe))->base.code))]) <= tcc_expression )) ? (fe)->exp.locus : ((location_t) 0))) : (((((fe)) && ((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((fe))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((fe))->base.code))]) <= tcc_expression)) ? (fe)->exp.locus : ((location_t) 0)))) != ((location_t) 0) ) ? (fe)->exp.locus : (locus))); |
168 | warning_at (&richloc, OPT_Wattributes, |
169 | "both branches of %<if%> statement marked as %qs", |
170 | pr == PRED_HOT_LABEL ? "likely" : "unlikely"); |
171 | } |
172 | } |
173 | |
174 | if (!then_) |
175 | then_ = build_empty_stmt (locus); |
176 | if (!else_) |
177 | else_ = build_empty_stmt (locus); |
178 | |
179 | /* consteval if has been verified not to have the then_/else_ blocks |
180 | entered by gotos/case labels from elsewhere, and as then_ block |
181 | can contain unfolded immediate function calls, we have to discard |
182 | the then_ block regardless of whether else_ has side-effects or not. */ |
183 | if (IF_STMT_CONSTEVAL_P (stmt)((tree_not_check2 (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 183, __FUNCTION__, (IF_STMT)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 183, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2)) |
184 | { |
185 | if (block_may_fallthru (then_)) |
186 | stmt = build3 (COND_EXPR, void_type_nodeglobal_trees[TI_VOID_TYPE], boolean_false_nodeglobal_trees[TI_BOOLEAN_FALSE], |
187 | void_nodeglobal_trees[TI_VOID], else_); |
188 | else |
189 | stmt = else_; |
190 | } |
191 | else if (IF_STMT_CONSTEXPR_P (stmt)((tree_not_check2 (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 191, __FUNCTION__, (IF_STMT)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 191, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0)) |
192 | stmt = integer_nonzerop (cond) ? then_ : else_; |
193 | /* ??? This optimization doesn't seem to belong here, but removing it |
194 | causes -Wreturn-type regressions (e.g. 107310). */ |
195 | else if (integer_nonzerop (cond) && !TREE_SIDE_EFFECTS (else_)((non_type_check ((else_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 195, __FUNCTION__))->base.side_effects_flag)) |
196 | stmt = then_; |
197 | else if (integer_zerop (cond) && !TREE_SIDE_EFFECTS (then_)((non_type_check ((then_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 197, __FUNCTION__))->base.side_effects_flag)) |
198 | stmt = else_; |
199 | else |
200 | stmt = build3 (COND_EXPR, void_type_nodeglobal_trees[TI_VOID_TYPE], cond, then_, else_); |
201 | protected_set_expr_location_if_unset (stmt, locus); |
202 | *stmt_p = stmt; |
203 | } |
204 | |
205 | /* Hook into the middle of gimplifying an OMP_FOR node. */ |
206 | |
207 | static enum gimplify_status |
208 | cp_gimplify_omp_for (tree *expr_p, gimple_seq *pre_p) |
209 | { |
210 | tree for_stmt = *expr_p; |
211 | gimple_seq seq = NULLnullptr; |
212 | |
213 | /* Protect ourselves from recursion. */ |
214 | if (OMP_FOR_GIMPLIFYING_P (for_stmt)(((tree_not_check2 (((tree_range_check ((for_stmt), (OMP_FOR) , (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 214, __FUNCTION__))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 214, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0))) |
215 | return GS_UNHANDLED; |
216 | OMP_FOR_GIMPLIFYING_P (for_stmt)(((tree_not_check2 (((tree_range_check ((for_stmt), (OMP_FOR) , (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 216, __FUNCTION__))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 216, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0)) = 1; |
217 | |
218 | gimplify_and_add (for_stmt, &seq); |
219 | gimple_seq_add_seq (pre_p, seq); |
220 | |
221 | OMP_FOR_GIMPLIFYING_P (for_stmt)(((tree_not_check2 (((tree_range_check ((for_stmt), (OMP_FOR) , (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 221, __FUNCTION__))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 221, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0)) = 0; |
222 | |
223 | return GS_ALL_DONE; |
224 | } |
225 | |
226 | /* Gimplify an EXPR_STMT node. */ |
227 | |
228 | static void |
229 | gimplify_expr_stmt (tree *stmt_p) |
230 | { |
231 | tree stmt = EXPR_STMT_EXPR (*stmt_p)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*stmt_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 231, __FUNCTION__, (EXPR_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 231, __FUNCTION__))))); |
232 | |
233 | if (stmt == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
234 | stmt = NULLnullptr; |
235 | |
236 | /* Gimplification of a statement expression will nullify the |
237 | statement if all its side effects are moved to *PRE_P and *POST_P. |
238 | |
239 | In this case we will not want to emit the gimplified statement. |
240 | However, we may still want to emit a warning, so we do that before |
241 | gimplification. */ |
242 | if (stmt && warn_unused_valueglobal_options.x_warn_unused_value) |
243 | { |
244 | if (!TREE_SIDE_EFFECTS (stmt)((non_type_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 244, __FUNCTION__))->base.side_effects_flag)) |
245 | { |
246 | if (!IS_EMPTY_STMT (stmt)(((enum tree_code) (stmt)->base.code) == NOP_EXPR && (((enum tree_code) (((contains_struct_check ((stmt), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 246, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE ) && integer_zerop ((*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 246, __FUNCTION__))))))) |
247 | && !VOID_TYPE_P (TREE_TYPE (stmt))(((enum tree_code) (((contains_struct_check ((stmt), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 247, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE ) |
248 | && !warning_suppressed_p (stmt, OPT_Wunused_value)) |
249 | warning (OPT_Wunused_value, "statement with no effect"); |
250 | } |
251 | else |
252 | warn_if_unused_value (stmt, input_location); |
253 | } |
254 | |
255 | if (stmt == NULL_TREE(tree) nullptr) |
256 | stmt = alloc_stmt_list (); |
257 | |
258 | *stmt_p = stmt; |
259 | } |
260 | |
261 | /* Gimplify initialization from an AGGR_INIT_EXPR. */ |
262 | |
263 | static void |
264 | cp_gimplify_init_expr (tree *expr_p) |
265 | { |
266 | tree from = TREE_OPERAND (*expr_p, 1)(*((const_cast<tree*> (tree_operand_check ((*expr_p), ( 1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 266, __FUNCTION__))))); |
267 | tree to = TREE_OPERAND (*expr_p, 0)(*((const_cast<tree*> (tree_operand_check ((*expr_p), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 267, __FUNCTION__))))); |
268 | tree t; |
269 | |
270 | if (TREE_CODE (from)((enum tree_code) (from)->base.code) == TARGET_EXPR) |
271 | if (tree init = TARGET_EXPR_INITIAL (from)(*(tree_operand_check_code ((from), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 271, __FUNCTION__)))) |
272 | { |
273 | /* Make sure that we expected to elide this temporary. But also allow |
274 | gimplify_modify_expr_rhs to elide temporaries of trivial type. */ |
275 | gcc_checking_assert (TARGET_EXPR_ELIDING_P (from)((void)(!(((tree_not_check2 (((tree_check ((from), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 275, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 275, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3) || !((((contains_struct_check ((from), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 276, __FUNCTION__))->typed.type))->base.addressable_flag )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 276, __FUNCTION__), 0 : 0)) |
276 | || !TREE_ADDRESSABLE (TREE_TYPE (from)))((void)(!(((tree_not_check2 (((tree_check ((from), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 275, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 275, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3) || !((((contains_struct_check ((from), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 276, __FUNCTION__))->typed.type))->base.addressable_flag )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 276, __FUNCTION__), 0 : 0)); |
277 | if (target_expr_needs_replace (from)) |
278 | { |
279 | /* If this was changed by cp_genericize_target_expr, we need to |
280 | walk into it to replace uses of the slot. */ |
281 | replace_decl (&init, TARGET_EXPR_SLOT (from)(*(tree_operand_check_code ((from), (TARGET_EXPR), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 281, __FUNCTION__))), to); |
282 | *expr_p = init; |
283 | return; |
284 | } |
285 | else |
286 | from = init; |
287 | } |
288 | |
289 | /* Look through any COMPOUND_EXPRs, since build_compound_expr pushes them |
290 | inside the TARGET_EXPR. */ |
291 | for (t = from; t; ) |
292 | { |
293 | tree sub = TREE_CODE (t)((enum tree_code) (t)->base.code) == COMPOUND_EXPR ? TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 293, __FUNCTION__))))) : t; |
294 | |
295 | /* If we are initializing from an AGGR_INIT_EXPR, drop the INIT_EXPR and |
296 | replace the slot operand with our target. |
297 | |
298 | Should we add a target parm to gimplify_expr instead? No, as in this |
299 | case we want to replace the INIT_EXPR. */ |
300 | if (TREE_CODE (sub)((enum tree_code) (sub)->base.code) == AGGR_INIT_EXPR |
301 | || TREE_CODE (sub)((enum tree_code) (sub)->base.code) == VEC_INIT_EXPR) |
302 | { |
303 | if (TREE_CODE (sub)((enum tree_code) (sub)->base.code) == AGGR_INIT_EXPR) |
304 | AGGR_INIT_EXPR_SLOT (sub)(*((const_cast<tree*> (tree_operand_check (((tree_check ((sub), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 304, __FUNCTION__, (AGGR_INIT_EXPR)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 304, __FUNCTION__))))) = to; |
305 | else |
306 | VEC_INIT_EXPR_SLOT (sub)(*((const_cast<tree*> (tree_operand_check (((tree_check ((sub), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 306, __FUNCTION__, (VEC_INIT_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 306, __FUNCTION__))))) = to; |
307 | *expr_p = from; |
308 | |
309 | /* The initialization is now a side-effect, so the container can |
310 | become void. */ |
311 | if (from != sub) |
312 | TREE_TYPE (from)((contains_struct_check ((from), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 312, __FUNCTION__))->typed.type) = void_type_nodeglobal_trees[TI_VOID_TYPE]; |
313 | } |
314 | |
315 | /* Handle aggregate NSDMI. */ |
316 | replace_placeholders (sub, to); |
317 | |
318 | if (t == sub) |
319 | break; |
320 | else |
321 | t = TREE_OPERAND (t, 1)(*((const_cast<tree*> (tree_operand_check ((t), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 321, __FUNCTION__))))); |
322 | } |
323 | |
324 | } |
325 | |
326 | /* Gimplify a MUST_NOT_THROW_EXPR. */ |
327 | |
328 | static enum gimplify_status |
329 | gimplify_must_not_throw_expr (tree *expr_p, gimple_seq *pre_p) |
330 | { |
331 | tree stmt = *expr_p; |
332 | tree temp = voidify_wrapper_expr (stmt, NULLnullptr); |
333 | tree body = TREE_OPERAND (stmt, 0)(*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 333, __FUNCTION__))))); |
334 | gimple_seq try_ = NULLnullptr; |
335 | gimple_seq catch_ = NULLnullptr; |
336 | gimple *mnt; |
337 | |
338 | gimplify_and_add (body, &try_); |
339 | mnt = gimple_build_eh_must_not_throw (terminate_fncp_global_trees[CPTI_TERMINATE_FN]); |
340 | gimple_seq_add_stmt_without_update (&catch_, mnt); |
341 | mnt = gimple_build_try (try_, catch_, GIMPLE_TRY_CATCH); |
342 | |
343 | gimple_seq_add_stmt_without_update (pre_p, mnt); |
344 | if (temp) |
345 | { |
346 | *expr_p = temp; |
347 | return GS_OK; |
348 | } |
349 | |
350 | *expr_p = NULLnullptr; |
351 | return GS_ALL_DONE; |
352 | } |
353 | |
354 | /* Return TRUE if an operand (OP) of a given TYPE being copied is |
355 | really just an empty class copy. |
356 | |
357 | Check that the operand has a simple form so that TARGET_EXPRs and |
358 | non-empty CONSTRUCTORs get reduced properly, and we leave the |
359 | return slot optimization alone because it isn't a copy. */ |
360 | |
361 | bool |
362 | simple_empty_class_p (tree type, tree op, tree_code code) |
363 | { |
364 | if (TREE_CODE (op)((enum tree_code) (op)->base.code) == COMPOUND_EXPR) |
365 | return simple_empty_class_p (type, TREE_OPERAND (op, 1)(*((const_cast<tree*> (tree_operand_check ((op), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 365, __FUNCTION__))))), code); |
366 | if (SIMPLE_TARGET_EXPR_P (op)(((enum tree_code) (op)->base.code) == TARGET_EXPR && (*(tree_operand_check_code ((op), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 366, __FUNCTION__))) && !(((enum tree_code) (((contains_struct_check (((*(tree_operand_check_code ((op), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 366, __FUNCTION__)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 366, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE )) |
367 | && TYPE_HAS_TRIVIAL_DESTRUCTOR (type)(!(((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 367, __FUNCTION__))->type_common.lang_flag_4)))) |
368 | /* The TARGET_EXPR is itself a simple copy, look through it. */ |
369 | return simple_empty_class_p (type, TARGET_EXPR_INITIAL (op)(*(tree_operand_check_code ((op), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 369, __FUNCTION__))), code); |
370 | |
371 | if (TREE_CODE (op)((enum tree_code) (op)->base.code) == PARM_DECL |
372 | && TREE_ADDRESSABLE (TREE_TYPE (op))((((contains_struct_check ((op), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 372, __FUNCTION__))->typed.type))->base.addressable_flag )) |
373 | { |
374 | tree fn = DECL_CONTEXT (op)((contains_struct_check ((op), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 374, __FUNCTION__))->decl_minimal.context); |
375 | if (DECL_THUNK_P (fn)(((enum tree_code) (fn)->base.code) == FUNCTION_DECL && ((contains_struct_check ((fn), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 375, __FUNCTION__))->decl_common.lang_specific) && __extension__ ({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code) (fn)->base.code) == TEMPLATE_DECL ? ( (struct tree_template_decl *)(const_cast<union tree_node * > ((((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 375, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)) , (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 375, __FUNCTION__))->decl_common.lang_specific); if (!(( (enum tree_code) (fn)->base.code) == FUNCTION_DECL || (((enum tree_code) (fn)->base.code) == TEMPLATE_DECL && ( (struct tree_template_decl *)(const_cast<union tree_node * > ((((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 375, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree ) nullptr && ((enum tree_code) (((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 375, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->base .code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn ) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 375, __FUNCTION__); <->u.fn; })->thunk_p) |
376 | || lambda_static_thunk_p (fn)) |
377 | /* In a thunk, we pass through invisible reference parms, so this isn't |
378 | actually a copy. */ |
379 | return false; |
380 | } |
381 | |
382 | return |
383 | (TREE_CODE (op)((enum tree_code) (op)->base.code) == EMPTY_CLASS_EXPR |
384 | || code == MODIFY_EXPR |
385 | || is_gimple_lvalue (op) |
386 | || INDIRECT_REF_P (op)(((enum tree_code) (op)->base.code) == INDIRECT_REF) |
387 | || (TREE_CODE (op)((enum tree_code) (op)->base.code) == CONSTRUCTOR |
388 | && CONSTRUCTOR_NELTS (op)(vec_safe_length (((tree_check ((op), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 388, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts))) == 0) |
389 | || (TREE_CODE (op)((enum tree_code) (op)->base.code) == CALL_EXPR |
390 | && !CALL_EXPR_RETURN_SLOT_OPT (op)((tree_check ((op), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 390, __FUNCTION__, (CALL_EXPR)))->base.private_flag))) |
391 | && !TREE_CLOBBER_P (op)(((enum tree_code) (op)->base.code) == CONSTRUCTOR && ((op)->base.volatile_flag)) |
392 | && is_really_empty_class (type, /*ignore_vptr*/true); |
393 | } |
394 | |
395 | /* Returns true if evaluating E as an lvalue has side-effects; |
396 | specifically, a volatile lvalue has TREE_SIDE_EFFECTS, but it doesn't really |
397 | have side-effects until there is a read or write through it. */ |
398 | |
399 | static bool |
400 | lvalue_has_side_effects (tree e) |
401 | { |
402 | if (!TREE_SIDE_EFFECTS (e)((non_type_check ((e), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 402, __FUNCTION__))->base.side_effects_flag)) |
403 | return false; |
404 | while (handled_component_p (e)) |
405 | { |
406 | if (TREE_CODE (e)((enum tree_code) (e)->base.code) == ARRAY_REF |
407 | && TREE_SIDE_EFFECTS (TREE_OPERAND (e, 1))((non_type_check (((*((const_cast<tree*> (tree_operand_check ((e), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 407, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 407, __FUNCTION__))->base.side_effects_flag)) |
408 | return true; |
409 | e = TREE_OPERAND (e, 0)(*((const_cast<tree*> (tree_operand_check ((e), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 409, __FUNCTION__))))); |
410 | } |
411 | if (DECL_P (e)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (e)->base.code))] == tcc_declaration)) |
412 | /* Just naming a variable has no side-effects. */ |
413 | return false; |
414 | else if (INDIRECT_REF_P (e)(((enum tree_code) (e)->base.code) == INDIRECT_REF)) |
415 | /* Similarly, indirection has no side-effects. */ |
416 | return TREE_SIDE_EFFECTS (TREE_OPERAND (e, 0))((non_type_check (((*((const_cast<tree*> (tree_operand_check ((e), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 416, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 416, __FUNCTION__))->base.side_effects_flag); |
417 | else |
418 | /* For anything else, trust TREE_SIDE_EFFECTS. */ |
419 | return TREE_SIDE_EFFECTS (e)((non_type_check ((e), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 419, __FUNCTION__))->base.side_effects_flag); |
420 | } |
421 | |
422 | /* Gimplify *EXPR_P as rvalue into an expression that can't be modified |
423 | by expressions with side-effects in other operands. */ |
424 | |
425 | static enum gimplify_status |
426 | gimplify_to_rvalue (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, |
427 | bool (*gimple_test_f) (tree)) |
428 | { |
429 | enum gimplify_status t |
430 | = gimplify_expr (expr_p, pre_p, post_p, gimple_test_f, fb_rvalue); |
431 | if (t == GS_ERROR) |
432 | return GS_ERROR; |
433 | else if (is_gimple_variable (*expr_p) && TREE_CODE (*expr_p)((enum tree_code) (*expr_p)->base.code) != SSA_NAME) |
434 | *expr_p = get_initialized_tmp_var (*expr_p, pre_p); |
435 | return t; |
436 | } |
437 | |
438 | /* Like gimplify_arg, but if ORDERED is set (which should be set if |
439 | any of the arguments this argument is sequenced before has |
440 | TREE_SIDE_EFFECTS set, make sure expressions with is_gimple_reg_type type |
441 | are gimplified into SSA_NAME or a fresh temporary and for |
442 | non-is_gimple_reg_type we don't optimize away TARGET_EXPRs. */ |
443 | |
444 | static enum gimplify_status |
445 | cp_gimplify_arg (tree *arg_p, gimple_seq *pre_p, location_t call_location, |
446 | bool ordered) |
447 | { |
448 | enum gimplify_status t; |
449 | if (ordered |
450 | && !is_gimple_reg_type (TREE_TYPE (*arg_p)((contains_struct_check ((*arg_p), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 450, __FUNCTION__))->typed.type)) |
451 | && TREE_CODE (*arg_p)((enum tree_code) (*arg_p)->base.code) == TARGET_EXPR) |
452 | { |
453 | /* gimplify_arg would strip away the TARGET_EXPR, but |
454 | that can mean we don't copy the argument and some following |
455 | argument with side-effect could modify it. */ |
456 | protected_set_expr_location (*arg_p, call_location); |
457 | return gimplify_expr (arg_p, pre_p, NULLnullptr, is_gimple_lvalue, fb_either); |
458 | } |
459 | else |
460 | { |
461 | t = gimplify_arg (arg_p, pre_p, call_location); |
462 | if (t == GS_ERROR) |
463 | return GS_ERROR; |
464 | else if (ordered |
465 | && is_gimple_reg_type (TREE_TYPE (*arg_p)((contains_struct_check ((*arg_p), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 465, __FUNCTION__))->typed.type)) |
466 | && is_gimple_variable (*arg_p) |
467 | && TREE_CODE (*arg_p)((enum tree_code) (*arg_p)->base.code) != SSA_NAME |
468 | /* No need to force references into register, references |
469 | can't be modified. */ |
470 | && !TYPE_REF_P (TREE_TYPE (*arg_p))(((enum tree_code) (((contains_struct_check ((*arg_p), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 470, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE ) |
471 | /* And this can't be modified either. */ |
472 | && *arg_p != current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun + 0)->language)->x_current_class_ptr : &scope_chain ->x_current_class_ptr))) |
473 | *arg_p = get_initialized_tmp_var (*arg_p, pre_p); |
474 | return t; |
475 | } |
476 | |
477 | } |
478 | |
479 | /* Do C++-specific gimplification. Args are as for gimplify_expr. */ |
480 | |
481 | int |
482 | cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p) |
483 | { |
484 | int saved_stmts_are_full_exprs_p = 0; |
485 | location_t loc = cp_expr_loc_or_input_loc (*expr_p); |
486 | enum tree_code code = TREE_CODE (*expr_p)((enum tree_code) (*expr_p)->base.code); |
487 | enum gimplify_status ret; |
488 | |
489 | if (STATEMENT_CODE_P (code)statement_code_p[(int) (code)]) |
490 | { |
491 | saved_stmts_are_full_exprs_p = stmts_are_full_exprs_p (); |
492 | current_stmt_tree ()->stmts_are_full_exprs_p |
493 | = STMT_IS_FULL_EXPR_P (*expr_p)((tree_not_check2 (((*expr_p)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 493, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_1); |
494 | } |
495 | |
496 | switch (code) |
497 | { |
498 | case AGGR_INIT_EXPR: |
499 | simplify_aggr_init_expr (expr_p); |
500 | ret = GS_OK; |
501 | break; |
502 | |
503 | case VEC_INIT_EXPR: |
504 | { |
505 | *expr_p = expand_vec_init_expr (NULL_TREE(tree) nullptr, *expr_p, |
506 | tf_warning_or_error); |
507 | |
508 | hash_set<tree> pset; |
509 | cp_walk_tree (expr_p, cp_fold_r, &pset, NULL)walk_tree_1 (expr_p, cp_fold_r, &pset, nullptr, cp_walk_subtrees ); |
510 | cp_genericize_tree (expr_p, false); |
511 | copy_if_shared (expr_p); |
512 | ret = GS_OK; |
513 | } |
514 | break; |
515 | |
516 | case THROW_EXPR: |
517 | /* FIXME communicate throw type to back end, probably by moving |
518 | THROW_EXPR into ../tree.def. */ |
519 | *expr_p = TREE_OPERAND (*expr_p, 0)(*((const_cast<tree*> (tree_operand_check ((*expr_p), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 519, __FUNCTION__))))); |
520 | ret = GS_OK; |
521 | break; |
522 | |
523 | case MUST_NOT_THROW_EXPR: |
524 | ret = gimplify_must_not_throw_expr (expr_p, pre_p); |
525 | break; |
526 | |
527 | /* We used to do this for MODIFY_EXPR as well, but that's unsafe; the |
528 | LHS of an assignment might also be involved in the RHS, as in bug |
529 | 25979. */ |
530 | case INIT_EXPR: |
531 | cp_gimplify_init_expr (expr_p); |
532 | if (TREE_CODE (*expr_p)((enum tree_code) (*expr_p)->base.code) != INIT_EXPR) |
533 | return GS_OK; |
534 | /* Fall through. */ |
535 | case MODIFY_EXPR: |
536 | modify_expr_case: |
537 | { |
538 | /* If the back end isn't clever enough to know that the lhs and rhs |
539 | types are the same, add an explicit conversion. */ |
540 | tree op0 = TREE_OPERAND (*expr_p, 0)(*((const_cast<tree*> (tree_operand_check ((*expr_p), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 540, __FUNCTION__))))); |
541 | tree op1 = TREE_OPERAND (*expr_p, 1)(*((const_cast<tree*> (tree_operand_check ((*expr_p), ( 1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 541, __FUNCTION__))))); |
542 | |
543 | if (!error_operand_p (op0) |
544 | && !error_operand_p (op1) |
545 | && (TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (op0))(((tree_class_check ((((contains_struct_check ((op0), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 545, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 545, __FUNCTION__))->type_common.canonical) == (tree) nullptr ) |
546 | || TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (op1))(((tree_class_check ((((contains_struct_check ((op1), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 546, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 546, __FUNCTION__))->type_common.canonical) == (tree) nullptr )) |
547 | && !useless_type_conversion_p (TREE_TYPE (op1)((contains_struct_check ((op1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 547, __FUNCTION__))->typed.type), TREE_TYPE (op0)((contains_struct_check ((op0), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 547, __FUNCTION__))->typed.type))) |
548 | TREE_OPERAND (*expr_p, 1)(*((const_cast<tree*> (tree_operand_check ((*expr_p), ( 1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 548, __FUNCTION__))))) = build1 (VIEW_CONVERT_EXPR, |
549 | TREE_TYPE (op0)((contains_struct_check ((op0), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 549, __FUNCTION__))->typed.type), op1); |
550 | |
551 | else if (simple_empty_class_p (TREE_TYPE (op0)((contains_struct_check ((op0), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 551, __FUNCTION__))->typed.type), op1, code)) |
552 | { |
553 | while (TREE_CODE (op1)((enum tree_code) (op1)->base.code) == TARGET_EXPR) |
554 | /* We're disconnecting the initializer from its target, |
555 | don't create a temporary. */ |
556 | op1 = TARGET_EXPR_INITIAL (op1)(*(tree_operand_check_code ((op1), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 556, __FUNCTION__))); |
557 | |
558 | /* Remove any copies of empty classes. Also drop volatile |
559 | variables on the RHS to avoid infinite recursion from |
560 | gimplify_expr trying to load the value. */ |
561 | if (TREE_SIDE_EFFECTS (op1)((non_type_check ((op1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 561, __FUNCTION__))->base.side_effects_flag)) |
562 | { |
563 | if (TREE_THIS_VOLATILE (op1)((op1)->base.volatile_flag) |
564 | && (REFERENCE_CLASS_P (op1)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (op1)->base.code))] == tcc_reference) || DECL_P (op1)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (op1)->base.code))] == tcc_declaration))) |
565 | op1 = build_fold_addr_expr (op1)build_fold_addr_expr_loc (((location_t) 0), (op1)); |
566 | |
567 | gimplify_and_add (op1, pre_p); |
568 | } |
569 | gimplify_expr (&TREE_OPERAND (*expr_p, 0)(*((const_cast<tree*> (tree_operand_check ((*expr_p), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 569, __FUNCTION__))))), pre_p, post_p, |
570 | is_gimple_lvalue, fb_lvalue); |
571 | *expr_p = TREE_OPERAND (*expr_p, 0)(*((const_cast<tree*> (tree_operand_check ((*expr_p), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 571, __FUNCTION__))))); |
572 | if (code == RETURN_EXPR && REFERENCE_CLASS_P (*expr_p)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (*expr_p)->base.code))] == tcc_reference)) |
573 | /* Avoid 'return *<retval>;' */ |
574 | *expr_p = TREE_OPERAND (*expr_p, 0)(*((const_cast<tree*> (tree_operand_check ((*expr_p), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 574, __FUNCTION__))))); |
575 | } |
576 | /* P0145 says that the RHS is sequenced before the LHS. |
577 | gimplify_modify_expr gimplifies the RHS before the LHS, but that |
578 | isn't quite strong enough in two cases: |
579 | |
580 | 1) gimplify.cc wants to leave a CALL_EXPR on the RHS, which would |
581 | mean it's evaluated after the LHS. |
582 | |
583 | 2) the value calculation of the RHS is also sequenced before the |
584 | LHS, so for scalar assignment we need to preevaluate if the |
585 | RHS could be affected by LHS side-effects even if it has no |
586 | side-effects of its own. We don't need this for classes because |
587 | class assignment takes its RHS by reference. */ |
588 | else if (flag_strong_eval_orderglobal_options.x_flag_strong_eval_order > 1 |
589 | && TREE_CODE (*expr_p)((enum tree_code) (*expr_p)->base.code) == MODIFY_EXPR |
590 | && lvalue_has_side_effects (op0) |
591 | && (TREE_CODE (op1)((enum tree_code) (op1)->base.code) == CALL_EXPR |
592 | || (SCALAR_TYPE_P (TREE_TYPE (op1))((((enum tree_code) (((contains_struct_check ((op1), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 592, __FUNCTION__))->typed.type))->base.code) == OFFSET_TYPE ) || ((enum tree_code) (((contains_struct_check ((op1), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 592, __FUNCTION__))->typed.type))->base.code) == ENUMERAL_TYPE || ((((enum tree_code) (((contains_struct_check ((op1), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 592, __FUNCTION__))->typed.type))->base.code) == BOOLEAN_TYPE || ((enum tree_code) (((contains_struct_check ((op1), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 592, __FUNCTION__))->typed.type))->base.code) == INTEGER_TYPE ) || ((enum tree_code) (((contains_struct_check ((op1), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 592, __FUNCTION__))->typed.type))->base.code) == REAL_TYPE || ((enum tree_code) (((contains_struct_check ((op1), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 592, __FUNCTION__))->typed.type))->base.code) == COMPLEX_TYPE ) || (((enum tree_code) (((contains_struct_check ((op1), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 592, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE ) || (((enum tree_code) (((contains_struct_check ((op1), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 592, __FUNCTION__))->typed.type))->base.code) == RECORD_TYPE && (((tree_class_check (((tree_check ((((contains_struct_check ((op1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 592, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 592, __FUNCTION__, (RECORD_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 592, __FUNCTION__))->type_common.lang_flag_2))) || (((enum tree_code) (((contains_struct_check ((op1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 592, __FUNCTION__))->typed.type))->base.code) == NULLPTR_TYPE )) |
593 | && !TREE_CONSTANT (op1)((non_type_check ((op1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 593, __FUNCTION__))->base.constant_flag)))) |
594 | TREE_OPERAND (*expr_p, 1)(*((const_cast<tree*> (tree_operand_check ((*expr_p), ( 1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 594, __FUNCTION__))))) = get_initialized_tmp_var (op1, pre_p); |
595 | } |
596 | ret = GS_OK; |
597 | break; |
598 | |
599 | case EMPTY_CLASS_EXPR: |
600 | /* We create an empty CONSTRUCTOR with RECORD_TYPE. */ |
601 | *expr_p = build_constructor (TREE_TYPE (*expr_p)((contains_struct_check ((*expr_p), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 601, __FUNCTION__))->typed.type), NULLnullptr); |
602 | ret = GS_OK; |
603 | break; |
604 | |
605 | case BASELINK: |
606 | *expr_p = BASELINK_FUNCTIONS (*expr_p)(((struct tree_baselink*) (tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 606, __FUNCTION__, (BASELINK))))->functions); |
607 | ret = GS_OK; |
608 | break; |
609 | |
610 | case TRY_BLOCK: |
611 | genericize_try_block (expr_p); |
612 | ret = GS_OK; |
613 | break; |
614 | |
615 | case HANDLER: |
616 | genericize_catch_block (expr_p); |
617 | ret = GS_OK; |
618 | break; |
619 | |
620 | case EH_SPEC_BLOCK: |
621 | genericize_eh_spec_block (expr_p); |
622 | ret = GS_OK; |
623 | break; |
624 | |
625 | case USING_STMT: |
626 | gcc_unreachable ()(fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 626, __FUNCTION__)); |
627 | |
628 | case FOR_STMT: |
629 | case WHILE_STMT: |
630 | case DO_STMT: |
631 | case SWITCH_STMT: |
632 | case CONTINUE_STMT: |
633 | case BREAK_STMT: |
634 | gcc_unreachable ()(fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 634, __FUNCTION__)); |
635 | |
636 | case OMP_FOR: |
637 | case OMP_SIMD: |
638 | case OMP_DISTRIBUTE: |
639 | case OMP_LOOP: |
640 | case OMP_TASKLOOP: |
641 | ret = cp_gimplify_omp_for (expr_p, pre_p); |
642 | break; |
643 | |
644 | case EXPR_STMT: |
645 | gimplify_expr_stmt (expr_p); |
646 | ret = GS_OK; |
647 | break; |
648 | |
649 | case UNARY_PLUS_EXPR: |
650 | { |
651 | tree arg = TREE_OPERAND (*expr_p, 0)(*((const_cast<tree*> (tree_operand_check ((*expr_p), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 651, __FUNCTION__))))); |
652 | tree type = TREE_TYPE (*expr_p)((contains_struct_check ((*expr_p), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 652, __FUNCTION__))->typed.type); |
653 | *expr_p = (TREE_TYPE (arg)((contains_struct_check ((arg), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 653, __FUNCTION__))->typed.type) != type) ? fold_convert (type, arg)fold_convert_loc (((location_t) 0), type, arg) |
654 | : arg; |
655 | ret = GS_OK; |
656 | } |
657 | break; |
658 | |
659 | case CALL_EXPR: |
660 | ret = GS_OK; |
661 | if (flag_strong_eval_orderglobal_options.x_flag_strong_eval_order == 2 |
662 | && CALL_EXPR_FN (*expr_p)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 662, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 662, __FUNCTION__))))) |
663 | && !CALL_EXPR_OPERATOR_SYNTAX (*expr_p)((tree_not_check2 (((tree_check2 (((*expr_p)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 663, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 663, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_6) |
664 | && cp_get_callee_fndecl_nofold (*expr_p) == NULL_TREE(tree) nullptr) |
665 | { |
666 | tree fnptrtype = TREE_TYPE (CALL_EXPR_FN (*expr_p))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 666, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 666, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 666, __FUNCTION__))->typed.type); |
667 | enum gimplify_status t |
668 | = gimplify_to_rvalue (&CALL_EXPR_FN (*expr_p)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 668, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 668, __FUNCTION__))))), pre_p, NULLnullptr, |
669 | is_gimple_call_addr); |
670 | if (t == GS_ERROR) |
671 | ret = GS_ERROR; |
672 | /* GIMPLE considers most pointer conversion useless, but for |
673 | calls we actually care about the exact function pointer type. */ |
674 | else if (TREE_TYPE (CALL_EXPR_FN (*expr_p))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 674, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 674, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 674, __FUNCTION__))->typed.type) != fnptrtype) |
675 | CALL_EXPR_FN (*expr_p)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 675, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 675, __FUNCTION__))))) |
676 | = build1 (NOP_EXPR, fnptrtype, CALL_EXPR_FN (*expr_p)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 676, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 676, __FUNCTION__)))))); |
677 | } |
678 | if (!CALL_EXPR_FN (*expr_p)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 678, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 678, __FUNCTION__)))))) |
679 | /* Internal function call. */; |
680 | else if (CALL_EXPR_REVERSE_ARGS (*expr_p)((tree_not_check2 (((tree_check2 (((*expr_p)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 680, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 680, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5)) |
681 | { |
682 | /* This is a call to a (compound) assignment operator that used |
683 | the operator syntax; gimplify the RHS first. */ |
684 | gcc_assert (call_expr_nargs (*expr_p) == 2)((void)(!((((int)((unsigned long) (*tree_int_cst_elt_check (( (tree_class_check ((*expr_p), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 684, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 684, __FUNCTION__)))) - 3) == 2) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 684, __FUNCTION__), 0 : 0)); |
685 | gcc_assert (!CALL_EXPR_ORDERED_ARGS (*expr_p))((void)(!(!((tree_not_check2 (((tree_check2 (((*expr_p)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 685, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 685, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 685, __FUNCTION__), 0 : 0)); |
686 | enum gimplify_status t |
687 | = cp_gimplify_arg (&CALL_EXPR_ARG (*expr_p, 1)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 687, __FUNCTION__, (CALL_EXPR)))), ((1) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 687, __FUNCTION__))))), pre_p, loc, |
688 | TREE_SIDE_EFFECTS (CALL_EXPR_ARG (*expr_p, 0))((non_type_check (((*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 688, __FUNCTION__, (CALL_EXPR)))), ((0) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 688, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 688, __FUNCTION__))->base.side_effects_flag)); |
689 | if (t == GS_ERROR) |
690 | ret = GS_ERROR; |
691 | } |
692 | else if (CALL_EXPR_ORDERED_ARGS (*expr_p)((tree_not_check2 (((tree_check2 (((*expr_p)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 692, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 692, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3)) |
693 | { |
694 | /* Leave the last argument for gimplify_call_expr, to avoid problems |
695 | with __builtin_va_arg_pack(). */ |
696 | int nargs = call_expr_nargs (*expr_p)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check ((*expr_p), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 696, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 696, __FUNCTION__)))) - 3) - 1; |
697 | int last_side_effects_arg = -1; |
698 | for (int i = nargs; i > 0; --i) |
699 | if (TREE_SIDE_EFFECTS (CALL_EXPR_ARG (*expr_p, i))((non_type_check (((*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 699, __FUNCTION__, (CALL_EXPR)))), ((i) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 699, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 699, __FUNCTION__))->base.side_effects_flag)) |
700 | { |
701 | last_side_effects_arg = i; |
702 | break; |
703 | } |
704 | for (int i = 0; i < nargs; ++i) |
705 | { |
706 | enum gimplify_status t |
707 | = cp_gimplify_arg (&CALL_EXPR_ARG (*expr_p, i)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 707, __FUNCTION__, (CALL_EXPR)))), ((i) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 707, __FUNCTION__))))), pre_p, loc, |
708 | i < last_side_effects_arg); |
709 | if (t == GS_ERROR) |
710 | ret = GS_ERROR; |
711 | } |
712 | } |
713 | else if (flag_strong_eval_orderglobal_options.x_flag_strong_eval_order |
714 | && !CALL_EXPR_OPERATOR_SYNTAX (*expr_p)((tree_not_check2 (((tree_check2 (((*expr_p)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 714, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 714, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_6)) |
715 | { |
716 | /* If flag_strong_eval_order, evaluate the object argument first. */ |
717 | tree fntype = TREE_TYPE (CALL_EXPR_FN (*expr_p))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 717, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 717, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 717, __FUNCTION__))->typed.type); |
718 | if (INDIRECT_TYPE_P (fntype)((((enum tree_code) (fntype)->base.code) == POINTER_TYPE) || (((enum tree_code) (fntype)->base.code) == REFERENCE_TYPE ))) |
719 | fntype = TREE_TYPE (fntype)((contains_struct_check ((fntype), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 719, __FUNCTION__))->typed.type); |
720 | if (TREE_CODE (fntype)((enum tree_code) (fntype)->base.code) == METHOD_TYPE) |
721 | { |
722 | int nargs = call_expr_nargs (*expr_p)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check ((*expr_p), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 722, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 722, __FUNCTION__)))) - 3); |
723 | bool side_effects = false; |
724 | for (int i = 1; i < nargs; ++i) |
725 | if (TREE_SIDE_EFFECTS (CALL_EXPR_ARG (*expr_p, i))((non_type_check (((*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 725, __FUNCTION__, (CALL_EXPR)))), ((i) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 725, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 725, __FUNCTION__))->base.side_effects_flag)) |
726 | { |
727 | side_effects = true; |
728 | break; |
729 | } |
730 | enum gimplify_status t |
731 | = cp_gimplify_arg (&CALL_EXPR_ARG (*expr_p, 0)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 731, __FUNCTION__, (CALL_EXPR)))), ((0) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 731, __FUNCTION__))))), pre_p, loc, |
732 | side_effects); |
733 | if (t == GS_ERROR) |
734 | ret = GS_ERROR; |
735 | } |
736 | } |
737 | if (ret != GS_ERROR) |
738 | { |
739 | tree decl = cp_get_callee_fndecl_nofold (*expr_p); |
740 | if (decl && fndecl_built_in_p (decl, BUILT_IN_FRONTEND)) |
741 | switch (DECL_FE_FUNCTION_CODE (decl)) |
742 | { |
743 | case CP_BUILT_IN_IS_CONSTANT_EVALUATED: |
744 | *expr_p = boolean_false_nodeglobal_trees[TI_BOOLEAN_FALSE]; |
745 | break; |
746 | case CP_BUILT_IN_SOURCE_LOCATION: |
747 | *expr_p |
748 | = fold_builtin_source_location (*expr_p); |
749 | break; |
750 | case CP_BUILT_IN_IS_CORRESPONDING_MEMBER: |
751 | *expr_p |
752 | = fold_builtin_is_corresponding_member |
753 | (EXPR_LOCATION (*expr_p)((((*expr_p)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((*expr_p))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((*expr_p))->base.code))]) <= tcc_expression)) ? (*expr_p)->exp.locus : ((location_t) 0 )), call_expr_nargs (*expr_p)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check ((*expr_p), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 753, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 753, __FUNCTION__)))) - 3), |
754 | &CALL_EXPR_ARG (*expr_p, 0)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 754, __FUNCTION__, (CALL_EXPR)))), ((0) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 754, __FUNCTION__)))))); |
755 | break; |
756 | case CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS: |
757 | *expr_p |
758 | = fold_builtin_is_pointer_inverconvertible_with_class |
759 | (EXPR_LOCATION (*expr_p)((((*expr_p)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((*expr_p))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((*expr_p))->base.code))]) <= tcc_expression)) ? (*expr_p)->exp.locus : ((location_t) 0 )), call_expr_nargs (*expr_p)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check ((*expr_p), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 759, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 759, __FUNCTION__)))) - 3), |
760 | &CALL_EXPR_ARG (*expr_p, 0)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 760, __FUNCTION__, (CALL_EXPR)))), ((0) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 760, __FUNCTION__)))))); |
761 | break; |
762 | default: |
763 | break; |
764 | } |
765 | } |
766 | break; |
767 | |
768 | case TARGET_EXPR: |
769 | /* A TARGET_EXPR that expresses direct-initialization should have been |
770 | elided by cp_gimplify_init_expr. */ |
771 | gcc_checking_assert (!TARGET_EXPR_DIRECT_INIT_P (*expr_p))((void)(!(!((tree_not_check2 (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 771, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 771, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 771, __FUNCTION__), 0 : 0)); |
772 | /* Likewise, but allow extra temps of trivial type so that |
773 | gimplify_init_ctor_preeval can materialize subobjects of a CONSTRUCTOR |
774 | on the rhs of an assignment, as in constexpr-aggr1.C. */ |
775 | gcc_checking_assert (!TARGET_EXPR_ELIDING_P (*expr_p)((void)(!(!((tree_not_check2 (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 775, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 775, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3) || !((((contains_struct_check ((*expr_p), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 776, __FUNCTION__))->typed.type))->base.addressable_flag )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 776, __FUNCTION__), 0 : 0)) |
776 | || !TREE_ADDRESSABLE (TREE_TYPE (*expr_p)))((void)(!(!((tree_not_check2 (((tree_check ((*expr_p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 775, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 775, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3) || !((((contains_struct_check ((*expr_p), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 776, __FUNCTION__))->typed.type))->base.addressable_flag )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 776, __FUNCTION__), 0 : 0)); |
777 | ret = GS_UNHANDLED; |
778 | break; |
779 | |
780 | case PTRMEM_CST: |
781 | *expr_p = cplus_expand_constant (*expr_p); |
782 | if (TREE_CODE (*expr_p)((enum tree_code) (*expr_p)->base.code) == PTRMEM_CST) |
783 | ret = GS_ERROR; |
784 | else |
785 | ret = GS_OK; |
786 | break; |
787 | |
788 | case RETURN_EXPR: |
789 | if (TREE_OPERAND (*expr_p, 0)(*((const_cast<tree*> (tree_operand_check ((*expr_p), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 789, __FUNCTION__))))) |
790 | && (TREE_CODE (TREE_OPERAND (*expr_p, 0))((enum tree_code) ((*((const_cast<tree*> (tree_operand_check ((*expr_p), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 790, __FUNCTION__))))))->base.code) == INIT_EXPR |
791 | || TREE_CODE (TREE_OPERAND (*expr_p, 0))((enum tree_code) ((*((const_cast<tree*> (tree_operand_check ((*expr_p), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 791, __FUNCTION__))))))->base.code) == MODIFY_EXPR)) |
792 | { |
793 | expr_p = &TREE_OPERAND (*expr_p, 0)(*((const_cast<tree*> (tree_operand_check ((*expr_p), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 793, __FUNCTION__))))); |
794 | /* Avoid going through the INIT_EXPR case, which can |
795 | degrade INIT_EXPRs into AGGR_INIT_EXPRs. */ |
796 | goto modify_expr_case; |
797 | } |
798 | /* Fall through. */ |
799 | |
800 | default: |
801 | ret = (enum gimplify_status) c_gimplify_expr (expr_p, pre_p, post_p); |
802 | break; |
803 | } |
804 | |
805 | /* Restore saved state. */ |
806 | if (STATEMENT_CODE_P (code)statement_code_p[(int) (code)]) |
807 | current_stmt_tree ()->stmts_are_full_exprs_p |
808 | = saved_stmts_are_full_exprs_p; |
809 | |
810 | return ret; |
811 | } |
812 | |
813 | static inline bool |
814 | is_invisiref_parm (const_tree t) |
815 | { |
816 | return ((TREE_CODE (t)((enum tree_code) (t)->base.code) == PARM_DECL || TREE_CODE (t)((enum tree_code) (t)->base.code) == RESULT_DECL) |
817 | && DECL_BY_REFERENCE (t)((tree_check3 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 817, __FUNCTION__, (VAR_DECL), (PARM_DECL), (RESULT_DECL))) ->decl_common.decl_by_reference_flag)); |
818 | } |
819 | |
820 | /* A stable comparison routine for use with splay trees and DECLs. */ |
821 | |
822 | static int |
823 | splay_tree_compare_decl_uid (splay_tree_key xa, splay_tree_key xb) |
824 | { |
825 | tree a = (tree) xa; |
826 | tree b = (tree) xb; |
827 | |
828 | return DECL_UID (a)((contains_struct_check ((a), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 828, __FUNCTION__))->decl_minimal.uid) - DECL_UID (b)((contains_struct_check ((b), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 828, __FUNCTION__))->decl_minimal.uid); |
829 | } |
830 | |
831 | /* OpenMP context during genericization. */ |
832 | |
833 | struct cp_genericize_omp_taskreg |
834 | { |
835 | bool is_parallel; |
836 | bool default_shared; |
837 | struct cp_genericize_omp_taskreg *outer; |
838 | splay_tree variables; |
839 | }; |
840 | |
841 | /* Return true if genericization should try to determine if |
842 | DECL is firstprivate or shared within task regions. */ |
843 | |
844 | static bool |
845 | omp_var_to_track (tree decl) |
846 | { |
847 | tree type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 847, __FUNCTION__))->typed.type); |
848 | if (is_invisiref_parm (decl)) |
849 | type = TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 849, __FUNCTION__))->typed.type); |
850 | else if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE)) |
851 | type = TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 851, __FUNCTION__))->typed.type); |
852 | while (TREE_CODE (type)((enum tree_code) (type)->base.code) == ARRAY_TYPE) |
853 | type = TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 853, __FUNCTION__))->typed.type); |
854 | if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK] || !CLASS_TYPE_P (type)(((((enum tree_code) (type)->base.code)) == RECORD_TYPE || (((enum tree_code) (type)->base.code)) == UNION_TYPE) && ((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 854, __FUNCTION__))->type_common.lang_flag_5))) |
855 | return false; |
856 | if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL) && CP_DECL_THREAD_LOCAL_P (decl)(((tree_not_check2 (((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 856, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 856, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0))) |
857 | return false; |
858 | if (cxx_omp_predetermined_sharing (decl) != OMP_CLAUSE_DEFAULT_UNSPECIFIED) |
859 | return false; |
860 | return true; |
861 | } |
862 | |
863 | /* Note DECL use in OpenMP region OMP_CTX during genericization. */ |
864 | |
865 | static void |
866 | omp_cxx_notice_variable (struct cp_genericize_omp_taskreg *omp_ctx, tree decl) |
867 | { |
868 | splay_tree_node n = splay_tree_lookup (omp_ctx->variables, |
869 | (splay_tree_key) decl); |
870 | if (n == NULLnullptr) |
871 | { |
872 | int flags = OMP_CLAUSE_DEFAULT_SHARED; |
873 | if (omp_ctx->outer) |
874 | omp_cxx_notice_variable (omp_ctx->outer, decl); |
875 | if (!omp_ctx->default_shared) |
876 | { |
877 | struct cp_genericize_omp_taskreg *octx; |
878 | |
879 | for (octx = omp_ctx->outer; octx; octx = octx->outer) |
880 | { |
881 | n = splay_tree_lookup (octx->variables, (splay_tree_key) decl); |
882 | if (n && n->value != OMP_CLAUSE_DEFAULT_SHARED) |
883 | { |
884 | flags = OMP_CLAUSE_DEFAULT_FIRSTPRIVATE; |
885 | break; |
886 | } |
887 | if (octx->is_parallel) |
888 | break; |
889 | } |
890 | if (octx == NULLnullptr |
891 | && (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == PARM_DECL |
892 | || (!(TREE_STATIC (decl)((decl)->base.static_flag) || DECL_EXTERNAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 892, __FUNCTION__))->decl_common.decl_flag_1)) |
893 | && DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 893, __FUNCTION__))->decl_minimal.context) == current_function_decl))) |
894 | flags = OMP_CLAUSE_DEFAULT_FIRSTPRIVATE; |
895 | if (flags == OMP_CLAUSE_DEFAULT_FIRSTPRIVATE) |
896 | { |
897 | /* DECL is implicitly determined firstprivate in |
898 | the current task construct. Ensure copy ctor and |
899 | dtor are instantiated, because during gimplification |
900 | it will be already too late. */ |
901 | tree type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 901, __FUNCTION__))->typed.type); |
902 | if (is_invisiref_parm (decl)) |
903 | type = TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 903, __FUNCTION__))->typed.type); |
904 | else if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE)) |
905 | type = TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 905, __FUNCTION__))->typed.type); |
906 | while (TREE_CODE (type)((enum tree_code) (type)->base.code) == ARRAY_TYPE) |
907 | type = TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 907, __FUNCTION__))->typed.type); |
908 | get_copy_ctor (type, tf_none); |
909 | get_dtor (type, tf_none); |
910 | } |
911 | } |
912 | splay_tree_insert (omp_ctx->variables, (splay_tree_key) decl, flags); |
913 | } |
914 | } |
915 | |
916 | /* True if any of the element initializers in CTOR are TARGET_EXPRs that are |
917 | not expected to elide, e.g. because unsafe_copy_elision_p is true. */ |
918 | |
919 | static bool |
920 | any_non_eliding_target_exprs (tree ctor) |
921 | { |
922 | for (const constructor_elt &e : *CONSTRUCTOR_ELTS (ctor)((tree_check ((ctor), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 922, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts)) |
923 | { |
924 | if (TREE_CODE (e.value)((enum tree_code) (e.value)->base.code) == TARGET_EXPR |
925 | && !TARGET_EXPR_ELIDING_P (e.value)((tree_not_check2 (((tree_check ((e.value), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 925, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 925, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3)) |
926 | return true; |
927 | } |
928 | return false; |
929 | } |
930 | |
931 | /* If we might need to clean up a partially constructed object, break down the |
932 | CONSTRUCTOR with split_nonconstant_init. Also expand VEC_INIT_EXPR at this |
933 | point. If initializing TO with FROM is non-trivial, overwrite *REPLACE with |
934 | the result. */ |
935 | |
936 | static void |
937 | cp_genericize_init (tree *replace, tree from, tree to) |
938 | { |
939 | tree init = NULL_TREE(tree) nullptr; |
940 | if (TREE_CODE (from)((enum tree_code) (from)->base.code) == VEC_INIT_EXPR) |
941 | init = expand_vec_init_expr (to, from, tf_warning_or_error); |
942 | else if (TREE_CODE (from)((enum tree_code) (from)->base.code) == CONSTRUCTOR |
943 | && TREE_SIDE_EFFECTS (from)((non_type_check ((from), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 943, __FUNCTION__))->base.side_effects_flag) |
944 | && ((flag_exceptionsglobal_options.x_flag_exceptions |
945 | && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TREE_TYPE (from))(((tree_class_check ((((contains_struct_check ((from), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 945, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 945, __FUNCTION__))->type_common.lang_flag_4))) |
946 | || any_non_eliding_target_exprs (from))) |
947 | { |
948 | to = cp_stabilize_reference (to); |
949 | replace_placeholders (from, to); |
950 | init = split_nonconstant_init (to, from); |
951 | } |
952 | |
953 | if (init) |
954 | { |
955 | if (*replace == from) |
956 | /* Make cp_gimplify_init_expr call replace_decl on this |
957 | TARGET_EXPR_INITIAL. */ |
958 | init = fold_convert (void_type_node, init)fold_convert_loc (((location_t) 0), global_trees[TI_VOID_TYPE ], init); |
959 | *replace = init; |
960 | } |
961 | } |
962 | |
963 | /* For an INIT_EXPR, replace the INIT_EXPR itself. */ |
964 | |
965 | static void |
966 | cp_genericize_init_expr (tree *stmt_p) |
967 | { |
968 | iloc_sentinel ils = EXPR_LOCATION (*stmt_p)((((*stmt_p)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((*stmt_p))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((*stmt_p))->base.code))]) <= tcc_expression)) ? (*stmt_p)->exp.locus : ((location_t) 0 )); |
969 | tree to = TREE_OPERAND (*stmt_p, 0)(*((const_cast<tree*> (tree_operand_check ((*stmt_p), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 969, __FUNCTION__))))); |
970 | tree from = TREE_OPERAND (*stmt_p, 1)(*((const_cast<tree*> (tree_operand_check ((*stmt_p), ( 1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 970, __FUNCTION__))))); |
971 | if (SIMPLE_TARGET_EXPR_P (from)(((enum tree_code) (from)->base.code) == TARGET_EXPR && (*(tree_operand_check_code ((from), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 971, __FUNCTION__))) && !(((enum tree_code) (((contains_struct_check (((*(tree_operand_check_code ((from), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 971, __FUNCTION__)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 971, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE )) |
972 | /* Return gets confused if we clobber its INIT_EXPR this soon. */ |
973 | && TREE_CODE (to)((enum tree_code) (to)->base.code) != RESULT_DECL) |
974 | from = TARGET_EXPR_INITIAL (from)(*(tree_operand_check_code ((from), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 974, __FUNCTION__))); |
975 | cp_genericize_init (stmt_p, from, to); |
976 | } |
977 | |
978 | /* For a TARGET_EXPR, change the TARGET_EXPR_INITIAL. We will need to use |
979 | replace_decl later when we know what we're initializing. */ |
980 | |
981 | static void |
982 | cp_genericize_target_expr (tree *stmt_p) |
983 | { |
984 | iloc_sentinel ils = EXPR_LOCATION (*stmt_p)((((*stmt_p)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((*stmt_p))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((*stmt_p))->base.code))]) <= tcc_expression)) ? (*stmt_p)->exp.locus : ((location_t) 0 )); |
985 | tree slot = TARGET_EXPR_SLOT (*stmt_p)(*(tree_operand_check_code ((*stmt_p), (TARGET_EXPR), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 985, __FUNCTION__))); |
986 | cp_genericize_init (&TARGET_EXPR_INITIAL (*stmt_p)(*(tree_operand_check_code ((*stmt_p), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 986, __FUNCTION__))), |
987 | TARGET_EXPR_INITIAL (*stmt_p)(*(tree_operand_check_code ((*stmt_p), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 987, __FUNCTION__))), slot); |
988 | gcc_assert (!DECL_INITIAL (slot))((void)(!(!((contains_struct_check ((slot), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 988, __FUNCTION__))->decl_common.initial)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 988, __FUNCTION__), 0 : 0)); |
989 | } |
990 | |
991 | /* Similar to if (target_expr_needs_replace) replace_decl, but TP is the |
992 | TARGET_EXPR_INITIAL, and this also updates *_SLOT. We need this extra |
993 | replacement when cp_folding TARGET_EXPR to preserve the invariant that |
994 | AGGR_INIT_EXPR_SLOT agrees with the enclosing TARGET_EXPR_SLOT. */ |
995 | |
996 | bool |
997 | maybe_replace_decl (tree *tp, tree decl, tree replacement) |
998 | { |
999 | if (!*tp || !VOID_TYPE_P (TREE_TYPE (*tp))(((enum tree_code) (((contains_struct_check ((*tp), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 999, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE )) |
1000 | return false; |
1001 | tree t = *tp; |
1002 | while (TREE_CODE (t)((enum tree_code) (t)->base.code) == COMPOUND_EXPR) |
1003 | t = TREE_OPERAND (t, 1)(*((const_cast<tree*> (tree_operand_check ((t), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1003, __FUNCTION__))))); |
1004 | if (TREE_CODE (t)((enum tree_code) (t)->base.code) == AGGR_INIT_EXPR) |
1005 | replace_decl (&AGGR_INIT_EXPR_SLOT (t)(*((const_cast<tree*> (tree_operand_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1005, __FUNCTION__, (AGGR_INIT_EXPR)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1005, __FUNCTION__))))), decl, replacement); |
1006 | else if (TREE_CODE (t)((enum tree_code) (t)->base.code) == VEC_INIT_EXPR) |
1007 | replace_decl (&VEC_INIT_EXPR_SLOT (t)(*((const_cast<tree*> (tree_operand_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1007, __FUNCTION__, (VEC_INIT_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1007, __FUNCTION__))))), decl, replacement); |
1008 | else |
1009 | replace_decl (tp, decl, replacement); |
1010 | return true; |
1011 | } |
1012 | |
1013 | /* Genericization context. */ |
1014 | |
1015 | struct cp_genericize_data |
1016 | { |
1017 | hash_set<tree> *p_set; |
1018 | auto_vec<tree> bind_expr_stack; |
1019 | struct cp_genericize_omp_taskreg *omp_ctx; |
1020 | tree try_block; |
1021 | bool no_sanitize_p; |
1022 | bool handle_invisiref_parm_p; |
1023 | }; |
1024 | |
1025 | /* Perform any pre-gimplification folding of C++ front end trees to |
1026 | GENERIC. |
1027 | Note: The folding of non-omp cases is something to move into |
1028 | the middle-end. As for now we have most foldings only on GENERIC |
1029 | in fold-const, we need to perform this before transformation to |
1030 | GIMPLE-form. */ |
1031 | |
1032 | struct cp_fold_data |
1033 | { |
1034 | hash_set<tree> pset; |
1035 | fold_flags_t flags; |
1036 | cp_fold_data (fold_flags_t flags): flags (flags) {} |
1037 | }; |
1038 | |
1039 | static tree |
1040 | cp_fold_r (tree *stmt_p, int *walk_subtrees, void *data_) |
1041 | { |
1042 | cp_fold_data *data = (cp_fold_data*)data_; |
1043 | tree stmt = *stmt_p; |
1044 | enum tree_code code = TREE_CODE (stmt)((enum tree_code) (stmt)->base.code); |
1045 | |
1046 | switch (code) |
1047 | { |
1048 | case PTRMEM_CST: |
1049 | if (TREE_CODE (PTRMEM_CST_MEMBER (stmt))((enum tree_code) ((((ptrmem_cst_t)(tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1049, __FUNCTION__, (PTRMEM_CST))))->member))->base.code ) == FUNCTION_DECL |
1050 | && DECL_IMMEDIATE_FUNCTION_P (PTRMEM_CST_MEMBER (stmt))(((contains_struct_check (((tree_check (((((enum tree_code) ( (((ptrmem_cst_t)(tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (PTRMEM_CST))))->member))->base.code ) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast <union tree_node *> ((((tree_check (((((ptrmem_cst_t)(tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (PTRMEM_CST))))->member)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (TEMPLATE_DECL))))))))->result : ((( ptrmem_cst_t)(tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (PTRMEM_CST))))->member))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__))->decl_common.lang_specific) ? __extension__ ({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code ) ((((ptrmem_cst_t)(tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (PTRMEM_CST))))->member))->base.code ) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast <union tree_node *> ((((tree_check (((((ptrmem_cst_t)(tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (PTRMEM_CST))))->member)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (TEMPLATE_DECL))))))))->result : ((( ptrmem_cst_t)(tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (PTRMEM_CST))))->member))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__))->decl_common.lang_specific); if (!( ((enum tree_code) ((((ptrmem_cst_t)(tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (PTRMEM_CST))))->member))->base.code ) == FUNCTION_DECL || (((enum tree_code) ((((ptrmem_cst_t)(tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (PTRMEM_CST))))->member))->base.code ) == TEMPLATE_DECL && ((struct tree_template_decl *)( const_cast<union tree_node *> ((((tree_check (((((ptrmem_cst_t )(tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (PTRMEM_CST))))->member)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree ) nullptr && ((enum tree_code) (((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check (((((ptrmem_cst_t )(tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (PTRMEM_CST))))->member)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__, (TEMPLATE_DECL))))))))->result)-> base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn ) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1050, __FUNCTION__); <->u.fn; })->immediate_fn_p : false)) |
1051 | { |
1052 | if (!data->pset.add (stmt)) |
1053 | error_at (PTRMEM_CST_LOCATION (stmt)(((ptrmem_cst_t)(tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1053, __FUNCTION__, (PTRMEM_CST))))->locus), |
1054 | "taking address of an immediate function %qD", |
1055 | PTRMEM_CST_MEMBER (stmt)(((ptrmem_cst_t)(tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1055, __FUNCTION__, (PTRMEM_CST))))->member)); |
1056 | stmt = *stmt_p = build_zero_cst (TREE_TYPE (stmt)((contains_struct_check ((stmt), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1056, __FUNCTION__))->typed.type)); |
Value stored to 'stmt' is never read | |
1057 | break; |
1058 | } |
1059 | break; |
1060 | |
1061 | case ADDR_EXPR: |
1062 | if (TREE_CODE (TREE_OPERAND (stmt, 0))((enum tree_code) ((*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1062, __FUNCTION__))))))->base.code) == FUNCTION_DECL |
1063 | && DECL_IMMEDIATE_FUNCTION_P (TREE_OPERAND (stmt, 0))(((contains_struct_check (((tree_check (((((enum tree_code) ( (*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__))))))->base.code) == TEMPLATE_DECL ? ( (struct tree_template_decl *)(const_cast<union tree_node * > ((((tree_check (((*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__, (TEMPLATE_DECL))))))))->result : (*( (const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__))))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__))->decl_common.lang_specific) ? __extension__ ({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code ) ((*((const_cast<tree*> (tree_operand_check ((stmt), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__))))))->base.code) == TEMPLATE_DECL ? ( (struct tree_template_decl *)(const_cast<union tree_node * > ((((tree_check (((*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__, (TEMPLATE_DECL))))))))->result : (*( (const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__))))))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__))->decl_common.lang_specific); if (!( ((enum tree_code) ((*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__))))))->base.code) == FUNCTION_DECL || (((enum tree_code) ((*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__))))))->base.code) == TEMPLATE_DECL && ((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check (((*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree ) nullptr && ((enum tree_code) (((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check (((*(( const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__, (TEMPLATE_DECL))))))))->result)-> base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn ) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1063, __FUNCTION__); <->u.fn; })->immediate_fn_p : false)) |
1064 | { |
1065 | error_at (EXPR_LOCATION (stmt)((((stmt)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((stmt))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((stmt))->base.code))]) <= tcc_expression )) ? (stmt)->exp.locus : ((location_t) 0)), |
1066 | "taking address of an immediate function %qD", |
1067 | TREE_OPERAND (stmt, 0)(*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1067, __FUNCTION__)))))); |
1068 | stmt = *stmt_p = build_zero_cst (TREE_TYPE (stmt)((contains_struct_check ((stmt), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1068, __FUNCTION__))->typed.type)); |
1069 | break; |
1070 | } |
1071 | break; |
1072 | |
1073 | default: |
1074 | break; |
1075 | } |
1076 | |
1077 | *stmt_p = stmt = cp_fold (*stmt_p, data->flags); |
1078 | |
1079 | if (data->pset.add (stmt)) |
1080 | { |
1081 | /* Don't walk subtrees of stmts we've already walked once, otherwise |
1082 | we can have exponential complexity with e.g. lots of nested |
1083 | SAVE_EXPRs or TARGET_EXPRs. cp_fold uses a cache and will return |
1084 | always the same tree, which the first time cp_fold_r has been |
1085 | called on it had the subtrees walked. */ |
1086 | *walk_subtrees = 0; |
1087 | return NULLnullptr; |
1088 | } |
1089 | |
1090 | code = TREE_CODE (stmt)((enum tree_code) (stmt)->base.code); |
1091 | switch (code) |
1092 | { |
1093 | tree x; |
1094 | int i, n; |
1095 | case OMP_FOR: |
1096 | case OMP_SIMD: |
1097 | case OMP_DISTRIBUTE: |
1098 | case OMP_LOOP: |
1099 | case OMP_TASKLOOP: |
1100 | case OACC_LOOP: |
1101 | cp_walk_tree (&OMP_FOR_BODY (stmt), cp_fold_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((stmt), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1101, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1101, __FUNCTION__))))), cp_fold_r, data, nullptr, cp_walk_subtrees ); |
1102 | cp_walk_tree (&OMP_FOR_CLAUSES (stmt), cp_fold_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((stmt), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1102, __FUNCTION__))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1102, __FUNCTION__))))), cp_fold_r, data, nullptr, cp_walk_subtrees ); |
1103 | cp_walk_tree (&OMP_FOR_INIT (stmt), cp_fold_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((stmt), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1103, __FUNCTION__))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1103, __FUNCTION__))))), cp_fold_r, data, nullptr, cp_walk_subtrees ); |
1104 | x = OMP_FOR_COND (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((stmt), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1104, __FUNCTION__))), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1104, __FUNCTION__))))); |
1105 | if (x && TREE_CODE_CLASS (TREE_CODE (x))tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (x)->base.code))] == tcc_comparison) |
1106 | { |
1107 | cp_walk_tree (&TREE_OPERAND (x, 0), cp_fold_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1107, __FUNCTION__))))), cp_fold_r, data, nullptr, cp_walk_subtrees ); |
1108 | cp_walk_tree (&TREE_OPERAND (x, 1), cp_fold_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check ((x), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1108, __FUNCTION__))))), cp_fold_r, data, nullptr, cp_walk_subtrees ); |
1109 | } |
1110 | else if (x && TREE_CODE (x)((enum tree_code) (x)->base.code) == TREE_VEC) |
1111 | { |
1112 | n = TREE_VEC_LENGTH (x)((tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1112, __FUNCTION__, (TREE_VEC)))->base.u.length); |
1113 | for (i = 0; i < n; i++) |
1114 | { |
1115 | tree o = TREE_VEC_ELT (x, i)(*((const_cast<tree *> (tree_vec_elt_check ((x), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1115, __FUNCTION__))))); |
1116 | if (o && TREE_CODE_CLASS (TREE_CODE (o))tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (o)->base.code))] == tcc_comparison) |
1117 | cp_walk_tree (&TREE_OPERAND (o, 1), cp_fold_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check ((o), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1117, __FUNCTION__))))), cp_fold_r, data, nullptr, cp_walk_subtrees ); |
1118 | } |
1119 | } |
1120 | x = OMP_FOR_INCR (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((stmt), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1120, __FUNCTION__))), (4), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1120, __FUNCTION__))))); |
1121 | if (x && TREE_CODE (x)((enum tree_code) (x)->base.code) == TREE_VEC) |
1122 | { |
1123 | n = TREE_VEC_LENGTH (x)((tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1123, __FUNCTION__, (TREE_VEC)))->base.u.length); |
1124 | for (i = 0; i < n; i++) |
1125 | { |
1126 | tree o = TREE_VEC_ELT (x, i)(*((const_cast<tree *> (tree_vec_elt_check ((x), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1126, __FUNCTION__))))); |
1127 | if (o && TREE_CODE (o)((enum tree_code) (o)->base.code) == MODIFY_EXPR) |
1128 | o = TREE_OPERAND (o, 1)(*((const_cast<tree*> (tree_operand_check ((o), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1128, __FUNCTION__))))); |
1129 | if (o && (TREE_CODE (o)((enum tree_code) (o)->base.code) == PLUS_EXPR || TREE_CODE (o)((enum tree_code) (o)->base.code) == MINUS_EXPR |
1130 | || TREE_CODE (o)((enum tree_code) (o)->base.code) == POINTER_PLUS_EXPR)) |
1131 | { |
1132 | cp_walk_tree (&TREE_OPERAND (o, 0), cp_fold_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check ((o), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1132, __FUNCTION__))))), cp_fold_r, data, nullptr, cp_walk_subtrees ); |
1133 | cp_walk_tree (&TREE_OPERAND (o, 1), cp_fold_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check ((o), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1133, __FUNCTION__))))), cp_fold_r, data, nullptr, cp_walk_subtrees ); |
1134 | } |
1135 | } |
1136 | } |
1137 | cp_walk_tree (&OMP_FOR_PRE_BODY (stmt), cp_fold_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((stmt), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1137, __FUNCTION__))), (5), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1137, __FUNCTION__))))), cp_fold_r, data, nullptr, cp_walk_subtrees ); |
1138 | *walk_subtrees = 0; |
1139 | return NULLnullptr; |
1140 | |
1141 | case IF_STMT: |
1142 | if (IF_STMT_CONSTEVAL_P (stmt)((tree_not_check2 (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1142, __FUNCTION__, (IF_STMT)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1142, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2)) |
1143 | { |
1144 | /* Don't walk THEN_CLAUSE (stmt) for consteval if. IF_COND is always |
1145 | boolean_false_node. */ |
1146 | cp_walk_tree (&ELSE_CLAUSE (stmt), cp_fold_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1146, __FUNCTION__, (IF_STMT)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1146, __FUNCTION__))))), cp_fold_r, data, nullptr, cp_walk_subtrees ); |
1147 | cp_walk_tree (&IF_SCOPE (stmt), cp_fold_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1147, __FUNCTION__, (IF_STMT)))), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1147, __FUNCTION__))))), cp_fold_r, data, nullptr, cp_walk_subtrees ); |
1148 | *walk_subtrees = 0; |
1149 | return NULLnullptr; |
1150 | } |
1151 | break; |
1152 | |
1153 | /* cp_genericize_{init,target}_expr are only for genericize time; they're |
1154 | here rather than in cp_genericize to avoid problems with the invisible |
1155 | reference transition. */ |
1156 | case INIT_EXPR: |
1157 | if (data->flags & ff_genericize) |
1158 | cp_genericize_init_expr (stmt_p); |
1159 | break; |
1160 | |
1161 | case TARGET_EXPR: |
1162 | if (data->flags & ff_genericize) |
1163 | cp_genericize_target_expr (stmt_p); |
1164 | |
1165 | /* Folding might replace e.g. a COND_EXPR with a TARGET_EXPR; in |
1166 | that case, strip it in favor of this one. */ |
1167 | if (tree &init = TARGET_EXPR_INITIAL (stmt)(*(tree_operand_check_code ((stmt), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1167, __FUNCTION__)))) |
1168 | { |
1169 | cp_walk_tree (&init, cp_fold_r, data, NULL)walk_tree_1 (&init, cp_fold_r, data, nullptr, cp_walk_subtrees ); |
1170 | cp_walk_tree (&TARGET_EXPR_CLEANUP (stmt), cp_fold_r, data, NULL)walk_tree_1 (&(*(tree_operand_check_code ((stmt), (TARGET_EXPR ), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1170, __FUNCTION__))), cp_fold_r, data, nullptr, cp_walk_subtrees ); |
1171 | *walk_subtrees = 0; |
1172 | if (TREE_CODE (init)((enum tree_code) (init)->base.code) == TARGET_EXPR) |
1173 | { |
1174 | tree sub = TARGET_EXPR_INITIAL (init)(*(tree_operand_check_code ((init), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1174, __FUNCTION__))); |
1175 | maybe_replace_decl (&sub, TARGET_EXPR_SLOT (init)(*(tree_operand_check_code ((init), (TARGET_EXPR), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1175, __FUNCTION__))), |
1176 | TARGET_EXPR_SLOT (stmt)(*(tree_operand_check_code ((stmt), (TARGET_EXPR), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1176, __FUNCTION__)))); |
1177 | init = sub; |
1178 | } |
1179 | } |
1180 | break; |
1181 | |
1182 | default: |
1183 | break; |
1184 | } |
1185 | |
1186 | return NULLnullptr; |
1187 | } |
1188 | |
1189 | /* Fold ALL the trees! FIXME we should be able to remove this, but |
1190 | apparently that still causes optimization regressions. */ |
1191 | |
1192 | void |
1193 | cp_fold_function (tree fndecl) |
1194 | { |
1195 | /* By now all manifestly-constant-evaluated expressions will have |
1196 | been constant-evaluated already if possible, so we can safely |
1197 | pass ff_mce_false. */ |
1198 | cp_fold_data data (ff_genericize | ff_mce_false); |
1199 | cp_walk_tree (&DECL_SAVED_TREE (fndecl), cp_fold_r, &data, NULL)walk_tree_1 (&((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1199, __FUNCTION__, (FUNCTION_DECL)))->function_decl.saved_tree ), cp_fold_r, &data, nullptr, cp_walk_subtrees); |
1200 | } |
1201 | |
1202 | /* Turn SPACESHIP_EXPR EXPR into GENERIC. */ |
1203 | |
1204 | static tree genericize_spaceship (tree expr) |
1205 | { |
1206 | iloc_sentinel s (cp_expr_location (expr)); |
1207 | tree type = TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1207, __FUNCTION__))->typed.type); |
1208 | tree op0 = TREE_OPERAND (expr, 0)(*((const_cast<tree*> (tree_operand_check ((expr), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1208, __FUNCTION__))))); |
1209 | tree op1 = TREE_OPERAND (expr, 1)(*((const_cast<tree*> (tree_operand_check ((expr), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1209, __FUNCTION__))))); |
1210 | return genericize_spaceship (input_location, type, op0, op1); |
1211 | } |
1212 | |
1213 | /* If EXPR involves an anonymous VLA type, prepend a DECL_EXPR for that type |
1214 | to trigger gimplify_type_sizes; otherwise a cast to pointer-to-VLA confuses |
1215 | the middle-end (c++/88256). If EXPR is a DECL, use add_stmt and return |
1216 | NULL_TREE; otherwise return a COMPOUND_STMT of the DECL_EXPR and EXPR. */ |
1217 | |
1218 | tree |
1219 | predeclare_vla (tree expr) |
1220 | { |
1221 | tree type = TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1221, __FUNCTION__))->typed.type); |
1222 | if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
1223 | return expr; |
1224 | if (is_typedef_decl (expr)) |
1225 | type = DECL_ORIGINAL_TYPE (expr)((tree_check ((expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1225, __FUNCTION__, (TYPE_DECL)))->decl_non_common.result ); |
1226 | |
1227 | /* We need to strip pointers for gimplify_type_sizes. */ |
1228 | tree vla = type; |
1229 | while (POINTER_TYPE_P (vla)(((enum tree_code) (vla)->base.code) == POINTER_TYPE || (( enum tree_code) (vla)->base.code) == REFERENCE_TYPE)) |
1230 | { |
1231 | if (TYPE_NAME (vla)((tree_class_check ((vla), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1231, __FUNCTION__))->type_common.name)) |
1232 | return expr; |
1233 | vla = TREE_TYPE (vla)((contains_struct_check ((vla), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1233, __FUNCTION__))->typed.type); |
1234 | } |
1235 | if (vla == type || TYPE_NAME (vla)((tree_class_check ((vla), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1235, __FUNCTION__))->type_common.name) |
1236 | || !variably_modified_type_p (vla, NULL_TREE(tree) nullptr)) |
1237 | return expr; |
1238 | |
1239 | tree decl = build_decl (input_location, TYPE_DECL, NULL_TREE(tree) nullptr, vla); |
1240 | DECL_ARTIFICIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1240, __FUNCTION__))->decl_common.artificial_flag) = 1; |
1241 | TYPE_NAME (vla)((tree_class_check ((vla), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1241, __FUNCTION__))->type_common.name) = decl; |
1242 | tree dexp = build_stmt (input_location, DECL_EXPR, decl); |
1243 | if (DECL_P (expr)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (expr)->base.code))] == tcc_declaration)) |
1244 | { |
1245 | add_stmt (dexp); |
1246 | return NULL_TREE(tree) nullptr; |
1247 | } |
1248 | else |
1249 | { |
1250 | expr = build2 (COMPOUND_EXPR, type, dexp, expr); |
1251 | return expr; |
1252 | } |
1253 | } |
1254 | |
1255 | /* Perform any pre-gimplification lowering of C++ front end trees to |
1256 | GENERIC. */ |
1257 | |
1258 | static tree |
1259 | cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data) |
1260 | { |
1261 | tree stmt = *stmt_p; |
1262 | struct cp_genericize_data *wtd = (struct cp_genericize_data *) data; |
1263 | hash_set<tree> *p_set = wtd->p_set; |
1264 | |
1265 | /* If in an OpenMP context, note var uses. */ |
1266 | if (UNLIKELY (wtd->omp_ctx != NULL)(__builtin_expect ((wtd->omp_ctx != nullptr), 0)) |
1267 | && (VAR_P (stmt)(((enum tree_code) (stmt)->base.code) == VAR_DECL) |
1268 | || TREE_CODE (stmt)((enum tree_code) (stmt)->base.code) == PARM_DECL |
1269 | || TREE_CODE (stmt)((enum tree_code) (stmt)->base.code) == RESULT_DECL) |
1270 | && omp_var_to_track (stmt)) |
1271 | omp_cxx_notice_variable (wtd->omp_ctx, stmt); |
1272 | |
1273 | /* Don't dereference parms in a thunk, pass the references through. */ |
1274 | if ((TREE_CODE (stmt)((enum tree_code) (stmt)->base.code) == CALL_EXPR && call_from_lambda_thunk_p (stmt)) |
1275 | || (TREE_CODE (stmt)((enum tree_code) (stmt)->base.code) == AGGR_INIT_EXPR && AGGR_INIT_FROM_THUNK_P (stmt)((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1275, __FUNCTION__, (AGGR_INIT_EXPR)))->base.protected_flag ))) |
1276 | { |
1277 | *walk_subtrees = 0; |
1278 | return NULLnullptr; |
1279 | } |
1280 | |
1281 | /* Dereference invisible reference parms. */ |
1282 | if (wtd->handle_invisiref_parm_p && is_invisiref_parm (stmt)) |
1283 | { |
1284 | *stmt_p = convert_from_reference (stmt); |
1285 | p_set->add (*stmt_p); |
1286 | *walk_subtrees = 0; |
1287 | return NULLnullptr; |
1288 | } |
1289 | |
1290 | /* Map block scope extern declarations to visible declarations with the |
1291 | same name and type in outer scopes if any. */ |
1292 | if (VAR_OR_FUNCTION_DECL_P (stmt)(((enum tree_code) (stmt)->base.code) == VAR_DECL || ((enum tree_code) (stmt)->base.code) == FUNCTION_DECL) && DECL_LOCAL_DECL_P (stmt)((contains_struct_check (((tree_check2 ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1292, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1292, __FUNCTION__))->decl_common.lang_flag_0)) |
1293 | if (tree alias = DECL_LOCAL_DECL_ALIAS (stmt)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check (((((void)(!(((contains_struct_check (((tree_check2 ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__), 0 : 0)), stmt)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__))->decl_common.lang_specific); if (!( (((enum tree_code) ((((void)(!(((contains_struct_check (((tree_check2 ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__), 0 : 0)), stmt))->base.code) == VAR_DECL || ((enum tree_code) ((((void)(!(((contains_struct_check ((( tree_check2 ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__), 0 : 0)), stmt))->base.code) == FUNCTION_DECL ) || ((enum tree_code) ((((void)(!(((contains_struct_check (( (tree_check2 ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__), 0 : 0)), stmt))->base.code) == FIELD_DECL || ((enum tree_code) ((((void)(!(((contains_struct_check ((( tree_check2 ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__), 0 : 0)), stmt))->base.code) == CONST_DECL || ((enum tree_code) ((((void)(!(((contains_struct_check ((( tree_check2 ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__), 0 : 0)), stmt))->base.code) == TYPE_DECL || ((enum tree_code) ((((void)(!(((contains_struct_check ((( tree_check2 ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__), 0 : 0)), stmt))->base.code) == TEMPLATE_DECL || ((enum tree_code) ((((void)(!(((contains_struct_check ((( tree_check2 ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__), 0 : 0)), stmt))->base.code) == USING_DECL || ((enum tree_code) ((((void)(!(((contains_struct_check ((( tree_check2 ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__), 0 : 0)), stmt))->base.code) == CONCEPT_DECL )) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1293, __FUNCTION__); <->u.min; })->access)) |
1294 | { |
1295 | if (alias != error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
1296 | { |
1297 | *stmt_p = alias; |
1298 | TREE_USED (alias)((alias)->base.used_flag) |= TREE_USED (stmt)((stmt)->base.used_flag); |
1299 | } |
1300 | *walk_subtrees = 0; |
1301 | return NULLnullptr; |
1302 | } |
1303 | |
1304 | if (TREE_CODE (stmt)((enum tree_code) (stmt)->base.code) == INTEGER_CST |
1305 | && TYPE_REF_P (TREE_TYPE (stmt))(((enum tree_code) (((contains_struct_check ((stmt), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1305, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE ) |
1306 | && (flag_sanitizeglobal_options.x_flag_sanitize & (SANITIZE_NULL | SANITIZE_ALIGNMENT)) |
1307 | && !wtd->no_sanitize_p) |
1308 | { |
1309 | ubsan_maybe_instrument_reference (stmt_p); |
1310 | if (*stmt_p != stmt) |
1311 | { |
1312 | *walk_subtrees = 0; |
1313 | return NULL_TREE(tree) nullptr; |
1314 | } |
1315 | } |
1316 | |
1317 | /* Other than invisiref parms, don't walk the same tree twice. */ |
1318 | if (p_set->contains (stmt)) |
1319 | { |
1320 | *walk_subtrees = 0; |
1321 | return NULL_TREE(tree) nullptr; |
1322 | } |
1323 | |
1324 | switch (TREE_CODE (stmt)((enum tree_code) (stmt)->base.code)) |
1325 | { |
1326 | case ADDR_EXPR: |
1327 | if (is_invisiref_parm (TREE_OPERAND (stmt, 0)(*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1327, __FUNCTION__))))))) |
1328 | { |
1329 | /* If in an OpenMP context, note var uses. */ |
1330 | if (UNLIKELY (wtd->omp_ctx != NULL)(__builtin_expect ((wtd->omp_ctx != nullptr), 0)) |
1331 | && omp_var_to_track (TREE_OPERAND (stmt, 0)(*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1331, __FUNCTION__))))))) |
1332 | omp_cxx_notice_variable (wtd->omp_ctx, TREE_OPERAND (stmt, 0)(*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1332, __FUNCTION__)))))); |
1333 | *stmt_p = fold_convert (TREE_TYPE (stmt), TREE_OPERAND (stmt, 0))fold_convert_loc (((location_t) 0), ((contains_struct_check ( (stmt), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1333, __FUNCTION__))->typed.type), (*((const_cast<tree *> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1333, __FUNCTION__)))))); |
1334 | *walk_subtrees = 0; |
1335 | } |
1336 | break; |
1337 | |
1338 | case RETURN_EXPR: |
1339 | if (TREE_OPERAND (stmt, 0)(*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1339, __FUNCTION__))))) && is_invisiref_parm (TREE_OPERAND (stmt, 0)(*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1339, __FUNCTION__))))))) |
1340 | /* Don't dereference an invisiref RESULT_DECL inside a RETURN_EXPR. */ |
1341 | *walk_subtrees = 0; |
1342 | break; |
1343 | |
1344 | case OMP_CLAUSE: |
1345 | switch (OMP_CLAUSE_CODE (stmt)((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1345, __FUNCTION__, (OMP_CLAUSE))))->omp_clause.code) |
1346 | { |
1347 | case OMP_CLAUSE_LASTPRIVATE: |
1348 | /* Don't dereference an invisiref in OpenMP clauses. */ |
1349 | if (is_invisiref_parm (OMP_CLAUSE_DECL (stmt)(*(omp_clause_elt_check (((omp_clause_range_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1349, __FUNCTION__, (OMP_CLAUSE)))), (OMP_CLAUSE_PRIVATE), ( OMP_CLAUSE__SCANTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1349, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1349, __FUNCTION__))))) |
1350 | { |
1351 | *walk_subtrees = 0; |
1352 | if (OMP_CLAUSE_LASTPRIVATE_STMT (stmt)(*(omp_clause_elt_check (((omp_clause_subcode_check ((stmt), ( OMP_CLAUSE_LASTPRIVATE), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1352, __FUNCTION__))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1352, __FUNCTION__)))) |
1353 | cp_walk_tree (&OMP_CLAUSE_LASTPRIVATE_STMT (stmt),walk_tree_1 (&(*(omp_clause_elt_check (((omp_clause_subcode_check ((stmt), (OMP_CLAUSE_LASTPRIVATE), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1353, __FUNCTION__))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1353, __FUNCTION__))), cp_genericize_r, data, nullptr, cp_walk_subtrees ) |
1354 | cp_genericize_r, data, NULL)walk_tree_1 (&(*(omp_clause_elt_check (((omp_clause_subcode_check ((stmt), (OMP_CLAUSE_LASTPRIVATE), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1353, __FUNCTION__))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1353, __FUNCTION__))), cp_genericize_r, data, nullptr, cp_walk_subtrees ); |
1355 | } |
1356 | break; |
1357 | case OMP_CLAUSE_PRIVATE: |
1358 | /* Don't dereference an invisiref in OpenMP clauses. */ |
1359 | if (is_invisiref_parm (OMP_CLAUSE_DECL (stmt)(*(omp_clause_elt_check (((omp_clause_range_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1359, __FUNCTION__, (OMP_CLAUSE)))), (OMP_CLAUSE_PRIVATE), ( OMP_CLAUSE__SCANTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1359, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1359, __FUNCTION__))))) |
1360 | *walk_subtrees = 0; |
1361 | else if (wtd->omp_ctx != NULLnullptr) |
1362 | { |
1363 | /* Private clause doesn't cause any references to the |
1364 | var in outer contexts, avoid calling |
1365 | omp_cxx_notice_variable for it. */ |
1366 | struct cp_genericize_omp_taskreg *old = wtd->omp_ctx; |
1367 | wtd->omp_ctx = NULLnullptr; |
1368 | cp_walk_tree (&OMP_CLAUSE_DECL (stmt), cp_genericize_r,walk_tree_1 (&(*(omp_clause_elt_check (((omp_clause_range_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1368, __FUNCTION__, (OMP_CLAUSE)))), (OMP_CLAUSE_PRIVATE), ( OMP_CLAUSE__SCANTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1368, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1368, __FUNCTION__))), cp_genericize_r, data, nullptr, cp_walk_subtrees ) |
1369 | data, NULL)walk_tree_1 (&(*(omp_clause_elt_check (((omp_clause_range_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1368, __FUNCTION__, (OMP_CLAUSE)))), (OMP_CLAUSE_PRIVATE), ( OMP_CLAUSE__SCANTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1368, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1368, __FUNCTION__))), cp_genericize_r, data, nullptr, cp_walk_subtrees ); |
1370 | wtd->omp_ctx = old; |
1371 | *walk_subtrees = 0; |
1372 | } |
1373 | break; |
1374 | case OMP_CLAUSE_SHARED: |
1375 | case OMP_CLAUSE_FIRSTPRIVATE: |
1376 | case OMP_CLAUSE_COPYIN: |
1377 | case OMP_CLAUSE_COPYPRIVATE: |
1378 | case OMP_CLAUSE_INCLUSIVE: |
1379 | case OMP_CLAUSE_EXCLUSIVE: |
1380 | /* Don't dereference an invisiref in OpenMP clauses. */ |
1381 | if (is_invisiref_parm (OMP_CLAUSE_DECL (stmt)(*(omp_clause_elt_check (((omp_clause_range_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1381, __FUNCTION__, (OMP_CLAUSE)))), (OMP_CLAUSE_PRIVATE), ( OMP_CLAUSE__SCANTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1381, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1381, __FUNCTION__))))) |
1382 | *walk_subtrees = 0; |
1383 | break; |
1384 | case OMP_CLAUSE_REDUCTION: |
1385 | case OMP_CLAUSE_IN_REDUCTION: |
1386 | case OMP_CLAUSE_TASK_REDUCTION: |
1387 | /* Don't dereference an invisiref in reduction clause's |
1388 | OMP_CLAUSE_DECL either. OMP_CLAUSE_REDUCTION_{INIT,MERGE} |
1389 | still needs to be genericized. */ |
1390 | if (is_invisiref_parm (OMP_CLAUSE_DECL (stmt)(*(omp_clause_elt_check (((omp_clause_range_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1390, __FUNCTION__, (OMP_CLAUSE)))), (OMP_CLAUSE_PRIVATE), ( OMP_CLAUSE__SCANTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1390, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1390, __FUNCTION__))))) |
1391 | { |
1392 | *walk_subtrees = 0; |
1393 | if (OMP_CLAUSE_REDUCTION_INIT (stmt)(*(omp_clause_elt_check (((omp_clause_range_check ((stmt), (OMP_CLAUSE_REDUCTION ), (OMP_CLAUSE_IN_REDUCTION), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1393, __FUNCTION__))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1393, __FUNCTION__)))) |
1394 | cp_walk_tree (&OMP_CLAUSE_REDUCTION_INIT (stmt),walk_tree_1 (&(*(omp_clause_elt_check (((omp_clause_range_check ((stmt), (OMP_CLAUSE_REDUCTION), (OMP_CLAUSE_IN_REDUCTION), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1394, __FUNCTION__))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1394, __FUNCTION__))), cp_genericize_r, data, nullptr, cp_walk_subtrees ) |
1395 | cp_genericize_r, data, NULL)walk_tree_1 (&(*(omp_clause_elt_check (((omp_clause_range_check ((stmt), (OMP_CLAUSE_REDUCTION), (OMP_CLAUSE_IN_REDUCTION), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1394, __FUNCTION__))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1394, __FUNCTION__))), cp_genericize_r, data, nullptr, cp_walk_subtrees ); |
1396 | if (OMP_CLAUSE_REDUCTION_MERGE (stmt)(*(omp_clause_elt_check (((omp_clause_range_check ((stmt), (OMP_CLAUSE_REDUCTION ), (OMP_CLAUSE_IN_REDUCTION), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1396, __FUNCTION__))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1396, __FUNCTION__)))) |
1397 | cp_walk_tree (&OMP_CLAUSE_REDUCTION_MERGE (stmt),walk_tree_1 (&(*(omp_clause_elt_check (((omp_clause_range_check ((stmt), (OMP_CLAUSE_REDUCTION), (OMP_CLAUSE_IN_REDUCTION), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1397, __FUNCTION__))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1397, __FUNCTION__))), cp_genericize_r, data, nullptr, cp_walk_subtrees ) |
1398 | cp_genericize_r, data, NULL)walk_tree_1 (&(*(omp_clause_elt_check (((omp_clause_range_check ((stmt), (OMP_CLAUSE_REDUCTION), (OMP_CLAUSE_IN_REDUCTION), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1397, __FUNCTION__))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1397, __FUNCTION__))), cp_genericize_r, data, nullptr, cp_walk_subtrees ); |
1399 | } |
1400 | break; |
1401 | default: |
1402 | break; |
1403 | } |
1404 | break; |
1405 | |
1406 | /* Due to the way voidify_wrapper_expr is written, we don't get a chance |
1407 | to lower this construct before scanning it, so we need to lower these |
1408 | before doing anything else. */ |
1409 | case CLEANUP_STMT: |
1410 | *stmt_p = build2_loc (EXPR_LOCATION (stmt)((((stmt)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((stmt))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((stmt))->base.code))]) <= tcc_expression )) ? (stmt)->exp.locus : ((location_t) 0)), |
1411 | CLEANUP_EH_ONLY (stmt)((stmt)->base.static_flag) ? TRY_CATCH_EXPR |
1412 | : TRY_FINALLY_EXPR, |
1413 | void_type_nodeglobal_trees[TI_VOID_TYPE], |
1414 | CLEANUP_BODY (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1414, __FUNCTION__, (CLEANUP_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1414, __FUNCTION__))))), |
1415 | CLEANUP_EXPR (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1415, __FUNCTION__, (CLEANUP_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1415, __FUNCTION__)))))); |
1416 | break; |
1417 | |
1418 | case IF_STMT: |
1419 | genericize_if_stmt (stmt_p); |
1420 | /* *stmt_p has changed, tail recurse to handle it again. */ |
1421 | return cp_genericize_r (stmt_p, walk_subtrees, data); |
1422 | |
1423 | /* COND_EXPR might have incompatible types in branches if one or both |
1424 | arms are bitfields. Fix it up now. */ |
1425 | case COND_EXPR: |
1426 | { |
1427 | tree type_left |
1428 | = (TREE_OPERAND (stmt, 1)(*((const_cast<tree*> (tree_operand_check ((stmt), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1428, __FUNCTION__))))) |
1429 | ? is_bitfield_expr_with_lowered_type (TREE_OPERAND (stmt, 1)(*((const_cast<tree*> (tree_operand_check ((stmt), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1429, __FUNCTION__)))))) |
1430 | : NULL_TREE(tree) nullptr); |
1431 | tree type_right |
1432 | = (TREE_OPERAND (stmt, 2)(*((const_cast<tree*> (tree_operand_check ((stmt), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1432, __FUNCTION__))))) |
1433 | ? is_bitfield_expr_with_lowered_type (TREE_OPERAND (stmt, 2)(*((const_cast<tree*> (tree_operand_check ((stmt), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1433, __FUNCTION__)))))) |
1434 | : NULL_TREE(tree) nullptr); |
1435 | if (type_left |
1436 | && !useless_type_conversion_p (TREE_TYPE (stmt)((contains_struct_check ((stmt), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1436, __FUNCTION__))->typed.type), |
1437 | TREE_TYPE (TREE_OPERAND (stmt, 1))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check ((stmt), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1437, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1437, __FUNCTION__))->typed.type))) |
1438 | { |
1439 | TREE_OPERAND (stmt, 1)(*((const_cast<tree*> (tree_operand_check ((stmt), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1439, __FUNCTION__))))) |
1440 | = fold_convert (type_left, TREE_OPERAND (stmt, 1))fold_convert_loc (((location_t) 0), type_left, (*((const_cast <tree*> (tree_operand_check ((stmt), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1440, __FUNCTION__)))))); |
1441 | gcc_assert (useless_type_conversion_p (TREE_TYPE (stmt),((void)(!(useless_type_conversion_p (((contains_struct_check ( (stmt), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1441, __FUNCTION__))->typed.type), type_left)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1442, __FUNCTION__), 0 : 0)) |
1442 | type_left))((void)(!(useless_type_conversion_p (((contains_struct_check ( (stmt), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1441, __FUNCTION__))->typed.type), type_left)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1442, __FUNCTION__), 0 : 0)); |
1443 | } |
1444 | if (type_right |
1445 | && !useless_type_conversion_p (TREE_TYPE (stmt)((contains_struct_check ((stmt), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1445, __FUNCTION__))->typed.type), |
1446 | TREE_TYPE (TREE_OPERAND (stmt, 2))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check ((stmt), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1446, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1446, __FUNCTION__))->typed.type))) |
1447 | { |
1448 | TREE_OPERAND (stmt, 2)(*((const_cast<tree*> (tree_operand_check ((stmt), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1448, __FUNCTION__))))) |
1449 | = fold_convert (type_right, TREE_OPERAND (stmt, 2))fold_convert_loc (((location_t) 0), type_right, (*((const_cast <tree*> (tree_operand_check ((stmt), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1449, __FUNCTION__)))))); |
1450 | gcc_assert (useless_type_conversion_p (TREE_TYPE (stmt),((void)(!(useless_type_conversion_p (((contains_struct_check ( (stmt), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1450, __FUNCTION__))->typed.type), type_right)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1451, __FUNCTION__), 0 : 0)) |
1451 | type_right))((void)(!(useless_type_conversion_p (((contains_struct_check ( (stmt), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1450, __FUNCTION__))->typed.type), type_right)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1451, __FUNCTION__), 0 : 0)); |
1452 | } |
1453 | } |
1454 | break; |
1455 | |
1456 | case BIND_EXPR: |
1457 | if (UNLIKELY (wtd->omp_ctx != NULL)(__builtin_expect ((wtd->omp_ctx != nullptr), 0))) |
1458 | { |
1459 | tree decl; |
1460 | for (decl = BIND_EXPR_VARS (stmt)((*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1460, __FUNCTION__, (BIND_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1460, __FUNCTION__)))))); decl; decl = DECL_CHAIN (decl)(((contains_struct_check (((contains_struct_check ((decl), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1460, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1460, __FUNCTION__))->common.chain))) |
1461 | if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL) |
1462 | && !DECL_EXTERNAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1462, __FUNCTION__))->decl_common.decl_flag_1) |
1463 | && omp_var_to_track (decl)) |
1464 | { |
1465 | splay_tree_node n |
1466 | = splay_tree_lookup (wtd->omp_ctx->variables, |
1467 | (splay_tree_key) decl); |
1468 | if (n == NULLnullptr) |
1469 | splay_tree_insert (wtd->omp_ctx->variables, |
1470 | (splay_tree_key) decl, |
1471 | TREE_STATIC (decl)((decl)->base.static_flag) |
1472 | ? OMP_CLAUSE_DEFAULT_SHARED |
1473 | : OMP_CLAUSE_DEFAULT_PRIVATE); |
1474 | } |
1475 | } |
1476 | if (sanitize_flags_p (SANITIZE_NULL | SANITIZE_ALIGNMENT | SANITIZE_VPTR)) |
1477 | { |
1478 | /* The point here is to not sanitize static initializers. */ |
1479 | bool no_sanitize_p = wtd->no_sanitize_p; |
1480 | wtd->no_sanitize_p = true; |
1481 | for (tree decl = BIND_EXPR_VARS (stmt)((*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1481, __FUNCTION__, (BIND_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1481, __FUNCTION__)))))); |
1482 | decl; |
1483 | decl = DECL_CHAIN (decl)(((contains_struct_check (((contains_struct_check ((decl), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1483, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1483, __FUNCTION__))->common.chain))) |
1484 | if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL) |
1485 | && TREE_STATIC (decl)((decl)->base.static_flag) |
1486 | && DECL_INITIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1486, __FUNCTION__))->decl_common.initial)) |
1487 | cp_walk_tree (&DECL_INITIAL (decl), cp_genericize_r, data, NULL)walk_tree_1 (&((contains_struct_check ((decl), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1487, __FUNCTION__))->decl_common.initial), cp_genericize_r , data, nullptr, cp_walk_subtrees); |
1488 | wtd->no_sanitize_p = no_sanitize_p; |
1489 | } |
1490 | wtd->bind_expr_stack.safe_push (stmt); |
1491 | cp_walk_tree (&BIND_EXPR_BODY (stmt),walk_tree_1 (&((*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1491, __FUNCTION__, (BIND_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1491, __FUNCTION__)))))), cp_genericize_r, data, nullptr, cp_walk_subtrees ) |
1492 | cp_genericize_r, data, NULL)walk_tree_1 (&((*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1491, __FUNCTION__, (BIND_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1491, __FUNCTION__)))))), cp_genericize_r, data, nullptr, cp_walk_subtrees ); |
1493 | wtd->bind_expr_stack.pop (); |
1494 | break; |
1495 | |
1496 | case ASSERTION_STMT: |
1497 | case PRECONDITION_STMT: |
1498 | case POSTCONDITION_STMT: |
1499 | { |
1500 | if (tree check = build_contract_check (stmt)) |
1501 | { |
1502 | *stmt_p = check; |
1503 | return cp_genericize_r (stmt_p, walk_subtrees, data); |
1504 | } |
1505 | |
1506 | /* If we didn't build a check, replace it with void_node so we don't |
1507 | leak contracts into GENERIC. */ |
1508 | *stmt_p = void_nodeglobal_trees[TI_VOID]; |
1509 | *walk_subtrees = 0; |
1510 | } |
1511 | break; |
1512 | |
1513 | case USING_STMT: |
1514 | { |
1515 | tree block = NULL_TREE(tree) nullptr; |
1516 | |
1517 | /* Get the innermost inclosing GIMPLE_BIND that has a non NULL |
1518 | BLOCK, and append an IMPORTED_DECL to its |
1519 | BLOCK_VARS chained list. */ |
1520 | if (wtd->bind_expr_stack.exists ()) |
1521 | { |
1522 | int i; |
1523 | for (i = wtd->bind_expr_stack.length () - 1; i >= 0; i--) |
1524 | if ((block = BIND_EXPR_BLOCK (wtd->bind_expr_stack[i])((*((const_cast<tree*> (tree_operand_check (((tree_check ((wtd->bind_expr_stack[i]), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1524, __FUNCTION__, (BIND_EXPR)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1524, __FUNCTION__)))))))) |
1525 | break; |
1526 | } |
1527 | if (block) |
1528 | { |
1529 | tree decl = TREE_OPERAND (stmt, 0)(*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1529, __FUNCTION__))))); |
1530 | gcc_assert (decl)((void)(!(decl) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1530, __FUNCTION__), 0 : 0)); |
1531 | |
1532 | if (undeduced_auto_decl (decl)) |
1533 | /* Omit from the GENERIC, the back-end can't handle it. */; |
1534 | else |
1535 | { |
1536 | tree using_directive = make_node (IMPORTED_DECL); |
1537 | TREE_TYPE (using_directive)((contains_struct_check ((using_directive), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1537, __FUNCTION__))->typed.type) = void_type_nodeglobal_trees[TI_VOID_TYPE]; |
1538 | DECL_CONTEXT (using_directive)((contains_struct_check ((using_directive), (TS_DECL_MINIMAL) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1538, __FUNCTION__))->decl_minimal.context) = current_function_decl; |
1539 | DECL_SOURCE_LOCATION (using_directive)((contains_struct_check ((using_directive), (TS_DECL_MINIMAL) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1539, __FUNCTION__))->decl_minimal.locus) |
1540 | = cp_expr_loc_or_input_loc (stmt); |
1541 | |
1542 | IMPORTED_DECL_ASSOCIATED_DECL (using_directive)(((contains_struct_check (((tree_check ((using_directive), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1542, __FUNCTION__, (IMPORTED_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1542, __FUNCTION__))->decl_common.initial)) = decl; |
1543 | DECL_CHAIN (using_directive)(((contains_struct_check (((contains_struct_check ((using_directive ), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1543, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1543, __FUNCTION__))->common.chain)) = BLOCK_VARS (block)((tree_check ((block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1543, __FUNCTION__, (BLOCK)))->block.vars); |
1544 | BLOCK_VARS (block)((tree_check ((block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1544, __FUNCTION__, (BLOCK)))->block.vars) = using_directive; |
1545 | } |
1546 | } |
1547 | /* The USING_STMT won't appear in GENERIC. */ |
1548 | *stmt_p = build1 (NOP_EXPR, void_type_nodeglobal_trees[TI_VOID_TYPE], integer_zero_nodeglobal_trees[TI_INTEGER_ZERO]); |
1549 | *walk_subtrees = 0; |
1550 | } |
1551 | break; |
1552 | |
1553 | case DECL_EXPR: |
1554 | if (TREE_CODE (DECL_EXPR_DECL (stmt))((enum tree_code) ((*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1554, __FUNCTION__, (DECL_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1554, __FUNCTION__))))))->base.code) == USING_DECL) |
1555 | { |
1556 | /* Using decls inside DECL_EXPRs are just dropped on the floor. */ |
1557 | *stmt_p = build1 (NOP_EXPR, void_type_nodeglobal_trees[TI_VOID_TYPE], integer_zero_nodeglobal_trees[TI_INTEGER_ZERO]); |
1558 | *walk_subtrees = 0; |
1559 | } |
1560 | else |
1561 | { |
1562 | tree d = DECL_EXPR_DECL (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1562, __FUNCTION__, (DECL_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1562, __FUNCTION__))))); |
1563 | if (VAR_P (d)(((enum tree_code) (d)->base.code) == VAR_DECL)) |
1564 | gcc_assert (CP_DECL_THREAD_LOCAL_P (d) == DECL_THREAD_LOCAL_P (d))((void)(!((((tree_not_check2 (((tree_check ((d), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1564, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1564, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0)) == ((((d)->base.static_flag) || ((contains_struct_check ((d), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1564, __FUNCTION__))->decl_common.decl_flag_1)) && decl_tls_model (d) >= TLS_MODEL_REAL)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1564, __FUNCTION__), 0 : 0)); |
1565 | } |
1566 | break; |
1567 | |
1568 | case OMP_PARALLEL: |
1569 | case OMP_TASK: |
1570 | case OMP_TASKLOOP: |
1571 | { |
1572 | struct cp_genericize_omp_taskreg omp_ctx; |
1573 | tree c, decl; |
1574 | splay_tree_node n; |
1575 | |
1576 | *walk_subtrees = 0; |
1577 | cp_walk_tree (&OMP_CLAUSES (stmt), cp_genericize_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((stmt), (OACC_PARALLEL), (OMP_SCAN), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1577, __FUNCTION__))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1577, __FUNCTION__))))), cp_genericize_r, data, nullptr, cp_walk_subtrees ); |
1578 | omp_ctx.is_parallel = TREE_CODE (stmt)((enum tree_code) (stmt)->base.code) == OMP_PARALLEL; |
1579 | omp_ctx.default_shared = omp_ctx.is_parallel; |
1580 | omp_ctx.outer = wtd->omp_ctx; |
1581 | omp_ctx.variables = splay_tree_new (splay_tree_compare_decl_uid, 0, 0); |
1582 | wtd->omp_ctx = &omp_ctx; |
1583 | for (c = OMP_CLAUSES (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((stmt), (OACC_PARALLEL), (OMP_SCAN), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1583, __FUNCTION__))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1583, __FUNCTION__))))); c; c = OMP_CLAUSE_CHAIN (c)((contains_struct_check (((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1583, __FUNCTION__, (OMP_CLAUSE)))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1583, __FUNCTION__))->common.chain)) |
1584 | switch (OMP_CLAUSE_CODE (c)((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1584, __FUNCTION__, (OMP_CLAUSE))))->omp_clause.code) |
1585 | { |
1586 | case OMP_CLAUSE_SHARED: |
1587 | case OMP_CLAUSE_PRIVATE: |
1588 | case OMP_CLAUSE_FIRSTPRIVATE: |
1589 | case OMP_CLAUSE_LASTPRIVATE: |
1590 | decl = OMP_CLAUSE_DECL (c)(*(omp_clause_elt_check (((omp_clause_range_check (((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1590, __FUNCTION__, (OMP_CLAUSE)))), (OMP_CLAUSE_PRIVATE), ( OMP_CLAUSE__SCANTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1590, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1590, __FUNCTION__))); |
1591 | if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK] || !omp_var_to_track (decl)) |
1592 | break; |
1593 | n = splay_tree_lookup (omp_ctx.variables, (splay_tree_key) decl); |
1594 | if (n != NULLnullptr) |
1595 | break; |
1596 | splay_tree_insert (omp_ctx.variables, (splay_tree_key) decl, |
1597 | OMP_CLAUSE_CODE (c)((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1597, __FUNCTION__, (OMP_CLAUSE))))->omp_clause.code == OMP_CLAUSE_SHARED |
1598 | ? OMP_CLAUSE_DEFAULT_SHARED |
1599 | : OMP_CLAUSE_DEFAULT_PRIVATE); |
1600 | if (OMP_CLAUSE_CODE (c)((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1600, __FUNCTION__, (OMP_CLAUSE))))->omp_clause.code != OMP_CLAUSE_PRIVATE && omp_ctx.outer) |
1601 | omp_cxx_notice_variable (omp_ctx.outer, decl); |
1602 | break; |
1603 | case OMP_CLAUSE_DEFAULT: |
1604 | if (OMP_CLAUSE_DEFAULT_KIND (c)((omp_clause_subcode_check ((c), (OMP_CLAUSE_DEFAULT), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1604, __FUNCTION__))->omp_clause.subcode.default_kind) == OMP_CLAUSE_DEFAULT_SHARED) |
1605 | omp_ctx.default_shared = true; |
1606 | default: |
1607 | break; |
1608 | } |
1609 | if (TREE_CODE (stmt)((enum tree_code) (stmt)->base.code) == OMP_TASKLOOP) |
1610 | c_genericize_control_stmt (stmt_p, walk_subtrees, data, |
1611 | cp_genericize_r, cp_walk_subtrees); |
1612 | else |
1613 | cp_walk_tree (&OMP_BODY (stmt), cp_genericize_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((stmt), (OACC_PARALLEL), (OMP_MASTER), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1613, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1613, __FUNCTION__))))), cp_genericize_r, data, nullptr, cp_walk_subtrees ); |
1614 | wtd->omp_ctx = omp_ctx.outer; |
1615 | splay_tree_delete (omp_ctx.variables); |
1616 | } |
1617 | break; |
1618 | |
1619 | case OMP_TARGET: |
1620 | cfun(cfun + 0)->has_omp_target = true; |
1621 | break; |
1622 | |
1623 | case TRY_BLOCK: |
1624 | { |
1625 | *walk_subtrees = 0; |
1626 | tree try_block = wtd->try_block; |
1627 | wtd->try_block = stmt; |
1628 | cp_walk_tree (&TRY_STMTS (stmt), cp_genericize_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1628, __FUNCTION__, (TRY_BLOCK)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1628, __FUNCTION__))))), cp_genericize_r, data, nullptr, cp_walk_subtrees ); |
1629 | wtd->try_block = try_block; |
1630 | cp_walk_tree (&TRY_HANDLERS (stmt), cp_genericize_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1630, __FUNCTION__, (TRY_BLOCK)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1630, __FUNCTION__))))), cp_genericize_r, data, nullptr, cp_walk_subtrees ); |
1631 | } |
1632 | break; |
1633 | |
1634 | case MUST_NOT_THROW_EXPR: |
1635 | /* MUST_NOT_THROW_COND might be something else with TM. */ |
1636 | if (MUST_NOT_THROW_COND (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1636, __FUNCTION__, (MUST_NOT_THROW_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1636, __FUNCTION__))))) == NULL_TREE(tree) nullptr) |
1637 | { |
1638 | *walk_subtrees = 0; |
1639 | tree try_block = wtd->try_block; |
1640 | wtd->try_block = stmt; |
1641 | cp_walk_tree (&TREE_OPERAND (stmt, 0), cp_genericize_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1641, __FUNCTION__))))), cp_genericize_r, data, nullptr, cp_walk_subtrees ); |
1642 | wtd->try_block = try_block; |
1643 | } |
1644 | break; |
1645 | |
1646 | case THROW_EXPR: |
1647 | { |
1648 | location_t loc = location_of (stmt); |
1649 | if (warning_suppressed_p (stmt /* What warning? */)) |
1650 | /* Never mind. */; |
1651 | else if (wtd->try_block) |
1652 | { |
1653 | if (TREE_CODE (wtd->try_block)((enum tree_code) (wtd->try_block)->base.code) == MUST_NOT_THROW_EXPR) |
1654 | { |
1655 | auto_diagnostic_group d; |
1656 | if (warning_at (loc, OPT_Wterminate, |
1657 | "%<throw%> will always call %<terminate%>") |
1658 | && cxx_dialect >= cxx11 |
1659 | && DECL_DESTRUCTOR_P (current_function_decl)((tree_check (((((enum tree_code) (current_function_decl)-> base.code) == TEMPLATE_DECL ? ((struct tree_template_decl *)( const_cast<union tree_node *> ((((tree_check ((current_function_decl ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1659, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl )), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1659, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor )) |
1660 | inform (loc, "in C++11 destructors default to %<noexcept%>"); |
1661 | } |
1662 | } |
1663 | else |
1664 | { |
1665 | if (warn_cxx11_compatglobal_options.x_warn_cxx11_compat && cxx_dialect < cxx11 |
1666 | && DECL_DESTRUCTOR_P (current_function_decl)((tree_check (((((enum tree_code) (current_function_decl)-> base.code) == TEMPLATE_DECL ? ((struct tree_template_decl *)( const_cast<union tree_node *> ((((tree_check ((current_function_decl ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1666, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl )), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1666, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor ) |
1667 | && (TYPE_RAISES_EXCEPTIONS (TREE_TYPE (current_function_decl))((tree_class_check (((tree_check2 ((((contains_struct_check ( (current_function_decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1667, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1667, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1667, __FUNCTION__))->type_non_common.lang_1) |
1668 | == NULL_TREE(tree) nullptr) |
1669 | && (get_defaulted_eh_spec (current_function_decl) |
1670 | == empty_except_speccp_global_trees[CPTI_EMPTY_EXCEPT_SPEC])) |
1671 | warning_at (loc, OPT_Wc__11_compat, |
1672 | "in C++11 this %<throw%> will call %<terminate%> " |
1673 | "because destructors default to %<noexcept%>"); |
1674 | } |
1675 | } |
1676 | break; |
1677 | |
1678 | case CONVERT_EXPR: |
1679 | gcc_checking_assert (!AGGREGATE_TYPE_P (TREE_TYPE (stmt)))((void)(!(!(((enum tree_code) (((contains_struct_check ((stmt ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1679, __FUNCTION__))->typed.type))->base.code) == ARRAY_TYPE || (((enum tree_code) (((contains_struct_check ((stmt), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1679, __FUNCTION__))->typed.type))->base.code) == RECORD_TYPE || ((enum tree_code) (((contains_struct_check ((stmt), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1679, __FUNCTION__))->typed.type))->base.code) == UNION_TYPE || ((enum tree_code) (((contains_struct_check ((stmt), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1679, __FUNCTION__))->typed.type))->base.code) == QUAL_UNION_TYPE ))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1679, __FUNCTION__), 0 : 0)); |
1680 | gcc_assert (!CONVERT_EXPR_VBASE_PATH (stmt))((void)(!(!((tree_not_check2 (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1680, __FUNCTION__, (CONVERT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1680, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1680, __FUNCTION__), 0 : 0)); |
1681 | break; |
1682 | |
1683 | case SPACESHIP_EXPR: |
1684 | *stmt_p = genericize_spaceship (*stmt_p); |
1685 | break; |
1686 | |
1687 | case PTRMEM_CST: |
1688 | /* By the time we get here we're handing off to the back end, so we don't |
1689 | need or want to preserve PTRMEM_CST anymore. */ |
1690 | *stmt_p = cplus_expand_constant (stmt); |
1691 | *walk_subtrees = 0; |
1692 | break; |
1693 | |
1694 | case MEM_REF: |
1695 | /* For MEM_REF, make sure not to sanitize the second operand even |
1696 | if it has reference type. It is just an offset with a type |
1697 | holding other information. There is no other processing we |
1698 | need to do for INTEGER_CSTs, so just ignore the second argument |
1699 | unconditionally. */ |
1700 | cp_walk_tree (&TREE_OPERAND (stmt, 0), cp_genericize_r, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1700, __FUNCTION__))))), cp_genericize_r, data, nullptr, cp_walk_subtrees ); |
1701 | *walk_subtrees = 0; |
1702 | break; |
1703 | |
1704 | case NOP_EXPR: |
1705 | *stmt_p = predeclare_vla (*stmt_p); |
1706 | if (!wtd->no_sanitize_p |
1707 | && sanitize_flags_p (SANITIZE_NULL | SANITIZE_ALIGNMENT) |
1708 | && TYPE_REF_P (TREE_TYPE (stmt))(((enum tree_code) (((contains_struct_check ((stmt), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1708, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE )) |
1709 | ubsan_maybe_instrument_reference (stmt_p); |
1710 | break; |
1711 | |
1712 | case CALL_EXPR: |
1713 | /* Evaluate function concept checks instead of treating them as |
1714 | normal functions. */ |
1715 | if (concept_check_p (stmt)) |
1716 | { |
1717 | *stmt_p = evaluate_concept_check (stmt); |
1718 | * walk_subtrees = 0; |
1719 | break; |
1720 | } |
1721 | |
1722 | if (!wtd->no_sanitize_p |
1723 | && sanitize_flags_p ((SANITIZE_NULL |
1724 | | SANITIZE_ALIGNMENT | SANITIZE_VPTR))) |
1725 | { |
1726 | tree fn = CALL_EXPR_FN (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1726, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1726, __FUNCTION__))))); |
1727 | if (fn != NULL_TREE(tree) nullptr |
1728 | && !error_operand_p (fn) |
1729 | && INDIRECT_TYPE_P (TREE_TYPE (fn))((((enum tree_code) (((contains_struct_check ((fn), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1729, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE ) || (((enum tree_code) (((contains_struct_check ((fn), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1729, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE )) |
1730 | && TREE_CODE (TREE_TYPE (TREE_TYPE (fn)))((enum tree_code) (((contains_struct_check ((((contains_struct_check ((fn), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1730, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1730, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE) |
1731 | { |
1732 | bool is_ctor |
1733 | = TREE_CODE (fn)((enum tree_code) (fn)->base.code) == ADDR_EXPR |
1734 | && TREE_CODE (TREE_OPERAND (fn, 0))((enum tree_code) ((*((const_cast<tree*> (tree_operand_check ((fn), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1734, __FUNCTION__))))))->base.code) == FUNCTION_DECL |
1735 | && DECL_CONSTRUCTOR_P (TREE_OPERAND (fn, 0))((tree_check (((((enum tree_code) ((*((const_cast<tree*> (tree_operand_check ((fn), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1735, __FUNCTION__))))))->base.code) == TEMPLATE_DECL ? ( (struct tree_template_decl *)(const_cast<union tree_node * > ((((tree_check (((*((const_cast<tree*> (tree_operand_check ((fn), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1735, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1735, __FUNCTION__, (TEMPLATE_DECL))))))))->result : (*( (const_cast<tree*> (tree_operand_check ((fn), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1735, __FUNCTION__))))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1735, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor ); |
1736 | if (sanitize_flags_p (SANITIZE_NULL | SANITIZE_ALIGNMENT)) |
1737 | ubsan_maybe_instrument_member_call (stmt, is_ctor); |
1738 | if (sanitize_flags_p (SANITIZE_VPTR) && !is_ctor) |
1739 | cp_ubsan_maybe_instrument_member_call (stmt); |
1740 | } |
1741 | else if (fn == NULL_TREE(tree) nullptr |
1742 | && CALL_EXPR_IFN (stmt)((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1742, __FUNCTION__, (CALL_EXPR)))->base.u.ifn) == IFN_UBSAN_NULL |
1743 | && TREE_CODE (CALL_EXPR_ARG (stmt, 0))((enum tree_code) ((*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1743, __FUNCTION__, (CALL_EXPR)))), ((0) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1743, __FUNCTION__))))))->base.code) == INTEGER_CST |
1744 | && TYPE_REF_P (TREE_TYPE (CALL_EXPR_ARG (stmt, 0)))(((enum tree_code) (((contains_struct_check (((*((const_cast< tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1744, __FUNCTION__, (CALL_EXPR)))), ((0) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1744, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1744, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE )) |
1745 | *walk_subtrees = 0; |
1746 | } |
1747 | /* Fall through. */ |
1748 | case AGGR_INIT_EXPR: |
1749 | /* For calls to a multi-versioned function, overload resolution |
1750 | returns the function with the highest target priority, that is, |
1751 | the version that will checked for dispatching first. If this |
1752 | version is inlinable, a direct call to this version can be made |
1753 | otherwise the call should go through the dispatcher. */ |
1754 | { |
1755 | tree fn = cp_get_callee_fndecl_nofold (stmt); |
1756 | if (fn && DECL_FUNCTION_VERSIONED (fn)((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1756, __FUNCTION__, (FUNCTION_DECL)))->function_decl.versioned_function ) |
1757 | && (current_function_decl == NULLnullptr |
1758 | || !targetm.target_option.can_inline_p (current_function_decl, |
1759 | fn))) |
1760 | if (tree dis = get_function_version_dispatcher (fn)) |
1761 | { |
1762 | mark_versions_used (dis); |
1763 | dis = build_address (dis); |
1764 | if (TREE_CODE (stmt)((enum tree_code) (stmt)->base.code) == CALL_EXPR) |
1765 | CALL_EXPR_FN (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1765, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1765, __FUNCTION__))))) = dis; |
1766 | else |
1767 | AGGR_INIT_EXPR_FN (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1767, __FUNCTION__, (AGGR_INIT_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1767, __FUNCTION__))))) = dis; |
1768 | } |
1769 | } |
1770 | break; |
1771 | |
1772 | case TARGET_EXPR: |
1773 | if (TARGET_EXPR_INITIAL (stmt)(*(tree_operand_check_code ((stmt), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1773, __FUNCTION__))) |
1774 | && TREE_CODE (TARGET_EXPR_INITIAL (stmt))((enum tree_code) ((*(tree_operand_check_code ((stmt), (TARGET_EXPR ), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1774, __FUNCTION__))))->base.code) == CONSTRUCTOR |
1775 | && CONSTRUCTOR_PLACEHOLDER_BOUNDARY (TARGET_EXPR_INITIAL (stmt))(((tree_not_check2 (((tree_check (((*(tree_operand_check_code ((stmt), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1775, __FUNCTION__)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1775, __FUNCTION__, (CONSTRUCTOR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1775, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5))) |
1776 | TARGET_EXPR_NO_ELIDE (stmt)((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1776, __FUNCTION__, (TARGET_EXPR)))->base.private_flag) = 1; |
1777 | break; |
1778 | |
1779 | case TEMPLATE_ID_EXPR: |
1780 | gcc_assert (concept_check_p (stmt))((void)(!(concept_check_p (stmt)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1780, __FUNCTION__), 0 : 0)); |
1781 | /* Emit the value of the concept check. */ |
1782 | *stmt_p = evaluate_concept_check (stmt); |
1783 | walk_subtrees = 0; |
1784 | break; |
1785 | |
1786 | case OMP_DISTRIBUTE: |
1787 | /* Need to explicitly instantiate copy ctors on class iterators of |
1788 | composite distribute parallel for. */ |
1789 | if (OMP_FOR_INIT (*stmt_p)(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((*stmt_p), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1789, __FUNCTION__))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1789, __FUNCTION__))))) == NULL_TREE(tree) nullptr) |
1790 | { |
1791 | tree *data[4] = { NULLnullptr, NULLnullptr, NULLnullptr, NULLnullptr }; |
1792 | tree inner = walk_tree (&OMP_FOR_BODY (*stmt_p),walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((*stmt_p), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1792, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1792, __FUNCTION__))))), find_combined_omp_for, data, nullptr , nullptr) |
1793 | find_combined_omp_for, data, NULL)walk_tree_1 (&(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((*stmt_p), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1792, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1792, __FUNCTION__))))), find_combined_omp_for, data, nullptr , nullptr); |
1794 | if (inner != NULL_TREE(tree) nullptr |
1795 | && TREE_CODE (inner)((enum tree_code) (inner)->base.code) == OMP_FOR) |
1796 | { |
1797 | for (int i = 0; i < TREE_VEC_LENGTH (OMP_FOR_INIT (inner))((tree_check (((*((const_cast<tree*> (tree_operand_check (((tree_range_check ((inner), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1797, __FUNCTION__))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1797, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1797, __FUNCTION__, (TREE_VEC)))->base.u.length); i++) |
1798 | if (OMP_FOR_ORIG_DECLS (inner)(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((inner), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1798, __FUNCTION__))), (6), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1798, __FUNCTION__))))) |
1799 | && TREE_CODE (TREE_VEC_ELT (OMP_FOR_ORIG_DECLS (inner),((enum tree_code) ((*((const_cast<tree *> (tree_vec_elt_check (((*((const_cast<tree*> (tree_operand_check (((tree_range_check ((inner), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1799, __FUNCTION__))), (6), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1799, __FUNCTION__)))))), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1800, __FUNCTION__))))))->base.code) |
1800 | i))((enum tree_code) ((*((const_cast<tree *> (tree_vec_elt_check (((*((const_cast<tree*> (tree_operand_check (((tree_range_check ((inner), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1799, __FUNCTION__))), (6), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1799, __FUNCTION__)))))), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1800, __FUNCTION__))))))->base.code) == TREE_LIST |
1801 | && TREE_PURPOSE (TREE_VEC_ELT (OMP_FOR_ORIG_DECLS (inner),((tree_check (((*((const_cast<tree *> (tree_vec_elt_check (((*((const_cast<tree*> (tree_operand_check (((tree_range_check ((inner), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1801, __FUNCTION__))), (6), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1801, __FUNCTION__)))))), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1802, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1802, __FUNCTION__, (TREE_LIST)))->list.purpose) |
1802 | i))((tree_check (((*((const_cast<tree *> (tree_vec_elt_check (((*((const_cast<tree*> (tree_operand_check (((tree_range_check ((inner), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1801, __FUNCTION__))), (6), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1801, __FUNCTION__)))))), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1802, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1802, __FUNCTION__, (TREE_LIST)))->list.purpose)) |
1803 | { |
1804 | tree orig = TREE_VEC_ELT (OMP_FOR_ORIG_DECLS (inner), i)(*((const_cast<tree *> (tree_vec_elt_check (((*((const_cast <tree*> (tree_operand_check (((tree_range_check ((inner ), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1804, __FUNCTION__))), (6), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1804, __FUNCTION__)))))), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1804, __FUNCTION__))))); |
1805 | /* Class iterators aren't allowed on OMP_SIMD, so the only |
1806 | case we need to solve is distribute parallel for. */ |
1807 | gcc_assert (TREE_CODE (inner) == OMP_FOR((void)(!(((enum tree_code) (inner)->base.code) == OMP_FOR && data[1]) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1808, __FUNCTION__), 0 : 0)) |
1808 | && data[1])((void)(!(((enum tree_code) (inner)->base.code) == OMP_FOR && data[1]) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1808, __FUNCTION__), 0 : 0)); |
1809 | tree orig_decl = TREE_PURPOSE (orig)((tree_check ((orig), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1809, __FUNCTION__, (TREE_LIST)))->list.purpose); |
1810 | tree c, cl = NULL_TREE(tree) nullptr; |
1811 | for (c = OMP_FOR_CLAUSES (inner)(*((const_cast<tree*> (tree_operand_check (((tree_range_check ((inner), (OMP_FOR), (OACC_LOOP), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1811, __FUNCTION__))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1811, __FUNCTION__))))); |
1812 | c; c = OMP_CLAUSE_CHAIN (c)((contains_struct_check (((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1812, __FUNCTION__, (OMP_CLAUSE)))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1812, __FUNCTION__))->common.chain)) |
1813 | if ((OMP_CLAUSE_CODE (c)((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1813, __FUNCTION__, (OMP_CLAUSE))))->omp_clause.code == OMP_CLAUSE_PRIVATE |
1814 | || OMP_CLAUSE_CODE (c)((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1814, __FUNCTION__, (OMP_CLAUSE))))->omp_clause.code == OMP_CLAUSE_LASTPRIVATE) |
1815 | && OMP_CLAUSE_DECL (c)(*(omp_clause_elt_check (((omp_clause_range_check (((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1815, __FUNCTION__, (OMP_CLAUSE)))), (OMP_CLAUSE_PRIVATE), ( OMP_CLAUSE__SCANTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1815, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1815, __FUNCTION__))) == orig_decl) |
1816 | { |
1817 | cl = c; |
1818 | break; |
1819 | } |
1820 | if (cl == NULL_TREE(tree) nullptr) |
1821 | { |
1822 | for (c = OMP_PARALLEL_CLAUSES (*data[1])(*((const_cast<tree*> (tree_operand_check (((tree_check ((*data[1]), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1822, __FUNCTION__, (OMP_PARALLEL)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1822, __FUNCTION__))))); |
1823 | c; c = OMP_CLAUSE_CHAIN (c)((contains_struct_check (((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1823, __FUNCTION__, (OMP_CLAUSE)))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1823, __FUNCTION__))->common.chain)) |
1824 | if (OMP_CLAUSE_CODE (c)((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1824, __FUNCTION__, (OMP_CLAUSE))))->omp_clause.code == OMP_CLAUSE_PRIVATE |
1825 | && OMP_CLAUSE_DECL (c)(*(omp_clause_elt_check (((omp_clause_range_check (((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1825, __FUNCTION__, (OMP_CLAUSE)))), (OMP_CLAUSE_PRIVATE), ( OMP_CLAUSE__SCANTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1825, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1825, __FUNCTION__))) == orig_decl) |
1826 | { |
1827 | cl = c; |
1828 | break; |
1829 | } |
1830 | } |
1831 | if (cl) |
1832 | { |
1833 | orig_decl = require_complete_type (orig_decl); |
1834 | tree inner_type = TREE_TYPE (orig_decl)((contains_struct_check ((orig_decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1834, __FUNCTION__))->typed.type); |
1835 | if (orig_decl == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
1836 | continue; |
1837 | if (TYPE_REF_P (TREE_TYPE (orig_decl))(((enum tree_code) (((contains_struct_check ((orig_decl), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1837, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE )) |
1838 | inner_type = TREE_TYPE (inner_type)((contains_struct_check ((inner_type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1838, __FUNCTION__))->typed.type); |
1839 | |
1840 | while (TREE_CODE (inner_type)((enum tree_code) (inner_type)->base.code) == ARRAY_TYPE) |
1841 | inner_type = TREE_TYPE (inner_type)((contains_struct_check ((inner_type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1841, __FUNCTION__))->typed.type); |
1842 | get_copy_ctor (inner_type, tf_warning_or_error); |
1843 | } |
1844 | } |
1845 | } |
1846 | } |
1847 | /* FALLTHRU */ |
1848 | |
1849 | case FOR_STMT: |
1850 | case WHILE_STMT: |
1851 | case DO_STMT: |
1852 | case SWITCH_STMT: |
1853 | case CONTINUE_STMT: |
1854 | case BREAK_STMT: |
1855 | case OMP_FOR: |
1856 | case OMP_SIMD: |
1857 | case OMP_LOOP: |
1858 | case OACC_LOOP: |
1859 | case STATEMENT_LIST: |
1860 | /* These cases are handled by shared code. */ |
1861 | c_genericize_control_stmt (stmt_p, walk_subtrees, data, |
1862 | cp_genericize_r, cp_walk_subtrees); |
1863 | break; |
1864 | |
1865 | case BIT_CAST_EXPR: |
1866 | *stmt_p = build1_loc (EXPR_LOCATION (stmt)((((stmt)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((stmt))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((stmt))->base.code))]) <= tcc_expression )) ? (stmt)->exp.locus : ((location_t) 0)), VIEW_CONVERT_EXPR, |
1867 | TREE_TYPE (stmt)((contains_struct_check ((stmt), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1867, __FUNCTION__))->typed.type), TREE_OPERAND (stmt, 0)(*((const_cast<tree*> (tree_operand_check ((stmt), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1867, __FUNCTION__)))))); |
1868 | break; |
1869 | |
1870 | default: |
1871 | if (IS_TYPE_OR_DECL_P (stmt)((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (stmt)->base.code))] == tcc_type) || (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (stmt)-> base.code))] == tcc_declaration))) |
1872 | *walk_subtrees = 0; |
1873 | break; |
1874 | } |
1875 | |
1876 | p_set->add (*stmt_p); |
1877 | |
1878 | return NULLnullptr; |
1879 | } |
1880 | |
1881 | /* Lower C++ front end trees to GENERIC in T_P. */ |
1882 | |
1883 | static void |
1884 | cp_genericize_tree (tree* t_p, bool handle_invisiref_parm_p) |
1885 | { |
1886 | struct cp_genericize_data wtd; |
1887 | |
1888 | wtd.p_set = new hash_set<tree>; |
1889 | wtd.bind_expr_stack.create (0); |
1890 | wtd.omp_ctx = NULLnullptr; |
1891 | wtd.try_block = NULL_TREE(tree) nullptr; |
1892 | wtd.no_sanitize_p = false; |
1893 | wtd.handle_invisiref_parm_p = handle_invisiref_parm_p; |
1894 | cp_walk_tree (t_p, cp_genericize_r, &wtd, NULL)walk_tree_1 (t_p, cp_genericize_r, &wtd, nullptr, cp_walk_subtrees ); |
1895 | delete wtd.p_set; |
1896 | if (sanitize_flags_p (SANITIZE_VPTR)) |
1897 | cp_ubsan_instrument_member_accesses (t_p); |
1898 | } |
1899 | |
1900 | /* If a function that should end with a return in non-void |
1901 | function doesn't obviously end with return, add ubsan |
1902 | instrumentation code to verify it at runtime. If -fsanitize=return |
1903 | is not enabled, instrument __builtin_unreachable. */ |
1904 | |
1905 | static void |
1906 | cp_maybe_instrument_return (tree fndecl) |
1907 | { |
1908 | if (VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fndecl)))(((enum tree_code) (((contains_struct_check ((((contains_struct_check ((fndecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1908, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1908, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE ) |
1909 | || DECL_CONSTRUCTOR_P (fndecl)((tree_check (((((enum tree_code) (fndecl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1909, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fndecl )), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1909, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor ) |
1910 | || DECL_DESTRUCTOR_P (fndecl)((tree_check (((((enum tree_code) (fndecl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1910, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fndecl )), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1910, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor ) |
1911 | || !targetm.warn_func_return (fndecl)) |
1912 | return; |
1913 | |
1914 | if (!sanitize_flags_p (SANITIZE_RETURN, fndecl) |
1915 | /* Don't add __builtin_unreachable () if not optimizing, it will not |
1916 | improve any optimizations in that case, just break UB code. |
1917 | Don't add it if -fsanitize=unreachable -fno-sanitize=return either, |
1918 | UBSan covers this with ubsan_instrument_return above where sufficient |
1919 | information is provided, while the __builtin_unreachable () below |
1920 | if return sanitization is disabled will just result in hard to |
1921 | understand runtime error without location. */ |
1922 | && ((!optimizeglobal_options.x_optimize && !flag_unreachable_trapsglobal_options.x_flag_unreachable_traps) |
1923 | || sanitize_flags_p (SANITIZE_UNREACHABLE, fndecl))) |
1924 | return; |
1925 | |
1926 | tree t = DECL_SAVED_TREE (fndecl)((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1926, __FUNCTION__, (FUNCTION_DECL)))->function_decl.saved_tree ); |
1927 | while (t) |
1928 | { |
1929 | switch (TREE_CODE (t)((enum tree_code) (t)->base.code)) |
1930 | { |
1931 | case BIND_EXPR: |
1932 | t = BIND_EXPR_BODY (t)((*((const_cast<tree*> (tree_operand_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1932, __FUNCTION__, (BIND_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1932, __FUNCTION__)))))); |
1933 | continue; |
1934 | case TRY_FINALLY_EXPR: |
1935 | case CLEANUP_POINT_EXPR: |
1936 | t = TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1936, __FUNCTION__))))); |
1937 | continue; |
1938 | case STATEMENT_LIST: |
1939 | { |
1940 | tree_stmt_iterator i = tsi_last (t); |
1941 | while (!tsi_end_p (i)) |
1942 | { |
1943 | tree p = tsi_stmt (i); |
1944 | if (TREE_CODE (p)((enum tree_code) (p)->base.code) != DEBUG_BEGIN_STMT) |
1945 | break; |
1946 | tsi_prev (&i); |
1947 | } |
1948 | if (!tsi_end_p (i)) |
1949 | { |
1950 | t = tsi_stmt (i); |
1951 | continue; |
1952 | } |
1953 | } |
1954 | break; |
1955 | case RETURN_EXPR: |
1956 | return; |
1957 | default: |
1958 | break; |
1959 | } |
1960 | break; |
1961 | } |
1962 | if (t == NULL_TREE(tree) nullptr) |
1963 | return; |
1964 | tree *p = &DECL_SAVED_TREE (fndecl)((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1964, __FUNCTION__, (FUNCTION_DECL)))->function_decl.saved_tree ); |
1965 | if (TREE_CODE (*p)((enum tree_code) (*p)->base.code) == BIND_EXPR) |
1966 | p = &BIND_EXPR_BODY (*p)((*((const_cast<tree*> (tree_operand_check (((tree_check ((*p), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1966, __FUNCTION__, (BIND_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1966, __FUNCTION__)))))); |
1967 | |
1968 | location_t loc = DECL_SOURCE_LOCATION (fndecl)((contains_struct_check ((fndecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1968, __FUNCTION__))->decl_minimal.locus); |
1969 | if (sanitize_flags_p (SANITIZE_RETURN, fndecl)) |
1970 | t = ubsan_instrument_return (loc); |
1971 | else |
1972 | t = build_builtin_unreachable (BUILTINS_LOCATION((location_t) 1)); |
1973 | |
1974 | append_to_statement_list (t, p); |
1975 | } |
1976 | |
1977 | void |
1978 | cp_genericize (tree fndecl) |
1979 | { |
1980 | tree t; |
1981 | |
1982 | /* Fix up the types of parms passed by invisible reference. */ |
1983 | for (t = DECL_ARGUMENTS (fndecl)((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1983, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments ); t; t = DECL_CHAIN (t)(((contains_struct_check (((contains_struct_check ((t), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1983, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1983, __FUNCTION__))->common.chain))) |
1984 | if (TREE_ADDRESSABLE (TREE_TYPE (t))((((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1984, __FUNCTION__))->typed.type))->base.addressable_flag )) |
1985 | { |
1986 | /* If a function's arguments are copied to create a thunk, |
1987 | then DECL_BY_REFERENCE will be set -- but the type of the |
1988 | argument will be a pointer type, so we will never get |
1989 | here. */ |
1990 | gcc_assert (!DECL_BY_REFERENCE (t))((void)(!(!((tree_check3 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1990, __FUNCTION__, (VAR_DECL), (PARM_DECL), (RESULT_DECL)) )->decl_common.decl_by_reference_flag)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1990, __FUNCTION__), 0 : 0)); |
1991 | gcc_assert (DECL_ARG_TYPE (t) != TREE_TYPE (t))((void)(!(((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1991, __FUNCTION__, (PARM_DECL)))->decl_common.initial) != ((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1991, __FUNCTION__))->typed.type)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1991, __FUNCTION__), 0 : 0)); |
1992 | TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1992, __FUNCTION__))->typed.type) = DECL_ARG_TYPE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1992, __FUNCTION__, (PARM_DECL)))->decl_common.initial); |
1993 | DECL_BY_REFERENCE (t)((tree_check3 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1993, __FUNCTION__, (VAR_DECL), (PARM_DECL), (RESULT_DECL)) )->decl_common.decl_by_reference_flag) = 1; |
1994 | TREE_ADDRESSABLE (t)((t)->base.addressable_flag) = 0; |
1995 | relayout_decl (t); |
1996 | } |
1997 | |
1998 | /* Do the same for the return value. */ |
1999 | if (TREE_ADDRESSABLE (TREE_TYPE (DECL_RESULT (fndecl)))((((contains_struct_check ((((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1999, __FUNCTION__, (FUNCTION_DECL)))->decl_non_common.result )), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 1999, __FUNCTION__))->typed.type))->base.addressable_flag )) |
2000 | { |
2001 | t = DECL_RESULT (fndecl)((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2001, __FUNCTION__, (FUNCTION_DECL)))->decl_non_common.result ); |
2002 | TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2002, __FUNCTION__))->typed.type) = build_reference_type (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2002, __FUNCTION__))->typed.type)); |
2003 | DECL_BY_REFERENCE (t)((tree_check3 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2003, __FUNCTION__, (VAR_DECL), (PARM_DECL), (RESULT_DECL)) )->decl_common.decl_by_reference_flag) = 1; |
2004 | TREE_ADDRESSABLE (t)((t)->base.addressable_flag) = 0; |
2005 | relayout_decl (t); |
2006 | if (DECL_NAME (t)((contains_struct_check ((t), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2006, __FUNCTION__))->decl_minimal.name)) |
2007 | { |
2008 | /* Adjust DECL_VALUE_EXPR of the original var. */ |
2009 | tree outer = outer_curly_brace_block (current_function_decl); |
2010 | tree var; |
2011 | |
2012 | if (outer) |
2013 | for (var = BLOCK_VARS (outer)((tree_check ((outer), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2013, __FUNCTION__, (BLOCK)))->block.vars); var; var = DECL_CHAIN (var)(((contains_struct_check (((contains_struct_check ((var), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2013, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2013, __FUNCTION__))->common.chain))) |
2014 | if (VAR_P (var)(((enum tree_code) (var)->base.code) == VAR_DECL) |
2015 | && DECL_NAME (t)((contains_struct_check ((t), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2015, __FUNCTION__))->decl_minimal.name) == DECL_NAME (var)((contains_struct_check ((var), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2015, __FUNCTION__))->decl_minimal.name) |
2016 | && DECL_HAS_VALUE_EXPR_P (var)((tree_check3 ((var), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2016, __FUNCTION__, (VAR_DECL), (PARM_DECL), (RESULT_DECL)) ) ->decl_common.decl_flag_2) |
2017 | && DECL_VALUE_EXPR (var)(decl_value_expr_lookup ((contains_struct_check ((var), (TS_DECL_WRTL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2017, __FUNCTION__)))) == t) |
2018 | { |
2019 | tree val = convert_from_reference (t); |
2020 | SET_DECL_VALUE_EXPR (var, val)(decl_value_expr_insert ((contains_struct_check ((var), (TS_DECL_WRTL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2020, __FUNCTION__)), val)); |
2021 | break; |
2022 | } |
2023 | } |
2024 | } |
2025 | |
2026 | /* If we're a clone, the body is already GIMPLE. */ |
2027 | if (DECL_CLONED_FUNCTION_P (fndecl)(((contains_struct_check ((fndecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2027, __FUNCTION__))->decl_minimal.name) && ((!( (tree_not_check2 (((tree_check ((((contains_struct_check ((fndecl ), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2027, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2027, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2027, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2)) & ((tree_not_check2 (((tree_check ((((contains_struct_check ((fndecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2027, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2027, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2027, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_1)) && !((((contains_struct_check ((fndecl ), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2027, __FUNCTION__))->decl_minimal.name) == cp_global_trees [CPTI_CTOR_IDENTIFIER]) || (((contains_struct_check ((fndecl) , (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2027, __FUNCTION__))->decl_minimal.name) == cp_global_trees [CPTI_DTOR_IDENTIFIER])))) |
2028 | return; |
2029 | |
2030 | /* Allow cp_genericize calls to be nested. */ |
2031 | bc_state_t save_state; |
2032 | save_bc_state (&save_state); |
2033 | |
2034 | /* We do want to see every occurrence of the parms, so we can't just use |
2035 | walk_tree's hash functionality. */ |
2036 | cp_genericize_tree (&DECL_SAVED_TREE (fndecl)((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2036, __FUNCTION__, (FUNCTION_DECL)))->function_decl.saved_tree ), true); |
2037 | |
2038 | cp_maybe_instrument_return (fndecl); |
2039 | |
2040 | /* Do everything else. */ |
2041 | c_genericize (fndecl); |
2042 | restore_bc_state (&save_state); |
2043 | } |
2044 | |
2045 | /* Build code to apply FN to each member of ARG1 and ARG2. FN may be |
2046 | NULL if there is in fact nothing to do. ARG2 may be null if FN |
2047 | actually only takes one argument. */ |
2048 | |
2049 | static tree |
2050 | cxx_omp_clause_apply_fn (tree fn, tree arg1, tree arg2) |
2051 | { |
2052 | tree defparm, parm, t; |
2053 | int i = 0; |
2054 | int nargs; |
2055 | tree *argarray; |
2056 | |
2057 | if (fn == NULLnullptr) |
2058 | return NULLnullptr; |
2059 | |
2060 | nargs = list_length (DECL_ARGUMENTS (fn)((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2060, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments )); |
2061 | argarray = XALLOCAVEC (tree, nargs)((tree *) __builtin_alloca(sizeof (tree) * (nargs))); |
2062 | |
2063 | defparm = TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (fn)))((contains_struct_check ((((tree_check2 ((((contains_struct_check ((fn), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2063, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2063, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common .values)), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2063, __FUNCTION__))->common.chain); |
2064 | if (arg2) |
2065 | defparm = TREE_CHAIN (defparm)((contains_struct_check ((defparm), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2065, __FUNCTION__))->common.chain); |
2066 | |
2067 | bool is_method = TREE_CODE (TREE_TYPE (fn))((enum tree_code) (((contains_struct_check ((fn), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2067, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE; |
2068 | if (TREE_CODE (TREE_TYPE (arg1))((enum tree_code) (((contains_struct_check ((arg1), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2068, __FUNCTION__))->typed.type))->base.code) == ARRAY_TYPE) |
2069 | { |
2070 | tree inner_type = TREE_TYPE (arg1)((contains_struct_check ((arg1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2070, __FUNCTION__))->typed.type); |
2071 | tree start1, end1, p1; |
2072 | tree start2 = NULLnullptr, p2 = NULLnullptr; |
2073 | tree ret = NULLnullptr, lab; |
2074 | |
2075 | start1 = arg1; |
2076 | start2 = arg2; |
2077 | do |
2078 | { |
2079 | inner_type = TREE_TYPE (inner_type)((contains_struct_check ((inner_type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2079, __FUNCTION__))->typed.type); |
2080 | start1 = build4 (ARRAY_REF, inner_type, start1, |
2081 | size_zero_nodeglobal_trees[TI_SIZE_ZERO], NULLnullptr, NULLnullptr); |
2082 | if (arg2) |
2083 | start2 = build4 (ARRAY_REF, inner_type, start2, |
2084 | size_zero_nodeglobal_trees[TI_SIZE_ZERO], NULLnullptr, NULLnullptr); |
2085 | } |
2086 | while (TREE_CODE (inner_type)((enum tree_code) (inner_type)->base.code) == ARRAY_TYPE); |
2087 | start1 = build_fold_addr_expr_loc (input_location, start1); |
2088 | if (arg2) |
2089 | start2 = build_fold_addr_expr_loc (input_location, start2); |
2090 | |
2091 | end1 = TYPE_SIZE_UNIT (TREE_TYPE (arg1))((tree_class_check ((((contains_struct_check ((arg1), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2091, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2091, __FUNCTION__))->type_common.size_unit); |
2092 | end1 = fold_build_pointer_plus (start1, end1)fold_build_pointer_plus_loc (((location_t) 0), start1, end1); |
2093 | |
2094 | p1 = create_tmp_var (TREE_TYPE (start1)((contains_struct_check ((start1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2094, __FUNCTION__))->typed.type)); |
2095 | t = build2 (MODIFY_EXPR, TREE_TYPE (p1)((contains_struct_check ((p1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2095, __FUNCTION__))->typed.type), p1, start1); |
2096 | append_to_statement_list (t, &ret); |
2097 | |
2098 | if (arg2) |
2099 | { |
2100 | p2 = create_tmp_var (TREE_TYPE (start2)((contains_struct_check ((start2), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2100, __FUNCTION__))->typed.type)); |
2101 | t = build2 (MODIFY_EXPR, TREE_TYPE (p2)((contains_struct_check ((p2), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2101, __FUNCTION__))->typed.type), p2, start2); |
2102 | append_to_statement_list (t, &ret); |
2103 | } |
2104 | |
2105 | lab = create_artificial_label (input_location); |
2106 | t = build1 (LABEL_EXPR, void_type_nodeglobal_trees[TI_VOID_TYPE], lab); |
2107 | append_to_statement_list (t, &ret); |
2108 | |
2109 | argarray[i++] = p1; |
2110 | if (arg2) |
2111 | argarray[i++] = p2; |
2112 | /* Handle default arguments. */ |
2113 | for (parm = defparm; parm && parm != void_list_nodeglobal_trees[TI_VOID_LIST_NODE]; |
2114 | parm = TREE_CHAIN (parm)((contains_struct_check ((parm), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2114, __FUNCTION__))->common.chain), i++) |
2115 | argarray[i] = convert_default_arg (TREE_VALUE (parm)((tree_check ((parm), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2115, __FUNCTION__, (TREE_LIST)))->list.value), |
2116 | TREE_PURPOSE (parm)((tree_check ((parm), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2116, __FUNCTION__, (TREE_LIST)))->list.purpose), fn, |
2117 | i - is_method, tf_warning_or_error); |
2118 | t = build_call_a (fn, i, argarray); |
2119 | t = fold_convert (void_type_node, t)fold_convert_loc (((location_t) 0), global_trees[TI_VOID_TYPE ], t); |
2120 | t = fold_build_cleanup_point_expr (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2120, __FUNCTION__))->typed.type), t); |
2121 | append_to_statement_list (t, &ret); |
2122 | |
2123 | t = fold_build_pointer_plus (p1, TYPE_SIZE_UNIT (inner_type))fold_build_pointer_plus_loc (((location_t) 0), p1, ((tree_class_check ((inner_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2123, __FUNCTION__))->type_common.size_unit)); |
2124 | t = build2 (MODIFY_EXPR, TREE_TYPE (p1)((contains_struct_check ((p1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2124, __FUNCTION__))->typed.type), p1, t); |
2125 | append_to_statement_list (t, &ret); |
2126 | |
2127 | if (arg2) |
2128 | { |
2129 | t = fold_build_pointer_plus (p2, TYPE_SIZE_UNIT (inner_type))fold_build_pointer_plus_loc (((location_t) 0), p2, ((tree_class_check ((inner_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2129, __FUNCTION__))->type_common.size_unit)); |
2130 | t = build2 (MODIFY_EXPR, TREE_TYPE (p2)((contains_struct_check ((p2), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2130, __FUNCTION__))->typed.type), p2, t); |
2131 | append_to_statement_list (t, &ret); |
2132 | } |
2133 | |
2134 | t = build2 (NE_EXPR, boolean_type_nodeglobal_trees[TI_BOOLEAN_TYPE], p1, end1); |
2135 | t = build3 (COND_EXPR, void_type_nodeglobal_trees[TI_VOID_TYPE], t, build_and_jump (&lab), NULLnullptr); |
2136 | append_to_statement_list (t, &ret); |
2137 | |
2138 | return ret; |
2139 | } |
2140 | else |
2141 | { |
2142 | argarray[i++] = build_fold_addr_expr_loc (input_location, arg1); |
2143 | if (arg2) |
2144 | argarray[i++] = build_fold_addr_expr_loc (input_location, arg2); |
2145 | /* Handle default arguments. */ |
2146 | for (parm = defparm; parm && parm != void_list_nodeglobal_trees[TI_VOID_LIST_NODE]; |
2147 | parm = TREE_CHAIN (parm)((contains_struct_check ((parm), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2147, __FUNCTION__))->common.chain), i++) |
2148 | argarray[i] = convert_default_arg (TREE_VALUE (parm)((tree_check ((parm), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2148, __FUNCTION__, (TREE_LIST)))->list.value), |
2149 | TREE_PURPOSE (parm)((tree_check ((parm), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2149, __FUNCTION__, (TREE_LIST)))->list.purpose), fn, |
2150 | i - is_method, tf_warning_or_error); |
2151 | t = build_call_a (fn, i, argarray); |
2152 | t = fold_convert (void_type_node, t)fold_convert_loc (((location_t) 0), global_trees[TI_VOID_TYPE ], t); |
2153 | return fold_build_cleanup_point_expr (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2153, __FUNCTION__))->typed.type), t); |
2154 | } |
2155 | } |
2156 | |
2157 | /* Return code to initialize DECL with its default constructor, or |
2158 | NULL if there's nothing to do. */ |
2159 | |
2160 | tree |
2161 | cxx_omp_clause_default_ctor (tree clause, tree decl, tree /*outer*/) |
2162 | { |
2163 | tree info = CP_OMP_CLAUSE_INFO (clause)((contains_struct_check (((omp_clause_range_check ((clause), ( OMP_CLAUSE_PRIVATE), (OMP_CLAUSE__CONDTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2163, __FUNCTION__))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2163, __FUNCTION__))->typed.type); |
2164 | tree ret = NULLnullptr; |
2165 | |
2166 | if (info) |
2167 | ret = cxx_omp_clause_apply_fn (TREE_VEC_ELT (info, 0)(*((const_cast<tree *> (tree_vec_elt_check ((info), (0) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2167, __FUNCTION__))))), decl, NULLnullptr); |
2168 | |
2169 | return ret; |
2170 | } |
2171 | |
2172 | /* Return code to initialize DST with a copy constructor from SRC. */ |
2173 | |
2174 | tree |
2175 | cxx_omp_clause_copy_ctor (tree clause, tree dst, tree src) |
2176 | { |
2177 | tree info = CP_OMP_CLAUSE_INFO (clause)((contains_struct_check (((omp_clause_range_check ((clause), ( OMP_CLAUSE_PRIVATE), (OMP_CLAUSE__CONDTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2177, __FUNCTION__))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2177, __FUNCTION__))->typed.type); |
2178 | tree ret = NULLnullptr; |
2179 | |
2180 | if (info) |
2181 | ret = cxx_omp_clause_apply_fn (TREE_VEC_ELT (info, 0)(*((const_cast<tree *> (tree_vec_elt_check ((info), (0) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2181, __FUNCTION__))))), dst, src); |
2182 | if (ret == NULLnullptr) |
2183 | ret = build2 (MODIFY_EXPR, TREE_TYPE (dst)((contains_struct_check ((dst), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2183, __FUNCTION__))->typed.type), dst, src); |
2184 | |
2185 | return ret; |
2186 | } |
2187 | |
2188 | /* Similarly, except use an assignment operator instead. */ |
2189 | |
2190 | tree |
2191 | cxx_omp_clause_assign_op (tree clause, tree dst, tree src) |
2192 | { |
2193 | tree info = CP_OMP_CLAUSE_INFO (clause)((contains_struct_check (((omp_clause_range_check ((clause), ( OMP_CLAUSE_PRIVATE), (OMP_CLAUSE__CONDTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2193, __FUNCTION__))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2193, __FUNCTION__))->typed.type); |
2194 | tree ret = NULLnullptr; |
2195 | |
2196 | if (info) |
2197 | ret = cxx_omp_clause_apply_fn (TREE_VEC_ELT (info, 2)(*((const_cast<tree *> (tree_vec_elt_check ((info), (2) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2197, __FUNCTION__))))), dst, src); |
2198 | if (ret == NULLnullptr) |
2199 | ret = build2 (MODIFY_EXPR, TREE_TYPE (dst)((contains_struct_check ((dst), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2199, __FUNCTION__))->typed.type), dst, src); |
2200 | |
2201 | return ret; |
2202 | } |
2203 | |
2204 | /* Return code to destroy DECL. */ |
2205 | |
2206 | tree |
2207 | cxx_omp_clause_dtor (tree clause, tree decl) |
2208 | { |
2209 | tree info = CP_OMP_CLAUSE_INFO (clause)((contains_struct_check (((omp_clause_range_check ((clause), ( OMP_CLAUSE_PRIVATE), (OMP_CLAUSE__CONDTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2209, __FUNCTION__))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2209, __FUNCTION__))->typed.type); |
2210 | tree ret = NULLnullptr; |
2211 | |
2212 | if (info) |
2213 | ret = cxx_omp_clause_apply_fn (TREE_VEC_ELT (info, 1)(*((const_cast<tree *> (tree_vec_elt_check ((info), (1) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2213, __FUNCTION__))))), decl, NULLnullptr); |
2214 | |
2215 | return ret; |
2216 | } |
2217 | |
2218 | /* True if OpenMP should privatize what this DECL points to rather |
2219 | than the DECL itself. */ |
2220 | |
2221 | bool |
2222 | cxx_omp_privatize_by_reference (const_tree decl) |
2223 | { |
2224 | return (TYPE_REF_P (TREE_TYPE (decl))(((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2224, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE ) |
2225 | || is_invisiref_parm (decl)); |
2226 | } |
2227 | |
2228 | /* Return true if DECL is const qualified var having no mutable member. */ |
2229 | bool |
2230 | cxx_omp_const_qual_no_mutable (tree decl) |
2231 | { |
2232 | tree type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2232, __FUNCTION__))->typed.type); |
2233 | if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE)) |
2234 | { |
2235 | if (!is_invisiref_parm (decl)) |
2236 | return false; |
2237 | type = TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2237, __FUNCTION__))->typed.type); |
2238 | |
2239 | if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == RESULT_DECL && DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2239, __FUNCTION__))->decl_minimal.name)) |
2240 | { |
2241 | /* NVR doesn't preserve const qualification of the |
2242 | variable's type. */ |
2243 | tree outer = outer_curly_brace_block (current_function_decl); |
2244 | tree var; |
2245 | |
2246 | if (outer) |
2247 | for (var = BLOCK_VARS (outer)((tree_check ((outer), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2247, __FUNCTION__, (BLOCK)))->block.vars); var; var = DECL_CHAIN (var)(((contains_struct_check (((contains_struct_check ((var), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2247, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2247, __FUNCTION__))->common.chain))) |
2248 | if (VAR_P (var)(((enum tree_code) (var)->base.code) == VAR_DECL) |
2249 | && DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2249, __FUNCTION__))->decl_minimal.name) == DECL_NAME (var)((contains_struct_check ((var), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2249, __FUNCTION__))->decl_minimal.name) |
2250 | && (TYPE_MAIN_VARIANT (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2250, __FUNCTION__))->type_common.main_variant) |
2251 | == TYPE_MAIN_VARIANT (TREE_TYPE (var))((tree_class_check ((((contains_struct_check ((var), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2251, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2251, __FUNCTION__))->type_common.main_variant))) |
2252 | { |
2253 | if (TYPE_READONLY (TREE_TYPE (var))((tree_class_check ((((contains_struct_check ((var), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2253, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2253, __FUNCTION__))->base.readonly_flag)) |
2254 | type = TREE_TYPE (var)((contains_struct_check ((var), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2254, __FUNCTION__))->typed.type); |
2255 | break; |
2256 | } |
2257 | } |
2258 | } |
2259 | |
2260 | if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
2261 | return false; |
2262 | |
2263 | /* Variables with const-qualified type having no mutable member |
2264 | are predetermined shared. */ |
2265 | if (TYPE_READONLY (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2265, __FUNCTION__))->base.readonly_flag) && !cp_has_mutable_p (type)) |
2266 | return true; |
2267 | |
2268 | return false; |
2269 | } |
2270 | |
2271 | /* OMP_CLAUSE_DEFAULT_UNSPECIFIED unless OpenMP sharing attribute |
2272 | of DECL is predetermined. */ |
2273 | |
2274 | enum omp_clause_default_kind |
2275 | cxx_omp_predetermined_sharing_1 (tree decl) |
2276 | { |
2277 | /* Static data members are predetermined shared. */ |
2278 | if (TREE_STATIC (decl)((decl)->base.static_flag)) |
2279 | { |
2280 | tree ctx = CP_DECL_CONTEXT (decl)(!(! (((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2280, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code ) (((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2280, __FUNCTION__))->decl_minimal.context))->base.code ) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((decl) , (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2280, __FUNCTION__))->decl_minimal.context) : cp_global_trees [CPTI_GLOBAL]); |
2281 | if (TYPE_P (ctx)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (ctx)->base.code))] == tcc_type) && MAYBE_CLASS_TYPE_P (ctx)((((enum tree_code) (ctx)->base.code) == TEMPLATE_TYPE_PARM || ((enum tree_code) (ctx)->base.code) == TYPENAME_TYPE || ((enum tree_code) (ctx)->base.code) == TYPEOF_TYPE || ((enum tree_code) (ctx)->base.code) == BOUND_TEMPLATE_TEMPLATE_PARM || ((enum tree_code) (ctx)->base.code) == DECLTYPE_TYPE || ((enum tree_code) (ctx)->base.code) == TRAIT_TYPE || ((enum tree_code) (ctx)->base.code) == DEPENDENT_OPERATOR_TYPE) || (((((enum tree_code) (ctx)->base.code)) == RECORD_TYPE || (((enum tree_code) (ctx)->base.code)) == UNION_TYPE) && ((tree_class_check ((ctx), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2281, __FUNCTION__))->type_common.lang_flag_5)))) |
2282 | return OMP_CLAUSE_DEFAULT_SHARED; |
2283 | |
2284 | if (c_omp_predefined_variable (decl)) |
2285 | return OMP_CLAUSE_DEFAULT_SHARED; |
2286 | } |
2287 | |
2288 | /* this may not be specified in data-sharing clauses, still we need |
2289 | to predetermined it firstprivate. */ |
2290 | if (decl == current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun + 0)->language)->x_current_class_ptr : &scope_chain ->x_current_class_ptr))) |
2291 | return OMP_CLAUSE_DEFAULT_FIRSTPRIVATE; |
2292 | |
2293 | return OMP_CLAUSE_DEFAULT_UNSPECIFIED; |
2294 | } |
2295 | |
2296 | /* Likewise, but also include the artificial vars. We don't want to |
2297 | disallow the artificial vars being mentioned in explicit clauses, |
2298 | as we use artificial vars e.g. for loop constructs with random |
2299 | access iterators other than pointers, but during gimplification |
2300 | we want to treat them as predetermined. */ |
2301 | |
2302 | enum omp_clause_default_kind |
2303 | cxx_omp_predetermined_sharing (tree decl) |
2304 | { |
2305 | enum omp_clause_default_kind ret = cxx_omp_predetermined_sharing_1 (decl); |
2306 | if (ret != OMP_CLAUSE_DEFAULT_UNSPECIFIED) |
2307 | return ret; |
2308 | |
2309 | /* Predetermine artificial variables holding integral values, those |
2310 | are usually result of gimplify_one_sizepos or SAVE_EXPR |
2311 | gimplification. */ |
2312 | if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL) |
2313 | && DECL_ARTIFICIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2313, __FUNCTION__))->decl_common.artificial_flag) |
2314 | && INTEGRAL_TYPE_P (TREE_TYPE (decl))(((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2314, __FUNCTION__))->typed.type))->base.code) == ENUMERAL_TYPE || ((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2314, __FUNCTION__))->typed.type))->base.code) == BOOLEAN_TYPE || ((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2314, __FUNCTION__))->typed.type))->base.code) == INTEGER_TYPE ) |
2315 | && !(DECL_LANG_SPECIFIC (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2315, __FUNCTION__))->decl_common.lang_specific) |
2316 | && DECL_OMP_PRIVATIZED_MEMBER (decl)(((contains_struct_check (((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2316, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2316, __FUNCTION__))->decl_common.lang_specific)->u.base .anticipated_p))) |
2317 | return OMP_CLAUSE_DEFAULT_SHARED; |
2318 | |
2319 | /* Similarly for typeinfo symbols. */ |
2320 | if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL) && DECL_ARTIFICIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2320, __FUNCTION__))->decl_common.artificial_flag) && DECL_TINFO_P (decl)((tree_not_check2 (((tree_check2 ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2320, __FUNCTION__, (VAR_DECL), (TYPE_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2320, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_4)) |
2321 | return OMP_CLAUSE_DEFAULT_SHARED; |
2322 | |
2323 | return OMP_CLAUSE_DEFAULT_UNSPECIFIED; |
2324 | } |
2325 | |
2326 | enum omp_clause_defaultmap_kind |
2327 | cxx_omp_predetermined_mapping (tree decl) |
2328 | { |
2329 | /* Predetermine artificial variables holding integral values, those |
2330 | are usually result of gimplify_one_sizepos or SAVE_EXPR |
2331 | gimplification. */ |
2332 | if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL) |
2333 | && DECL_ARTIFICIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2333, __FUNCTION__))->decl_common.artificial_flag) |
2334 | && INTEGRAL_TYPE_P (TREE_TYPE (decl))(((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2334, __FUNCTION__))->typed.type))->base.code) == ENUMERAL_TYPE || ((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2334, __FUNCTION__))->typed.type))->base.code) == BOOLEAN_TYPE || ((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2334, __FUNCTION__))->typed.type))->base.code) == INTEGER_TYPE ) |
2335 | && !(DECL_LANG_SPECIFIC (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2335, __FUNCTION__))->decl_common.lang_specific) |
2336 | && DECL_OMP_PRIVATIZED_MEMBER (decl)(((contains_struct_check (((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2336, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2336, __FUNCTION__))->decl_common.lang_specific)->u.base .anticipated_p))) |
2337 | return OMP_CLAUSE_DEFAULTMAP_FIRSTPRIVATE; |
2338 | |
2339 | if (c_omp_predefined_variable (decl)) |
2340 | return OMP_CLAUSE_DEFAULTMAP_TO; |
2341 | |
2342 | return OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED; |
2343 | } |
2344 | |
2345 | /* Finalize an implicitly determined clause. */ |
2346 | |
2347 | void |
2348 | cxx_omp_finish_clause (tree c, gimple_seq *, bool /* openacc */) |
2349 | { |
2350 | tree decl, inner_type; |
2351 | bool make_shared = false; |
2352 | |
2353 | if (OMP_CLAUSE_CODE (c)((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2353, __FUNCTION__, (OMP_CLAUSE))))->omp_clause.code != OMP_CLAUSE_FIRSTPRIVATE |
2354 | && OMP_CLAUSE_CODE (c)((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2354, __FUNCTION__, (OMP_CLAUSE))))->omp_clause.code != OMP_CLAUSE_PRIVATE |
2355 | && (OMP_CLAUSE_CODE (c)((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2355, __FUNCTION__, (OMP_CLAUSE))))->omp_clause.code != OMP_CLAUSE_LASTPRIVATE |
2356 | || !OMP_CLAUSE_LASTPRIVATE_LOOP_IV (c)(((omp_clause_subcode_check ((c), (OMP_CLAUSE_LASTPRIVATE), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2356, __FUNCTION__)))->base.protected_flag))) |
2357 | return; |
2358 | |
2359 | decl = OMP_CLAUSE_DECL (c)(*(omp_clause_elt_check (((omp_clause_range_check (((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2359, __FUNCTION__, (OMP_CLAUSE)))), (OMP_CLAUSE_PRIVATE), ( OMP_CLAUSE__SCANTEMP_), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2359, __FUNCTION__))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2359, __FUNCTION__))); |
2360 | decl = require_complete_type (decl); |
2361 | inner_type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2361, __FUNCTION__))->typed.type); |
2362 | if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
2363 | make_shared = true; |
2364 | else if (TYPE_REF_P (TREE_TYPE (decl))(((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2364, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE )) |
2365 | inner_type = TREE_TYPE (inner_type)((contains_struct_check ((inner_type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2365, __FUNCTION__))->typed.type); |
2366 | |
2367 | /* We're interested in the base element, not arrays. */ |
2368 | while (TREE_CODE (inner_type)((enum tree_code) (inner_type)->base.code) == ARRAY_TYPE) |
2369 | inner_type = TREE_TYPE (inner_type)((contains_struct_check ((inner_type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2369, __FUNCTION__))->typed.type); |
2370 | |
2371 | /* Check for special function availability by building a call to one. |
2372 | Save the results, because later we won't be in the right context |
2373 | for making these queries. */ |
2374 | bool first = OMP_CLAUSE_CODE (c)((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2374, __FUNCTION__, (OMP_CLAUSE))))->omp_clause.code == OMP_CLAUSE_FIRSTPRIVATE; |
2375 | bool last = OMP_CLAUSE_CODE (c)((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2375, __FUNCTION__, (OMP_CLAUSE))))->omp_clause.code == OMP_CLAUSE_LASTPRIVATE; |
2376 | if (!make_shared |
2377 | && CLASS_TYPE_P (inner_type)(((((enum tree_code) (inner_type)->base.code)) == RECORD_TYPE || (((enum tree_code) (inner_type)->base.code)) == UNION_TYPE ) && ((tree_class_check ((inner_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2377, __FUNCTION__))->type_common.lang_flag_5)) |
2378 | && cxx_omp_create_clause_info (c, inner_type, !first, first, last, |
2379 | true)) |
2380 | make_shared = true; |
2381 | |
2382 | if (make_shared) |
2383 | { |
2384 | OMP_CLAUSE_CODE (c)((tree_check ((c), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2384, __FUNCTION__, (OMP_CLAUSE))))->omp_clause.code = OMP_CLAUSE_SHARED; |
2385 | OMP_CLAUSE_SHARED_FIRSTPRIVATE (c)((omp_clause_subcode_check ((c), (OMP_CLAUSE_SHARED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2385, __FUNCTION__))->base.public_flag) = 0; |
2386 | OMP_CLAUSE_SHARED_READONLY (c)(((omp_clause_subcode_check ((c), (OMP_CLAUSE_SHARED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2386, __FUNCTION__)))->base.private_flag) = 0; |
2387 | } |
2388 | } |
2389 | |
2390 | /* Return true if DECL's DECL_VALUE_EXPR (if any) should be |
2391 | disregarded in OpenMP construct, because it is going to be |
2392 | remapped during OpenMP lowering. SHARED is true if DECL |
2393 | is going to be shared, false if it is going to be privatized. */ |
2394 | |
2395 | bool |
2396 | cxx_omp_disregard_value_expr (tree decl, bool shared) |
2397 | { |
2398 | if (shared) |
2399 | return false; |
2400 | if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL) |
2401 | && DECL_HAS_VALUE_EXPR_P (decl)((tree_check3 ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2401, __FUNCTION__, (VAR_DECL), (PARM_DECL), (RESULT_DECL)) ) ->decl_common.decl_flag_2) |
2402 | && DECL_ARTIFICIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2402, __FUNCTION__))->decl_common.artificial_flag) |
2403 | && DECL_LANG_SPECIFIC (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2403, __FUNCTION__))->decl_common.lang_specific) |
2404 | && DECL_OMP_PRIVATIZED_MEMBER (decl)(((contains_struct_check (((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2404, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2404, __FUNCTION__))->decl_common.lang_specific)->u.base .anticipated_p)) |
2405 | return true; |
2406 | if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL) && DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2406, __FUNCTION__))->decl_minimal.context) && is_capture_proxy (decl)) |
2407 | return true; |
2408 | return false; |
2409 | } |
2410 | |
2411 | /* Fold expression X which is used as an rvalue if RVAL is true. */ |
2412 | |
2413 | static tree |
2414 | cp_fold_maybe_rvalue (tree x, bool rval, fold_flags_t flags) |
2415 | { |
2416 | while (true) |
2417 | { |
2418 | x = cp_fold (x, flags); |
2419 | if (rval) |
2420 | x = mark_rvalue_use (x); |
2421 | if (rval && DECL_P (x)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (x)->base.code))] == tcc_declaration) |
2422 | && !TYPE_REF_P (TREE_TYPE (x))(((enum tree_code) (((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2422, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE )) |
2423 | { |
2424 | tree v = decl_constant_value (x); |
2425 | if (v != x && v != error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
2426 | { |
2427 | x = v; |
2428 | continue; |
2429 | } |
2430 | } |
2431 | break; |
2432 | } |
2433 | return x; |
2434 | } |
2435 | |
2436 | tree |
2437 | cp_fold_maybe_rvalue (tree x, bool rval) |
2438 | { |
2439 | return cp_fold_maybe_rvalue (x, rval, ff_none); |
2440 | } |
2441 | |
2442 | /* Fold expression X which is used as an rvalue. */ |
2443 | |
2444 | static tree |
2445 | cp_fold_rvalue (tree x, fold_flags_t flags) |
2446 | { |
2447 | return cp_fold_maybe_rvalue (x, true, flags); |
2448 | } |
2449 | |
2450 | tree |
2451 | cp_fold_rvalue (tree x) |
2452 | { |
2453 | return cp_fold_rvalue (x, ff_none); |
2454 | } |
2455 | |
2456 | /* Perform folding on expression X. */ |
2457 | |
2458 | static tree |
2459 | cp_fully_fold (tree x, mce_value manifestly_const_eval) |
2460 | { |
2461 | if (processing_template_declscope_chain->x_processing_template_decl) |
2462 | return x; |
2463 | /* FIXME cp_fold ought to be a superset of maybe_constant_value so we don't |
2464 | have to call both. */ |
2465 | if (cxx_dialect >= cxx11) |
2466 | { |
2467 | x = maybe_constant_value (x, /*decl=*/NULL_TREE(tree) nullptr, manifestly_const_eval); |
2468 | /* Sometimes we are given a CONSTRUCTOR but the call above wraps it into |
2469 | a TARGET_EXPR; undo that here. */ |
2470 | if (TREE_CODE (x)((enum tree_code) (x)->base.code) == TARGET_EXPR) |
2471 | x = TARGET_EXPR_INITIAL (x)(*(tree_operand_check_code ((x), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2471, __FUNCTION__))); |
2472 | else if (TREE_CODE (x)((enum tree_code) (x)->base.code) == VIEW_CONVERT_EXPR |
2473 | && TREE_CODE (TREE_OPERAND (x, 0))((enum tree_code) ((*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2473, __FUNCTION__))))))->base.code) == CONSTRUCTOR |
2474 | && TREE_TYPE (TREE_OPERAND (x, 0))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2474, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2474, __FUNCTION__))->typed.type) == TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2474, __FUNCTION__))->typed.type)) |
2475 | x = TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2475, __FUNCTION__))))); |
2476 | } |
2477 | fold_flags_t flags = ff_none; |
2478 | if (manifestly_const_eval == mce_false) |
2479 | flags |= ff_mce_false; |
2480 | return cp_fold_rvalue (x, flags); |
2481 | } |
2482 | |
2483 | tree |
2484 | cp_fully_fold (tree x) |
2485 | { |
2486 | return cp_fully_fold (x, mce_unknown); |
2487 | } |
2488 | |
2489 | /* Likewise, but also fold recursively, which cp_fully_fold doesn't perform |
2490 | in some cases. */ |
2491 | |
2492 | tree |
2493 | cp_fully_fold_init (tree x) |
2494 | { |
2495 | if (processing_template_declscope_chain->x_processing_template_decl) |
2496 | return x; |
2497 | x = cp_fully_fold (x, mce_false); |
2498 | cp_fold_data data (ff_mce_false); |
2499 | cp_walk_tree (&x, cp_fold_r, &data, NULL)walk_tree_1 (&x, cp_fold_r, &data, nullptr, cp_walk_subtrees ); |
2500 | return x; |
2501 | } |
2502 | |
2503 | /* c-common interface to cp_fold. If IN_INIT, this is in a static initializer |
2504 | and certain changes are made to the folding done. Or should be (FIXME). We |
2505 | never touch maybe_const, as it is only used for the C front-end |
2506 | C_MAYBE_CONST_EXPR. */ |
2507 | |
2508 | tree |
2509 | c_fully_fold (tree x, bool /*in_init*/, bool */*maybe_const*/, bool lval) |
2510 | { |
2511 | return cp_fold_maybe_rvalue (x, !lval); |
2512 | } |
2513 | |
2514 | static GTY((deletable)) hash_map<tree, tree> *fold_caches[2]; |
2515 | |
2516 | /* Subroutine of cp_fold. Returns which fold cache to use according |
2517 | to the given flags. We need multiple caches since the result of |
2518 | folding may depend on which flags are used. */ |
2519 | |
2520 | static hash_map<tree, tree> *& |
2521 | get_fold_cache (fold_flags_t flags) |
2522 | { |
2523 | if (flags & ff_mce_false) |
2524 | return fold_caches[1]; |
2525 | else |
2526 | return fold_caches[0]; |
2527 | } |
2528 | |
2529 | /* Dispose of the whole FOLD_CACHE. */ |
2530 | |
2531 | void |
2532 | clear_fold_cache (void) |
2533 | { |
2534 | for (auto& fold_cache : fold_caches) |
2535 | if (fold_cache != NULLnullptr) |
2536 | fold_cache->empty (); |
2537 | } |
2538 | |
2539 | /* This function tries to fold an expression X. |
2540 | To avoid combinatorial explosion, folding results are kept in fold_cache. |
2541 | If X is invalid, we don't fold at all. |
2542 | For performance reasons we don't cache expressions representing a |
2543 | declaration or constant. |
2544 | Function returns X or its folded variant. */ |
2545 | |
2546 | static tree |
2547 | cp_fold (tree x, fold_flags_t flags) |
2548 | { |
2549 | tree op0, op1, op2, op3; |
2550 | tree org_x = x, r = NULL_TREE(tree) nullptr; |
2551 | enum tree_code code; |
2552 | location_t loc; |
2553 | bool rval_ops = true; |
2554 | |
2555 | if (!x || x == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
2556 | return x; |
2557 | |
2558 | if (EXPR_P (x)((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (x)->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (x)->base.code))]) <= tcc_expression) && (!TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2558, __FUNCTION__))->typed.type) || TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2558, __FUNCTION__))->typed.type) == error_mark_nodeglobal_trees[TI_ERROR_MARK])) |
2559 | return x; |
2560 | |
2561 | /* Don't bother to cache DECLs or constants. */ |
2562 | if (DECL_P (x)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (x)->base.code))] == tcc_declaration) || CONSTANT_CLASS_P (x)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (x)->base.code))] == tcc_constant)) |
2563 | return x; |
2564 | |
2565 | auto& fold_cache = get_fold_cache (flags); |
2566 | if (fold_cache == NULLnullptr) |
2567 | fold_cache = hash_map<tree, tree>::create_ggc (101); |
2568 | |
2569 | if (tree *cached = fold_cache->get (x)) |
2570 | return *cached; |
2571 | |
2572 | uid_sensitive_constexpr_evaluation_checker c; |
2573 | |
2574 | code = TREE_CODE (x)((enum tree_code) (x)->base.code); |
2575 | switch (code) |
2576 | { |
2577 | case CLEANUP_POINT_EXPR: |
2578 | /* Strip CLEANUP_POINT_EXPR if the expression doesn't have side |
2579 | effects. */ |
2580 | r = cp_fold_rvalue (TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2580, __FUNCTION__))))), flags); |
2581 | if (!TREE_SIDE_EFFECTS (r)((non_type_check ((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2581, __FUNCTION__))->base.side_effects_flag)) |
2582 | x = r; |
2583 | break; |
2584 | |
2585 | case SIZEOF_EXPR: |
2586 | x = fold_sizeof_expr (x); |
2587 | break; |
2588 | |
2589 | case VIEW_CONVERT_EXPR: |
2590 | rval_ops = false; |
2591 | /* FALLTHRU */ |
2592 | case NON_LVALUE_EXPR: |
2593 | CASE_CONVERTcase NOP_EXPR: case CONVERT_EXPR: |
2594 | |
2595 | if (VOID_TYPE_P (TREE_TYPE (x))(((enum tree_code) (((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2595, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE )) |
2596 | { |
2597 | /* This is just to make sure we don't end up with casts to |
2598 | void from error_mark_node. If we just return x, then |
2599 | cp_fold_r might fold the operand into error_mark_node and |
2600 | leave the conversion in the IR. STRIP_USELESS_TYPE_CONVERSION |
2601 | during gimplification doesn't like such casts. |
2602 | Don't create a new tree if op0 != TREE_OPERAND (x, 0), the |
2603 | folding of the operand should be in the caches and if in cp_fold_r |
2604 | it will modify it in place. */ |
2605 | op0 = cp_fold (TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2605, __FUNCTION__))))), flags); |
2606 | if (op0 == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
2607 | x = error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
2608 | break; |
2609 | } |
2610 | |
2611 | loc = EXPR_LOCATION (x)((((x)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((x))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((x))->base.code))]) <= tcc_expression )) ? (x)->exp.locus : ((location_t) 0)); |
2612 | op0 = cp_fold_maybe_rvalue (TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2612, __FUNCTION__))))), rval_ops, flags); |
2613 | |
2614 | if (code == CONVERT_EXPR |
2615 | && SCALAR_TYPE_P (TREE_TYPE (x))((((enum tree_code) (((contains_struct_check ((x), (TS_TYPED) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2615, __FUNCTION__))->typed.type))->base.code) == OFFSET_TYPE ) || ((enum tree_code) (((contains_struct_check ((x), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2615, __FUNCTION__))->typed.type))->base.code) == ENUMERAL_TYPE || ((((enum tree_code) (((contains_struct_check ((x), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2615, __FUNCTION__))->typed.type))->base.code) == BOOLEAN_TYPE || ((enum tree_code) (((contains_struct_check ((x), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2615, __FUNCTION__))->typed.type))->base.code) == INTEGER_TYPE ) || ((enum tree_code) (((contains_struct_check ((x), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2615, __FUNCTION__))->typed.type))->base.code) == REAL_TYPE || ((enum tree_code) (((contains_struct_check ((x), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2615, __FUNCTION__))->typed.type))->base.code) == COMPLEX_TYPE ) || (((enum tree_code) (((contains_struct_check ((x), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2615, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE ) || (((enum tree_code) (((contains_struct_check ((x), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2615, __FUNCTION__))->typed.type))->base.code) == RECORD_TYPE && (((tree_class_check (((tree_check ((((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2615, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2615, __FUNCTION__, (RECORD_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2615, __FUNCTION__))->type_common.lang_flag_2))) || (((enum tree_code) (((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2615, __FUNCTION__))->typed.type))->base.code) == NULLPTR_TYPE )) |
2616 | && op0 != void_nodeglobal_trees[TI_VOID]) |
2617 | /* During parsing we used convert_to_*_nofold; re-convert now using the |
2618 | folding variants, since fold() doesn't do those transformations. */ |
2619 | x = fold (convert (TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2619, __FUNCTION__))->typed.type), op0)); |
2620 | else if (op0 != TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2620, __FUNCTION__)))))) |
2621 | { |
2622 | if (op0 == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
2623 | x = error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
2624 | else |
2625 | x = fold_build1_loc (loc, code, TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2625, __FUNCTION__))->typed.type), op0); |
2626 | } |
2627 | else |
2628 | x = fold (x); |
2629 | |
2630 | /* Conversion of an out-of-range value has implementation-defined |
2631 | behavior; the language considers it different from arithmetic |
2632 | overflow, which is undefined. */ |
2633 | if (TREE_CODE (op0)((enum tree_code) (op0)->base.code) == INTEGER_CST |
2634 | && TREE_OVERFLOW_P (x)((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (x)->base.code))] == tcc_constant) && ( (tree_class_check ((x), (tcc_constant), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2634, __FUNCTION__))->base.public_flag)) && !TREE_OVERFLOW_P (op0)((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (op0)->base.code))] == tcc_constant) && ((tree_class_check ((op0), (tcc_constant), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2634, __FUNCTION__))->base.public_flag))) |
2635 | TREE_OVERFLOW (x)((tree_class_check ((x), (tcc_constant), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2635, __FUNCTION__))->base.public_flag) = false; |
2636 | |
2637 | break; |
2638 | |
2639 | case EXCESS_PRECISION_EXPR: |
2640 | op0 = cp_fold_maybe_rvalue (TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2640, __FUNCTION__))))), rval_ops, flags); |
2641 | x = fold_convert_loc (EXPR_LOCATION (x)((((x)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((x))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((x))->base.code))]) <= tcc_expression )) ? (x)->exp.locus : ((location_t) 0)), TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2641, __FUNCTION__))->typed.type), op0); |
2642 | break; |
2643 | |
2644 | case INDIRECT_REF: |
2645 | /* We don't need the decltype(auto) obfuscation anymore. */ |
2646 | if (REF_PARENTHESIZED_P (x)((tree_not_check2 (((tree_check5 (((x)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2646, __FUNCTION__, (COMPONENT_REF), (INDIRECT_REF), (SCOPE_REF ), (VIEW_CONVERT_EXPR), (PAREN_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2646, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2)) |
2647 | { |
2648 | tree p = maybe_undo_parenthesized_ref (x); |
2649 | if (p != x) |
2650 | return cp_fold (p, flags); |
2651 | } |
2652 | goto unary; |
2653 | |
2654 | case ADDR_EXPR: |
2655 | loc = EXPR_LOCATION (x)((((x)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((x))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((x))->base.code))]) <= tcc_expression )) ? (x)->exp.locus : ((location_t) 0)); |
2656 | op0 = cp_fold_maybe_rvalue (TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2656, __FUNCTION__))))), false, flags); |
2657 | |
2658 | /* Cope with user tricks that amount to offsetof. */ |
2659 | if (op0 != error_mark_nodeglobal_trees[TI_ERROR_MARK] |
2660 | && !FUNC_OR_METHOD_TYPE_P (TREE_TYPE (op0))(((enum tree_code) (((contains_struct_check ((op0), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2660, __FUNCTION__))->typed.type))->base.code) == FUNCTION_TYPE || ((enum tree_code) (((contains_struct_check ((op0), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2660, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE )) |
2661 | { |
2662 | tree val = get_base_address (op0); |
2663 | if (val |
2664 | && INDIRECT_REF_P (val)(((enum tree_code) (val)->base.code) == INDIRECT_REF) |
2665 | && COMPLETE_TYPE_P (TREE_TYPE (val))(((tree_class_check ((((contains_struct_check ((val), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2665, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2665, __FUNCTION__))->type_common.size) != (tree) nullptr ) |
2666 | && TREE_CONSTANT (TREE_OPERAND (val, 0))((non_type_check (((*((const_cast<tree*> (tree_operand_check ((val), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2666, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2666, __FUNCTION__))->base.constant_flag)) |
2667 | { |
2668 | val = TREE_OPERAND (val, 0)(*((const_cast<tree*> (tree_operand_check ((val), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2668, __FUNCTION__))))); |
2669 | STRIP_NOPS (val)(val) = tree_strip_nop_conversions ((const_cast<union tree_node *> (((val))))); |
2670 | val = maybe_constant_value (val); |
2671 | if (TREE_CODE (val)((enum tree_code) (val)->base.code) == INTEGER_CST) |
2672 | return fold_offsetof (op0, TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2672, __FUNCTION__))->typed.type)); |
2673 | } |
2674 | } |
2675 | goto finish_unary; |
2676 | |
2677 | case REALPART_EXPR: |
2678 | case IMAGPART_EXPR: |
2679 | rval_ops = false; |
2680 | /* FALLTHRU */ |
2681 | case CONJ_EXPR: |
2682 | case FIX_TRUNC_EXPR: |
2683 | case FLOAT_EXPR: |
2684 | case NEGATE_EXPR: |
2685 | case ABS_EXPR: |
2686 | case ABSU_EXPR: |
2687 | case BIT_NOT_EXPR: |
2688 | case TRUTH_NOT_EXPR: |
2689 | case FIXED_CONVERT_EXPR: |
2690 | unary: |
2691 | |
2692 | loc = EXPR_LOCATION (x)((((x)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((x))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((x))->base.code))]) <= tcc_expression )) ? (x)->exp.locus : ((location_t) 0)); |
2693 | op0 = cp_fold_maybe_rvalue (TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2693, __FUNCTION__))))), rval_ops, flags); |
2694 | |
2695 | finish_unary: |
2696 | if (op0 != TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2696, __FUNCTION__)))))) |
2697 | { |
2698 | if (op0 == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
2699 | x = error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
2700 | else |
2701 | { |
2702 | x = fold_build1_loc (loc, code, TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2702, __FUNCTION__))->typed.type), op0); |
2703 | if (code == INDIRECT_REF |
2704 | && (INDIRECT_REF_P (x)(((enum tree_code) (x)->base.code) == INDIRECT_REF) || TREE_CODE (x)((enum tree_code) (x)->base.code) == MEM_REF)) |
2705 | { |
2706 | TREE_READONLY (x)((non_type_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2706, __FUNCTION__))->base.readonly_flag) = TREE_READONLY (org_x)((non_type_check ((org_x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2706, __FUNCTION__))->base.readonly_flag); |
2707 | TREE_SIDE_EFFECTS (x)((non_type_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2707, __FUNCTION__))->base.side_effects_flag) = TREE_SIDE_EFFECTS (org_x)((non_type_check ((org_x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2707, __FUNCTION__))->base.side_effects_flag); |
2708 | TREE_THIS_VOLATILE (x)((x)->base.volatile_flag) = TREE_THIS_VOLATILE (org_x)((org_x)->base.volatile_flag); |
2709 | } |
2710 | } |
2711 | } |
2712 | else |
2713 | x = fold (x); |
2714 | |
2715 | gcc_assert (TREE_CODE (x) != COND_EXPR((void)(!(((enum tree_code) (x)->base.code) != COND_EXPR || !(((enum tree_code) (((contains_struct_check (((*((const_cast <tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2716, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2716, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2716, __FUNCTION__), 0 : 0)) |
2716 | || !VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (x, 0))))((void)(!(((enum tree_code) (x)->base.code) != COND_EXPR || !(((enum tree_code) (((contains_struct_check (((*((const_cast <tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2716, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2716, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2716, __FUNCTION__), 0 : 0)); |
2717 | break; |
2718 | |
2719 | case UNARY_PLUS_EXPR: |
2720 | op0 = cp_fold_rvalue (TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2720, __FUNCTION__))))), flags); |
2721 | if (op0 == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
2722 | x = error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
2723 | else |
2724 | x = fold_convert (TREE_TYPE (x), op0)fold_convert_loc (((location_t) 0), ((contains_struct_check ( (x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2724, __FUNCTION__))->typed.type), op0); |
2725 | break; |
2726 | |
2727 | case POSTDECREMENT_EXPR: |
2728 | case POSTINCREMENT_EXPR: |
2729 | case INIT_EXPR: |
2730 | case PREDECREMENT_EXPR: |
2731 | case PREINCREMENT_EXPR: |
2732 | case COMPOUND_EXPR: |
2733 | case MODIFY_EXPR: |
2734 | rval_ops = false; |
2735 | /* FALLTHRU */ |
2736 | case POINTER_PLUS_EXPR: |
2737 | case PLUS_EXPR: |
2738 | case POINTER_DIFF_EXPR: |
2739 | case MINUS_EXPR: |
2740 | case MULT_EXPR: |
2741 | case TRUNC_DIV_EXPR: |
2742 | case CEIL_DIV_EXPR: |
2743 | case FLOOR_DIV_EXPR: |
2744 | case ROUND_DIV_EXPR: |
2745 | case TRUNC_MOD_EXPR: |
2746 | case CEIL_MOD_EXPR: |
2747 | case ROUND_MOD_EXPR: |
2748 | case RDIV_EXPR: |
2749 | case EXACT_DIV_EXPR: |
2750 | case MIN_EXPR: |
2751 | case MAX_EXPR: |
2752 | case LSHIFT_EXPR: |
2753 | case RSHIFT_EXPR: |
2754 | case LROTATE_EXPR: |
2755 | case RROTATE_EXPR: |
2756 | case BIT_AND_EXPR: |
2757 | case BIT_IOR_EXPR: |
2758 | case BIT_XOR_EXPR: |
2759 | case TRUTH_AND_EXPR: |
2760 | case TRUTH_ANDIF_EXPR: |
2761 | case TRUTH_OR_EXPR: |
2762 | case TRUTH_ORIF_EXPR: |
2763 | case TRUTH_XOR_EXPR: |
2764 | case LT_EXPR: case LE_EXPR: |
2765 | case GT_EXPR: case GE_EXPR: |
2766 | case EQ_EXPR: case NE_EXPR: |
2767 | case UNORDERED_EXPR: case ORDERED_EXPR: |
2768 | case UNLT_EXPR: case UNLE_EXPR: |
2769 | case UNGT_EXPR: case UNGE_EXPR: |
2770 | case UNEQ_EXPR: case LTGT_EXPR: |
2771 | case RANGE_EXPR: case COMPLEX_EXPR: |
2772 | |
2773 | loc = EXPR_LOCATION (x)((((x)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((x))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((x))->base.code))]) <= tcc_expression )) ? (x)->exp.locus : ((location_t) 0)); |
2774 | op0 = cp_fold_maybe_rvalue (TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2774, __FUNCTION__))))), rval_ops, flags); |
2775 | op1 = cp_fold_rvalue (TREE_OPERAND (x, 1)(*((const_cast<tree*> (tree_operand_check ((x), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2775, __FUNCTION__))))), flags); |
2776 | |
2777 | /* decltype(nullptr) has only one value, so optimize away all comparisons |
2778 | with that type right away, keeping them in the IL causes troubles for |
2779 | various optimizations. */ |
2780 | if (COMPARISON_CLASS_P (org_x)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (org_x)->base.code))] == tcc_comparison) |
2781 | && TREE_CODE (TREE_TYPE (op0))((enum tree_code) (((contains_struct_check ((op0), (TS_TYPED) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2781, __FUNCTION__))->typed.type))->base.code) == NULLPTR_TYPE |
2782 | && TREE_CODE (TREE_TYPE (op1))((enum tree_code) (((contains_struct_check ((op1), (TS_TYPED) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2782, __FUNCTION__))->typed.type))->base.code) == NULLPTR_TYPE) |
2783 | { |
2784 | switch (code) |
2785 | { |
2786 | case EQ_EXPR: |
2787 | x = constant_boolean_node (true, TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2787, __FUNCTION__))->typed.type)); |
2788 | break; |
2789 | case NE_EXPR: |
2790 | x = constant_boolean_node (false, TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2790, __FUNCTION__))->typed.type)); |
2791 | break; |
2792 | default: |
2793 | gcc_unreachable ()(fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2793, __FUNCTION__)); |
2794 | } |
2795 | return omit_two_operands_loc (loc, TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2795, __FUNCTION__))->typed.type), x, |
2796 | op0, op1); |
2797 | } |
2798 | |
2799 | if (op0 != TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2799, __FUNCTION__))))) || op1 != TREE_OPERAND (x, 1)(*((const_cast<tree*> (tree_operand_check ((x), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2799, __FUNCTION__)))))) |
2800 | { |
2801 | if (op0 == error_mark_nodeglobal_trees[TI_ERROR_MARK] || op1 == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
2802 | x = error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
2803 | else |
2804 | x = fold_build2_loc (loc, code, TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2804, __FUNCTION__))->typed.type), op0, op1); |
2805 | } |
2806 | else |
2807 | x = fold (x); |
2808 | |
2809 | /* This is only needed for -Wnonnull-compare and only if |
2810 | TREE_NO_WARNING (org_x), but to avoid that option affecting code |
2811 | generation, we do it always. */ |
2812 | if (COMPARISON_CLASS_P (org_x)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (org_x)->base.code))] == tcc_comparison)) |
2813 | { |
2814 | if (x == error_mark_nodeglobal_trees[TI_ERROR_MARK] || TREE_CODE (x)((enum tree_code) (x)->base.code) == INTEGER_CST) |
2815 | ; |
2816 | else if (COMPARISON_CLASS_P (x)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (x)->base.code))] == tcc_comparison)) |
2817 | { |
2818 | if (warn_nonnull_compareglobal_options.x_warn_nonnull_compare |
2819 | && warning_suppressed_p (org_x, OPT_Wnonnull_compare)) |
2820 | suppress_warning (x, OPT_Wnonnull_compare); |
2821 | } |
2822 | /* Otherwise give up on optimizing these, let GIMPLE folders |
2823 | optimize those later on. */ |
2824 | else if (op0 != TREE_OPERAND (org_x, 0)(*((const_cast<tree*> (tree_operand_check ((org_x), (0) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2824, __FUNCTION__))))) |
2825 | || op1 != TREE_OPERAND (org_x, 1)(*((const_cast<tree*> (tree_operand_check ((org_x), (1) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2825, __FUNCTION__)))))) |
2826 | { |
2827 | x = build2_loc (loc, code, TREE_TYPE (org_x)((contains_struct_check ((org_x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2827, __FUNCTION__))->typed.type), op0, op1); |
2828 | if (warn_nonnull_compareglobal_options.x_warn_nonnull_compare |
2829 | && warning_suppressed_p (org_x, OPT_Wnonnull_compare)) |
2830 | suppress_warning (x, OPT_Wnonnull_compare); |
2831 | } |
2832 | else |
2833 | x = org_x; |
2834 | } |
2835 | |
2836 | break; |
2837 | |
2838 | case VEC_COND_EXPR: |
2839 | case COND_EXPR: |
2840 | loc = EXPR_LOCATION (x)((((x)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((x))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((x))->base.code))]) <= tcc_expression )) ? (x)->exp.locus : ((location_t) 0)); |
2841 | op0 = cp_fold_rvalue (TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2841, __FUNCTION__))))), flags); |
2842 | op1 = cp_fold (TREE_OPERAND (x, 1)(*((const_cast<tree*> (tree_operand_check ((x), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2842, __FUNCTION__))))), flags); |
2843 | op2 = cp_fold (TREE_OPERAND (x, 2)(*((const_cast<tree*> (tree_operand_check ((x), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2843, __FUNCTION__))))), flags); |
2844 | |
2845 | if (TREE_CODE (TREE_TYPE (x))((enum tree_code) (((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2845, __FUNCTION__))->typed.type))->base.code) == BOOLEAN_TYPE) |
2846 | { |
2847 | warning_sentinel s (warn_int_in_bool_contextglobal_options.x_warn_int_in_bool_context); |
2848 | if (!VOID_TYPE_P (TREE_TYPE (op1))(((enum tree_code) (((contains_struct_check ((op1), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2848, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE )) |
2849 | op1 = cp_truthvalue_conversion (op1, tf_warning_or_error); |
2850 | if (!VOID_TYPE_P (TREE_TYPE (op2))(((enum tree_code) (((contains_struct_check ((op2), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2850, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE )) |
2851 | op2 = cp_truthvalue_conversion (op2, tf_warning_or_error); |
2852 | } |
2853 | else if (VOID_TYPE_P (TREE_TYPE (x))(((enum tree_code) (((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2853, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE )) |
2854 | { |
2855 | if (TREE_CODE (op0)((enum tree_code) (op0)->base.code) == INTEGER_CST) |
2856 | { |
2857 | /* If the condition is constant, fold can fold away |
2858 | the COND_EXPR. If some statement-level uses of COND_EXPR |
2859 | have one of the branches NULL, avoid folding crash. */ |
2860 | if (!op1) |
2861 | op1 = build_empty_stmt (loc); |
2862 | if (!op2) |
2863 | op2 = build_empty_stmt (loc); |
2864 | } |
2865 | else |
2866 | { |
2867 | /* Otherwise, don't bother folding a void condition, since |
2868 | it can't produce a constant value. */ |
2869 | if (op0 != TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2869, __FUNCTION__))))) |
2870 | || op1 != TREE_OPERAND (x, 1)(*((const_cast<tree*> (tree_operand_check ((x), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2870, __FUNCTION__))))) |
2871 | || op2 != TREE_OPERAND (x, 2)(*((const_cast<tree*> (tree_operand_check ((x), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2871, __FUNCTION__)))))) |
2872 | x = build3_loc (loc, code, TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2872, __FUNCTION__))->typed.type), op0, op1, op2); |
2873 | break; |
2874 | } |
2875 | } |
2876 | |
2877 | if (op0 != TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2877, __FUNCTION__))))) |
2878 | || op1 != TREE_OPERAND (x, 1)(*((const_cast<tree*> (tree_operand_check ((x), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2878, __FUNCTION__))))) |
2879 | || op2 != TREE_OPERAND (x, 2)(*((const_cast<tree*> (tree_operand_check ((x), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2879, __FUNCTION__)))))) |
2880 | { |
2881 | if (op0 == error_mark_nodeglobal_trees[TI_ERROR_MARK] |
2882 | || op1 == error_mark_nodeglobal_trees[TI_ERROR_MARK] |
2883 | || op2 == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
2884 | x = error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
2885 | else |
2886 | x = fold_build3_loc (loc, code, TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2886, __FUNCTION__))->typed.type), op0, op1, op2); |
2887 | } |
2888 | else |
2889 | x = fold (x); |
2890 | |
2891 | /* A COND_EXPR might have incompatible types in branches if one or both |
2892 | arms are bitfields. If folding exposed such a branch, fix it up. */ |
2893 | if (TREE_CODE (x)((enum tree_code) (x)->base.code) != code |
2894 | && x != error_mark_nodeglobal_trees[TI_ERROR_MARK] |
2895 | && !useless_type_conversion_p (TREE_TYPE (org_x)((contains_struct_check ((org_x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2895, __FUNCTION__))->typed.type), TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2895, __FUNCTION__))->typed.type))) |
2896 | x = fold_convert (TREE_TYPE (org_x), x)fold_convert_loc (((location_t) 0), ((contains_struct_check ( (org_x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2896, __FUNCTION__))->typed.type), x); |
2897 | |
2898 | break; |
2899 | |
2900 | case CALL_EXPR: |
2901 | { |
2902 | tree callee = get_callee_fndecl (x); |
2903 | |
2904 | /* "Inline" calls to std::move/forward and other cast-like functions |
2905 | by simply folding them into a corresponding cast to their return |
2906 | type. This is cheaper than relying on the middle end to do so, and |
2907 | also means we avoid generating useless debug info for them at all. |
2908 | |
2909 | At this point the argument has already been converted into a |
2910 | reference, so it suffices to use a NOP_EXPR to express the |
2911 | cast. */ |
2912 | if ((OPTION_SET_P (flag_fold_simple_inlines)global_options_set.x_flag_fold_simple_inlines |
2913 | ? flag_fold_simple_inlinesglobal_options.x_flag_fold_simple_inlines |
2914 | : !flag_no_inlineglobal_options.x_flag_no_inline) |
2915 | && call_expr_nargs (x)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check ((x), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2915, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2915, __FUNCTION__)))) - 3) == 1 |
2916 | && decl_in_std_namespace_p (callee) |
2917 | && DECL_NAME (callee)((contains_struct_check ((callee), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2917, __FUNCTION__))->decl_minimal.name) != NULL_TREE(tree) nullptr |
2918 | && (id_equal (DECL_NAME (callee)((contains_struct_check ((callee), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2918, __FUNCTION__))->decl_minimal.name), "move") |
2919 | || id_equal (DECL_NAME (callee)((contains_struct_check ((callee), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2919, __FUNCTION__))->decl_minimal.name), "forward") |
2920 | || id_equal (DECL_NAME (callee)((contains_struct_check ((callee), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2920, __FUNCTION__))->decl_minimal.name), "addressof") |
2921 | /* This addressof equivalent is used heavily in libstdc++. */ |
2922 | || id_equal (DECL_NAME (callee)((contains_struct_check ((callee), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2922, __FUNCTION__))->decl_minimal.name), "__addressof") |
2923 | || id_equal (DECL_NAME (callee)((contains_struct_check ((callee), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2923, __FUNCTION__))->decl_minimal.name), "as_const"))) |
2924 | { |
2925 | r = CALL_EXPR_ARG (x, 0)(*((const_cast<tree*> (tree_operand_check (((tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2925, __FUNCTION__, (CALL_EXPR)))), ((0) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2925, __FUNCTION__))))); |
2926 | /* Check that the return and argument types are sane before |
2927 | folding. */ |
2928 | if (INDIRECT_TYPE_P (TREE_TYPE (x))((((enum tree_code) (((contains_struct_check ((x), (TS_TYPED) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2928, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE ) || (((enum tree_code) (((contains_struct_check ((x), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2928, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE )) |
2929 | && INDIRECT_TYPE_P (TREE_TYPE (r))((((enum tree_code) (((contains_struct_check ((r), (TS_TYPED) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2929, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE ) || (((enum tree_code) (((contains_struct_check ((r), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2929, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE ))) |
2930 | { |
2931 | if (!same_type_p (TREE_TYPE (x), TREE_TYPE (r))comptypes ((((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2931, __FUNCTION__))->typed.type)), (((contains_struct_check ((r), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2931, __FUNCTION__))->typed.type)), 0)) |
2932 | r = build_nop (TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2932, __FUNCTION__))->typed.type), r); |
2933 | x = cp_fold (r, flags); |
2934 | break; |
2935 | } |
2936 | } |
2937 | |
2938 | int sv = optimizeglobal_options.x_optimize, nw = sv; |
2939 | |
2940 | /* Some built-in function calls will be evaluated at compile-time in |
2941 | fold (). Set optimize to 1 when folding __builtin_constant_p inside |
2942 | a constexpr function so that fold_builtin_1 doesn't fold it to 0. */ |
2943 | if (callee && fndecl_built_in_p (callee) && !optimizeglobal_options.x_optimize |
2944 | && DECL_IS_BUILTIN_CONSTANT_P (callee)(((enum tree_code) (callee)->base.code) == FUNCTION_DECL && ((built_in_class) (tree_check ((callee), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2944, __FUNCTION__, (FUNCTION_DECL)))->function_decl.built_in_class ) == BUILT_IN_NORMAL && DECL_FUNCTION_CODE (callee) == BUILT_IN_CONSTANT_P) |
2945 | && current_function_decl |
2946 | && DECL_DECLARED_CONSTEXPR_P (current_function_decl)((contains_struct_check (((tree_check2 (((((enum tree_code) ( current_function_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast<union tree_node *> (( ((tree_check ((current_function_decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2946, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl )), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2946, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2946, __FUNCTION__))->decl_common.lang_flag_8)) |
2947 | nw = 1; |
2948 | |
2949 | if (callee && fndecl_built_in_p (callee, BUILT_IN_FRONTEND)) |
2950 | { |
2951 | iloc_sentinel ils (EXPR_LOCATION (x)((((x)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((x))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((x))->base.code))]) <= tcc_expression )) ? (x)->exp.locus : ((location_t) 0))); |
2952 | switch (DECL_FE_FUNCTION_CODE (callee)) |
2953 | { |
2954 | case CP_BUILT_IN_IS_CONSTANT_EVALUATED: |
2955 | /* Defer folding __builtin_is_constant_evaluated unless |
2956 | we know this isn't a manifestly constant-evaluated |
2957 | context. */ |
2958 | if (flags & ff_mce_false) |
2959 | x = boolean_false_nodeglobal_trees[TI_BOOLEAN_FALSE]; |
2960 | break; |
2961 | case CP_BUILT_IN_SOURCE_LOCATION: |
2962 | x = fold_builtin_source_location (x); |
2963 | break; |
2964 | case CP_BUILT_IN_IS_CORRESPONDING_MEMBER: |
2965 | x = fold_builtin_is_corresponding_member |
2966 | (EXPR_LOCATION (x)((((x)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((x))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((x))->base.code))]) <= tcc_expression )) ? (x)->exp.locus : ((location_t) 0)), call_expr_nargs (x)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check ((x), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2966, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2966, __FUNCTION__)))) - 3), |
2967 | &CALL_EXPR_ARG (x, 0)(*((const_cast<tree*> (tree_operand_check (((tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2967, __FUNCTION__, (CALL_EXPR)))), ((0) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2967, __FUNCTION__)))))); |
2968 | break; |
2969 | case CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS: |
2970 | x = fold_builtin_is_pointer_inverconvertible_with_class |
2971 | (EXPR_LOCATION (x)((((x)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((x))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((x))->base.code))]) <= tcc_expression )) ? (x)->exp.locus : ((location_t) 0)), call_expr_nargs (x)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check ((x), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2971, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2971, __FUNCTION__)))) - 3), |
2972 | &CALL_EXPR_ARG (x, 0)(*((const_cast<tree*> (tree_operand_check (((tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2972, __FUNCTION__, (CALL_EXPR)))), ((0) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2972, __FUNCTION__)))))); |
2973 | break; |
2974 | default: |
2975 | break; |
2976 | } |
2977 | break; |
2978 | } |
2979 | |
2980 | if (callee |
2981 | && fndecl_built_in_p (callee, CP_BUILT_IN_SOURCE_LOCATION, |
2982 | BUILT_IN_FRONTEND)) |
2983 | { |
2984 | x = fold_builtin_source_location (x); |
2985 | break; |
2986 | } |
2987 | |
2988 | bool changed = false; |
2989 | int m = call_expr_nargs (x)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check ((x), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2989, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2989, __FUNCTION__)))) - 3); |
2990 | for (int i = 0; i < m; i++) |
2991 | { |
2992 | r = cp_fold (CALL_EXPR_ARG (x, i)(*((const_cast<tree*> (tree_operand_check (((tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2992, __FUNCTION__, (CALL_EXPR)))), ((i) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2992, __FUNCTION__))))), flags); |
2993 | if (r != CALL_EXPR_ARG (x, i)(*((const_cast<tree*> (tree_operand_check (((tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2993, __FUNCTION__, (CALL_EXPR)))), ((i) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 2993, __FUNCTION__)))))) |
2994 | { |
2995 | if (r == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
2996 | { |
2997 | x = error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
2998 | break; |
2999 | } |
3000 | if (!changed) |
3001 | x = copy_node (x); |
3002 | CALL_EXPR_ARG (x, i)(*((const_cast<tree*> (tree_operand_check (((tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3002, __FUNCTION__, (CALL_EXPR)))), ((i) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3002, __FUNCTION__))))) = r; |
3003 | changed = true; |
3004 | } |
3005 | } |
3006 | if (x == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
3007 | break; |
3008 | |
3009 | optimizeglobal_options.x_optimize = nw; |
3010 | r = fold (x); |
3011 | optimizeglobal_options.x_optimize = sv; |
3012 | |
3013 | if (TREE_CODE (r)((enum tree_code) (r)->base.code) != CALL_EXPR) |
3014 | { |
3015 | x = cp_fold (r, flags); |
3016 | break; |
3017 | } |
3018 | |
3019 | optimizeglobal_options.x_optimize = nw; |
3020 | |
3021 | /* Invoke maybe_constant_value for functions declared |
3022 | constexpr and not called with AGGR_INIT_EXPRs. |
3023 | TODO: |
3024 | Do constexpr expansion of expressions where the call itself is not |
3025 | constant, but the call followed by an INDIRECT_REF is. */ |
3026 | if (callee && DECL_DECLARED_CONSTEXPR_P (callee)((contains_struct_check (((tree_check2 (((((enum tree_code) ( callee)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((callee ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3026, __FUNCTION__, (TEMPLATE_DECL))))))))->result : callee )), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3026, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3026, __FUNCTION__))->decl_common.lang_flag_8) |
3027 | && !flag_no_inlineglobal_options.x_flag_no_inline) |
3028 | { |
3029 | mce_value manifestly_const_eval = mce_unknown; |
3030 | if (flags & ff_mce_false) |
3031 | /* Allow folding __builtin_is_constant_evaluated to false during |
3032 | constexpr evaluation of this call. */ |
3033 | manifestly_const_eval = mce_false; |
3034 | r = maybe_constant_value (x, /*decl=*/NULL_TREE(tree) nullptr, |
3035 | manifestly_const_eval); |
3036 | } |
3037 | optimizeglobal_options.x_optimize = sv; |
3038 | |
3039 | if (TREE_CODE (r)((enum tree_code) (r)->base.code) != CALL_EXPR) |
3040 | { |
3041 | if (DECL_CONSTRUCTOR_P (callee)((tree_check (((((enum tree_code) (callee)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((callee), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3041, __FUNCTION__, (TEMPLATE_DECL))))))))->result : callee )), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3041, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor )) |
3042 | { |
3043 | loc = EXPR_LOCATION (x)((((x)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((x))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((x))->base.code))]) <= tcc_expression )) ? (x)->exp.locus : ((location_t) 0)); |
3044 | tree s = build_fold_indirect_ref_loc (loc, |
3045 | CALL_EXPR_ARG (x, 0)(*((const_cast<tree*> (tree_operand_check (((tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3045, __FUNCTION__, (CALL_EXPR)))), ((0) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3045, __FUNCTION__)))))); |
3046 | r = cp_build_init_expr (s, r); |
3047 | } |
3048 | x = r; |
3049 | break; |
3050 | } |
3051 | |
3052 | break; |
3053 | } |
3054 | |
3055 | case CONSTRUCTOR: |
3056 | { |
3057 | unsigned i; |
3058 | constructor_elt *p; |
3059 | vec<constructor_elt, va_gc> *elts = CONSTRUCTOR_ELTS (x)((tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3059, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts); |
3060 | vec<constructor_elt, va_gc> *nelts = NULLnullptr; |
3061 | FOR_EACH_VEC_SAFE_ELT (elts, i, p)for (i = 0; vec_safe_iterate ((elts), (i), &(p)); ++(i)) |
3062 | { |
3063 | tree op = cp_fold (p->value, flags); |
3064 | if (op != p->value) |
3065 | { |
3066 | if (op == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
3067 | { |
3068 | x = error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
3069 | vec_free (nelts); |
3070 | break; |
3071 | } |
3072 | if (nelts == NULLnullptr) |
3073 | nelts = elts->copy (); |
3074 | (*nelts)[i].value = op; |
3075 | } |
3076 | } |
3077 | if (nelts) |
3078 | { |
3079 | x = build_constructor (TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3079, __FUNCTION__))->typed.type), nelts); |
3080 | CONSTRUCTOR_PLACEHOLDER_BOUNDARY (x)(((tree_not_check2 (((tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3080, __FUNCTION__, (CONSTRUCTOR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3080, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5)) |
3081 | = CONSTRUCTOR_PLACEHOLDER_BOUNDARY (org_x)(((tree_not_check2 (((tree_check ((org_x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3081, __FUNCTION__, (CONSTRUCTOR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3081, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5)); |
3082 | } |
3083 | if (VECTOR_TYPE_P (TREE_TYPE (x))(((enum tree_code) (((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3083, __FUNCTION__))->typed.type))->base.code) == VECTOR_TYPE )) |
3084 | x = fold (x); |
3085 | break; |
3086 | } |
3087 | case TREE_VEC: |
3088 | { |
3089 | bool changed = false; |
3090 | int n = TREE_VEC_LENGTH (x)((tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3090, __FUNCTION__, (TREE_VEC)))->base.u.length); |
3091 | |
3092 | for (int i = 0; i < n; i++) |
3093 | { |
3094 | tree op = cp_fold (TREE_VEC_ELT (x, i)(*((const_cast<tree *> (tree_vec_elt_check ((x), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3094, __FUNCTION__))))), flags); |
3095 | if (op != TREE_VEC_ELT (x, i)(*((const_cast<tree *> (tree_vec_elt_check ((x), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3095, __FUNCTION__)))))) |
3096 | { |
3097 | if (!changed) |
3098 | x = copy_node (x); |
3099 | TREE_VEC_ELT (x, i)(*((const_cast<tree *> (tree_vec_elt_check ((x), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3099, __FUNCTION__))))) = op; |
3100 | changed = true; |
3101 | } |
3102 | } |
3103 | } |
3104 | |
3105 | break; |
3106 | |
3107 | case ARRAY_REF: |
3108 | case ARRAY_RANGE_REF: |
3109 | |
3110 | loc = EXPR_LOCATION (x)((((x)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((x))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((x))->base.code))]) <= tcc_expression )) ? (x)->exp.locus : ((location_t) 0)); |
3111 | op0 = cp_fold (TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3111, __FUNCTION__))))), flags); |
3112 | op1 = cp_fold (TREE_OPERAND (x, 1)(*((const_cast<tree*> (tree_operand_check ((x), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3112, __FUNCTION__))))), flags); |
3113 | op2 = cp_fold (TREE_OPERAND (x, 2)(*((const_cast<tree*> (tree_operand_check ((x), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3113, __FUNCTION__))))), flags); |
3114 | op3 = cp_fold (TREE_OPERAND (x, 3)(*((const_cast<tree*> (tree_operand_check ((x), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3114, __FUNCTION__))))), flags); |
3115 | |
3116 | if (op0 != TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3116, __FUNCTION__))))) |
3117 | || op1 != TREE_OPERAND (x, 1)(*((const_cast<tree*> (tree_operand_check ((x), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3117, __FUNCTION__))))) |
3118 | || op2 != TREE_OPERAND (x, 2)(*((const_cast<tree*> (tree_operand_check ((x), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3118, __FUNCTION__))))) |
3119 | || op3 != TREE_OPERAND (x, 3)(*((const_cast<tree*> (tree_operand_check ((x), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3119, __FUNCTION__)))))) |
3120 | { |
3121 | if (op0 == error_mark_nodeglobal_trees[TI_ERROR_MARK] |
3122 | || op1 == error_mark_nodeglobal_trees[TI_ERROR_MARK] |
3123 | || op2 == error_mark_nodeglobal_trees[TI_ERROR_MARK] |
3124 | || op3 == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
3125 | x = error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
3126 | else |
3127 | { |
3128 | x = build4_loc (loc, code, TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3128, __FUNCTION__))->typed.type), op0, op1, op2, op3); |
3129 | TREE_READONLY (x)((non_type_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3129, __FUNCTION__))->base.readonly_flag) = TREE_READONLY (org_x)((non_type_check ((org_x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3129, __FUNCTION__))->base.readonly_flag); |
3130 | TREE_SIDE_EFFECTS (x)((non_type_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3130, __FUNCTION__))->base.side_effects_flag) = TREE_SIDE_EFFECTS (org_x)((non_type_check ((org_x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3130, __FUNCTION__))->base.side_effects_flag); |
3131 | TREE_THIS_VOLATILE (x)((x)->base.volatile_flag) = TREE_THIS_VOLATILE (org_x)((org_x)->base.volatile_flag); |
3132 | } |
3133 | } |
3134 | |
3135 | x = fold (x); |
3136 | break; |
3137 | |
3138 | case SAVE_EXPR: |
3139 | /* A SAVE_EXPR might contain e.g. (0 * i) + (0 * j), which, after |
3140 | folding, evaluates to an invariant. In that case no need to wrap |
3141 | this folded tree with a SAVE_EXPR. */ |
3142 | r = cp_fold (TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3142, __FUNCTION__))))), flags); |
3143 | if (tree_invariant_p (r)) |
3144 | x = r; |
3145 | break; |
3146 | |
3147 | case REQUIRES_EXPR: |
3148 | x = evaluate_requires_expr (x); |
3149 | break; |
3150 | |
3151 | default: |
3152 | return org_x; |
3153 | } |
3154 | |
3155 | if (EXPR_P (x)((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (x)->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (x)->base.code))]) <= tcc_expression) && TREE_CODE (x)((enum tree_code) (x)->base.code) == code) |
3156 | { |
3157 | TREE_THIS_VOLATILE (x)((x)->base.volatile_flag) = TREE_THIS_VOLATILE (org_x)((org_x)->base.volatile_flag); |
3158 | copy_warning (x, org_x); |
3159 | } |
3160 | |
3161 | if (!c.evaluation_restricted_p ()) |
3162 | { |
3163 | fold_cache->put (org_x, x); |
3164 | /* Prevent that we try to fold an already folded result again. */ |
3165 | if (x != org_x) |
3166 | fold_cache->put (x, x); |
3167 | } |
3168 | |
3169 | return x; |
3170 | } |
3171 | |
3172 | /* Look up "hot", "cold", "likely" or "unlikely" in attribute list LIST. */ |
3173 | |
3174 | tree |
3175 | lookup_hotness_attribute (tree list) |
3176 | { |
3177 | for (; list; list = TREE_CHAIN (list)((contains_struct_check ((list), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3177, __FUNCTION__))->common.chain)) |
3178 | { |
3179 | tree name = get_attribute_name (list); |
3180 | if ((is_attribute_p ("hot", name) |
3181 | || is_attribute_p ("cold", name) |
3182 | || is_attribute_p ("likely", name) |
3183 | || is_attribute_p ("unlikely", name)) |
3184 | && is_attribute_namespace_p ("", list)) |
3185 | break; |
3186 | } |
3187 | return list; |
3188 | } |
3189 | |
3190 | /* Remove "hot", "cold", "likely" and "unlikely" attributes from LIST. */ |
3191 | |
3192 | static tree |
3193 | remove_hotness_attribute (tree list) |
3194 | { |
3195 | for (tree *p = &list; *p; ) |
3196 | { |
3197 | tree l = *p; |
3198 | tree name = get_attribute_name (l); |
3199 | if ((is_attribute_p ("hot", name) |
3200 | || is_attribute_p ("cold", name) |
3201 | || is_attribute_p ("likely", name) |
3202 | || is_attribute_p ("unlikely", name)) |
3203 | && is_attribute_namespace_p ("", l)) |
3204 | { |
3205 | *p = TREE_CHAIN (l)((contains_struct_check ((l), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3205, __FUNCTION__))->common.chain); |
3206 | continue; |
3207 | } |
3208 | p = &TREE_CHAIN (l)((contains_struct_check ((l), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3208, __FUNCTION__))->common.chain); |
3209 | } |
3210 | return list; |
3211 | } |
3212 | |
3213 | /* If [[likely]] or [[unlikely]] appear on this statement, turn it into a |
3214 | PREDICT_EXPR. */ |
3215 | |
3216 | tree |
3217 | process_stmt_hotness_attribute (tree std_attrs, location_t attrs_loc) |
3218 | { |
3219 | if (std_attrs == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
3220 | return std_attrs; |
3221 | if (tree attr = lookup_hotness_attribute (std_attrs)) |
3222 | { |
3223 | tree name = get_attribute_name (attr); |
3224 | bool hot = (is_attribute_p ("hot", name) |
3225 | || is_attribute_p ("likely", name)); |
3226 | tree pred = build_predict_expr (hot ? PRED_HOT_LABEL : PRED_COLD_LABEL, |
3227 | hot ? TAKEN : NOT_TAKEN); |
3228 | SET_EXPR_LOCATION (pred, attrs_loc)(expr_check (((pred)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3228, __FUNCTION__))->exp.locus = (attrs_loc); |
3229 | add_stmt (pred); |
3230 | if (tree other = lookup_hotness_attribute (TREE_CHAIN (attr)((contains_struct_check ((attr), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3230, __FUNCTION__))->common.chain))) |
3231 | warning (OPT_Wattributes, "ignoring attribute %qE after earlier %qE", |
3232 | get_attribute_name (other), name); |
3233 | std_attrs = remove_hotness_attribute (std_attrs); |
3234 | } |
3235 | return std_attrs; |
3236 | } |
3237 | |
3238 | /* Build IFN_ASSUME internal call for assume condition ARG. */ |
3239 | |
3240 | tree |
3241 | build_assume_call (location_t loc, tree arg) |
3242 | { |
3243 | if (!processing_template_declscope_chain->x_processing_template_decl) |
3244 | arg = fold_build_cleanup_point_expr (TREE_TYPE (arg)((contains_struct_check ((arg), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3244, __FUNCTION__))->typed.type), arg); |
3245 | return build_call_expr_internal_loc (loc, IFN_ASSUME, void_type_nodeglobal_trees[TI_VOID_TYPE], |
3246 | 1, arg); |
3247 | } |
3248 | |
3249 | /* If [[assume (cond)]] appears on this statement, handle it. */ |
3250 | |
3251 | tree |
3252 | process_stmt_assume_attribute (tree std_attrs, tree statement, |
3253 | location_t attrs_loc) |
3254 | { |
3255 | if (std_attrs == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
3256 | return std_attrs; |
3257 | tree attr = lookup_attribute ("gnu", "assume", std_attrs); |
3258 | if (!attr) |
3259 | return std_attrs; |
3260 | /* The next token after the assume attribute is not ';'. */ |
3261 | if (statement) |
3262 | { |
3263 | warning_at (attrs_loc, OPT_Wattributes, |
3264 | "%<assume%> attribute not followed by %<;%>"); |
3265 | attr = NULL_TREE(tree) nullptr; |
3266 | } |
3267 | for (; attr; attr = lookup_attribute ("gnu", "assume", TREE_CHAIN (attr)((contains_struct_check ((attr), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3267, __FUNCTION__))->common.chain))) |
3268 | { |
3269 | tree args = TREE_VALUE (attr)((tree_check ((attr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3269, __FUNCTION__, (TREE_LIST)))->list.value); |
3270 | int nargs = list_length (args); |
3271 | if (nargs != 1) |
3272 | { |
3273 | auto_diagnostic_group d; |
3274 | error_at (attrs_loc, "wrong number of arguments specified for " |
3275 | "%qE attribute", get_attribute_name (attr)); |
3276 | inform (attrs_loc, "expected %i, found %i", 1, nargs); |
3277 | } |
3278 | else |
3279 | { |
3280 | tree arg = TREE_VALUE (args)((tree_check ((args), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3280, __FUNCTION__, (TREE_LIST)))->list.value); |
3281 | if (!type_dependent_expression_p (arg)) |
3282 | arg = contextual_conv_bool (arg, tf_warning_or_error); |
3283 | if (error_operand_p (arg)) |
3284 | continue; |
3285 | finish_expr_stmt (build_assume_call (attrs_loc, arg)); |
3286 | } |
3287 | } |
3288 | return remove_attribute ("gnu", "assume", std_attrs); |
3289 | } |
3290 | |
3291 | /* Return the type std::source_location::__impl after performing |
3292 | verification on it. */ |
3293 | |
3294 | tree |
3295 | get_source_location_impl_type () |
3296 | { |
3297 | tree name = get_identifier ("source_location")(__builtin_constant_p ("source_location") ? get_identifier_with_length (("source_location"), strlen ("source_location")) : get_identifier ("source_location")); |
3298 | tree decl = lookup_qualified_name (std_nodecp_global_trees[CPTI_STD], name); |
3299 | if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) != TYPE_DECL) |
3300 | { |
3301 | auto_diagnostic_group d; |
3302 | if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK] || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TREE_LIST) |
3303 | qualified_name_lookup_error (std_nodecp_global_trees[CPTI_STD], name, decl, input_location); |
3304 | else |
3305 | error ("%qD is not a type", decl); |
3306 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
3307 | } |
3308 | name = get_identifier ("__impl")(__builtin_constant_p ("__impl") ? get_identifier_with_length (("__impl"), strlen ("__impl")) : get_identifier ("__impl")); |
3309 | tree type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3309, __FUNCTION__))->typed.type); |
3310 | decl = lookup_qualified_name (type, name); |
3311 | if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) != TYPE_DECL) |
3312 | { |
3313 | auto_diagnostic_group d; |
3314 | if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK] || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TREE_LIST) |
3315 | qualified_name_lookup_error (type, name, decl, input_location); |
3316 | else |
3317 | error ("%qD is not a type", decl); |
3318 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
3319 | } |
3320 | type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3320, __FUNCTION__))->typed.type); |
3321 | if (TREE_CODE (type)((enum tree_code) (type)->base.code) != RECORD_TYPE) |
3322 | { |
3323 | error ("%qD is not a class type", decl); |
3324 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
3325 | } |
3326 | |
3327 | int cnt = 0; |
3328 | for (tree field = TYPE_FIELDS (type)((tree_check3 ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3328, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE )))->type_non_common.values); |
3329 | (field = next_aggregate_field (field)) != NULL_TREE(tree) nullptr; |
3330 | field = DECL_CHAIN (field)(((contains_struct_check (((contains_struct_check ((field), ( TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3330, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3330, __FUNCTION__))->common.chain))) |
3331 | { |
3332 | if (DECL_NAME (field)((contains_struct_check ((field), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3332, __FUNCTION__))->decl_minimal.name) != NULL_TREE(tree) nullptr) |
3333 | { |
3334 | const char *n = IDENTIFIER_POINTER (DECL_NAME (field))((const char *) (tree_check ((((contains_struct_check ((field ), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3334, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3334, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.str ); |
3335 | if (strcmp (n, "_M_file_name") == 0 |
3336 | || strcmp (n, "_M_function_name") == 0) |
3337 | { |
3338 | if (TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3338, __FUNCTION__))->typed.type) != const_string_type_nodec_global_trees[CTI_CONST_STRING_TYPE]) |
3339 | { |
3340 | error ("%qD does not have %<const char *%> type", field); |
3341 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
3342 | } |
3343 | cnt++; |
3344 | continue; |
3345 | } |
3346 | else if (strcmp (n, "_M_line") == 0 || strcmp (n, "_M_column") == 0) |
3347 | { |
3348 | if (TREE_CODE (TREE_TYPE (field))((enum tree_code) (((contains_struct_check ((field), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3348, __FUNCTION__))->typed.type))->base.code) != INTEGER_TYPE) |
3349 | { |
3350 | error ("%qD does not have integral type", field); |
3351 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
3352 | } |
3353 | cnt++; |
3354 | continue; |
3355 | } |
3356 | } |
3357 | cnt = 0; |
3358 | break; |
3359 | } |
3360 | if (cnt != 4) |
3361 | { |
3362 | error ("%<std::source_location::__impl%> does not contain only " |
3363 | "non-static data members %<_M_file_name%>, " |
3364 | "%<_M_function_name%>, %<_M_line%> and %<_M_column%>"); |
3365 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
3366 | } |
3367 | return build_qualified_type (type, TYPE_QUAL_CONST); |
3368 | } |
3369 | |
3370 | /* Type for source_location_table hash_set. */ |
3371 | struct GTY((for_user)) source_location_table_entry { |
3372 | location_t loc; |
3373 | unsigned uid; |
3374 | tree var; |
3375 | }; |
3376 | |
3377 | /* Traits class for function start hash maps below. */ |
3378 | |
3379 | struct source_location_table_entry_hash |
3380 | : ggc_remove <source_location_table_entry> |
3381 | { |
3382 | typedef source_location_table_entry value_type; |
3383 | typedef source_location_table_entry compare_type; |
3384 | |
3385 | static hashval_t |
3386 | hash (const source_location_table_entry &ref) |
3387 | { |
3388 | inchash::hash hstate (0); |
3389 | hstate.add_int (ref.loc); |
3390 | hstate.add_int (ref.uid); |
3391 | return hstate.end (); |
3392 | } |
3393 | |
3394 | static bool |
3395 | equal (const source_location_table_entry &ref1, |
3396 | const source_location_table_entry &ref2) |
3397 | { |
3398 | return ref1.loc == ref2.loc && ref1.uid == ref2.uid; |
3399 | } |
3400 | |
3401 | static void |
3402 | mark_deleted (source_location_table_entry &ref) |
3403 | { |
3404 | ref.loc = UNKNOWN_LOCATION((location_t) 0); |
3405 | ref.uid = -1U; |
3406 | ref.var = NULL_TREE(tree) nullptr; |
3407 | } |
3408 | |
3409 | static const bool empty_zero_p = true; |
3410 | |
3411 | static void |
3412 | mark_empty (source_location_table_entry &ref) |
3413 | { |
3414 | ref.loc = UNKNOWN_LOCATION((location_t) 0); |
3415 | ref.uid = 0; |
3416 | ref.var = NULL_TREE(tree) nullptr; |
3417 | } |
3418 | |
3419 | static bool |
3420 | is_deleted (const source_location_table_entry &ref) |
3421 | { |
3422 | return (ref.loc == UNKNOWN_LOCATION((location_t) 0) |
3423 | && ref.uid == -1U |
3424 | && ref.var == NULL_TREE(tree) nullptr); |
3425 | } |
3426 | |
3427 | static bool |
3428 | is_empty (const source_location_table_entry &ref) |
3429 | { |
3430 | return (ref.loc == UNKNOWN_LOCATION((location_t) 0) |
3431 | && ref.uid == 0 |
3432 | && ref.var == NULL_TREE(tree) nullptr); |
3433 | } |
3434 | |
3435 | static void |
3436 | pch_nx (source_location_table_entry &p) |
3437 | { |
3438 | extern void gt_pch_nx (source_location_table_entry &); |
3439 | gt_pch_nx (p); |
3440 | } |
3441 | |
3442 | static void |
3443 | pch_nx (source_location_table_entry &p, gt_pointer_operator op, void *cookie) |
3444 | { |
3445 | extern void gt_pch_nx (source_location_table_entry *, gt_pointer_operator, |
3446 | void *); |
3447 | gt_pch_nx (&p, op, cookie); |
3448 | } |
3449 | }; |
3450 | |
3451 | static GTY(()) hash_table <source_location_table_entry_hash> |
3452 | *source_location_table; |
3453 | static GTY(()) unsigned int source_location_id; |
3454 | |
3455 | /* Fold the __builtin_source_location () call T. */ |
3456 | |
3457 | tree |
3458 | fold_builtin_source_location (const_tree t) |
3459 | { |
3460 | gcc_assert (TREE_CODE (t) == CALL_EXPR)((void)(!(((enum tree_code) (t)->base.code) == CALL_EXPR) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3460, __FUNCTION__), 0 : 0)); |
3461 | /* TREE_TYPE (t) is const std::source_location::__impl* */ |
3462 | tree source_location_impl = TREE_TYPE (TREE_TYPE (t))((contains_struct_check ((((contains_struct_check ((t), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3462, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3462, __FUNCTION__))->typed.type); |
3463 | if (source_location_impl == error_mark_nodeglobal_trees[TI_ERROR_MARK]) |
3464 | return build_zero_cst (const_ptr_type_nodeglobal_trees[TI_CONST_PTR_TYPE]); |
3465 | gcc_assert (CLASS_TYPE_P (source_location_impl)((void)(!((((((enum tree_code) (source_location_impl)->base .code)) == RECORD_TYPE || (((enum tree_code) (source_location_impl )->base.code)) == UNION_TYPE) && ((tree_class_check ((source_location_impl), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3465, __FUNCTION__))->type_common.lang_flag_5)) && id_equal ((((tree_class_check ((source_location_impl), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3466, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check ((source_location_impl), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3466, __FUNCTION__))->type_common.name))->base.code)) ] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check ((source_location_impl), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3466, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3466, __FUNCTION__))->decl_minimal.name) : ((tree_class_check ((source_location_impl), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3466, __FUNCTION__))->type_common.name)), "__impl")) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3466, __FUNCTION__), 0 : 0)) |
3466 | && id_equal (TYPE_IDENTIFIER (source_location_impl), "__impl"))((void)(!((((((enum tree_code) (source_location_impl)->base .code)) == RECORD_TYPE || (((enum tree_code) (source_location_impl )->base.code)) == UNION_TYPE) && ((tree_class_check ((source_location_impl), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3465, __FUNCTION__))->type_common.lang_flag_5)) && id_equal ((((tree_class_check ((source_location_impl), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3466, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check ((source_location_impl), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3466, __FUNCTION__))->type_common.name))->base.code)) ] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check ((source_location_impl), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3466, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3466, __FUNCTION__))->decl_minimal.name) : ((tree_class_check ((source_location_impl), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3466, __FUNCTION__))->type_common.name)), "__impl")) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3466, __FUNCTION__), 0 : 0)); |
3467 | |
3468 | location_t loc = EXPR_LOCATION (t)((((t)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((t))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((t))->base.code))]) <= tcc_expression )) ? (t)->exp.locus : ((location_t) 0)); |
3469 | if (source_location_table == NULLnullptr) |
3470 | source_location_table |
3471 | = hash_table <source_location_table_entry_hash>::create_ggc (64); |
3472 | const line_map_ordinary *map; |
3473 | source_location_table_entry entry; |
3474 | entry.loc |
3475 | = linemap_resolve_location (line_table, loc, LRK_MACRO_EXPANSION_POINT, |
3476 | &map); |
3477 | entry.uid = current_function_decl ? DECL_UID (current_function_decl)((contains_struct_check ((current_function_decl), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3477, __FUNCTION__))->decl_minimal.uid) : -1; |
3478 | entry.var = error_mark_nodeglobal_trees[TI_ERROR_MARK]; |
3479 | source_location_table_entry *entryp |
3480 | = source_location_table->find_slot (entry, INSERT); |
3481 | tree var; |
3482 | if (entryp->var) |
3483 | var = entryp->var; |
3484 | else |
3485 | { |
3486 | char tmp_name[32]; |
3487 | ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lsrc_loc", source_location_id++)do { char *__p; (tmp_name)[0] = '*'; (tmp_name)[1] = '.'; __p = stpcpy (&(tmp_name)[2], "Lsrc_loc"); sprint_ul (__p, ( unsigned long) (source_location_id++)); } while (0); |
3488 | var = build_decl (loc, VAR_DECL, get_identifier (tmp_name)(__builtin_constant_p (tmp_name) ? get_identifier_with_length ((tmp_name), strlen (tmp_name)) : get_identifier (tmp_name)), |
3489 | source_location_impl); |
3490 | TREE_STATIC (var)((var)->base.static_flag) = 1; |
3491 | TREE_PUBLIC (var)((var)->base.public_flag) = 0; |
3492 | DECL_ARTIFICIAL (var)((contains_struct_check ((var), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3492, __FUNCTION__))->decl_common.artificial_flag) = 1; |
3493 | DECL_IGNORED_P (var)((contains_struct_check ((var), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3493, __FUNCTION__))->decl_common.ignored_flag) = 1; |
3494 | DECL_EXTERNAL (var)((contains_struct_check ((var), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3494, __FUNCTION__))->decl_common.decl_flag_1) = 0; |
3495 | DECL_DECLARED_CONSTEXPR_P (var)((contains_struct_check (((tree_check2 (((((enum tree_code) ( var)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((var) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3495, __FUNCTION__, (TEMPLATE_DECL))))))))->result : var )), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3495, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3495, __FUNCTION__))->decl_common.lang_flag_8) = 1; |
3496 | DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (var)(((tree_not_check2 (((tree_check ((var), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3496, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3496, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2)) = 1; |
3497 | layout_decl (var, 0); |
3498 | |
3499 | vec<constructor_elt, va_gc> *v = NULLnullptr; |
3500 | vec_alloc (v, 4); |
3501 | for (tree field = TYPE_FIELDS (source_location_impl)((tree_check3 ((source_location_impl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3501, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE )))->type_non_common.values); |
3502 | (field = next_aggregate_field (field)) != NULL_TREE(tree) nullptr; |
3503 | field = DECL_CHAIN (field)(((contains_struct_check (((contains_struct_check ((field), ( TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3503, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3503, __FUNCTION__))->common.chain))) |
3504 | { |
3505 | const char *n = IDENTIFIER_POINTER (DECL_NAME (field))((const char *) (tree_check ((((contains_struct_check ((field ), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3505, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3505, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.str ); |
3506 | tree val = NULL_TREE(tree) nullptr; |
3507 | if (strcmp (n, "_M_file_name") == 0) |
3508 | { |
3509 | if (const char *fname = LOCATION_FILE (loc)((expand_location (loc)).file)) |
3510 | { |
3511 | fname = remap_macro_filename (fname); |
3512 | val = build_string_literal (fname); |
3513 | } |
3514 | else |
3515 | val = build_string_literal (""); |
3516 | } |
3517 | else if (strcmp (n, "_M_function_name") == 0) |
3518 | { |
3519 | const char *name = ""; |
3520 | |
3521 | if (current_function_decl) |
3522 | name = cxx_printable_name (current_function_decl, 2); |
3523 | |
3524 | val = build_string_literal (name); |
3525 | } |
3526 | else if (strcmp (n, "_M_line") == 0) |
3527 | val = build_int_cst (TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3527, __FUNCTION__))->typed.type), LOCATION_LINE (loc)((expand_location (loc)).line)); |
3528 | else if (strcmp (n, "_M_column") == 0) |
3529 | val = build_int_cst (TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3529, __FUNCTION__))->typed.type), LOCATION_COLUMN (loc)((expand_location (loc)).column)); |
3530 | else |
3531 | gcc_unreachable ()(fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3531, __FUNCTION__)); |
3532 | CONSTRUCTOR_APPEND_ELT (v, field, val)do { constructor_elt _ce___ = {field, val}; vec_safe_push ((v ), _ce___); } while (0); |
3533 | } |
3534 | |
3535 | tree ctor = build_constructor (source_location_impl, v); |
3536 | TREE_CONSTANT (ctor)((non_type_check ((ctor), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3536, __FUNCTION__))->base.constant_flag) = 1; |
3537 | TREE_STATIC (ctor)((ctor)->base.static_flag) = 1; |
3538 | DECL_INITIAL (var)((contains_struct_check ((var), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3538, __FUNCTION__))->decl_common.initial) = ctor; |
3539 | varpool_node::finalize_decl (var); |
3540 | *entryp = entry; |
3541 | entryp->var = var; |
3542 | } |
3543 | |
3544 | return build_fold_addr_expr_with_type_loc (loc, var, TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/cp-gimplify.cc" , 3544, __FUNCTION__))->typed.type)); |
3545 | } |
3546 | |
3547 | #include "gt-cp-cp-gimplify.h" |