Bug Summary

File:build/gcc/cp/decl.cc
Warning:line 13806, column 4
Value stored to 'rqual' is never read

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-suse-linux -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name decl.cc -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=cplusplus -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -analyzer-config-compatibility-mode=true -mrelocation-model static -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/gcc -resource-dir /usr/lib64/clang/15.0.7 -D IN_GCC_FRONTEND -D IN_GCC -D HAVE_CONFIG_H -I . -I cp -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../include -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libcpp/include -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libcody -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libdecnumber -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libdecnumber/bid -I ../libdecnumber -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libbacktrace -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13/x86_64-suse-linux -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13/backward -internal-isystem /usr/lib64/clang/15.0.7/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wno-narrowing -Wwrite-strings -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fdeprecated-macro -fdebug-compilation-dir=/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/gcc -ferror-limit 19 -fno-rtti -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -analyzer-output=plist-html -analyzer-config silence-checkers=core.NullDereference -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /buildworker/marxinbox-gcc-clang-static-analyzer/objdir/clang-static-analyzer/2023-03-27-141847-20772-1/report-A6Vl2a.plist -x c++ /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc
1/* Process declarations and variables for -*- C++ -*- compiler.
2 Copyright (C) 1988-2023 Free Software Foundation, Inc.
3 Contributed by Michael Tiemann (tiemann@cygnus.com)
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 3, or (at your option)
10any later version.
11
12GCC is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
20
21
22/* Process declarations and symbol lookup for C++ front end.
23 Also constructs types; the standard scalar types at initialization,
24 and structure, union, array and enum types when they are declared. */
25
26/* ??? not all decl nodes are given the most useful possible
27 line numbers. For example, the CONST_DECLs for enum values. */
28
29#include "config.h"
30#include "system.h"
31#include "coretypes.h"
32#include "target.h"
33#include "c-family/c-target.h"
34#include "cp-tree.h"
35#include "timevar.h"
36#include "stringpool.h"
37#include "cgraph.h"
38#include "stor-layout.h"
39#include "varasm.h"
40#include "attribs.h"
41#include "flags.h"
42#include "tree-iterator.h"
43#include "decl.h"
44#include "intl.h"
45#include "toplev.h"
46#include "c-family/c-objc.h"
47#include "c-family/c-pragma.h"
48#include "c-family/c-ubsan.h"
49#include "debug.h"
50#include "plugin.h"
51#include "builtins.h"
52#include "gimplify.h"
53#include "asan.h"
54#include "gcc-rich-location.h"
55#include "langhooks.h"
56#include "context.h" /* For 'g'. */
57#include "omp-general.h"
58#include "omp-offload.h" /* For offload_vars. */
59#include "opts.h"
60#include "langhooks-def.h" /* For lhd_simulate_record_decl */
61
62/* Possible cases of bad specifiers type used by bad_specifiers. */
63enum bad_spec_place {
64 BSP_VAR, /* variable */
65 BSP_PARM, /* parameter */
66 BSP_TYPE, /* type */
67 BSP_FIELD /* field */
68};
69
70static const char *redeclaration_error_message (tree, tree);
71
72static int decl_jump_unsafe (tree);
73static void require_complete_types_for_parms (tree);
74static tree grok_reference_init (tree, tree, tree, int);
75static tree grokvardecl (tree, tree, tree, const cp_decl_specifier_seq *,
76 int, int, int, bool, int, tree, location_t);
77static void check_static_variable_definition (tree, tree);
78static void record_unknown_type (tree, const char *);
79static int member_function_or_else (tree, tree, enum overload_flags);
80static tree local_variable_p_walkfn (tree *, int *, void *);
81static const char *tag_name (enum tag_types);
82static tree lookup_and_check_tag (enum tag_types, tree, TAG_how, bool);
83static void maybe_deduce_size_from_array_init (tree, tree);
84static void layout_var_decl (tree);
85static tree check_initializer (tree, tree, int, vec<tree, va_gc> **);
86static void make_rtl_for_nonlocal_decl (tree, tree, const char *);
87static void copy_type_enum (tree , tree);
88static void check_function_type (tree, tree);
89static void begin_destructor_body (void);
90static void record_key_method_defined (tree);
91static tree create_array_type_for_decl (tree, tree, tree, location_t);
92static tree get_atexit_node (void);
93static tree get_dso_handle_node (void);
94static tree start_cleanup_fn (void);
95static void end_cleanup_fn (void);
96static tree cp_make_fname_decl (location_t, tree, int);
97static void initialize_predefined_identifiers (void);
98static tree check_special_function_return_type
99 (special_function_kind, tree, tree, int, const location_t*);
100static tree push_cp_library_fn (enum tree_code, tree, int);
101static tree build_cp_library_fn (tree, enum tree_code, tree, int);
102static void store_parm_decls (tree);
103static void initialize_local_var (tree, tree);
104static void expand_static_init (tree, tree);
105static location_t smallest_type_location (const cp_decl_specifier_seq*);
106
107/* The following symbols are subsumed in the cp_global_trees array, and
108 listed here individually for documentation purposes.
109
110 C++ extensions
111 tree wchar_decl_node;
112
113 tree vtable_entry_type;
114 tree delta_type_node;
115 tree __t_desc_type_node;
116
117 tree class_type_node;
118 tree unknown_type_node;
119
120 Array type `vtable_entry_type[]'
121
122 tree vtbl_type_node;
123 tree vtbl_ptr_type_node;
124
125 Namespaces,
126
127 tree std_node;
128 tree abi_node;
129
130 A FUNCTION_DECL which can call `abort'. Not necessarily the
131 one that the user will declare, but sufficient to be called
132 by routines that want to abort the program.
133
134 tree abort_fndecl;
135
136 Used by RTTI
137 tree type_info_type_node, tinfo_decl_id, tinfo_decl_type;
138 tree tinfo_var_id; */
139
140tree cp_global_trees[CPTI_MAX];
141
142/* A list of objects which have constructors or destructors
143 which reside in namespace scope. The decl is stored in
144 the TREE_VALUE slot and the initializer is stored
145 in the TREE_PURPOSE slot. */
146tree static_aggregates;
147
148/* Like static_aggregates, but for thread_local variables. */
149tree tls_aggregates;
150
151/* A hash-map mapping from variable decls to the dynamic initializer for
152 the decl. This is currently only used by OpenMP. */
153decl_tree_map *dynamic_initializers;
154
155/* -- end of C++ */
156
157/* A node for the integer constant 2. */
158
159tree integer_two_node;
160
161/* vector of static decls. */
162vec<tree, va_gc> *static_decls;
163
164/* vector of keyed classes. */
165vec<tree, va_gc> *keyed_classes;
166
167/* Used only for jumps to as-yet undefined labels, since jumps to
168 defined labels can have their validity checked immediately. */
169
170struct GTY((chain_next ("%h.next"))) named_label_use_entry {
171 struct named_label_use_entry *next;
172 /* The binding level to which this entry is *currently* attached.
173 This is initially the binding level in which the goto appeared,
174 but is modified as scopes are closed. */
175 cp_binding_level *binding_level;
176 /* The head of the names list that was current when the goto appeared,
177 or the inner scope popped. These are the decls that will *not* be
178 skipped when jumping to the label. */
179 tree names_in_scope;
180 /* The location of the goto, for error reporting. */
181 location_t o_goto_locus;
182 /* True if an OpenMP structured block scope has been closed since
183 the goto appeared. This means that the branch from the label will
184 illegally exit an OpenMP scope. */
185 bool in_omp_scope;
186};
187
188/* A list of all LABEL_DECLs in the function that have names. Here so
189 we can clear out their names' definitions at the end of the
190 function, and so we can check the validity of jumps to these labels. */
191
192struct GTY((for_user)) named_label_entry {
193
194 tree name; /* Name of decl. */
195
196 tree label_decl; /* LABEL_DECL, unless deleted local label. */
197
198 named_label_entry *outer; /* Outer shadowed chain. */
199
200 /* The binding level to which the label is *currently* attached.
201 This is initially set to the binding level in which the label
202 is defined, but is modified as scopes are closed. */
203 cp_binding_level *binding_level;
204
205 /* The head of the names list that was current when the label was
206 defined, or the inner scope popped. These are the decls that will
207 be skipped when jumping to the label. */
208 tree names_in_scope;
209
210 /* A vector of all decls from all binding levels that would be
211 crossed by a backward branch to the label. */
212 vec<tree, va_gc> *bad_decls;
213
214 /* A list of uses of the label, before the label is defined. */
215 named_label_use_entry *uses;
216
217 /* The following bits are set after the label is defined, and are
218 updated as scopes are popped. They indicate that a jump to the
219 label will illegally enter a scope of the given flavor. */
220 bool in_try_scope;
221 bool in_catch_scope;
222 bool in_omp_scope;
223 bool in_transaction_scope;
224 bool in_constexpr_if;
225 bool in_consteval_if;
226 bool in_stmt_expr;
227};
228
229#define named_labels((cfun + 0)->language)->x_named_labels cp_function_chain((cfun + 0)->language)->x_named_labels
230
231/* The number of function bodies which we are currently processing.
232 (Zero if we are at namespace scope, one inside the body of a
233 function, two inside the body of a function in a local class, etc.) */
234int function_depth;
235
236/* Whether the exception-specifier is part of a function type (i.e. C++17). */
237bool flag_noexcept_type;
238
239/* States indicating how grokdeclarator() should handle declspecs marked
240 with __attribute__((deprecated)). An object declared as
241 __attribute__((deprecated)) suppresses warnings of uses of other
242 deprecated items. */
243enum deprecated_states deprecated_state = DEPRECATED_NORMAL;
244
245
246/* A list of VAR_DECLs whose type was incomplete at the time the
247 variable was declared. */
248
249struct GTY(()) incomplete_var {
250 tree decl;
251 tree incomplete_type;
252};
253
254
255static GTY(()) vec<incomplete_var, va_gc> *incomplete_vars;
256
257/* Returns the kind of template specialization we are currently
258 processing, given that it's declaration contained N_CLASS_SCOPES
259 explicit scope qualifications. */
260
261tmpl_spec_kind
262current_tmpl_spec_kind (int n_class_scopes)
263{
264 int n_template_parm_scopes = 0;
265 int seen_specialization_p = 0;
266 int innermost_specialization_p = 0;
267 cp_binding_level *b;
268
269 /* Scan through the template parameter scopes. */
270 for (b = current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
;
271 b->kind == sk_template_parms;
272 b = b->level_chain)
273 {
274 /* If we see a specialization scope inside a parameter scope,
275 then something is wrong. That corresponds to a declaration
276 like:
277
278 template <class T> template <> ...
279
280 which is always invalid since [temp.expl.spec] forbids the
281 specialization of a class member template if the enclosing
282 class templates are not explicitly specialized as well. */
283 if (b->explicit_spec_p)
284 {
285 if (n_template_parm_scopes == 0)
286 innermost_specialization_p = 1;
287 else
288 seen_specialization_p = 1;
289 }
290 else if (seen_specialization_p == 1)
291 return tsk_invalid_member_spec;
292
293 ++n_template_parm_scopes;
294 }
295
296 /* Handle explicit instantiations. */
297 if (processing_explicit_instantiationscope_chain->x_processing_explicit_instantiation)
298 {
299 if (n_template_parm_scopes != 0)
300 /* We've seen a template parameter list during an explicit
301 instantiation. For example:
302
303 template <class T> template void f(int);
304
305 This is erroneous. */
306 return tsk_invalid_expl_inst;
307 else
308 return tsk_expl_inst;
309 }
310
311 if (n_template_parm_scopes < n_class_scopes)
312 /* We've not seen enough template headers to match all the
313 specialized classes present. For example:
314
315 template <class T> void R<T>::S<T>::f(int);
316
317 This is invalid; there needs to be one set of template
318 parameters for each class. */
319 return tsk_insufficient_parms;
320 else if (n_template_parm_scopes == n_class_scopes)
321 /* We're processing a non-template declaration (even though it may
322 be a member of a template class.) For example:
323
324 template <class T> void S<T>::f(int);
325
326 The `class T' matches the `S<T>', leaving no template headers
327 corresponding to the `f'. */
328 return tsk_none;
329 else if (n_template_parm_scopes > n_class_scopes + 1)
330 /* We've got too many template headers. For example:
331
332 template <> template <class T> void f (T);
333
334 There need to be more enclosing classes. */
335 return tsk_excessive_parms;
336 else
337 /* This must be a template. It's of the form:
338
339 template <class T> template <class U> void S<T>::f(U);
340
341 This is a specialization if the innermost level was a
342 specialization; otherwise it's just a definition of the
343 template. */
344 return innermost_specialization_p ? tsk_expl_spec : tsk_template;
345}
346
347/* Exit the current scope. */
348
349void
350finish_scope (void)
351{
352 poplevel (0, 0, 0);
353}
354
355/* When a label goes out of scope, check to see if that label was used
356 in a valid manner, and issue any appropriate warnings or errors. */
357
358static void
359check_label_used (tree label)
360{
361 if (!processing_template_declscope_chain->x_processing_template_decl)
362 {
363 if (DECL_INITIAL (label)((contains_struct_check ((label), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 363, __FUNCTION__))->decl_common.initial)
== NULL_TREE(tree) __null)
364 {
365 location_t location;
366
367 error ("label %q+D used but not defined", label);
368 location = input_location;
369 /* FIXME want (LOCATION_FILE (input_location), (line)0) */
370 /* Avoid crashing later. */
371 define_label (location, DECL_NAME (label)((contains_struct_check ((label), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 371, __FUNCTION__))->decl_minimal.name)
);
372 }
373 else
374 warn_for_unused_label (label);
375 }
376}
377
378/* Helper function to sort named label entries in a vector by DECL_UID. */
379
380static int
381sort_labels (const void *a, const void *b)
382{
383 tree label1 = *(tree const *) a;
384 tree label2 = *(tree const *) b;
385
386 /* DECL_UIDs can never be equal. */
387 return DECL_UID (label1)((contains_struct_check ((label1), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 387, __FUNCTION__))->decl_minimal.uid)
> DECL_UID (label2)((contains_struct_check ((label2), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 387, __FUNCTION__))->decl_minimal.uid)
? -1 : +1;
388}
389
390/* At the end of a function, all labels declared within the function
391 go out of scope. BLOCK is the top-level block for the
392 function. */
393
394static void
395pop_labels (tree block)
396{
397 if (!named_labels((cfun + 0)->language)->x_named_labels)
398 return;
399
400 /* We need to add the labels to the block chain, so debug
401 information is emitted. But, we want the order to be stable so
402 need to sort them first. Otherwise the debug output could be
403 randomly ordered. I guess it's mostly stable, unless the hash
404 table implementation changes. */
405 auto_vec<tree, 32> labels (named_labels((cfun + 0)->language)->x_named_labels->elements ());
406 hash_table<named_label_hash>::iterator end (named_labels((cfun + 0)->language)->x_named_labels->end ());
407 for (hash_table<named_label_hash>::iterator iter
408 (named_labels((cfun + 0)->language)->x_named_labels->begin ()); iter != end; ++iter)
409 {
410 named_label_entry *ent = *iter;
411
412 gcc_checking_assert (!ent->outer)((void)(!(!ent->outer) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 412, __FUNCTION__), 0 : 0))
;
413 if (ent->label_decl)
414 labels.quick_push (ent->label_decl);
415 ggc_free (ent);
416 }
417 named_labels((cfun + 0)->language)->x_named_labels = NULL__null;
418 labels.qsort (sort_labels)qsort (sort_labels);
419
420 while (labels.length ())
421 {
422 tree label = labels.pop ();
423
424 DECL_CHAIN (label)(((contains_struct_check (((contains_struct_check ((label), (
TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 424, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 424, __FUNCTION__))->common.chain))
= BLOCK_VARS (block)((tree_check ((block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 424, __FUNCTION__, (BLOCK)))->block.vars)
;
425 BLOCK_VARS (block)((tree_check ((block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 425, __FUNCTION__, (BLOCK)))->block.vars)
= label;
426
427 check_label_used (label);
428 }
429}
430
431/* At the end of a block with local labels, restore the outer definition. */
432
433static void
434pop_local_label (tree id, tree label)
435{
436 check_label_used (label);
437 named_label_entry **slot = named_labels((cfun + 0)->language)->x_named_labels->find_slot_with_hash
438 (id, IDENTIFIER_HASH_VALUE (id)((tree_check ((id), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 438, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.hash_value
)
, NO_INSERT);
439 named_label_entry *ent = *slot;
440
441 if (ent->outer)
442 ent = ent->outer;
443 else
444 {
445 ent = ggc_cleared_alloc<named_label_entry> ();
446 ent->name = id;
447 }
448 *slot = ent;
449}
450
451/* The following two routines are used to interface to Objective-C++.
452 The binding level is purposely treated as an opaque type. */
453
454void *
455objc_get_current_scope (void)
456{
457 return current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
;
458}
459
460/* The following routine is used by the NeXT-style SJLJ exceptions;
461 variables get marked 'volatile' so as to not be clobbered by
462 _setjmp()/_longjmp() calls. All variables in the current scope,
463 as well as parent scopes up to (but not including) ENCLOSING_BLK
464 shall be thusly marked. */
465
466void
467objc_mark_locals_volatile (void *enclosing_blk)
468{
469 cp_binding_level *scope;
470
471 for (scope = current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
;
472 scope && scope != enclosing_blk;
473 scope = scope->level_chain)
474 {
475 tree decl;
476
477 for (decl = scope->names; decl; decl = TREE_CHAIN (decl)((contains_struct_check ((decl), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 477, __FUNCTION__))->common.chain)
)
478 objc_volatilize_decl (decl);
479
480 /* Do not climb up past the current function. */
481 if (scope->kind == sk_function_parms)
482 break;
483 }
484}
485
486/* True if B is the level for the condition of a constexpr if. */
487
488static bool
489level_for_constexpr_if (cp_binding_level *b)
490{
491 return (b->kind == sk_cond && b->this_entity
492 && TREE_CODE (b->this_entity)((enum tree_code) (b->this_entity)->base.code) == IF_STMT
493 && IF_STMT_CONSTEXPR_P (b->this_entity)((tree_not_check2 (((tree_check ((b->this_entity), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 493, __FUNCTION__, (IF_STMT)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 493, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
);
494}
495
496/* True if B is the level for the condition of a consteval if. */
497
498static bool
499level_for_consteval_if (cp_binding_level *b)
500{
501 return (b->kind == sk_cond && b->this_entity
502 && TREE_CODE (b->this_entity)((enum tree_code) (b->this_entity)->base.code) == IF_STMT
503 && IF_STMT_CONSTEVAL_P (b->this_entity)((tree_not_check2 (((tree_check ((b->this_entity), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 503, __FUNCTION__, (IF_STMT)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 503, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)
);
504}
505
506/* Update data for defined and undefined labels when leaving a scope. */
507
508int
509poplevel_named_label_1 (named_label_entry **slot, cp_binding_level *bl)
510{
511 named_label_entry *ent = *slot;
512 cp_binding_level *obl = bl->level_chain;
513
514 if (ent->binding_level == bl)
515 {
516 tree decl;
517
518 /* ENT->NAMES_IN_SCOPE may contain a mixture of DECLs and
519 TREE_LISTs representing OVERLOADs, so be careful. */
520 for (decl = ent->names_in_scope; decl; decl = (DECL_P (decl)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (decl)->base.code))] == tcc_declaration)
521 ? DECL_CHAIN (decl)(((contains_struct_check (((contains_struct_check ((decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 521, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 521, __FUNCTION__))->common.chain))
522 : TREE_CHAIN (decl)((contains_struct_check ((decl), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 522, __FUNCTION__))->common.chain)
))
523 if (decl_jump_unsafe (decl))
524 vec_safe_push (ent->bad_decls, decl);
525
526 ent->binding_level = obl;
527 ent->names_in_scope = obl->names;
528 switch (bl->kind)
529 {
530 case sk_try:
531 ent->in_try_scope = true;
532 break;
533 case sk_catch:
534 ent->in_catch_scope = true;
535 break;
536 case sk_omp:
537 ent->in_omp_scope = true;
538 break;
539 case sk_transaction:
540 ent->in_transaction_scope = true;
541 break;
542 case sk_stmt_expr:
543 ent->in_stmt_expr = true;
544 break;
545 case sk_block:
546 if (level_for_constexpr_if (bl->level_chain))
547 ent->in_constexpr_if = true;
548 else if (level_for_consteval_if (bl->level_chain))
549 ent->in_consteval_if = true;
550 break;
551 default:
552 break;
553 }
554 }
555 else if (ent->uses)
556 {
557 struct named_label_use_entry *use;
558
559 for (use = ent->uses; use ; use = use->next)
560 if (use->binding_level == bl)
561 {
562 use->binding_level = obl;
563 use->names_in_scope = obl->names;
564 if (bl->kind == sk_omp)
565 use->in_omp_scope = true;
566 }
567 }
568
569 return 1;
570}
571
572/* Saved errorcount to avoid -Wunused-but-set-{parameter,variable} warnings
573 when errors were reported, except for -Werror-unused-but-set-*. */
574static int unused_but_set_errorcount;
575
576/* Exit a binding level.
577 Pop the level off, and restore the state of the identifier-decl mappings
578 that were in effect when this level was entered.
579
580 If KEEP == 1, this level had explicit declarations, so
581 and create a "block" (a BLOCK node) for the level
582 to record its declarations and subblocks for symbol table output.
583
584 If FUNCTIONBODY is nonzero, this level is the body of a function,
585 so create a block as if KEEP were set and also clear out all
586 label names.
587
588 If REVERSE is nonzero, reverse the order of decls before putting
589 them into the BLOCK. */
590
591tree
592poplevel (int keep, int reverse, int functionbody)
593{
594 tree link;
595 /* The chain of decls was accumulated in reverse order.
596 Put it into forward order, just for cleanliness. */
597 tree decls;
598 tree subblocks;
599 tree block;
600 tree decl;
601 scope_kind kind;
602
603 auto_cond_timevar tv (TV_NAME_LOOKUP);
604 restart:
605
606 block = NULL_TREE(tree) __null;
607
608 gcc_assert (current_binding_level->kind != sk_class((void)(!((*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))->
kind != sk_class && (*((cfun + 0) && ((cfun +
0)->language) && ((cfun + 0)->language)->bindings
? &((cfun + 0)->language)->bindings : &scope_chain
->bindings))->kind != sk_namespace) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 609, __FUNCTION__), 0 : 0))
609 && current_binding_level->kind != sk_namespace)((void)(!((*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))->
kind != sk_class && (*((cfun + 0) && ((cfun +
0)->language) && ((cfun + 0)->language)->bindings
? &((cfun + 0)->language)->bindings : &scope_chain
->bindings))->kind != sk_namespace) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 609, __FUNCTION__), 0 : 0))
;
610
611 if (current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->kind == sk_cleanup)
612 functionbody = 0;
613 subblocks = functionbody >= 0 ? current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->blocks : 0;
614
615 gcc_assert (!vec_safe_length (current_binding_level->class_shadowed))((void)(!(!vec_safe_length ((*((cfun + 0) && ((cfun +
0)->language) && ((cfun + 0)->language)->bindings
? &((cfun + 0)->language)->bindings : &scope_chain
->bindings))->class_shadowed)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 615, __FUNCTION__), 0 : 0))
;
616
617 /* We used to use KEEP == 2 to indicate that the new block should go
618 at the beginning of the list of blocks at this binding level,
619 rather than the end. This hack is no longer used. */
620 gcc_assert (keep == 0 || keep == 1)((void)(!(keep == 0 || keep == 1) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 620, __FUNCTION__), 0 : 0))
;
621
622 if (current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->keep)
623 keep = 1;
624
625 /* Any uses of undefined labels, and any defined labels, now operate
626 under constraints of next binding contour. */
627 if (cfun(cfun + 0) && !functionbody && named_labels((cfun + 0)->language)->x_named_labels)
628 named_labels((cfun + 0)->language)->x_named_labels->traverse<cp_binding_level *, poplevel_named_label_1>
629 (current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
);
630
631 /* Get the decls in the order they were written.
632 Usually current_binding_level->names is in reverse order.
633 But parameter decls were previously put in forward order. */
634
635 decls = current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->names;
636 if (reverse)
637 {
638 decls = nreverse (decls);
639 current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->names = decls;
640 }
641
642 /* If there were any declarations or structure tags in that level,
643 or if this level is a function body,
644 create a BLOCK to record them for the life of this function. */
645 block = NULL_TREE(tree) __null;
646 /* Avoid function body block if possible. */
647 if (functionbody && subblocks && BLOCK_CHAIN (subblocks)((tree_check ((subblocks), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 647, __FUNCTION__, (BLOCK)))->block.chain)
== NULL_TREE(tree) __null)
648 keep = 0;
649 else if (keep == 1 || functionbody)
650 block = make_node (BLOCK);
651 if (block != NULL_TREE(tree) __null)
652 {
653 BLOCK_VARS (block)((tree_check ((block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 653, __FUNCTION__, (BLOCK)))->block.vars)
= decls;
654 BLOCK_SUBBLOCKS (block)((tree_check ((block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 654, __FUNCTION__, (BLOCK)))->block.subblocks)
= subblocks;
655 }
656
657 /* In each subblock, record that this is its superior. */
658 if (keep >= 0)
659 for (link = subblocks; link; link = BLOCK_CHAIN (link)((tree_check ((link), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 659, __FUNCTION__, (BLOCK)))->block.chain)
)
660 BLOCK_SUPERCONTEXT (link)((tree_check ((link), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 660, __FUNCTION__, (BLOCK)))->block.supercontext)
= block;
661
662 /* Before we remove the declarations first check for unused variables. */
663 if ((warn_unused_variableglobal_options.x_warn_unused_variable || warn_unused_but_set_variableglobal_options.x_warn_unused_but_set_variable)
664 && current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->kind != sk_template_parms
665 && !processing_template_declscope_chain->x_processing_template_decl)
666 for (tree d = get_local_decls (); d; d = TREE_CHAIN (d)((contains_struct_check ((d), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 666, __FUNCTION__))->common.chain)
)
667 {
668 /* There are cases where D itself is a TREE_LIST. See in
669 push_local_binding where the list of decls returned by
670 getdecls is built. */
671 decl = TREE_CODE (d)((enum tree_code) (d)->base.code) == TREE_LIST ? TREE_VALUE (d)((tree_check ((d), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 671, __FUNCTION__, (TREE_LIST)))->list.value)
: d;
672
673 tree type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 673, __FUNCTION__))->typed.type)
;
674 if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL)
675 && (! TREE_USED (decl)((decl)->base.used_flag) || !DECL_READ_P (decl)((tree_check2 ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 675, __FUNCTION__, (VAR_DECL), (PARM_DECL)))->decl_common
.decl_read_flag)
)
676 && ! DECL_IN_SYSTEM_HEADER (decl)(in_system_header_at (((contains_struct_check ((decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 676, __FUNCTION__))->decl_minimal.locus)))
677 /* For structured bindings, consider only real variables, not
678 subobjects. */
679 && (DECL_DECOMPOSITION_P (decl)((((enum tree_code) (decl)->base.code) == VAR_DECL) &&
((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 679, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 679, __FUNCTION__))->decl_common.lang_specific)->u.base
.selector == lds_decomp : false)
? !DECL_DECOMP_BASE (decl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 679, __FUNCTION__))->decl_common.lang_specific); if (!((
(enum tree_code) (decl)->base.code) == VAR_DECL) || lt->
u.base.selector != lds_decomp) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 679, __FUNCTION__); &lt->u.decomp; })->base)
680 : (DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 680, __FUNCTION__))->decl_minimal.name)
&& !DECL_ARTIFICIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 680, __FUNCTION__))->decl_common.artificial_flag)
))
681 && type != error_mark_nodeglobal_trees[TI_ERROR_MARK]
682 && (!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/decl.cc"
, 682, __FUNCTION__))->type_common.lang_flag_5))
683 || !TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)(((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 683, __FUNCTION__))->type_common.lang_flag_4))
684 || lookup_attribute ("warn_unused",
685 TYPE_ATTRIBUTES (TREE_TYPE (decl))((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 685, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 685, __FUNCTION__))->type_common.attributes)
)))
686 {
687 if (! TREE_USED (decl)((decl)->base.used_flag))
688 {
689 if (!DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 689, __FUNCTION__))->decl_minimal.name)
&& DECL_DECOMPOSITION_P (decl)((((enum tree_code) (decl)->base.code) == VAR_DECL) &&
((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 689, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 689, __FUNCTION__))->decl_common.lang_specific)->u.base
.selector == lds_decomp : false)
)
690 warning_at (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 690, __FUNCTION__))->decl_minimal.locus)
,
691 OPT_Wunused_variable,
692 "unused structured binding declaration");
693 else
694 warning_at (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 694, __FUNCTION__))->decl_minimal.locus)
,
695 OPT_Wunused_variable, "unused variable %qD", decl);
696 suppress_warning (decl, OPT_Wunused_variable);
697 }
698 else if (DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 698, __FUNCTION__))->decl_minimal.context)
== current_function_decl
699 // For -Wunused-but-set-variable leave references alone.
700 && !TYPE_REF_P (TREE_TYPE (decl))(((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 700, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE
)
701 && errorcount(global_dc)->diagnostic_count[(int) (DK_ERROR)] == unused_but_set_errorcount)
702 {
703 if (!DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 703, __FUNCTION__))->decl_minimal.name)
&& DECL_DECOMPOSITION_P (decl)((((enum tree_code) (decl)->base.code) == VAR_DECL) &&
((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 703, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 703, __FUNCTION__))->decl_common.lang_specific)->u.base
.selector == lds_decomp : false)
)
704 warning_at (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 704, __FUNCTION__))->decl_minimal.locus)
,
705 OPT_Wunused_but_set_variable, "structured "
706 "binding declaration set but not used");
707 else
708 warning_at (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 708, __FUNCTION__))->decl_minimal.locus)
,
709 OPT_Wunused_but_set_variable,
710 "variable %qD set but not used", decl);
711 unused_but_set_errorcount = errorcount(global_dc)->diagnostic_count[(int) (DK_ERROR)];
712 }
713 }
714 }
715
716 /* Remove declarations for all the DECLs in this level. */
717 for (link = decls; link; link = TREE_CHAIN (link)((contains_struct_check ((link), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 717, __FUNCTION__))->common.chain)
)
718 {
719 tree name;
720 if (TREE_CODE (link)((enum tree_code) (link)->base.code) == TREE_LIST)
721 {
722 decl = TREE_VALUE (link)((tree_check ((link), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 722, __FUNCTION__, (TREE_LIST)))->list.value)
;
723 name = TREE_PURPOSE (link)((tree_check ((link), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 723, __FUNCTION__, (TREE_LIST)))->list.purpose)
;
724 gcc_checking_assert (name)((void)(!(name) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 724, __FUNCTION__), 0 : 0))
;
725 }
726 else
727 {
728 decl = link;
729 name = DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 729, __FUNCTION__))->decl_minimal.name)
;
730 }
731
732 /* Remove the binding. */
733 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == LABEL_DECL)
734 pop_local_label (name, decl);
735 else
736 pop_local_binding (name, decl);
737 }
738
739 /* Restore the IDENTIFIER_TYPE_VALUEs. */
740 for (link = current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->type_shadowed;
741 link; link = TREE_CHAIN (link)((contains_struct_check ((link), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 741, __FUNCTION__))->common.chain)
)
742 SET_IDENTIFIER_TYPE_VALUE (TREE_PURPOSE (link), TREE_VALUE (link))(((contains_struct_check ((((tree_check ((link), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 742, __FUNCTION__, (TREE_LIST)))->list.purpose)), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 742, __FUNCTION__))->typed.type) = (((tree_check ((link)
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 742, __FUNCTION__, (TREE_LIST)))->list.value)))
;
743
744 /* There may be OVERLOADs (wrapped in TREE_LISTs) on the BLOCK_VARs
745 list if a `using' declaration put them there. The debugging
746 back ends won't understand OVERLOAD, so we remove them here.
747 Because the BLOCK_VARS are (temporarily) shared with
748 CURRENT_BINDING_LEVEL->NAMES we must do this fixup after we have
749 popped all the bindings. Also remove undeduced 'auto' decls,
750 which LTO doesn't understand, and can't have been used by anything. */
751 if (block)
752 {
753 tree* d;
754
755 for (d = &BLOCK_VARS (block)((tree_check ((block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 755, __FUNCTION__, (BLOCK)))->block.vars)
; *d; )
756 {
757 if (TREE_CODE (*d)((enum tree_code) (*d)->base.code) == TREE_LIST
758 || (!processing_template_declscope_chain->x_processing_template_decl
759 && undeduced_auto_decl (*d)))
760 *d = TREE_CHAIN (*d)((contains_struct_check ((*d), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 760, __FUNCTION__))->common.chain)
;
761 else
762 d = &DECL_CHAIN (*d)(((contains_struct_check (((contains_struct_check ((*d), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 762, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 762, __FUNCTION__))->common.chain))
;
763 }
764 }
765
766 /* If the level being exited is the top level of a function,
767 check over all the labels. */
768 if (functionbody)
769 {
770 if (block)
771 {
772 /* Since this is the top level block of a function, the vars are
773 the function's parameters. Don't leave them in the BLOCK
774 because they are found in the FUNCTION_DECL instead. */
775 BLOCK_VARS (block)((tree_check ((block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 775, __FUNCTION__, (BLOCK)))->block.vars)
= 0;
776 pop_labels (block);
777 }
778 else
779 pop_labels (subblocks);
780 }
781
782 kind = current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->kind;
783 if (kind == sk_cleanup)
784 {
785 tree stmt;
786
787 /* If this is a temporary binding created for a cleanup, then we'll
788 have pushed a statement list level. Pop that, create a new
789 BIND_EXPR for the block, and insert it into the stream. */
790 stmt = pop_stmt_list (current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->statement_list);
791 stmt = c_build_bind_expr (input_location, block, stmt);
792 add_stmt (stmt);
793 }
794
795 leave_scope ();
796 if (functionbody)
797 {
798 /* The current function is being defined, so its DECL_INITIAL
799 should be error_mark_node. */
800 gcc_assert (DECL_INITIAL (current_function_decl) == error_mark_node)((void)(!(((contains_struct_check ((current_function_decl), (
TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 800, __FUNCTION__))->decl_common.initial) == global_trees
[TI_ERROR_MARK]) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 800, __FUNCTION__), 0 : 0))
;
801 DECL_INITIAL (current_function_decl)((contains_struct_check ((current_function_decl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 801, __FUNCTION__))->decl_common.initial)
= block ? block : subblocks;
802 if (subblocks)
803 {
804 if (FUNCTION_NEEDS_BODY_BLOCK (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/decl.cc"
, 804, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) || ((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/decl.cc"
, 804, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
) || ((((enum tree_code) (current_function_decl)->base.code
) == FUNCTION_DECL || (((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/decl.cc"
, 804, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((current_function_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->base
.code) == FUNCTION_DECL)) && (((tree_not_check2 (((tree_check
((((contains_struct_check ((current_function_decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) && ((__extension__ ({ struct lang_decl
*lt = ((contains_struct_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/decl.cc"
, 804, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_common.lang_specific); if (!((
(enum tree_code) (current_function_decl)->base.code) == FUNCTION_DECL
|| (((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/decl.cc"
, 804, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((current_function_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __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/decl.cc"
, 804, __FUNCTION__); &lt->u.fn; })->ovl_op_code) ==
OVL_OP_CALL_EXPR) && (((enum tree_code) ((!(! (((contains_struct_check
((current_function_decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((current_function_decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL]))->base.code) == RECORD_TYPE && ((((
tree_class_check ((((tree_class_check (((!(! (((contains_struct_check
((current_function_decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((current_function_decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((current_function_decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.name))->base.code))]
== tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((current_function_decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((current_function_decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check (((!(! (((contains_struct_check
((current_function_decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((current_function_decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((current_function_decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.name))->base.code))]
== tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((current_function_decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((current_function_decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((current_function_decl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 804, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))))
)
805 {
806 if (BLOCK_SUBBLOCKS (subblocks)((tree_check ((subblocks), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 806, __FUNCTION__, (BLOCK)))->block.subblocks)
)
807 BLOCK_OUTER_CURLY_BRACE_P (BLOCK_SUBBLOCKS (subblocks))((tree_not_check2 (((tree_check ((((tree_check ((subblocks), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 807, __FUNCTION__, (BLOCK)))->block.subblocks)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 807, __FUNCTION__, (BLOCK)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 807, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= 1;
808 }
809 else
810 BLOCK_OUTER_CURLY_BRACE_P (subblocks)((tree_not_check2 (((tree_check ((subblocks), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 810, __FUNCTION__, (BLOCK)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 810, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= 1;
811 }
812 }
813 else if (block)
814 current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->blocks
815 = block_chainon (current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->blocks, block);
816
817 /* If we did not make a block for the level just exited,
818 any blocks made for inner levels
819 (since they cannot be recorded as subblocks in that level)
820 must be carried forward so they will later become subblocks
821 of something else. */
822 else if (subblocks)
823 current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->blocks
824 = block_chainon (current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->blocks, subblocks);
825
826 /* Each and every BLOCK node created here in `poplevel' is important
827 (e.g. for proper debugging information) so if we created one
828 earlier, mark it as "used". */
829 if (block)
830 TREE_USED (block)((block)->base.used_flag) = 1;
831
832 /* All temporary bindings created for cleanups are popped silently. */
833 if (kind == sk_cleanup)
834 goto restart;
835
836 return block;
837}
838
839/* Call wrapup_globals_declarations for the globals in NAMESPACE. */
840/* Diagnose odr-used extern inline variables without definitions
841 in the current TU. */
842
843int
844wrapup_namespace_globals ()
845{
846 if (vec<tree, va_gc> *statics = static_decls)
847 {
848 for (tree decl : *statics)
849 {
850 if (warn_unused_functionglobal_options.x_warn_unused_function
851 && TREE_CODE (decl)((enum tree_code) (decl)->base.code) == FUNCTION_DECL
852 && DECL_INITIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 852, __FUNCTION__))->decl_common.initial)
== 0
853 && DECL_EXTERNAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 853, __FUNCTION__))->decl_common.decl_flag_1)
854 && !TREE_PUBLIC (decl)((decl)->base.public_flag)
855 && !DECL_ARTIFICIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 855, __FUNCTION__))->decl_common.artificial_flag)
856 && !DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION (decl)(((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 856, __FUNCTION__))->decl_common.lang_specific) &&
(((contains_struct_check ((template_info_decl_check ((decl),
"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 856, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 856, __FUNCTION__))->decl_common.lang_specific) ->u.min
.template_info) && !(((contains_struct_check ((decl),
(TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 856, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template))
857 && !warning_suppressed_p (decl, OPT_Wunused_function))
858 warning_at (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 858, __FUNCTION__))->decl_minimal.locus)
,
859 OPT_Wunused_function,
860 "%qF declared %<static%> but never defined", decl);
861
862 if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL)
863 && DECL_EXTERNAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 863, __FUNCTION__))->decl_common.decl_flag_1)
864 && DECL_INLINE_VAR_P (decl)((((contains_struct_check (((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 864, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 864, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 864, __FUNCTION__))->decl_common.lang_specific)->u.base
.var_declared_inline_p : false) || (cxx_dialect >= cxx17 &&
((contains_struct_check (((tree_check2 (((((enum tree_code) (
decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 864, __FUNCTION__, (TEMPLATE_DECL))))))))->result : decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 864, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 864, __FUNCTION__))->decl_common.lang_flag_8) &&
(((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 864, __FUNCTION__))->decl_minimal.context) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((contains_struct_check
((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 864, __FUNCTION__))->decl_minimal.context))->base.code
))] == tcc_type))))
865 && DECL_ODR_USED (decl)(((contains_struct_check (((tree_check2 ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 865, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 865, __FUNCTION__))->decl_common.lang_specific) ->u.base
.odr_used)
)
866 error_at (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 866, __FUNCTION__))->decl_minimal.locus)
,
867 "odr-used inline variable %qD is not defined", decl);
868 }
869
870 /* Clear out the list, so we don't rescan next time. */
871 static_decls = NULL__null;
872
873 /* Write out any globals that need to be output. */
874 return wrapup_global_declarations (statics->address (),
875 statics->length ());
876 }
877 return 0;
878}
879
880/* In C++, you don't have to write `struct S' to refer to `S'; you
881 can just use `S'. We accomplish this by creating a TYPE_DECL as
882 if the user had written `typedef struct S S'. Create and return
883 the TYPE_DECL for TYPE. */
884
885tree
886create_implicit_typedef (tree name, tree type)
887{
888 tree decl;
889
890 decl = build_decl (input_location, TYPE_DECL, name, type);
891 DECL_ARTIFICIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 891, __FUNCTION__))->decl_common.artificial_flag)
= 1;
892 /* There are other implicit type declarations, like the one *within*
893 a class that allows you to write `S::S'. We must distinguish
894 amongst these. */
895 SET_DECL_IMPLICIT_TYPEDEF_P (decl)(((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 895, __FUNCTION__))->decl_common.lang_flag_2) = 1)
;
896 TYPE_NAME (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 896, __FUNCTION__))->type_common.name)
= decl;
897 TYPE_STUB_DECL (type)(((contains_struct_check (((tree_class_check ((type), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 897, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 897, __FUNCTION__))->common.chain))
= decl;
898
899 return decl;
900}
901
902/* Function-scope local entities that need discriminators. Each entry
903 is a {decl,name} pair. VAR_DECLs for anon unions get their name
904 smashed, so we cannot rely on DECL_NAME. */
905
906static GTY((deletable)) vec<tree, va_gc> *local_entities;
907
908/* Determine the mangling discriminator of local DECL. There are
909 generally very few of these in any particular function. */
910
911void
912determine_local_discriminator (tree decl)
913{
914 auto_cond_timevar tv (TV_NAME_LOOKUP);
915 retrofit_lang_decl (decl);
916 tree ctx = DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 916, __FUNCTION__))->decl_minimal.context)
;
917 tree name = (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TYPE_DECL
918 && TYPE_UNNAMED_P (TREE_TYPE (decl))((((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.name))->base.code))]
== tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.name))->base.code))]
== tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__, (IDENTIFIER_NODE)))->base.private_flag
)) && !((tree_check ((((((tree_class_check ((((tree_class_check
((((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.name))->base.code))]
== tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 918, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))
919 ? NULL_TREE(tree) __null : DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 919, __FUNCTION__))->decl_minimal.name)
);
920 size_t nelts = vec_safe_length (local_entities);
921 for (size_t i = 0; i < nelts; i += 2)
922 {
923 tree *pair = &(*local_entities)[i];
924 tree d = pair[0];
925 tree n = pair[1];
926 gcc_checking_assert (d != decl)((void)(!(d != decl) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 926, __FUNCTION__), 0 : 0))
;
927 if (name == n
928 && TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TREE_CODE (d)((enum tree_code) (d)->base.code)
929 && ctx == DECL_CONTEXT (d)((contains_struct_check ((d), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 929, __FUNCTION__))->decl_minimal.context)
)
930 {
931 tree disc = integer_one_nodeglobal_trees[TI_INTEGER_ONE];
932 if (DECL_DISCRIMINATOR (d)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
((d), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 932, __FUNCTION__))->decl_common.lang_specific); if (!((
((enum tree_code) (d)->base.code) == VAR_DECL || ((enum tree_code
) (d)->base.code) == FUNCTION_DECL) || ((enum tree_code) (
d)->base.code) == FIELD_DECL || ((enum tree_code) (d)->
base.code) == CONST_DECL || ((enum tree_code) (d)->base.code
) == TYPE_DECL || ((enum tree_code) (d)->base.code) == TEMPLATE_DECL
|| ((enum tree_code) (d)->base.code) == USING_DECL || ((enum
tree_code) (d)->base.code) == CONCEPT_DECL)) lang_check_failed
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 932, __FUNCTION__); &lt->u.min; })->access)
)
933 disc = build_int_cst (TREE_TYPE (disc)((contains_struct_check ((disc), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 933, __FUNCTION__))->typed.type)
,
934 TREE_INT_CST_LOW (DECL_DISCRIMINATOR (d))((unsigned long) (*tree_int_cst_elt_check (((__extension__ ({
struct lang_decl *lt = ((contains_struct_check ((d), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 934, __FUNCTION__))->decl_common.lang_specific); if (!((
((enum tree_code) (d)->base.code) == VAR_DECL || ((enum tree_code
) (d)->base.code) == FUNCTION_DECL) || ((enum tree_code) (
d)->base.code) == FIELD_DECL || ((enum tree_code) (d)->
base.code) == CONST_DECL || ((enum tree_code) (d)->base.code
) == TYPE_DECL || ((enum tree_code) (d)->base.code) == TEMPLATE_DECL
|| ((enum tree_code) (d)->base.code) == USING_DECL || ((enum
tree_code) (d)->base.code) == CONCEPT_DECL)) lang_check_failed
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 934, __FUNCTION__); &lt->u.min; })->access)), (0)
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 934, __FUNCTION__)))
+ 1);
935 DECL_DISCRIMINATOR (decl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 935, __FUNCTION__))->decl_common.lang_specific); if (!((
((enum tree_code) (decl)->base.code) == VAR_DECL || ((enum
tree_code) (decl)->base.code) == FUNCTION_DECL) || ((enum
tree_code) (decl)->base.code) == FIELD_DECL || ((enum tree_code
) (decl)->base.code) == CONST_DECL || ((enum tree_code) (decl
)->base.code) == TYPE_DECL || ((enum tree_code) (decl)->
base.code) == TEMPLATE_DECL || ((enum tree_code) (decl)->base
.code) == USING_DECL || ((enum tree_code) (decl)->base.code
) == CONCEPT_DECL)) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 935, __FUNCTION__); &lt->u.min; })->access)
= disc;
936 /* Replace the saved decl. */
937 pair[0] = decl;
938 decl = NULL_TREE(tree) __null;
939 break;
940 }
941 }
942
943 if (decl)
944 {
945 vec_safe_reserve (local_entities, 2);
946 local_entities->quick_push (decl);
947 local_entities->quick_push (name);
948 }
949}
950
951
952
953/* Returns true if functions FN1 and FN2 have equivalent trailing
954 requires clauses. */
955
956static bool
957function_requirements_equivalent_p (tree newfn, tree oldfn)
958{
959 /* In the concepts TS, the combined constraints are compared. */
960 if (cxx_dialect < cxx20)
961 {
962 tree ci1 = get_constraints (oldfn);
963 tree ci2 = get_constraints (newfn);
964 tree req1 = ci1 ? CI_ASSOCIATED_CONSTRAINTS (ci1)check_constraint_info (check_nonnull (ci1))->associated_constr : NULL_TREE(tree) __null;
965 tree req2 = ci2 ? CI_ASSOCIATED_CONSTRAINTS (ci2)check_constraint_info (check_nonnull (ci2))->associated_constr : NULL_TREE(tree) __null;
966 return cp_tree_equal (req1, req2);
967 }
968
969 /* Compare only trailing requirements. */
970 tree reqs1 = get_trailing_function_requirements (newfn);
971 tree reqs2 = get_trailing_function_requirements (oldfn);
972 if ((reqs1 != NULL_TREE(tree) __null) != (reqs2 != NULL_TREE(tree) __null))
973 return false;
974
975 /* Substitution is needed when friends are involved. */
976 reqs1 = maybe_substitute_reqs_for (reqs1, newfn);
977 reqs2 = maybe_substitute_reqs_for (reqs2, oldfn);
978
979 return cp_tree_equal (reqs1, reqs2);
980}
981
982/* Two functions of the same name correspond [basic.scope.scope] if
983
984 + both declare functions with the same non-object-parameter-type-list,
985 equivalent ([temp.over.link]) trailing requires-clauses (if any, except as
986 specified in [temp.friend]), and, if both are non-static members, they have
987 corresponding object parameters, or
988
989 + both declare function templates with equivalent
990 non-object-parameter-type-lists, return types (if any), template-heads, and
991 trailing requires-clauses (if any), and, if both are non-static members,
992 they have corresponding object parameters.
993
994 This is a subset of decls_match: it identifies declarations that cannot be
995 overloaded with one another. This function does not consider DECL_NAME. */
996
997bool
998fns_correspond (tree newdecl, tree olddecl)
999{
1000 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) != TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code))
1001 return false;
1002
1003 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL)
1004 {
1005 if (!template_heads_equivalent_p (newdecl, olddecl))
1006 return 0;
1007 newdecl = DECL_TEMPLATE_RESULT (newdecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1007, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1008 olddecl = DECL_TEMPLATE_RESULT (olddecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1008, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1009 }
1010
1011 tree f1 = TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1011, __FUNCTION__))->typed.type)
;
1012 tree f2 = TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1012, __FUNCTION__))->typed.type)
;
1013
1014 int rq1 = type_memfn_rqual (f1);
1015 int rq2 = type_memfn_rqual (f2);
1016
1017 /* If only one is a non-static member function, ignore ref-quals. */
1018 if (TREE_CODE (f1)((enum tree_code) (f1)->base.code) != TREE_CODE (f2)((enum tree_code) (f2)->base.code))
1019 rq1 = rq2;
1020 /* Two non-static member functions have corresponding object parameters if:
1021 + exactly one is an implicit object member function with no ref-qualifier
1022 and the types of their object parameters ([dcl.fct]), after removing
1023 top-level references, are the same, or
1024 + their object parameters have the same type. */
1025 /* ??? We treat member functions of different classes as corresponding even
1026 though that means the object parameters have different types. */
1027 else if ((rq1 == REF_QUAL_NONE) != (rq2 == REF_QUAL_NONE))
1028 rq1 = rq2;
1029
1030 bool types_match = rq1 == rq2;
1031
1032 if (types_match)
1033 {
1034 tree p1 = FUNCTION_FIRST_USER_PARMTYPE (newdecl)skip_artificial_parms_for ((newdecl), ((tree_check2 ((((contains_struct_check
((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1034, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1034, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
;
1035 tree p2 = FUNCTION_FIRST_USER_PARMTYPE (olddecl)skip_artificial_parms_for ((olddecl), ((tree_check2 ((((contains_struct_check
((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1035, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1035, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
;
1036 types_match = compparms (p1, p2);
1037 }
1038
1039 /* Two function declarations match if either has a requires-clause
1040 then both have a requires-clause and their constraints-expressions
1041 are equivalent. */
1042 if (types_match && flag_conceptsglobal_options.x_flag_concepts)
1043 types_match = function_requirements_equivalent_p (newdecl, olddecl);
1044
1045 return types_match;
1046}
1047
1048/* Subroutine of duplicate_decls: return truthvalue of whether
1049 or not types of these decls match.
1050
1051 For C++, we must compare the parameter list so that `int' can match
1052 `int&' in a parameter position, but `int&' is not confused with
1053 `const int&'. */
1054
1055int
1056decls_match (tree newdecl, tree olddecl, bool record_versions /* = true */)
1057{
1058 int types_match;
1059
1060 if (newdecl == olddecl)
1061 return 1;
1062
1063 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) != TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code))
1064 /* If the two DECLs are not even the same kind of thing, we're not
1065 interested in their types. */
1066 return 0;
1067
1068 gcc_assert (DECL_P (newdecl))((void)(!((tree_code_type_tmpl <0>::tree_code_type[(int
) (((enum tree_code) (newdecl)->base.code))] == tcc_declaration
)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1068, __FUNCTION__), 0 : 0))
;
1069
1070 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
1071 {
1072 /* Specializations of different templates are different functions
1073 even if they have the same type. */
1074 tree t1 = (DECL_USE_TEMPLATE (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1074, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template)
1075 ? DECL_TI_TEMPLATE (newdecl)((struct tree_template_info*)(tree_check (((((contains_struct_check
((template_info_decl_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1075, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1075, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1075, __FUNCTION__, (TEMPLATE_INFO))))->tmpl
1076 : NULL_TREE(tree) __null);
1077 tree t2 = (DECL_USE_TEMPLATE (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1077, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template)
1078 ? DECL_TI_TEMPLATE (olddecl)((struct tree_template_info*)(tree_check (((((contains_struct_check
((template_info_decl_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1078, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1078, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1078, __FUNCTION__, (TEMPLATE_INFO))))->tmpl
1079 : NULL_TREE(tree) __null);
1080 if (t1 != t2)
1081 return 0;
1082
1083 if (CP_DECL_CONTEXT (newdecl)(!(! (((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1083, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1083, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((newdecl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1083, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])
!= CP_DECL_CONTEXT (olddecl)(!(! (((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1083, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1083, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((olddecl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1083, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])
1084 && ! (DECL_EXTERN_C_P (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1084, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1084, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
1085 && DECL_EXTERN_C_P (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1085, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1085, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
))
1086 return 0;
1087
1088 /* A new declaration doesn't match a built-in one unless it
1089 is also extern "C". */
1090 if (DECL_IS_UNDECLARED_BUILTIN (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1090, __FUNCTION__))->decl_minimal.locus) <= ((location_t
) 1))
1091 && DECL_EXTERN_C_P (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1091, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1091, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
&& !DECL_EXTERN_C_P (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1091, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1091, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
)
1092 return 0;
1093
1094 tree f1 = TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1094, __FUNCTION__))->typed.type)
;
1095 tree f2 = TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1095, __FUNCTION__))->typed.type)
;
1096 if (TREE_CODE (f1)((enum tree_code) (f1)->base.code) != TREE_CODE (f2)((enum tree_code) (f2)->base.code))
1097 return 0;
1098
1099 /* A declaration with deduced return type should use its pre-deduction
1100 type for declaration matching. */
1101 tree r2 = fndecl_declared_return_type (olddecl);
1102 tree r1 = fndecl_declared_return_type (newdecl);
1103
1104 tree p1 = TYPE_ARG_TYPES (f1)((tree_check2 ((f1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1104, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
;
1105 tree p2 = TYPE_ARG_TYPES (f2)((tree_check2 ((f2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1105, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
;
1106
1107 if (same_type_p (r1, r2)comptypes ((r1), (r2), 0))
1108 {
1109 if (!prototype_p (f2) && DECL_EXTERN_C_P (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1109, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1109, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
1110 && fndecl_built_in_p (olddecl))
1111 {
1112 types_match = self_promoting_args_p (p1);
1113 if (p1 == void_list_nodeglobal_trees[TI_VOID_LIST_NODE])
1114 TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1114, __FUNCTION__))->typed.type)
= TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1114, __FUNCTION__))->typed.type)
;
1115 }
1116 else
1117 types_match =
1118 compparms (p1, p2)
1119 && type_memfn_rqual (f1) == type_memfn_rqual (f2)
1120 && (TYPE_ATTRIBUTES (TREE_TYPE (newdecl))((tree_class_check ((((contains_struct_check ((newdecl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1120, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1120, __FUNCTION__))->type_common.attributes)
== NULL_TREE(tree) __null
1121 || comp_type_attributes (TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1121, __FUNCTION__))->typed.type)
,
1122 TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1122, __FUNCTION__))->typed.type)
) != 0);
1123 }
1124 else
1125 types_match = 0;
1126
1127 /* Two function declarations match if either has a requires-clause
1128 then both have a requires-clause and their constraints-expressions
1129 are equivalent. */
1130 if (types_match && flag_conceptsglobal_options.x_flag_concepts)
1131 types_match = function_requirements_equivalent_p (newdecl, olddecl);
1132
1133 /* The decls dont match if they correspond to two different versions
1134 of the same function. Disallow extern "C" functions to be
1135 versions for now. */
1136 if (types_match
1137 && !DECL_EXTERN_C_P (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1137, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1137, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
1138 && !DECL_EXTERN_C_P (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1138, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1138, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
1139 && targetm.target_option.function_versions (newdecl, olddecl))
1140 {
1141 if (record_versions)
1142 maybe_version_functions (newdecl, olddecl,
1143 (!DECL_FUNCTION_VERSIONED (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1143, __FUNCTION__, (FUNCTION_DECL)))->function_decl.versioned_function
)
1144 || !DECL_FUNCTION_VERSIONED (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1144, __FUNCTION__, (FUNCTION_DECL)))->function_decl.versioned_function
)
));
1145 return 0;
1146 }
1147 }
1148 else if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL)
1149 {
1150 if (!template_heads_equivalent_p (newdecl, olddecl))
1151 return 0;
1152
1153 tree oldres = DECL_TEMPLATE_RESULT (olddecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1153, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1154 tree newres = DECL_TEMPLATE_RESULT (newdecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1154, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1155
1156 if (TREE_CODE (newres)((enum tree_code) (newres)->base.code) != TREE_CODE (oldres)((enum tree_code) (oldres)->base.code))
1157 return 0;
1158
1159 /* Two template types match if they are the same. Otherwise, compare
1160 the underlying declarations. */
1161 if (TREE_CODE (newres)((enum tree_code) (newres)->base.code) == TYPE_DECL)
1162 types_match = same_type_p (TREE_TYPE (newres), TREE_TYPE (oldres))comptypes ((((contains_struct_check ((newres), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1162, __FUNCTION__))->typed.type)), (((contains_struct_check
((oldres), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1162, __FUNCTION__))->typed.type)), 0)
;
1163 else
1164 types_match = decls_match (newres, oldres);
1165 }
1166 else
1167 {
1168 /* Need to check scope for variable declaration (VAR_DECL).
1169 For typedef (TYPE_DECL), scope is ignored. */
1170 if (VAR_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL)
1171 && CP_DECL_CONTEXT (newdecl)(!(! (((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1171, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1171, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((newdecl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1171, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])
!= CP_DECL_CONTEXT (olddecl)(!(! (((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1171, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1171, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((olddecl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1171, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])
1172 /* [dcl.link]
1173 Two declarations for an object with C language linkage
1174 with the same name (ignoring the namespace that qualify
1175 it) that appear in different namespace scopes refer to
1176 the same object. */
1177 && !(DECL_EXTERN_C_P (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1177, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1177, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
&& DECL_EXTERN_C_P (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1177, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1177, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
))
1178 return 0;
1179
1180 if (TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1180, __FUNCTION__))->typed.type)
== error_mark_nodeglobal_trees[TI_ERROR_MARK])
1181 types_match = TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1181, __FUNCTION__))->typed.type)
== error_mark_nodeglobal_trees[TI_ERROR_MARK];
1182 else if (TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1182, __FUNCTION__))->typed.type)
== NULL_TREE(tree) __null)
1183 types_match = TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1183, __FUNCTION__))->typed.type)
== NULL_TREE(tree) __null;
1184 else if (TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1184, __FUNCTION__))->typed.type)
== NULL_TREE(tree) __null)
1185 types_match = 0;
1186 else
1187 types_match = comptypes (TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1187, __FUNCTION__))->typed.type)
,
1188 TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1188, __FUNCTION__))->typed.type)
,
1189 COMPARE_REDECLARATION4);
1190 }
1191
1192 return types_match;
1193}
1194
1195/* Mark DECL as versioned if it isn't already. */
1196
1197static void
1198maybe_mark_function_versioned (tree decl)
1199{
1200 if (!DECL_FUNCTION_VERSIONED (decl)((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1200, __FUNCTION__, (FUNCTION_DECL)))->function_decl.versioned_function
)
)
1201 {
1202 DECL_FUNCTION_VERSIONED (decl)((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1202, __FUNCTION__, (FUNCTION_DECL)))->function_decl.versioned_function
)
= 1;
1203 /* If DECL_ASSEMBLER_NAME has already been set, re-mangle
1204 to include the version marker. */
1205 if (DECL_ASSEMBLER_NAME_SET_P (decl)(((contains_struct_check ((decl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1205, __FUNCTION__))->decl_with_vis.assembler_name) != (
tree) __null)
)
1206 mangle_decl (decl);
1207 }
1208}
1209
1210/* NEWDECL and OLDDECL have identical signatures. If they are
1211 different versions adjust them and return true.
1212 If RECORD is set to true, record function versions. */
1213
1214bool
1215maybe_version_functions (tree newdecl, tree olddecl, bool record)
1216{
1217 if (!targetm.target_option.function_versions (newdecl, olddecl))
1218 return false;
1219
1220 maybe_mark_function_versioned (olddecl);
1221 if (DECL_LOCAL_DECL_P (olddecl)((contains_struct_check (((tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1221, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1221, __FUNCTION__))->decl_common.lang_flag_0)
)
1222 {
1223 olddecl = DECL_LOCAL_DECL_ALIAS (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((void)(!(((contains_struct_check (((tree_check2 ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__), 0 : 0)), olddecl)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__))->decl_common.lang_specific); if (!(
(((enum tree_code) ((((void)(!(((contains_struct_check (((tree_check2
((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__), 0 : 0)), olddecl))->base.code) == VAR_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__), 0 : 0)), olddecl))->base.code) == FUNCTION_DECL
) || ((enum tree_code) ((((void)(!(((contains_struct_check ((
(tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__), 0 : 0)), olddecl))->base.code) == FIELD_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__), 0 : 0)), olddecl))->base.code) == CONST_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__), 0 : 0)), olddecl))->base.code) == TYPE_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__), 0 : 0)), olddecl))->base.code) == TEMPLATE_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__), 0 : 0)), olddecl))->base.code) == USING_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__), 0 : 0)), olddecl))->base.code) == CONCEPT_DECL
)) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1223, __FUNCTION__); &lt->u.min; })->access)
;
1224 maybe_mark_function_versioned (olddecl);
1225 }
1226
1227 maybe_mark_function_versioned (newdecl);
1228 if (DECL_LOCAL_DECL_P (newdecl)((contains_struct_check (((tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1228, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1228, __FUNCTION__))->decl_common.lang_flag_0)
)
1229 {
1230 /* Unfortunately, we can get here before pushdecl naturally calls
1231 push_local_extern_decl_alias, so we need to call it directly. */
1232 if (!DECL_LOCAL_DECL_ALIAS (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((void)(!(((contains_struct_check (((tree_check2 ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__), 0 : 0)), newdecl)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__))->decl_common.lang_specific); if (!(
(((enum tree_code) ((((void)(!(((contains_struct_check (((tree_check2
((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__), 0 : 0)), newdecl))->base.code) == VAR_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__), 0 : 0)), newdecl))->base.code) == FUNCTION_DECL
) || ((enum tree_code) ((((void)(!(((contains_struct_check ((
(tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__), 0 : 0)), newdecl))->base.code) == FIELD_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__), 0 : 0)), newdecl))->base.code) == CONST_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__), 0 : 0)), newdecl))->base.code) == TYPE_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__), 0 : 0)), newdecl))->base.code) == TEMPLATE_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__), 0 : 0)), newdecl))->base.code) == USING_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__), 0 : 0)), newdecl))->base.code) == CONCEPT_DECL
)) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1232, __FUNCTION__); &lt->u.min; })->access)
)
1233 push_local_extern_decl_alias (newdecl);
1234 newdecl = DECL_LOCAL_DECL_ALIAS (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((void)(!(((contains_struct_check (((tree_check2 ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__), 0 : 0)), newdecl)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__))->decl_common.lang_specific); if (!(
(((enum tree_code) ((((void)(!(((contains_struct_check (((tree_check2
((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__), 0 : 0)), newdecl))->base.code) == VAR_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__), 0 : 0)), newdecl))->base.code) == FUNCTION_DECL
) || ((enum tree_code) ((((void)(!(((contains_struct_check ((
(tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__), 0 : 0)), newdecl))->base.code) == FIELD_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__), 0 : 0)), newdecl))->base.code) == CONST_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__), 0 : 0)), newdecl))->base.code) == TYPE_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__), 0 : 0)), newdecl))->base.code) == TEMPLATE_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__), 0 : 0)), newdecl))->base.code) == USING_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__), 0 : 0)), newdecl))->base.code) == CONCEPT_DECL
)) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1234, __FUNCTION__); &lt->u.min; })->access)
;
1235 maybe_mark_function_versioned (newdecl);
1236 }
1237
1238 if (record)
1239 cgraph_node::record_function_versions (olddecl, newdecl);
1240
1241 return true;
1242}
1243
1244/* If NEWDECL is `static' and an `extern' was seen previously,
1245 warn about it. OLDDECL is the previous declaration.
1246
1247 Note that this does not apply to the C++ case of declaring
1248 a variable `extern const' and then later `const'.
1249
1250 Don't complain about built-in functions, since they are beyond
1251 the user's control. */
1252
1253void
1254warn_extern_redeclared_static (tree newdecl, tree olddecl)
1255{
1256 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == TYPE_DECL
1257 || TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
1258 || TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == CONST_DECL
1259 || TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == NAMESPACE_DECL)
1260 return;
1261
1262 /* Don't get confused by static member functions; that's a different
1263 use of `static'. */
1264 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
1265 && DECL_STATIC_FUNCTION_P (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1265, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1265, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1265, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1265, __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/decl.cc"
, 1265, __FUNCTION__); &lt->u.fn; })->static_function
)
)
1266 return;
1267
1268 /* If the old declaration was `static', or the new one isn't, then
1269 everything is OK. */
1270 if (DECL_THIS_STATIC (olddecl)((contains_struct_check (((tree_check3 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1270, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL), (PARM_DECL
)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1270, __FUNCTION__))->decl_common.lang_flag_6)
|| !DECL_THIS_STATIC (newdecl)((contains_struct_check (((tree_check3 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1270, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL), (PARM_DECL
)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1270, __FUNCTION__))->decl_common.lang_flag_6)
)
1271 return;
1272
1273 /* It's OK to declare a builtin function as `static'. */
1274 if (TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
1275 && DECL_ARTIFICIAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1275, __FUNCTION__))->decl_common.artificial_flag)
)
1276 return;
1277
1278 auto_diagnostic_group d;
1279 if (permerror (DECL_SOURCE_LOCATION (newdecl)((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1279, __FUNCTION__))->decl_minimal.locus)
,
1280 "%qD was declared %<extern%> and later %<static%>", newdecl))
1281 inform (DECL_SOURCE_LOCATION (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1281, __FUNCTION__))->decl_minimal.locus)
,
1282 "previous declaration of %qD", olddecl);
1283}
1284
1285/* NEW_DECL is a redeclaration of OLD_DECL; both are functions or
1286 function templates. If their exception specifications do not
1287 match, issue a diagnostic. */
1288
1289static void
1290check_redeclaration_exception_specification (tree new_decl,
1291 tree old_decl)
1292{
1293 tree new_exceptions = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (new_decl))((tree_class_check (((tree_check2 ((((contains_struct_check (
(new_decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1293, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1293, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1293, __FUNCTION__))->type_non_common.lang_1)
;
1294 tree old_exceptions = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (old_decl))((tree_class_check (((tree_check2 ((((contains_struct_check (
(old_decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1294, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1294, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1294, __FUNCTION__))->type_non_common.lang_1)
;
1295
1296 /* Two default specs are equivalent, don't force evaluation. */
1297 if (UNEVALUATED_NOEXCEPT_SPEC_P (new_exceptions)(((new_exceptions) && (((tree_check ((new_exceptions)
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1297, __FUNCTION__, (TREE_LIST)))->list.purpose)) &&
(((enum tree_code) (((tree_check ((new_exceptions), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1297, __FUNCTION__, (TREE_LIST)))->list.purpose))->base
.code) == DEFERRED_NOEXCEPT)) && (((struct tree_deferred_noexcept
*)(tree_check ((((tree_check ((new_exceptions), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1297, __FUNCTION__, (TREE_LIST)))->list.purpose)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1297, __FUNCTION__, (DEFERRED_NOEXCEPT))))->pattern) == (
tree) __null)
1298 && UNEVALUATED_NOEXCEPT_SPEC_P (old_exceptions)(((old_exceptions) && (((tree_check ((old_exceptions)
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1298, __FUNCTION__, (TREE_LIST)))->list.purpose)) &&
(((enum tree_code) (((tree_check ((old_exceptions), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1298, __FUNCTION__, (TREE_LIST)))->list.purpose))->base
.code) == DEFERRED_NOEXCEPT)) && (((struct tree_deferred_noexcept
*)(tree_check ((((tree_check ((old_exceptions), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1298, __FUNCTION__, (TREE_LIST)))->list.purpose)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1298, __FUNCTION__, (DEFERRED_NOEXCEPT))))->pattern) == (
tree) __null)
)
1299 return;
1300
1301 if (!type_dependent_expression_p (old_decl))
1302 {
1303 maybe_instantiate_noexcept (new_decl);
1304 maybe_instantiate_noexcept (old_decl);
1305 }
1306 new_exceptions = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (new_decl))((tree_class_check (((tree_check2 ((((contains_struct_check (
(new_decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1306, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1306, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1306, __FUNCTION__))->type_non_common.lang_1)
;
1307 old_exceptions = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (old_decl))((tree_class_check (((tree_check2 ((((contains_struct_check (
(old_decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1307, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1307, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1307, __FUNCTION__))->type_non_common.lang_1)
;
1308
1309 /* [except.spec]
1310
1311 If any declaration of a function has an exception-specification,
1312 all declarations, including the definition and an explicit
1313 specialization, of that function shall have an
1314 exception-specification with the same set of type-ids. */
1315 if (!DECL_IS_UNDECLARED_BUILTIN (old_decl)(((contains_struct_check ((old_decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1315, __FUNCTION__))->decl_minimal.locus) <= ((location_t
) 1))
1316 && !DECL_IS_UNDECLARED_BUILTIN (new_decl)(((contains_struct_check ((new_decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1316, __FUNCTION__))->decl_minimal.locus) <= ((location_t
) 1))
1317 && !comp_except_specs (new_exceptions, old_exceptions, ce_normal))
1318 {
1319 const char *const msg
1320 = G_("declaration of %qF has a different exception specifier")"declaration of %qF has a different exception specifier";
1321 bool complained = true;
1322 location_t new_loc = DECL_SOURCE_LOCATION (new_decl)((contains_struct_check ((new_decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1322, __FUNCTION__))->decl_minimal.locus)
;
1323 auto_diagnostic_group d;
1324 if (DECL_IN_SYSTEM_HEADER (old_decl)(in_system_header_at (((contains_struct_check ((old_decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1324, __FUNCTION__))->decl_minimal.locus)))
)
1325 complained = pedwarn (new_loc, OPT_Wsystem_headers, msg, new_decl);
1326 else if (!flag_exceptionsglobal_options.x_flag_exceptions)
1327 /* We used to silently permit mismatched eh specs with
1328 -fno-exceptions, so make them a pedwarn now. */
1329 complained = pedwarn (new_loc, OPT_Wpedantic, msg, new_decl);
1330 else
1331 error_at (new_loc, msg, new_decl);
1332 if (complained)
1333 inform (DECL_SOURCE_LOCATION (old_decl)((contains_struct_check ((old_decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1333, __FUNCTION__))->decl_minimal.locus)
,
1334 "from previous declaration %qF", old_decl);
1335 }
1336}
1337
1338/* Return true if OLD_DECL and NEW_DECL agree on constexprness.
1339 Otherwise issue diagnostics. */
1340
1341static bool
1342validate_constexpr_redeclaration (tree old_decl, tree new_decl)
1343{
1344 old_decl = STRIP_TEMPLATE (old_decl)(((enum tree_code) (old_decl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((old_decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1344, __FUNCTION__, (TEMPLATE_DECL))))))))->result : old_decl
)
;
1345 new_decl = STRIP_TEMPLATE (new_decl)(((enum tree_code) (new_decl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((new_decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1345, __FUNCTION__, (TEMPLATE_DECL))))))))->result : new_decl
)
;
1346 if (!VAR_OR_FUNCTION_DECL_P (old_decl)(((enum tree_code) (old_decl)->base.code) == VAR_DECL || (
(enum tree_code) (old_decl)->base.code) == FUNCTION_DECL)
1347 || !VAR_OR_FUNCTION_DECL_P (new_decl)(((enum tree_code) (new_decl)->base.code) == VAR_DECL || (
(enum tree_code) (new_decl)->base.code) == FUNCTION_DECL)
)
1348 return true;
1349 if (DECL_DECLARED_CONSTEXPR_P (old_decl)((contains_struct_check (((tree_check2 (((((enum tree_code) (
old_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1349, __FUNCTION__, (TEMPLATE_DECL))))))))->result : old_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1349, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1349, __FUNCTION__))->decl_common.lang_flag_8)
1350 == DECL_DECLARED_CONSTEXPR_P (new_decl)((contains_struct_check (((tree_check2 (((((enum tree_code) (
new_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1350, __FUNCTION__, (TEMPLATE_DECL))))))))->result : new_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1350, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1350, __FUNCTION__))->decl_common.lang_flag_8)
)
1351 {
1352 if (TREE_CODE (old_decl)((enum tree_code) (old_decl)->base.code) != FUNCTION_DECL)
1353 return true;
1354 if (DECL_IMMEDIATE_FUNCTION_P (old_decl)(((contains_struct_check (((tree_check (((((enum tree_code) (
old_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1354, __FUNCTION__, (TEMPLATE_DECL))))))))->result : old_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1354, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1354, __FUNCTION__))->decl_common.lang_specific) ? __extension__
({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code
) (old_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1354, __FUNCTION__, (TEMPLATE_DECL))))))))->result : old_decl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1354, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (old_decl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (old_decl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((old_decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1354, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1354, __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/decl.cc"
, 1354, __FUNCTION__); &lt->u.fn; })->immediate_fn_p
: false)
1355 == DECL_IMMEDIATE_FUNCTION_P (new_decl)(((contains_struct_check (((tree_check (((((enum tree_code) (
new_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1355, __FUNCTION__, (TEMPLATE_DECL))))))))->result : new_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1355, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1355, __FUNCTION__))->decl_common.lang_specific) ? __extension__
({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code
) (new_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1355, __FUNCTION__, (TEMPLATE_DECL))))))))->result : new_decl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1355, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (new_decl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (new_decl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((new_decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1355, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1355, __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/decl.cc"
, 1355, __FUNCTION__); &lt->u.fn; })->immediate_fn_p
: false)
)
1356 return true;
1357 }
1358 if (TREE_CODE (old_decl)((enum tree_code) (old_decl)->base.code) == FUNCTION_DECL)
1359 {
1360 /* With -fimplicit-constexpr, ignore changes in the constexpr
1361 keyword. */
1362 if (flag_implicit_constexprglobal_options.x_flag_implicit_constexpr
1363 && (DECL_IMMEDIATE_FUNCTION_P (new_decl)(((contains_struct_check (((tree_check (((((enum tree_code) (
new_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1363, __FUNCTION__, (TEMPLATE_DECL))))))))->result : new_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1363, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1363, __FUNCTION__))->decl_common.lang_specific) ? __extension__
({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code
) (new_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1363, __FUNCTION__, (TEMPLATE_DECL))))))))->result : new_decl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1363, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (new_decl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (new_decl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((new_decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1363, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1363, __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/decl.cc"
, 1363, __FUNCTION__); &lt->u.fn; })->immediate_fn_p
: false)
1364 == DECL_IMMEDIATE_FUNCTION_P (old_decl)(((contains_struct_check (((tree_check (((((enum tree_code) (
old_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1364, __FUNCTION__, (TEMPLATE_DECL))))))))->result : old_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1364, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1364, __FUNCTION__))->decl_common.lang_specific) ? __extension__
({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code
) (old_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1364, __FUNCTION__, (TEMPLATE_DECL))))))))->result : old_decl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1364, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (old_decl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (old_decl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((old_decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1364, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1364, __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/decl.cc"
, 1364, __FUNCTION__); &lt->u.fn; })->immediate_fn_p
: false)
))
1365 return true;
1366 if (fndecl_built_in_p (old_decl))
1367 {
1368 /* Hide a built-in declaration. */
1369 DECL_DECLARED_CONSTEXPR_P (old_decl)((contains_struct_check (((tree_check2 (((((enum tree_code) (
old_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1369, __FUNCTION__, (TEMPLATE_DECL))))))))->result : old_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1369, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1369, __FUNCTION__))->decl_common.lang_flag_8)
1370 = DECL_DECLARED_CONSTEXPR_P (new_decl)((contains_struct_check (((tree_check2 (((((enum tree_code) (
new_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1370, __FUNCTION__, (TEMPLATE_DECL))))))))->result : new_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1370, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1370, __FUNCTION__))->decl_common.lang_flag_8)
;
1371 if (DECL_IMMEDIATE_FUNCTION_P (new_decl)(((contains_struct_check (((tree_check (((((enum tree_code) (
new_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1371, __FUNCTION__, (TEMPLATE_DECL))))))))->result : new_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1371, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1371, __FUNCTION__))->decl_common.lang_specific) ? __extension__
({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code
) (new_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1371, __FUNCTION__, (TEMPLATE_DECL))))))))->result : new_decl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1371, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (new_decl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (new_decl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((new_decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1371, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1371, __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/decl.cc"
, 1371, __FUNCTION__); &lt->u.fn; })->immediate_fn_p
: false)
)
1372 SET_DECL_IMMEDIATE_FUNCTION_P (old_decl)(retrofit_lang_decl ((tree_check ((old_decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1372, __FUNCTION__, (FUNCTION_DECL)))), __extension__ ({ struct
lang_decl *lt = ((contains_struct_check (((((enum tree_code)
(old_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1372, __FUNCTION__, (TEMPLATE_DECL))))))))->result : old_decl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1372, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (old_decl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (old_decl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((old_decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1372, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1372, __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/decl.cc"
, 1372, __FUNCTION__); &lt->u.fn; })->immediate_fn_p
= true)
;
1373 return true;
1374 }
1375 /* 7.1.5 [dcl.constexpr]
1376 Note: An explicit specialization can differ from the template
1377 declaration with respect to the constexpr specifier. */
1378 if (! DECL_TEMPLATE_SPECIALIZATION (old_decl)((((contains_struct_check ((old_decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1378, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) == 2)
1379 && DECL_TEMPLATE_SPECIALIZATION (new_decl)((((contains_struct_check ((new_decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1379, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) == 2)
)
1380 return true;
1381
1382 const char *kind = "constexpr";
1383 if (DECL_IMMEDIATE_FUNCTION_P (old_decl)(((contains_struct_check (((tree_check (((((enum tree_code) (
old_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1383, __FUNCTION__, (TEMPLATE_DECL))))))))->result : old_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1383, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1383, __FUNCTION__))->decl_common.lang_specific) ? __extension__
({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code
) (old_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1383, __FUNCTION__, (TEMPLATE_DECL))))))))->result : old_decl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1383, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (old_decl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (old_decl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((old_decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1383, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1383, __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/decl.cc"
, 1383, __FUNCTION__); &lt->u.fn; })->immediate_fn_p
: false)
1384 || DECL_IMMEDIATE_FUNCTION_P (new_decl)(((contains_struct_check (((tree_check (((((enum tree_code) (
new_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1384, __FUNCTION__, (TEMPLATE_DECL))))))))->result : new_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1384, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1384, __FUNCTION__))->decl_common.lang_specific) ? __extension__
({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code
) (new_decl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1384, __FUNCTION__, (TEMPLATE_DECL))))))))->result : new_decl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1384, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (new_decl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (new_decl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((new_decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1384, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1384, __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/decl.cc"
, 1384, __FUNCTION__); &lt->u.fn; })->immediate_fn_p
: false)
)
1385 kind = "consteval";
1386 error_at (DECL_SOURCE_LOCATION (new_decl)((contains_struct_check ((new_decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1386, __FUNCTION__))->decl_minimal.locus)
,
1387 "redeclaration %qD differs in %qs "
1388 "from previous declaration", new_decl,
1389 kind);
1390 inform (DECL_SOURCE_LOCATION (old_decl)((contains_struct_check ((old_decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1390, __FUNCTION__))->decl_minimal.locus)
,
1391 "previous declaration %qD", old_decl);
1392 return false;
1393 }
1394 return true;
1395}
1396
1397// If OLDDECL and NEWDECL are concept declarations with the same type
1398// (i.e., and template parameters), but different requirements,
1399// emit diagnostics and return true. Otherwise, return false.
1400static inline bool
1401check_concept_refinement (tree olddecl, tree newdecl)
1402{
1403 if (!DECL_DECLARED_CONCEPT_P (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1403, __FUNCTION__))->decl_common.lang_specific)->u.base
.concept_p)
|| !DECL_DECLARED_CONCEPT_P (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1403, __FUNCTION__))->decl_common.lang_specific)->u.base
.concept_p)
)
1404 return false;
1405
1406 tree d1 = DECL_TEMPLATE_RESULT (olddecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1406, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1407 tree d2 = DECL_TEMPLATE_RESULT (newdecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1407, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1408 if (TREE_CODE (d1)((enum tree_code) (d1)->base.code) != TREE_CODE (d2)((enum tree_code) (d2)->base.code))
1409 return false;
1410
1411 tree t1 = TREE_TYPE (d1)((contains_struct_check ((d1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1411, __FUNCTION__))->typed.type)
;
1412 tree t2 = TREE_TYPE (d2)((contains_struct_check ((d2), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1412, __FUNCTION__))->typed.type)
;
1413 if (TREE_CODE (d1)((enum tree_code) (d1)->base.code) == FUNCTION_DECL)
1414 {
1415 if (compparms (TYPE_ARG_TYPES (t1)((tree_check2 ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1415, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
, TYPE_ARG_TYPES (t2)((tree_check2 ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1415, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
)
1416 && comp_template_parms (DECL_TEMPLATE_PARMS (olddecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1416, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments
,
1417 DECL_TEMPLATE_PARMS (newdecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1417, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments
)
1418 && !equivalently_constrained (olddecl, newdecl))
1419 {
1420 error ("cannot specialize concept %q#D", olddecl);
1421 return true;
1422 }
1423 }
1424 return false;
1425}
1426
1427/* DECL is a redeclaration of a function or function template. If
1428 it does have default arguments issue a diagnostic. Note: this
1429 function is used to enforce the requirements in C++11 8.3.6 about
1430 no default arguments in redeclarations. */
1431
1432static void
1433check_redeclaration_no_default_args (tree decl)
1434{
1435 gcc_assert (DECL_DECLARES_FUNCTION_P (decl))((void)(!((((enum tree_code) (decl)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (decl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1435, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1435, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1435, __FUNCTION__), 0 : 0))
;
1436
1437 for (tree t = FUNCTION_FIRST_USER_PARMTYPE (decl)skip_artificial_parms_for ((decl), ((tree_check2 ((((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1437, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1437, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
;
1438 t && t != void_list_nodeglobal_trees[TI_VOID_LIST_NODE]; t = TREE_CHAIN (t)((contains_struct_check ((t), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1438, __FUNCTION__))->common.chain)
)
1439 if (TREE_PURPOSE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1439, __FUNCTION__, (TREE_LIST)))->list.purpose)
)
1440 {
1441 permerror (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1441, __FUNCTION__))->decl_minimal.locus)
,
1442 "redeclaration of %q#D may not have default "
1443 "arguments", decl);
1444 return;
1445 }
1446}
1447
1448/* NEWDECL is a redeclaration of a function or function template OLDDECL,
1449 in any case represented as FUNCTION_DECLs (the DECL_TEMPLATE_RESULTs of
1450 the TEMPLATE_DECLs in case of function templates). This function is used
1451 to enforce the final part of C++17 11.3.6/4, about a single declaration:
1452 "If a friend declaration specifies a default argument expression, that
1453 declaration shall be a definition and shall be the only declaration of
1454 the function or function template in the translation unit." */
1455
1456static void
1457check_no_redeclaration_friend_default_args (tree olddecl, tree newdecl)
1458{
1459 if (!DECL_UNIQUE_FRIEND_P (olddecl)(((contains_struct_check (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1459, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1459, __FUNCTION__))->decl_common.lang_specific) ->u.
base.friend_or_tls)
&& !DECL_UNIQUE_FRIEND_P (newdecl)(((contains_struct_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1459, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1459, __FUNCTION__))->decl_common.lang_specific) ->u.
base.friend_or_tls)
)
1460 return;
1461
1462 for (tree t1 = FUNCTION_FIRST_USER_PARMTYPE (olddecl)skip_artificial_parms_for ((olddecl), ((tree_check2 ((((contains_struct_check
((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1462, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1462, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
,
1463 t2 = FUNCTION_FIRST_USER_PARMTYPE (newdecl)skip_artificial_parms_for ((newdecl), ((tree_check2 ((((contains_struct_check
((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1463, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1463, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
;
1464 t1 && t1 != void_list_nodeglobal_trees[TI_VOID_LIST_NODE];
1465 t1 = TREE_CHAIN (t1)((contains_struct_check ((t1), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1465, __FUNCTION__))->common.chain)
, t2 = TREE_CHAIN (t2)((contains_struct_check ((t2), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1465, __FUNCTION__))->common.chain)
)
1466 if ((DECL_UNIQUE_FRIEND_P (olddecl)(((contains_struct_check (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1466, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1466, __FUNCTION__))->decl_common.lang_specific) ->u.
base.friend_or_tls)
&& TREE_PURPOSE (t1)((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1466, __FUNCTION__, (TREE_LIST)))->list.purpose)
)
1467 || (DECL_UNIQUE_FRIEND_P (newdecl)(((contains_struct_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1467, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1467, __FUNCTION__))->decl_common.lang_specific) ->u.
base.friend_or_tls)
&& TREE_PURPOSE (t2)((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1467, __FUNCTION__, (TREE_LIST)))->list.purpose)
))
1468 {
1469 auto_diagnostic_group d;
1470 if (permerror (DECL_SOURCE_LOCATION (newdecl)((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1470, __FUNCTION__))->decl_minimal.locus)
,
1471 "friend declaration of %q#D specifies default "
1472 "arguments and isn%'t the only declaration", newdecl))
1473 inform (DECL_SOURCE_LOCATION (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1473, __FUNCTION__))->decl_minimal.locus)
,
1474 "previous declaration of %q#D", olddecl);
1475 return;
1476 }
1477}
1478
1479/* Merge tree bits that correspond to attributes noreturn, nothrow,
1480 const, malloc, and pure from NEWDECL with those of OLDDECL. */
1481
1482static void
1483merge_attribute_bits (tree newdecl, tree olddecl)
1484{
1485 TREE_THIS_VOLATILE (newdecl)((newdecl)->base.volatile_flag) |= TREE_THIS_VOLATILE (olddecl)((olddecl)->base.volatile_flag);
1486 TREE_THIS_VOLATILE (olddecl)((olddecl)->base.volatile_flag) |= TREE_THIS_VOLATILE (newdecl)((newdecl)->base.volatile_flag);
1487 TREE_NOTHROW (newdecl)((newdecl)->base.nothrow_flag) |= TREE_NOTHROW (olddecl)((olddecl)->base.nothrow_flag);
1488 TREE_NOTHROW (olddecl)((olddecl)->base.nothrow_flag) |= TREE_NOTHROW (newdecl)((newdecl)->base.nothrow_flag);
1489 TREE_READONLY (newdecl)((non_type_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1489, __FUNCTION__))->base.readonly_flag)
|= TREE_READONLY (olddecl)((non_type_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1489, __FUNCTION__))->base.readonly_flag)
;
1490 TREE_READONLY (olddecl)((non_type_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1490, __FUNCTION__))->base.readonly_flag)
|= TREE_READONLY (newdecl)((non_type_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1490, __FUNCTION__))->base.readonly_flag)
;
1491 DECL_IS_MALLOC (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1491, __FUNCTION__, (FUNCTION_DECL)))->function_decl.malloc_flag
)
|= DECL_IS_MALLOC (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1491, __FUNCTION__, (FUNCTION_DECL)))->function_decl.malloc_flag
)
;
1492 DECL_IS_MALLOC (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1492, __FUNCTION__, (FUNCTION_DECL)))->function_decl.malloc_flag
)
|= DECL_IS_MALLOC (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1492, __FUNCTION__, (FUNCTION_DECL)))->function_decl.malloc_flag
)
;
1493 DECL_PURE_P (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1493, __FUNCTION__, (FUNCTION_DECL)))->function_decl.pure_flag
)
|= DECL_PURE_P (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1493, __FUNCTION__, (FUNCTION_DECL)))->function_decl.pure_flag
)
;
1494 DECL_PURE_P (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1494, __FUNCTION__, (FUNCTION_DECL)))->function_decl.pure_flag
)
|= DECL_PURE_P (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1494, __FUNCTION__, (FUNCTION_DECL)))->function_decl.pure_flag
)
;
1495 DECL_UNINLINABLE (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1495, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
|= DECL_UNINLINABLE (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1495, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
;
1496 DECL_UNINLINABLE (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1496, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
|= DECL_UNINLINABLE (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1496, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
;
1497}
1498
1499#define GNU_INLINE_P(fn)(((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1499, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
) && lookup_attribute ("gnu_inline", ((contains_struct_check
((fn), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1499, __FUNCTION__))->decl_common.attributes)))
(DECL_DECLARED_INLINE_P (fn)((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1499, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
\
1500 && lookup_attribute ("gnu_inline", \
1501 DECL_ATTRIBUTES (fn)((contains_struct_check ((fn), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1501, __FUNCTION__))->decl_common.attributes)
))
1502
1503/* A subroutine of duplicate_decls. Emits a diagnostic when newdecl
1504 ambiguates olddecl. Returns true if an error occurs. */
1505
1506static bool
1507duplicate_function_template_decls (tree newdecl, tree olddecl)
1508{
1509
1510 tree newres = DECL_TEMPLATE_RESULT (newdecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1510, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1511 tree oldres = DECL_TEMPLATE_RESULT (olddecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1511, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1512 /* Function template declarations can be differentiated by parameter
1513 and return type. */
1514 if (compparms (TYPE_ARG_TYPES (TREE_TYPE (oldres))((tree_check2 ((((contains_struct_check ((oldres), (TS_TYPED)
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1514, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1514, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
,
1515 TYPE_ARG_TYPES (TREE_TYPE (newres))((tree_check2 ((((contains_struct_check ((newres), (TS_TYPED)
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1515, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1515, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
)
1516 && same_type_p (TREE_TYPE (TREE_TYPE (newdecl)),comptypes ((((contains_struct_check ((((contains_struct_check
((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1516, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1516, __FUNCTION__))->typed.type)), (((contains_struct_check
((((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1517, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1517, __FUNCTION__))->typed.type)), 0)
1517 TREE_TYPE (TREE_TYPE (olddecl)))comptypes ((((contains_struct_check ((((contains_struct_check
((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1516, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1516, __FUNCTION__))->typed.type)), (((contains_struct_check
((((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1517, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1517, __FUNCTION__))->typed.type)), 0)
)
1518 {
1519 /* ... and also by their template-heads and requires-clauses. */
1520 if (template_heads_equivalent_p (newdecl, olddecl)
1521 && function_requirements_equivalent_p (newres, oldres))
1522 {
1523 error ("ambiguating new declaration %q+#D", newdecl);
1524 inform (DECL_SOURCE_LOCATION (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1524, __FUNCTION__))->decl_minimal.locus)
,
1525 "old declaration %q#D", olddecl);
1526 return true;
1527 }
1528
1529 /* FIXME: The types are the same but the are differences
1530 in either the template heads or function requirements.
1531 We should be able to diagnose a set of common errors
1532 stemming from these declarations. For example:
1533
1534 template<typename T> requires C void f(...);
1535 template<typename T> void f(...) requires C;
1536
1537 These are functionally equivalent but not equivalent. */
1538 }
1539
1540 return false;
1541}
1542
1543/* OLD_PARMS is the innermost set of template parameters for some template
1544 declaration, and NEW_PARMS is the corresponding set of template parameters
1545 for a redeclaration of that template. Merge the default arguments within
1546 these two sets of parameters. CLASS_P is true iff the template in
1547 question is a class template. */
1548
1549bool
1550merge_default_template_args (tree new_parms, tree old_parms, bool class_p)
1551{
1552 gcc_checking_assert (TREE_VEC_LENGTH (new_parms)((void)(!(((tree_check ((new_parms), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1552, __FUNCTION__, (TREE_VEC)))->base.u.length) == ((tree_check
((old_parms), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1553, __FUNCTION__, (TREE_VEC)))->base.u.length)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1553, __FUNCTION__), 0 : 0))
1553 == TREE_VEC_LENGTH (old_parms))((void)(!(((tree_check ((new_parms), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1552, __FUNCTION__, (TREE_VEC)))->base.u.length) == ((tree_check
((old_parms), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1553, __FUNCTION__, (TREE_VEC)))->base.u.length)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1553, __FUNCTION__), 0 : 0))
;
1554 for (int i = 0; i < TREE_VEC_LENGTH (new_parms)((tree_check ((new_parms), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1554, __FUNCTION__, (TREE_VEC)))->base.u.length)
; i++)
1555 {
1556 tree new_parm = TREE_VALUE (TREE_VEC_ELT (new_parms, i))((tree_check (((*((const_cast<tree *> (tree_vec_elt_check
((new_parms), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1556, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1556, __FUNCTION__, (TREE_LIST)))->list.value)
;
1557 tree old_parm = TREE_VALUE (TREE_VEC_ELT (old_parms, i))((tree_check (((*((const_cast<tree *> (tree_vec_elt_check
((old_parms), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1557, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1557, __FUNCTION__, (TREE_LIST)))->list.value)
;
1558 tree& new_default = TREE_PURPOSE (TREE_VEC_ELT (new_parms, i))((tree_check (((*((const_cast<tree *> (tree_vec_elt_check
((new_parms), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1558, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1558, __FUNCTION__, (TREE_LIST)))->list.purpose)
;
1559 tree& old_default = TREE_PURPOSE (TREE_VEC_ELT (old_parms, i))((tree_check (((*((const_cast<tree *> (tree_vec_elt_check
((old_parms), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1559, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1559, __FUNCTION__, (TREE_LIST)))->list.purpose)
;
1560 if (error_operand_p (new_parm) || error_operand_p (old_parm))
1561 return false;
1562 if (new_default != NULL_TREE(tree) __null && old_default != NULL_TREE(tree) __null)
1563 {
1564 auto_diagnostic_group d;
1565 error ("redefinition of default argument for %q+#D", new_parm);
1566 inform (DECL_SOURCE_LOCATION (old_parm)((contains_struct_check ((old_parm), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1566, __FUNCTION__))->decl_minimal.locus)
,
1567 "original definition appeared here");
1568 return false;
1569 }
1570 else if (new_default != NULL_TREE(tree) __null)
1571 /* Update the previous template parameters (which are the ones
1572 that will really count) with the new default value. */
1573 old_default = new_default;
1574 else if (class_p && old_default != NULL_TREE(tree) __null)
1575 /* Update the new parameters, too; they'll be used as the
1576 parameters for any members. */
1577 new_default = old_default;
1578 }
1579 return true;
1580}
1581
1582/* If NEWDECL is a redeclaration of OLDDECL, merge the declarations.
1583 If the redeclaration is invalid, a diagnostic is issued, and the
1584 error_mark_node is returned. Otherwise, OLDDECL is returned.
1585
1586 If NEWDECL is not a redeclaration of OLDDECL, NULL_TREE is
1587 returned.
1588
1589 HIDING is true if the new decl is being hidden. WAS_HIDDEN is true
1590 if the old decl was hidden.
1591
1592 Hidden decls can be anticipated builtins, injected friends, or
1593 (coming soon) injected from a local-extern decl. */
1594
1595tree
1596duplicate_decls (tree newdecl, tree olddecl, bool hiding, bool was_hidden)
1597{
1598 unsigned olddecl_uid = DECL_UID (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1598, __FUNCTION__))->decl_minimal.uid)
;
1599 int types_match = 0;
1600 int new_defines_function = 0;
1601 tree new_template_info;
1602 location_t olddecl_loc = DECL_SOURCE_LOCATION (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1602, __FUNCTION__))->decl_minimal.locus)
;
1603 location_t newdecl_loc = DECL_SOURCE_LOCATION (newdecl)((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1603, __FUNCTION__))->decl_minimal.locus)
;
1604
1605 if (newdecl == olddecl)
1606 return olddecl;
1607
1608 types_match = decls_match (newdecl, olddecl);
1609
1610 /* If either the type of the new decl or the type of the old decl is an
1611 error_mark_node, then that implies that we have already issued an
1612 error (earlier) for some bogus type specification, and in that case,
1613 it is rather pointless to harass the user with yet more error message
1614 about the same declaration, so just pretend the types match here. */
1615 if (TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1615, __FUNCTION__))->typed.type)
== error_mark_nodeglobal_trees[TI_ERROR_MARK]
1616 || TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1616, __FUNCTION__))->typed.type)
== error_mark_nodeglobal_trees[TI_ERROR_MARK])
1617 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1618
1619 /* Check for redeclaration and other discrepancies. */
1620 if (TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
1621 && DECL_IS_UNDECLARED_BUILTIN (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1621, __FUNCTION__))->decl_minimal.locus) <= ((location_t
) 1))
)
1622 {
1623 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) != FUNCTION_DECL)
1624 {
1625 /* Avoid warnings redeclaring built-ins which have not been
1626 explicitly declared. */
1627 if (was_hidden)
1628 {
1629 if (TREE_PUBLIC (newdecl)((newdecl)->base.public_flag)
1630 && CP_DECL_CONTEXT (newdecl)(!(! (((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1630, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1630, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((newdecl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1630, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])
== global_namespacecp_global_trees[CPTI_GLOBAL])
1631 warning_at (newdecl_loc,
1632 OPT_Wbuiltin_declaration_mismatch,
1633 "built-in function %qD declared as non-function",
1634 newdecl);
1635 return NULL_TREE(tree) __null;
1636 }
1637
1638 /* If you declare a built-in or predefined function name as static,
1639 the old definition is overridden, but optionally warn this was a
1640 bad choice of name. */
1641 if (! TREE_PUBLIC (newdecl)((newdecl)->base.public_flag))
1642 {
1643 warning_at (newdecl_loc,
1644 OPT_Wshadow,
1645 fndecl_built_in_p (olddecl)
1646 ? G_("shadowing built-in function %q#D")"shadowing built-in function %q#D"
1647 : G_("shadowing library function %q#D")"shadowing library function %q#D", olddecl);
1648 /* Discard the old built-in function. */
1649 return NULL_TREE(tree) __null;
1650 }
1651 /* If the built-in is not ansi, then programs can override
1652 it even globally without an error. */
1653 else if (! fndecl_built_in_p (olddecl))
1654 warning_at (newdecl_loc, 0,
1655 "library function %q#D redeclared as non-function %q#D",
1656 olddecl, newdecl);
1657 else
1658 error_at (newdecl_loc,
1659 "declaration of %q#D conflicts with built-in "
1660 "declaration %q#D", newdecl, olddecl);
1661 return NULL_TREE(tree) __null;
1662 }
1663 else if (!types_match)
1664 {
1665 /* Avoid warnings redeclaring built-ins which have not been
1666 explicitly declared. */
1667 if (was_hidden)
1668 {
1669 tree t1, t2;
1670
1671 /* A new declaration doesn't match a built-in one unless it
1672 is also extern "C". */
1673 gcc_assert (DECL_IS_UNDECLARED_BUILTIN (olddecl))((void)(!((((contains_struct_check ((olddecl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1673, __FUNCTION__))->decl_minimal.locus) <= ((location_t
) 1))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1673, __FUNCTION__), 0 : 0))
;
1674 gcc_assert (DECL_EXTERN_C_P (olddecl))((void)(!(((((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1674, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1674, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1674, __FUNCTION__), 0 : 0))
;
1675 if (!DECL_EXTERN_C_P (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1675, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1675, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
)
1676 return NULL_TREE(tree) __null;
1677
1678 for (t1 = TYPE_ARG_TYPES (TREE_TYPE (newdecl))((tree_check2 ((((contains_struct_check ((newdecl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1678, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1678, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
,
1679 t2 = TYPE_ARG_TYPES (TREE_TYPE (olddecl))((tree_check2 ((((contains_struct_check ((olddecl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1679, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1679, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
;
1680 t1 || t2;
1681 t1 = TREE_CHAIN (t1)((contains_struct_check ((t1), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1681, __FUNCTION__))->common.chain)
, t2 = TREE_CHAIN (t2)((contains_struct_check ((t2), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1681, __FUNCTION__))->common.chain)
)
1682 {
1683 if (!t1 || !t2)
1684 break;
1685 /* FILE, tm types are not known at the time
1686 we create the builtins. */
1687 for (unsigned i = 0;
1688 i < sizeof (builtin_structptr_types)
1689 / sizeof (builtin_structptr_type);
1690 ++i)
1691 if (TREE_VALUE (t2)((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1691, __FUNCTION__, (TREE_LIST)))->list.value)
== builtin_structptr_types[i].node)
1692 {
1693 tree t = TREE_VALUE (t1)((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1693, __FUNCTION__, (TREE_LIST)))->list.value)
;
1694
1695 if (TYPE_PTR_P (t)(((enum tree_code) (t)->base.code) == POINTER_TYPE)
1696 && TYPE_IDENTIFIER (TREE_TYPE (t))(((tree_class_check ((((contains_struct_check ((t), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1696, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1696, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1696, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1696, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1696, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1696, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1696, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1696, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1696, __FUNCTION__))->type_common.name))
1697 == get_identifier (builtin_structptr_types[i].str)(__builtin_constant_p (builtin_structptr_types[i].str) ? get_identifier_with_length
((builtin_structptr_types[i].str), strlen (builtin_structptr_types
[i].str)) : get_identifier (builtin_structptr_types[i].str))
1698 && compparms (TREE_CHAIN (t1)((contains_struct_check ((t1), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1698, __FUNCTION__))->common.chain)
, TREE_CHAIN (t2)((contains_struct_check ((t2), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1698, __FUNCTION__))->common.chain)
))
1699 {
1700 tree oldargs = TYPE_ARG_TYPES (TREE_TYPE (olddecl))((tree_check2 ((((contains_struct_check ((olddecl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1700, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1700, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
;
1701
1702 TYPE_ARG_TYPES (TREE_TYPE (olddecl))((tree_check2 ((((contains_struct_check ((olddecl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1702, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1702, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
1703 = TYPE_ARG_TYPES (TREE_TYPE (newdecl))((tree_check2 ((((contains_struct_check ((newdecl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1703, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1703, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
;
1704 types_match = decls_match (newdecl, olddecl);
1705 if (types_match)
1706 return duplicate_decls (newdecl, olddecl,
1707 hiding, was_hidden);
1708 TYPE_ARG_TYPES (TREE_TYPE (olddecl))((tree_check2 ((((contains_struct_check ((olddecl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1708, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1708, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
= oldargs;
1709 }
1710 goto next_arg;
1711 }
1712
1713 if (! same_type_p (TREE_VALUE (t1), TREE_VALUE (t2))comptypes ((((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1713, __FUNCTION__, (TREE_LIST)))->list.value)), (((tree_check
((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1713, __FUNCTION__, (TREE_LIST)))->list.value)), 0)
)
1714 break;
1715 next_arg:;
1716 }
1717
1718 warning_at (newdecl_loc,
1719 OPT_Wbuiltin_declaration_mismatch,
1720 "declaration of %q#D conflicts with built-in "
1721 "declaration %q#D", newdecl, olddecl);
1722 }
1723 else if ((DECL_EXTERN_C_P (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1723, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1723, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
1724 && DECL_EXTERN_C_P (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1724, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1724, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
)
1725 || compparms (TYPE_ARG_TYPES (TREE_TYPE (newdecl))((tree_check2 ((((contains_struct_check ((newdecl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1725, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1725, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
,
1726 TYPE_ARG_TYPES (TREE_TYPE (olddecl))((tree_check2 ((((contains_struct_check ((olddecl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1726, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1726, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
))
1727 {
1728 /* Don't really override olddecl for __* prefixed builtins
1729 except for __[^b]*_chk, the compiler might be using those
1730 explicitly. */
1731 if (fndecl_built_in_p (olddecl))
1732 {
1733 tree id = DECL_NAME (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1733, __FUNCTION__))->decl_minimal.name)
;
1734 const char *name = IDENTIFIER_POINTER (id)((const char *) (tree_check ((id), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1734, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.str
)
;
1735 size_t len;
1736
1737 if (name[0] == '_'
1738 && name[1] == '_'
1739 && (startswith (name + 2, "builtin_")
1740 || (len = strlen (name)) <= strlen ("___chk")
1741 || memcmp (name + len - strlen ("_chk"),
1742 "_chk", strlen ("_chk") + 1) != 0))
1743 {
1744 if (DECL_INITIAL (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1744, __FUNCTION__))->decl_common.initial)
)
1745 {
1746 error_at (newdecl_loc,
1747 "definition of %q#D ambiguates built-in "
1748 "declaration %q#D", newdecl, olddecl);
1749 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1750 }
1751 auto_diagnostic_group d;
1752 if (permerror (newdecl_loc,
1753 "new declaration %q#D ambiguates built-in"
1754 " declaration %q#D", newdecl, olddecl)
1755 && flag_permissiveglobal_options.x_flag_permissive)
1756 inform (newdecl_loc,
1757 "ignoring the %q#D declaration", newdecl);
1758 return flag_permissiveglobal_options.x_flag_permissive ? olddecl : error_mark_nodeglobal_trees[TI_ERROR_MARK];
1759 }
1760 }
1761
1762 /* A near match; override the builtin. */
1763
1764 if (TREE_PUBLIC (newdecl)((newdecl)->base.public_flag))
1765 warning_at (newdecl_loc,
1766 OPT_Wbuiltin_declaration_mismatch,
1767 "new declaration %q#D ambiguates built-in "
1768 "declaration %q#D", newdecl, olddecl);
1769 else
1770 warning (OPT_Wshadow,
1771 fndecl_built_in_p (olddecl)
1772 ? G_("shadowing built-in function %q#D")"shadowing built-in function %q#D"
1773 : G_("shadowing library function %q#D")"shadowing library function %q#D", olddecl);
1774 }
1775 else
1776 /* Discard the old built-in function. */
1777 return NULL_TREE(tree) __null;
1778
1779 /* Replace the old RTL to avoid problems with inlining. */
1780 COPY_DECL_RTL (newdecl, olddecl)((contains_struct_check ((olddecl), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1780, __FUNCTION__))->decl_with_rtl.rtl = (contains_struct_check
((newdecl), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1780, __FUNCTION__))->decl_with_rtl.rtl)
;
1781 }
1782 else
1783 {
1784 /* Even if the types match, prefer the new declarations type
1785 for built-ins which have not been explicitly declared,
1786 for exception lists, etc... */
1787 tree type = TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1787, __FUNCTION__))->typed.type)
;
1788 tree attribs = (*targetm.merge_type_attributes)
1789 (TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1789, __FUNCTION__))->typed.type)
, type);
1790
1791 type = cp_build_type_attribute_variant (type, attribs);
1792 TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1792, __FUNCTION__))->typed.type)
= TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1792, __FUNCTION__))->typed.type)
= type;
1793 }
1794
1795 /* If a function is explicitly declared "throw ()", propagate that to
1796 the corresponding builtin. */
1797 if (DECL_BUILT_IN_CLASS (olddecl)((built_in_class) (tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1797, __FUNCTION__, (FUNCTION_DECL)))->function_decl.built_in_class
)
== BUILT_IN_NORMAL
1798 && was_hidden
1799 && TREE_NOTHROW (newdecl)((newdecl)->base.nothrow_flag)
1800 && !TREE_NOTHROW (olddecl)((olddecl)->base.nothrow_flag))
1801 {
1802 enum built_in_function fncode = DECL_FUNCTION_CODE (olddecl);
1803 tree tmpdecl = builtin_decl_explicit (fncode);
1804 if (tmpdecl && tmpdecl != olddecl && types_match)
1805 TREE_NOTHROW (tmpdecl)((tmpdecl)->base.nothrow_flag) = 1;
1806 }
1807
1808 /* Whether or not the builtin can throw exceptions has no
1809 bearing on this declarator. */
1810 TREE_NOTHROW (olddecl)((olddecl)->base.nothrow_flag) = 0;
1811
1812 if (DECL_THIS_STATIC (newdecl)((contains_struct_check (((tree_check3 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1812, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL), (PARM_DECL
)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1812, __FUNCTION__))->decl_common.lang_flag_6)
&& !DECL_THIS_STATIC (olddecl)((contains_struct_check (((tree_check3 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1812, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL), (PARM_DECL
)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1812, __FUNCTION__))->decl_common.lang_flag_6)
)
1813 {
1814 /* If a builtin function is redeclared as `static', merge
1815 the declarations, but make the original one static. */
1816 DECL_THIS_STATIC (olddecl)((contains_struct_check (((tree_check3 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1816, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL), (PARM_DECL
)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1816, __FUNCTION__))->decl_common.lang_flag_6)
= 1;
1817 TREE_PUBLIC (olddecl)((olddecl)->base.public_flag) = 0;
1818
1819 /* Make the old declaration consistent with the new one so
1820 that all remnants of the builtin-ness of this function
1821 will be banished. */
1822 SET_DECL_LANGUAGE (olddecl, DECL_LANGUAGE (newdecl))(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1822, __FUNCTION__))->decl_common.lang_specific)->u.base
.language = ((((contains_struct_check ((newdecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1822, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1822, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus))))
;
1823 COPY_DECL_RTL (newdecl, olddecl)((contains_struct_check ((olddecl), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1823, __FUNCTION__))->decl_with_rtl.rtl = (contains_struct_check
((newdecl), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1823, __FUNCTION__))->decl_with_rtl.rtl)
;
1824 }
1825 }
1826 else if (TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) != TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code))
1827 {
1828 /* C++ Standard, 3.3, clause 4:
1829 "[Note: a namespace name or a class template name must be unique
1830 in its declarative region (7.3.2, clause 14). ]" */
1831 if (TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == NAMESPACE_DECL
1832 || TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == NAMESPACE_DECL)
1833 /* Namespace conflicts with not namespace. */;
1834 else if (DECL_TYPE_TEMPLATE_P (olddecl)(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1834, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1834, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == TYPE_DECL)
1835 || DECL_TYPE_TEMPLATE_P (newdecl)(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1835, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1835, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == TYPE_DECL)
)
1836 /* Class template conflicts. */;
1837 else if ((TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
1838 && DECL_TEMPLATE_RESULT (olddecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1838, __FUNCTION__, (TEMPLATE_DECL))))))))->result
1839 && TREE_CODE (DECL_TEMPLATE_RESULT (olddecl))((enum tree_code) (((struct tree_template_decl *)(const_cast<
union tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1839, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code)
== VAR_DECL)
1840 || (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
1841 && DECL_TEMPLATE_RESULT (newdecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1841, __FUNCTION__, (TEMPLATE_DECL))))))))->result
1842 && TREE_CODE (DECL_TEMPLATE_RESULT (newdecl))((enum tree_code) (((struct tree_template_decl *)(const_cast<
union tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1842, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code)
== VAR_DECL))
1843 /* Variable template conflicts. */;
1844 else if (concept_definition_p (olddecl)
1845 || concept_definition_p (newdecl))
1846 /* Concept conflicts. */;
1847 else if ((TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
1848 && DECL_FUNCTION_TEMPLATE_P (olddecl)(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1848, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1848, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)
)
1849 || (TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
1850 && DECL_FUNCTION_TEMPLATE_P (newdecl)(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1850, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1850, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)
))
1851 {
1852 /* One is a function and the other is a template
1853 function. */
1854 if (!UDLIT_OPER_P (DECL_NAME (newdecl))(!strncmp (((const char *) (tree_check ((((contains_struct_check
((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1854, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1854, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.str
), "operator\"\"", sizeof ("operator\"\"") - 1))
)
1855 return NULL_TREE(tree) __null;
1856
1857 /* There can only be one! */
1858 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
1859 && check_raw_literal_operator (olddecl))
1860 error_at (newdecl_loc,
1861 "literal operator %q#D conflicts with"
1862 " raw literal operator", newdecl);
1863 else if (check_raw_literal_operator (newdecl))
1864 error_at (newdecl_loc,
1865 "raw literal operator %q#D conflicts with"
1866 " literal operator template", newdecl);
1867 else
1868 return NULL_TREE(tree) __null;
1869
1870 inform (olddecl_loc, "previous declaration %q#D", olddecl);
1871 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1872 }
1873 else if ((VAR_P (olddecl)(((enum tree_code) (olddecl)->base.code) == VAR_DECL) && DECL_DECOMPOSITION_P (olddecl)((((enum tree_code) (olddecl)->base.code) == VAR_DECL) &&
((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1873, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1873, __FUNCTION__))->decl_common.lang_specific)->u.base
.selector == lds_decomp : false)
)
1874 || (VAR_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL) && DECL_DECOMPOSITION_P (newdecl)((((enum tree_code) (newdecl)->base.code) == VAR_DECL) &&
((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1874, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1874, __FUNCTION__))->decl_common.lang_specific)->u.base
.selector == lds_decomp : false)
))
1875 /* A structured binding must be unique in its declarative region. */;
1876 else if (DECL_IMPLICIT_TYPEDEF_P (olddecl)(((enum tree_code) (olddecl)->base.code) == TYPE_DECL &&
((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1876, __FUNCTION__))->decl_common.lang_flag_2))
1877 || DECL_IMPLICIT_TYPEDEF_P (newdecl)(((enum tree_code) (newdecl)->base.code) == TYPE_DECL &&
((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1877, __FUNCTION__))->decl_common.lang_flag_2))
)
1878 /* One is an implicit typedef, that's ok. */
1879 return NULL_TREE(tree) __null;
1880
1881 error ("%q#D redeclared as different kind of entity", newdecl);
1882 inform (olddecl_loc, "previous declaration %q#D", olddecl);
1883
1884 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1885 }
1886 else if (!types_match)
1887 {
1888 if (CP_DECL_CONTEXT (newdecl)(!(! (((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1888, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1888, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((newdecl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1888, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])
!= CP_DECL_CONTEXT (olddecl)(!(! (((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1888, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1888, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((olddecl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1888, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])
)
1889 /* These are certainly not duplicate declarations; they're
1890 from different scopes. */
1891 return NULL_TREE(tree) __null;
1892
1893 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL)
1894 {
1895 tree oldres = DECL_TEMPLATE_RESULT (olddecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1895, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1896 tree newres = DECL_TEMPLATE_RESULT (newdecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1896, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1897
1898 /* The name of a class template may not be declared to refer to
1899 any other template, class, function, object, namespace, value,
1900 or type in the same scope. */
1901 if (TREE_CODE (oldres)((enum tree_code) (oldres)->base.code) == TYPE_DECL
1902 || TREE_CODE (newres)((enum tree_code) (newres)->base.code) == TYPE_DECL)
1903 {
1904 error_at (newdecl_loc,
1905 "conflicting declaration of template %q#D", newdecl);
1906 inform (olddecl_loc,
1907 "previous declaration %q#D", olddecl);
1908 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1909 }
1910
1911 else if (TREE_CODE (oldres)((enum tree_code) (oldres)->base.code) == FUNCTION_DECL
1912 && TREE_CODE (newres)((enum tree_code) (newres)->base.code) == FUNCTION_DECL)
1913 {
1914 if (duplicate_function_template_decls (newdecl, olddecl))
1915 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1916 return NULL_TREE(tree) __null;
1917 }
1918 else if (check_concept_refinement (olddecl, newdecl))
1919 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1920 return NULL_TREE(tree) __null;
1921 }
1922 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
1923 {
1924 if (DECL_EXTERN_C_P (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1924, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1924, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
&& DECL_EXTERN_C_P (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1924, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1924, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)
)
1925 {
1926 error_at (newdecl_loc,
1927 "conflicting declaration of C function %q#D",
1928 newdecl);
1929 inform (olddecl_loc,
1930 "previous declaration %q#D", olddecl);
1931 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1932 }
1933 /* For function versions, params and types match, but they
1934 are not ambiguous. */
1935 else if ((!DECL_FUNCTION_VERSIONED (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1935, __FUNCTION__, (FUNCTION_DECL)))->function_decl.versioned_function
)
1936 && !DECL_FUNCTION_VERSIONED (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1936, __FUNCTION__, (FUNCTION_DECL)))->function_decl.versioned_function
)
)
1937 // The functions have the same parameter types.
1938 && compparms (TYPE_ARG_TYPES (TREE_TYPE (newdecl))((tree_check2 ((((contains_struct_check ((newdecl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1938, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1938, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
,
1939 TYPE_ARG_TYPES (TREE_TYPE (olddecl))((tree_check2 ((((contains_struct_check ((olddecl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1939, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1939, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
)
1940 // And the same constraints.
1941 && equivalently_constrained (newdecl, olddecl))
1942 {
1943 error_at (newdecl_loc,
1944 "ambiguating new declaration of %q#D", newdecl);
1945 inform (olddecl_loc,
1946 "old declaration %q#D", olddecl);
1947 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1948 }
1949 else
1950 return NULL_TREE(tree) __null;
1951 }
1952 else
1953 {
1954 error_at (newdecl_loc, "conflicting declaration %q#D", newdecl);
1955 inform (olddecl_loc,
1956 "previous declaration as %q#D", olddecl);
1957 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1958 }
1959 }
1960 else if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
1961 && DECL_OMP_DECLARE_REDUCTION_P (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) ((contains_struct_check ((newdecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1961, __FUNCTION__)))->base.code) == TEMPLATE_DECL ? ((struct
tree_template_decl *)(const_cast<union tree_node *> ((
((tree_check (((contains_struct_check ((newdecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1961, __FUNCTION__))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1961, __FUNCTION__, (TEMPLATE_DECL))))))))->result : (contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1961, __FUNCTION__)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1961, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) ((contains_struct_check ((newdecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1961, __FUNCTION__)))->base.code) == FUNCTION_DECL || ((
(enum tree_code) ((contains_struct_check ((newdecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1961, __FUNCTION__)))->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check (((contains_struct_check ((newdecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1961, __FUNCTION__))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1961, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check (((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1961, __FUNCTION__))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1961, __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/decl.cc"
, 1961, __FUNCTION__); &lt->u.fn; })->omp_declare_reduction_p
)
)
1962 {
1963 /* OMP UDRs are never duplicates. */
1964 gcc_assert (DECL_OMP_DECLARE_REDUCTION_P (olddecl))((void)(!((__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) ((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1964, __FUNCTION__)))->base.code) == TEMPLATE_DECL ? ((struct
tree_template_decl *)(const_cast<union tree_node *> ((
((tree_check (((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1964, __FUNCTION__))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1964, __FUNCTION__, (TEMPLATE_DECL))))))))->result : (contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1964, __FUNCTION__)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1964, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) ((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1964, __FUNCTION__)))->base.code) == FUNCTION_DECL || ((
(enum tree_code) ((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1964, __FUNCTION__)))->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check (((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1964, __FUNCTION__))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1964, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check (((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1964, __FUNCTION__))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1964, __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/decl.cc"
, 1964, __FUNCTION__); &lt->u.fn; })->omp_declare_reduction_p
)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1964, __FUNCTION__), 0 : 0))
;
1965 error_at (newdecl_loc,
1966 "redeclaration of %<pragma omp declare reduction%>");
1967 inform (olddecl_loc,
1968 "previous %<pragma omp declare reduction%> declaration");
1969 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1970 }
1971 else if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
1972 && ((DECL_TEMPLATE_SPECIALIZATION (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1972, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) == 2)
1973 && (!DECL_TEMPLATE_INFO (newdecl)(((contains_struct_check ((template_info_decl_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1973, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1973, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)
1974 || (DECL_TI_TEMPLATE (newdecl)((struct tree_template_info*)(tree_check (((((contains_struct_check
((template_info_decl_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1974, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1974, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1974, __FUNCTION__, (TEMPLATE_INFO))))->tmpl
1975 != DECL_TI_TEMPLATE (olddecl)((struct tree_template_info*)(tree_check (((((contains_struct_check
((template_info_decl_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1975, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1975, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1975, __FUNCTION__, (TEMPLATE_INFO))))->tmpl
)))
1976 || (DECL_TEMPLATE_SPECIALIZATION (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1976, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) == 2)
1977 && (!DECL_TEMPLATE_INFO (olddecl)(((contains_struct_check ((template_info_decl_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1977, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1977, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)
1978 || (DECL_TI_TEMPLATE (olddecl)((struct tree_template_info*)(tree_check (((((contains_struct_check
((template_info_decl_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1978, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1978, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1978, __FUNCTION__, (TEMPLATE_INFO))))->tmpl
1979 != DECL_TI_TEMPLATE (newdecl)((struct tree_template_info*)(tree_check (((((contains_struct_check
((template_info_decl_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1979, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1979, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1979, __FUNCTION__, (TEMPLATE_INFO))))->tmpl
)))))
1980 /* It's OK to have a template specialization and a non-template
1981 with the same type, or to have specializations of two
1982 different templates with the same type. Note that if one is a
1983 specialization, and the other is an instantiation of the same
1984 template, that we do not exit at this point. That situation
1985 can occur if we instantiate a template class, and then
1986 specialize one of its methods. This situation is valid, but
1987 the declarations must be merged in the usual way. */
1988 return NULL_TREE(tree) __null;
1989 else if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
1990 && ((DECL_TEMPLATE_INSTANTIATION (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1990, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) & 1)
1991 && !DECL_USE_TEMPLATE (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1991, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template)
)
1992 || (DECL_TEMPLATE_INSTANTIATION (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1992, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) & 1)
1993 && !DECL_USE_TEMPLATE (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 1993, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template)
)))
1994 /* One of the declarations is a template instantiation, and the
1995 other is not a template at all. That's OK. */
1996 return NULL_TREE(tree) __null;
1997 else if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == NAMESPACE_DECL)
1998 {
1999 /* In [namespace.alias] we have:
2000
2001 In a declarative region, a namespace-alias-definition can be
2002 used to redefine a namespace-alias declared in that declarative
2003 region to refer only to the namespace to which it already
2004 refers.
2005
2006 Therefore, if we encounter a second alias directive for the same
2007 alias, we can just ignore the second directive. */
2008 if (DECL_NAMESPACE_ALIAS (newdecl)((contains_struct_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2008, __FUNCTION__, (NAMESPACE_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2008, __FUNCTION__))->decl_common.abstract_origin)
2009 && (DECL_NAMESPACE_ALIAS (newdecl)((contains_struct_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2009, __FUNCTION__, (NAMESPACE_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2009, __FUNCTION__))->decl_common.abstract_origin)
2010 == DECL_NAMESPACE_ALIAS (olddecl)((contains_struct_check (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2010, __FUNCTION__, (NAMESPACE_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2010, __FUNCTION__))->decl_common.abstract_origin)
))
2011 return olddecl;
2012
2013 /* Leave it to update_binding to merge or report error. */
2014 return NULL_TREE(tree) __null;
2015 }
2016 else
2017 {
2018 const char *errmsg = redeclaration_error_message (newdecl, olddecl);
2019 if (errmsg)
2020 {
2021 auto_diagnostic_group d;
2022 error_at (newdecl_loc, errmsg, newdecl);
2023 if (DECL_NAME (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2023, __FUNCTION__))->decl_minimal.name)
!= NULL_TREE(tree) __null)
2024 inform (olddecl_loc,
2025 (DECL_INITIAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2025, __FUNCTION__))->decl_common.initial)
&& namespace_bindings_p ())
2026 ? G_("%q#D previously defined here")"%q#D previously defined here"
2027 : G_("%q#D previously declared here")"%q#D previously declared here", olddecl);
2028 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2029 }
2030 else if (TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
2031 && DECL_INITIAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2031, __FUNCTION__))->decl_common.initial)
!= NULL_TREE(tree) __null
2032 && !prototype_p (TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2032, __FUNCTION__))->typed.type)
)
2033 && prototype_p (TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2033, __FUNCTION__))->typed.type)
))
2034 {
2035 /* Prototype decl follows defn w/o prototype. */
2036 auto_diagnostic_group d;
2037 if (warning_at (newdecl_loc, 0,
2038 "prototype specified for %q#D", newdecl))
2039 inform (olddecl_loc,
2040 "previous non-prototype definition here");
2041 }
2042 else if (VAR_OR_FUNCTION_DECL_P (olddecl)(((enum tree_code) (olddecl)->base.code) == VAR_DECL || ((
enum tree_code) (olddecl)->base.code) == FUNCTION_DECL)
2043 && DECL_LANGUAGE (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2043, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2043, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus))
!= DECL_LANGUAGE (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2043, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2043, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus))
)
2044 {
2045 /* [dcl.link]
2046 If two declarations of the same function or object
2047 specify different linkage-specifications ..., the program
2048 is ill-formed.... Except for functions with C++ linkage,
2049 a function declaration without a linkage specification
2050 shall not precede the first linkage specification for
2051 that function. A function can be declared without a
2052 linkage specification after an explicit linkage
2053 specification has been seen; the linkage explicitly
2054 specified in the earlier declaration is not affected by
2055 such a function declaration.
2056
2057 DR 563 raises the question why the restrictions on
2058 functions should not also apply to objects. Older
2059 versions of G++ silently ignore the linkage-specification
2060 for this example:
2061
2062 namespace N {
2063 extern int i;
2064 extern "C" int i;
2065 }
2066
2067 which is clearly wrong. Therefore, we now treat objects
2068 like functions. */
2069 if (current_lang_depth () == 0)
2070 {
2071 /* There is no explicit linkage-specification, so we use
2072 the linkage from the previous declaration. */
2073 retrofit_lang_decl (newdecl);
2074 SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl))(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2074, __FUNCTION__))->decl_common.lang_specific)->u.base
.language = ((((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2074, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2074, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus))))
;
2075 }
2076 else
2077 {
2078 auto_diagnostic_group d;
2079 error_at (newdecl_loc,
2080 "conflicting declaration of %q#D with %qL linkage",
2081 newdecl, DECL_LANGUAGE (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2081, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2081, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus))
);
2082 inform (olddecl_loc,
2083 "previous declaration with %qL linkage",
2084 DECL_LANGUAGE (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2084, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2084, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus))
);
2085 }
2086 }
2087
2088 if (DECL_LANG_SPECIFIC (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2088, __FUNCTION__))->decl_common.lang_specific)
&& DECL_USE_TEMPLATE (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2088, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template)
)
2089 ;
2090 else if (TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL)
2091 {
2092 /* Note: free functions, as TEMPLATE_DECLs, are handled below. */
2093 if (DECL_FUNCTION_MEMBER_P (olddecl)((((enum tree_code) (((contains_struct_check ((olddecl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2093, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE
) || (__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2093, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2093, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2093, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2093, __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/decl.cc"
, 2093, __FUNCTION__); &lt->u.fn; })->static_function
))
2094 && (/* grokfndecl passes member function templates too
2095 as FUNCTION_DECLs. */
2096 DECL_TEMPLATE_INFO (olddecl)(((contains_struct_check ((template_info_decl_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2096, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2096, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)
2097 /* C++11 8.3.6/6.
2098 Default arguments for a member function of a class
2099 template shall be specified on the initial declaration
2100 of the member function within the class template. */
2101 || CLASSTYPE_TEMPLATE_INFO (CP_DECL_CONTEXT (olddecl))(((tree_class_check (((tree_check3 (((!(! (((contains_struct_check
((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2101, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2101, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((olddecl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2101, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2101, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2101, __FUNCTION__))->type_non_common.lang_1))
))
2102 {
2103 check_redeclaration_no_default_args (newdecl);
2104
2105 if (DECL_TEMPLATE_INFO (olddecl)(((contains_struct_check ((template_info_decl_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2105, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2105, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)
2106 && DECL_MEMBER_TEMPLATE_P (DECL_TI_TEMPLATE (olddecl))(((contains_struct_check (((tree_check ((((struct tree_template_info
*)(tree_check (((((contains_struct_check ((template_info_decl_check
((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2106, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2106, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2106, __FUNCTION__, (TEMPLATE_INFO))))->tmpl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2106, __FUNCTION__, (TEMPLATE_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2106, __FUNCTION__))->decl_common.lang_flag_1))
)
2107 {
2108 tree new_parms = DECL_TEMPLATE_INFO (newdecl)(((contains_struct_check ((template_info_decl_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2108, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2108, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)
2109 ? DECL_INNERMOST_TEMPLATE_PARMS (DECL_TI_TEMPLATE (newdecl))((tree_check ((((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((((struct tree_template_info
*)(tree_check (((((contains_struct_check ((template_info_decl_check
((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2109, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2109, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2109, __FUNCTION__, (TEMPLATE_INFO))))->tmpl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2109, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2109, __FUNCTION__, (TREE_LIST)))->list.value)
2110 : INNERMOST_TEMPLATE_PARMS (current_template_parms)((tree_check ((scope_chain->template_parms), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2110, __FUNCTION__, (TREE_LIST)))->list.value)
;
2111 tree old_parms
2112 = DECL_INNERMOST_TEMPLATE_PARMS (DECL_TI_TEMPLATE (olddecl))((tree_check ((((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((((struct tree_template_info
*)(tree_check (((((contains_struct_check ((template_info_decl_check
((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2112, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2112, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2112, __FUNCTION__, (TEMPLATE_INFO))))->tmpl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2112, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2112, __FUNCTION__, (TREE_LIST)))->list.value)
;
2113 merge_default_template_args (new_parms, old_parms,
2114 /*class_p=*/false);
2115 }
2116 }
2117 else
2118 {
2119 tree t1 = FUNCTION_FIRST_USER_PARMTYPE (olddecl)skip_artificial_parms_for ((olddecl), ((tree_check2 ((((contains_struct_check
((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2119, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2119, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
;
2120 tree t2 = FUNCTION_FIRST_USER_PARMTYPE (newdecl)skip_artificial_parms_for ((newdecl), ((tree_check2 ((((contains_struct_check
((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2120, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2120, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
;
2121 int i = 1;
2122
2123 for (; t1 && t1 != void_list_nodeglobal_trees[TI_VOID_LIST_NODE];
2124 t1 = TREE_CHAIN (t1)((contains_struct_check ((t1), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2124, __FUNCTION__))->common.chain)
, t2 = TREE_CHAIN (t2)((contains_struct_check ((t2), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2124, __FUNCTION__))->common.chain)
, i++)
2125 if (TREE_PURPOSE (t1)((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2125, __FUNCTION__, (TREE_LIST)))->list.purpose)
&& TREE_PURPOSE (t2)((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2125, __FUNCTION__, (TREE_LIST)))->list.purpose)
)
2126 {
2127 if (simple_cst_equal (TREE_PURPOSE (t1)((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2127, __FUNCTION__, (TREE_LIST)))->list.purpose)
,
2128 TREE_PURPOSE (t2)((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2128, __FUNCTION__, (TREE_LIST)))->list.purpose)
) == 1)
2129 {
2130 auto_diagnostic_group d;
2131 if (permerror (newdecl_loc,
2132 "default argument given for parameter "
2133 "%d of %q#D", i, newdecl))
2134 inform (olddecl_loc,
2135 "previous specification in %q#D here",
2136 olddecl);
2137 }
2138 else
2139 {
2140 auto_diagnostic_group d;
2141 error_at (newdecl_loc,
2142 "default argument given for parameter %d "
2143 "of %q#D", i, newdecl);
2144 inform (olddecl_loc,
2145 "previous specification in %q#D here",
2146 olddecl);
2147 }
2148 }
2149
2150 /* C++17 11.3.6/4: "If a friend declaration specifies a default
2151 argument expression, that declaration... shall be the only
2152 declaration of the function or function template in the
2153 translation unit." */
2154 check_no_redeclaration_friend_default_args (olddecl, newdecl);
2155 }
2156 }
2157 }
2158
2159 /* Do not merge an implicit typedef with an explicit one. In:
2160
2161 class A;
2162 ...
2163 typedef class A A __attribute__ ((foo));
2164
2165 the attribute should apply only to the typedef. */
2166 if (TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == TYPE_DECL
2167 && (DECL_IMPLICIT_TYPEDEF_P (olddecl)(((enum tree_code) (olddecl)->base.code) == TYPE_DECL &&
((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2167, __FUNCTION__))->decl_common.lang_flag_2))
2168 || DECL_IMPLICIT_TYPEDEF_P (newdecl)(((enum tree_code) (newdecl)->base.code) == TYPE_DECL &&
((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2168, __FUNCTION__))->decl_common.lang_flag_2))
))
2169 return NULL_TREE(tree) __null;
2170
2171 if (DECL_TEMPLATE_PARM_P (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2171, __FUNCTION__))->decl_common.lang_flag_0) &&
(((enum tree_code) (olddecl)->base.code) == CONST_DECL ||
((enum tree_code) (olddecl)->base.code) == PARM_DECL || (
(enum tree_code) (olddecl)->base.code) == TYPE_DECL || ((enum
tree_code) (olddecl)->base.code) == TEMPLATE_DECL))
!= DECL_TEMPLATE_PARM_P (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2171, __FUNCTION__))->decl_common.lang_flag_0) &&
(((enum tree_code) (newdecl)->base.code) == CONST_DECL ||
((enum tree_code) (newdecl)->base.code) == PARM_DECL || (
(enum tree_code) (newdecl)->base.code) == TYPE_DECL || ((enum
tree_code) (newdecl)->base.code) == TEMPLATE_DECL))
)
2172 return NULL_TREE(tree) __null;
2173
2174 if (!validate_constexpr_redeclaration (olddecl, newdecl))
2175 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2176
2177 if (modules_p ()
2178 && TREE_CODE (CP_DECL_CONTEXT (olddecl))((enum tree_code) ((!(! (((contains_struct_check ((olddecl), (
TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2178, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2178, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((olddecl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2178, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL]))->base.code)
== NAMESPACE_DECL
2179 && TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) != NAMESPACE_DECL
2180 && !hiding)
2181 {
2182 if (!module_may_redeclare (olddecl))
2183 {
2184 if (DECL_ARTIFICIAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2184, __FUNCTION__))->decl_common.artificial_flag)
)
2185 error ("declaration %qD conflicts with builtin", newdecl);
2186 else
2187 {
2188 error ("declaration %qD conflicts with import", newdecl);
2189 inform (olddecl_loc, "import declared %q#D here", olddecl);
2190 }
2191
2192 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2193 }
2194
2195 tree not_tmpl = STRIP_TEMPLATE (olddecl)(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL ?
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2195, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)
;
2196 if (DECL_LANG_SPECIFIC (not_tmpl)((contains_struct_check ((not_tmpl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2196, __FUNCTION__))->decl_common.lang_specific)
&& DECL_MODULE_ATTACH_P (not_tmpl)(((contains_struct_check (((tree_not_check ((not_tmpl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2196, __FUNCTION__, (TEMPLATE_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2196, __FUNCTION__))->decl_common.lang_specific)->u.base
.module_attach_p)
)
2197 {
2198 if (DECL_MODULE_EXPORT_P (STRIP_TEMPLATE (newdecl))((tree_not_check2 (((((enum tree_code) (newdecl)->base.code
) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast
<union tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2198, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2198, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
2199 && !DECL_MODULE_EXPORT_P (not_tmpl)((tree_not_check2 ((not_tmpl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2199, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
)
2200 {
2201 error ("conflicting exporting declaration %qD", newdecl);
2202 inform (olddecl_loc, "previous declaration %q#D here", olddecl);
2203 }
2204 }
2205 else if (DECL_MODULE_EXPORT_P (newdecl)((tree_not_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2205, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
)
2206 DECL_MODULE_EXPORT_P (not_tmpl)((tree_not_check2 ((not_tmpl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2206, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
= true;
2207 }
2208
2209 /* We have committed to returning OLDDECL at this point. */
2210
2211 /* If new decl is `static' and an `extern' was seen previously,
2212 warn about it. */
2213 warn_extern_redeclared_static (newdecl, olddecl);
2214
2215 /* True to merge attributes between the declarations, false to
2216 set OLDDECL's attributes to those of NEWDECL (for template
2217 explicit specializations that specify their own attributes
2218 independent of those specified for the primary template). */
2219 const bool merge_attr = (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) != FUNCTION_DECL
2220 || !DECL_TEMPLATE_SPECIALIZATION (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2220, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) == 2)
2221 || DECL_TEMPLATE_SPECIALIZATION (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2221, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) == 2)
);
2222
2223 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
2224 {
2225 if (merge_attr)
2226 {
2227 if (diagnose_mismatched_attributes (olddecl, newdecl))
2228 inform (olddecl_loc, DECL_INITIAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2228, __FUNCTION__))->decl_common.initial)
2229 ? G_("previous definition of %qD here")"previous definition of %qD here"
2230 : G_("previous declaration of %qD here")"previous declaration of %qD here", olddecl);
2231
2232 /* [dcl.attr.noreturn]: The first declaration of a function shall
2233 specify the noreturn attribute if any declaration of that function
2234 specifies the noreturn attribute. */
2235 tree a;
2236 if (TREE_THIS_VOLATILE (newdecl)((newdecl)->base.volatile_flag)
2237 && !TREE_THIS_VOLATILE (olddecl)((olddecl)->base.volatile_flag)
2238 /* This applies to [[noreturn]] only, not its GNU variants. */
2239 && (a = lookup_attribute ("noreturn", DECL_ATTRIBUTES (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2239, __FUNCTION__))->decl_common.attributes)
))
2240 && cxx11_attribute_p (a)
2241 && get_attribute_namespace (a) == NULL_TREE(tree) __null)
2242 {
2243 error_at (newdecl_loc, "function %qD declared %<[[noreturn]]%> "
2244 "but its first declaration was not", newdecl);
2245 inform (olddecl_loc, "previous declaration of %qD", olddecl);
2246 }
2247 }
2248
2249 /* Now that functions must hold information normally held
2250 by field decls, there is extra work to do so that
2251 declaration information does not get destroyed during
2252 definition. */
2253 if (DECL_VINDEX (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2253, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
)
2254 DECL_VINDEX (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2254, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
= DECL_VINDEX (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2254, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
;
2255 if (DECL_CONTEXT (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2255, __FUNCTION__))->decl_minimal.context)
)
2256 DECL_CONTEXT (newdecl)((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2256, __FUNCTION__))->decl_minimal.context)
= DECL_CONTEXT (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2256, __FUNCTION__))->decl_minimal.context)
;
2257 DECL_STATIC_CONSTRUCTOR (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2257, __FUNCTION__, (FUNCTION_DECL)))->function_decl.static_ctor_flag
)
|= DECL_STATIC_CONSTRUCTOR (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2257, __FUNCTION__, (FUNCTION_DECL)))->function_decl.static_ctor_flag
)
;
2258 DECL_STATIC_DESTRUCTOR (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2258, __FUNCTION__, (FUNCTION_DECL)))->function_decl.static_dtor_flag
)
|= DECL_STATIC_DESTRUCTOR (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2258, __FUNCTION__, (FUNCTION_DECL)))->function_decl.static_dtor_flag
)
;
2259 DECL_PURE_VIRTUAL_P (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2259, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2259, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2259, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2259, __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/decl.cc"
, 2259, __FUNCTION__); &lt->u.fn; })->pure_virtual)
|= DECL_PURE_VIRTUAL_P (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2259, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2259, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2259, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2259, __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/decl.cc"
, 2259, __FUNCTION__); &lt->u.fn; })->pure_virtual)
;
2260 DECL_VIRTUAL_P (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2260, __FUNCTION__))->decl_common.virtual_flag)
|= DECL_VIRTUAL_P (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2260, __FUNCTION__))->decl_common.virtual_flag)
;
2261 DECL_INVALID_OVERRIDER_P (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2261, __FUNCTION__))->decl_common.lang_flag_4))
|= DECL_INVALID_OVERRIDER_P (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2261, __FUNCTION__))->decl_common.lang_flag_4))
;
2262 DECL_FINAL_P (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2262, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.final
)
|= DECL_FINAL_P (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2262, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.final
)
;
2263 DECL_OVERRIDE_P (newdecl)(((tree_not_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2263, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
|= DECL_OVERRIDE_P (olddecl)(((tree_not_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2263, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
;
2264 DECL_THIS_STATIC (newdecl)((contains_struct_check (((tree_check3 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2264, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL), (PARM_DECL
)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2264, __FUNCTION__))->decl_common.lang_flag_6)
|= DECL_THIS_STATIC (olddecl)((contains_struct_check (((tree_check3 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2264, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL), (PARM_DECL
)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2264, __FUNCTION__))->decl_common.lang_flag_6)
;
2265 DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2265, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2265, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2265, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2265, __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/decl.cc"
, 2265, __FUNCTION__); &lt->u.fn; })->has_dependent_explicit_spec_p
)
2266 |= DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2266, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2266, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2266, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2266, __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/decl.cc"
, 2266, __FUNCTION__); &lt->u.fn; })->has_dependent_explicit_spec_p
)
;
2267 if (DECL_OVERLOADED_OPERATOR_P (olddecl)(((tree_not_check2 (((tree_check ((((contains_struct_check ((
olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2267, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2267, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2267, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
)
2268 DECL_OVERLOADED_OPERATOR_CODE_RAW (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2268, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2268, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2268, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2268, __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/decl.cc"
, 2268, __FUNCTION__); &lt->u.fn; })->ovl_op_code)
2269 = DECL_OVERLOADED_OPERATOR_CODE_RAW (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2269, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2269, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2269, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2269, __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/decl.cc"
, 2269, __FUNCTION__); &lt->u.fn; })->ovl_op_code)
;
2270 new_defines_function = DECL_INITIAL (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2270, __FUNCTION__))->decl_common.initial)
!= NULL_TREE(tree) __null;
2271
2272 duplicate_contracts (newdecl, olddecl);
2273
2274 /* Optionally warn about more than one declaration for the same
2275 name, but don't warn about a function declaration followed by a
2276 definition. */
2277 if (warn_redundant_declsglobal_options.x_warn_redundant_decls && ! DECL_ARTIFICIAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2277, __FUNCTION__))->decl_common.artificial_flag)
2278 && !(new_defines_function && DECL_INITIAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2278, __FUNCTION__))->decl_common.initial)
== NULL_TREE(tree) __null)
2279 /* Don't warn about extern decl followed by definition. */
2280 && !(DECL_EXTERNAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2280, __FUNCTION__))->decl_common.decl_flag_1)
&& ! DECL_EXTERNAL (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2280, __FUNCTION__))->decl_common.decl_flag_1)
)
2281 /* Don't warn if at least one is/was hidden. */
2282 && !(hiding || was_hidden)
2283 /* Don't warn about declaration followed by specialization. */
2284 && (! DECL_TEMPLATE_SPECIALIZATION (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2284, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) == 2)
2285 || DECL_TEMPLATE_SPECIALIZATION (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2285, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) == 2)
))
2286 {
2287 auto_diagnostic_group d;
2288 if (warning_at (newdecl_loc,
2289 OPT_Wredundant_decls,
2290 "redundant redeclaration of %qD in same scope",
2291 newdecl))
2292 inform (olddecl_loc,
2293 "previous declaration of %qD", olddecl);
2294 }
2295
2296 /* [dcl.fct.def.delete] A deleted definition of a function shall be the
2297 first declaration of the function or, for an explicit specialization
2298 of a function template, the first declaration of that
2299 specialization. */
2300 if (!(DECL_TEMPLATE_INSTANTIATION (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2300, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) & 1)
2301 && DECL_TEMPLATE_SPECIALIZATION (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2301, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) == 2)
))
2302 {
2303 if (DECL_DELETED_FN (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2303, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2303, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2303, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2303, __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/decl.cc"
, 2303, __FUNCTION__); &lt->u.fn; })->min.base.threadprivate_or_deleted_p
)
)
2304 {
2305 auto_diagnostic_group d;
2306 if (pedwarn (newdecl_loc, 0, "deleted definition of %qD "
2307 "is not first declaration", newdecl))
2308 inform (olddecl_loc,
2309 "previous declaration of %qD", olddecl);
2310 }
2311 DECL_DELETED_FN (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2311, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2311, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2311, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2311, __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/decl.cc"
, 2311, __FUNCTION__); &lt->u.fn; })->min.base.threadprivate_or_deleted_p
)
|= DECL_DELETED_FN (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2311, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2311, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2311, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2311, __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/decl.cc"
, 2311, __FUNCTION__); &lt->u.fn; })->min.base.threadprivate_or_deleted_p
)
;
2312 }
2313 }
2314
2315 /* Deal with C++: must preserve virtual function table size. */
2316 if (TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == TYPE_DECL)
2317 {
2318 tree newtype = TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2318, __FUNCTION__))->typed.type)
;
2319 tree oldtype = TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2319, __FUNCTION__))->typed.type)
;
2320
2321 if (newtype != error_mark_nodeglobal_trees[TI_ERROR_MARK] && oldtype != error_mark_nodeglobal_trees[TI_ERROR_MARK]
2322 && TYPE_LANG_SPECIFIC (newtype)((tree_class_check ((newtype), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2322, __FUNCTION__))->type_with_lang_specific.lang_specific
)
&& TYPE_LANG_SPECIFIC (oldtype)((tree_class_check ((oldtype), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2322, __FUNCTION__))->type_with_lang_specific.lang_specific
)
)
2323 CLASSTYPE_FRIEND_CLASSES (newtype)((((tree_class_check ((newtype), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2323, __FUNCTION__))->type_with_lang_specific.lang_specific
))->friend_classes)
2324 = CLASSTYPE_FRIEND_CLASSES (oldtype)((((tree_class_check ((oldtype), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2324, __FUNCTION__))->type_with_lang_specific.lang_specific
))->friend_classes)
;
2325
2326 DECL_ORIGINAL_TYPE (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2326, __FUNCTION__, (TYPE_DECL)))->decl_non_common.result
)
= DECL_ORIGINAL_TYPE (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2326, __FUNCTION__, (TYPE_DECL)))->decl_non_common.result
)
;
2327 }
2328
2329 /* Copy all the DECL_... slots specified in the new decl except for
2330 any that we copy here from the old type. */
2331 if (merge_attr)
2332 DECL_ATTRIBUTES (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2332, __FUNCTION__))->decl_common.attributes)
2333 = (*targetm.merge_decl_attributes) (olddecl, newdecl);
2334 else
2335 DECL_ATTRIBUTES (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2335, __FUNCTION__))->decl_common.attributes)
= DECL_ATTRIBUTES (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2335, __FUNCTION__))->decl_common.attributes)
;
2336
2337 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL)
2338 {
2339 tree old_result = DECL_TEMPLATE_RESULT (olddecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2339, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
2340 tree new_result = DECL_TEMPLATE_RESULT (newdecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2340, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
2341 TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2341, __FUNCTION__))->typed.type)
= TREE_TYPE (old_result)((contains_struct_check ((old_result), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2341, __FUNCTION__))->typed.type)
;
2342
2343 /* The new decl should not already have gathered any
2344 specializations. */
2345 gcc_assert (!DECL_TEMPLATE_SPECIALIZATIONS (newdecl))((void)(!(!((contains_struct_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2345, __FUNCTION__, (TEMPLATE_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2345, __FUNCTION__))->decl_common.size)) ? fancy_abort (
"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2345, __FUNCTION__), 0 : 0))
;
2346
2347 /* Make sure the contracts are equivalent. */
2348 duplicate_contracts (newdecl, olddecl);
2349
2350 /* Remove contracts from old_result so they aren't appended to
2351 old_result by the merge function. */
2352 remove_contract_attributes (old_result);
2353
2354 DECL_ATTRIBUTES (old_result)((contains_struct_check ((old_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2354, __FUNCTION__))->decl_common.attributes)
2355 = (*targetm.merge_decl_attributes) (old_result, new_result);
2356
2357 if (DECL_FUNCTION_TEMPLATE_P (newdecl)(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2357, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2357, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)
)
2358 {
2359 if (DECL_SOURCE_LOCATION (newdecl)((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2359, __FUNCTION__))->decl_minimal.locus)
2360 != DECL_SOURCE_LOCATION (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2360, __FUNCTION__))->decl_minimal.locus)
)
2361 {
2362 /* Per C++11 8.3.6/4, default arguments cannot be added in
2363 later declarations of a function template. */
2364 check_redeclaration_no_default_args (newdecl);
2365 /* C++17 11.3.6/4: "If a friend declaration specifies a default
2366 argument expression, that declaration... shall be the only
2367 declaration of the function or function template in the
2368 translation unit." */
2369 check_no_redeclaration_friend_default_args
2370 (old_result, new_result);
2371
2372 tree new_parms = DECL_INNERMOST_TEMPLATE_PARMS (newdecl)((tree_check ((((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2372, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2372, __FUNCTION__, (TREE_LIST)))->list.value)
;
2373 tree old_parms = DECL_INNERMOST_TEMPLATE_PARMS (olddecl)((tree_check ((((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2373, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2373, __FUNCTION__, (TREE_LIST)))->list.value)
;
2374 merge_default_template_args (new_parms, old_parms,
2375 /*class_p=*/false);
2376 }
2377 if (!DECL_UNIQUE_FRIEND_P (new_result)(((contains_struct_check (((tree_check ((new_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2377, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2377, __FUNCTION__))->decl_common.lang_specific) ->u.
base.friend_or_tls)
)
2378 DECL_UNIQUE_FRIEND_P (old_result)(((contains_struct_check (((tree_check ((old_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2378, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2378, __FUNCTION__))->decl_common.lang_specific) ->u.
base.friend_or_tls)
= false;
2379
2380 check_default_args (newdecl);
2381
2382 if (GNU_INLINE_P (old_result)(((tree_check ((old_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2382, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
) && lookup_attribute ("gnu_inline", ((contains_struct_check
((old_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2382, __FUNCTION__))->decl_common.attributes)))
!= GNU_INLINE_P (new_result)(((tree_check ((new_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2382, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
) && lookup_attribute ("gnu_inline", ((contains_struct_check
((new_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2382, __FUNCTION__))->decl_common.attributes)))
2383 && DECL_INITIAL (new_result)((contains_struct_check ((new_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2383, __FUNCTION__))->decl_common.initial)
)
2384 {
2385 if (DECL_INITIAL (old_result)((contains_struct_check ((old_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2385, __FUNCTION__))->decl_common.initial)
)
2386 DECL_UNINLINABLE (old_result)((tree_check ((old_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2386, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
= 1;
2387 else
2388 DECL_UNINLINABLE (old_result)((tree_check ((old_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2388, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
= DECL_UNINLINABLE (new_result)((tree_check ((new_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2388, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
;
2389 DECL_EXTERNAL (old_result)((contains_struct_check ((old_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2389, __FUNCTION__))->decl_common.decl_flag_1)
= DECL_EXTERNAL (new_result)((contains_struct_check ((new_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2389, __FUNCTION__))->decl_common.decl_flag_1)
;
2390 DECL_NOT_REALLY_EXTERN (old_result)(((contains_struct_check ((old_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2390, __FUNCTION__))->decl_common.lang_specific)->u.base
.not_really_extern)
2391 = DECL_NOT_REALLY_EXTERN (new_result)(((contains_struct_check ((new_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2391, __FUNCTION__))->decl_common.lang_specific)->u.base
.not_really_extern)
;
2392 DECL_INTERFACE_KNOWN (old_result)((contains_struct_check ((old_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2392, __FUNCTION__))->decl_common.lang_flag_5)
2393 = DECL_INTERFACE_KNOWN (new_result)((contains_struct_check ((new_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2393, __FUNCTION__))->decl_common.lang_flag_5)
;
2394 DECL_DECLARED_INLINE_P (old_result)((tree_check ((old_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2394, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
2395 = DECL_DECLARED_INLINE_P (new_result)((tree_check ((new_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2395, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
;
2396 DECL_DISREGARD_INLINE_LIMITS (old_result)((tree_check ((old_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2396, __FUNCTION__, (FUNCTION_DECL)))->function_decl.disregard_inline_limits
)
2397 |= DECL_DISREGARD_INLINE_LIMITS (new_result)((tree_check ((new_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2397, __FUNCTION__, (FUNCTION_DECL)))->function_decl.disregard_inline_limits
)
;
2398 }
2399 else
2400 {
2401 DECL_DECLARED_INLINE_P (old_result)((tree_check ((old_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2401, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
2402 |= DECL_DECLARED_INLINE_P (new_result)((tree_check ((new_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2402, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
;
2403 DECL_DISREGARD_INLINE_LIMITS (old_result)((tree_check ((old_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2403, __FUNCTION__, (FUNCTION_DECL)))->function_decl.disregard_inline_limits
)
2404 |= DECL_DISREGARD_INLINE_LIMITS (new_result)((tree_check ((new_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2404, __FUNCTION__, (FUNCTION_DECL)))->function_decl.disregard_inline_limits
)
;
2405 check_redeclaration_exception_specification (newdecl, olddecl);
2406
2407 merge_attribute_bits (new_result, old_result);
2408 }
2409 }
2410
2411 /* If the new declaration is a definition, update the file and
2412 line information on the declaration, and also make
2413 the old declaration the same definition. */
2414 if (DECL_INITIAL (new_result)((contains_struct_check ((new_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2414, __FUNCTION__))->decl_common.initial)
!= NULL_TREE(tree) __null)
2415 {
2416 DECL_SOURCE_LOCATION (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2416, __FUNCTION__))->decl_minimal.locus)
2417 = DECL_SOURCE_LOCATION (old_result)((contains_struct_check ((old_result), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2417, __FUNCTION__))->decl_minimal.locus)
2418 = DECL_SOURCE_LOCATION (newdecl)((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2418, __FUNCTION__))->decl_minimal.locus)
;
2419 DECL_INITIAL (old_result)((contains_struct_check ((old_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2419, __FUNCTION__))->decl_common.initial)
= DECL_INITIAL (new_result)((contains_struct_check ((new_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2419, __FUNCTION__))->decl_common.initial)
;
2420 if (DECL_FUNCTION_TEMPLATE_P (newdecl)(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2420, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2420, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)
)
2421 {
2422 DECL_ARGUMENTS (old_result)((tree_check ((old_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2422, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments
)
= DECL_ARGUMENTS (new_result)((tree_check ((new_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2422, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments
)
;
2423 for (tree p = DECL_ARGUMENTS (old_result)((tree_check ((old_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2423, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments
)
; p; p = DECL_CHAIN (p)(((contains_struct_check (((contains_struct_check ((p), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2423, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2423, __FUNCTION__))->common.chain))
)
2424 DECL_CONTEXT (p)((contains_struct_check ((p), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2424, __FUNCTION__))->decl_minimal.context)
= old_result;
2425
2426 if (tree fc = DECL_FRIEND_CONTEXT (new_result)(((((enum tree_code) (new_result)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (new_result)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((new_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2426, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_result
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2426, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && !((contains_struct_check
((new_result), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2426, __FUNCTION__))->decl_common.virtual_flag) &&
!((tree_check (((((enum tree_code) (new_result)->base.code
) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast
<union tree_node *> ((((tree_check ((new_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2426, __FUNCTION__, (TEMPLATE_DECL))))))))->result : new_result
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2426, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
)) ? __extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (new_result)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((new_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2426, __FUNCTION__, (TEMPLATE_DECL))))))))->result : new_result
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2426, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (new_result)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (new_result)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((new_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2426, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((new_result
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2426, __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/decl.cc"
, 2426, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)
)
2427 SET_DECL_FRIEND_CONTEXT (old_result, fc)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (old_result)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((old_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2427, __FUNCTION__, (TEMPLATE_DECL))))))))->result : old_result
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2427, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (old_result)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (old_result)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((old_result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2427, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((old_result
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2427, __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/decl.cc"
, 2427, __FUNCTION__); &lt->u.fn; })->context = (fc
))
;
2428 }
2429 }
2430
2431 return olddecl;
2432 }
2433
2434 if (types_match)
2435 {
2436 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
2437 check_redeclaration_exception_specification (newdecl, olddecl);
2438
2439 /* Automatically handles default parameters. */
2440 tree oldtype = TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2440, __FUNCTION__))->typed.type)
;
2441 tree newtype;
2442
2443 /* For typedefs use the old type, as the new type's DECL_NAME points
2444 at newdecl, which will be ggc_freed. */
2445 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == TYPE_DECL)
2446 {
2447 /* But NEWTYPE might have an attribute, honor that. */
2448 tree tem = TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2448, __FUNCTION__))->typed.type)
;
2449 newtype = oldtype;
2450
2451 if (TYPE_USER_ALIGN (tem)((tree_class_check ((tem), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2451, __FUNCTION__))->base.u.bits.user_align)
)
2452 {
2453 if (TYPE_ALIGN (tem)(((tree_class_check ((tem), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2453, __FUNCTION__))->type_common.align) ? ((unsigned)1)
<< (((tree_class_check ((tem), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2453, __FUNCTION__))->type_common.align) - 1) : 0)
> TYPE_ALIGN (newtype)(((tree_class_check ((newtype), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2453, __FUNCTION__))->type_common.align) ? ((unsigned)1)
<< (((tree_class_check ((newtype), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2453, __FUNCTION__))->type_common.align) - 1) : 0)
)
2454 SET_TYPE_ALIGN (newtype, TYPE_ALIGN (tem))((tree_class_check ((newtype), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2454, __FUNCTION__))->type_common.align = ffs_hwi ((((tree_class_check
((tem), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2454, __FUNCTION__))->type_common.align) ? ((unsigned)1)
<< (((tree_class_check ((tem), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2454, __FUNCTION__))->type_common.align) - 1) : 0)))
;
2455 TYPE_USER_ALIGN (newtype)((tree_class_check ((newtype), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2455, __FUNCTION__))->base.u.bits.user_align)
= true;
2456 }
2457
2458 /* And remove the new type from the variants list. */
2459 if (TYPE_NAME (TREE_TYPE (newdecl))((tree_class_check ((((contains_struct_check ((newdecl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2459, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2459, __FUNCTION__))->type_common.name)
== newdecl)
2460 {
2461 tree remove = TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2461, __FUNCTION__))->typed.type)
;
2462 if (TYPE_MAIN_VARIANT (remove)((tree_class_check ((remove), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2462, __FUNCTION__))->type_common.main_variant)
== remove)
2463 {
2464 gcc_assert (TYPE_NEXT_VARIANT (remove) == NULL_TREE)((void)(!(((tree_class_check ((remove), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2464, __FUNCTION__))->type_common.next_variant) == (tree
) __null) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2464, __FUNCTION__), 0 : 0))
;
2465 /* If remove is the main variant, no need to remove that
2466 from the list. One of the DECL_ORIGINAL_TYPE
2467 variants, e.g. created for aligned attribute, might still
2468 refer to the newdecl TYPE_DECL though, so remove that one
2469 in that case. */
2470 if (tree orig = DECL_ORIGINAL_TYPE (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2470, __FUNCTION__, (TYPE_DECL)))->decl_non_common.result
)
)
2471 if (orig != remove)
2472 for (tree t = TYPE_MAIN_VARIANT (orig)((tree_class_check ((orig), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2472, __FUNCTION__))->type_common.main_variant)
; t;
2473 t = TYPE_MAIN_VARIANT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2473, __FUNCTION__))->type_common.main_variant)
)
2474 if (TYPE_NAME (TYPE_NEXT_VARIANT (t))((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2474, __FUNCTION__))->type_common.next_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2474, __FUNCTION__))->type_common.name)
== newdecl)
2475 {
2476 TYPE_NEXT_VARIANT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2476, __FUNCTION__))->type_common.next_variant)
2477 = TYPE_NEXT_VARIANT (TYPE_NEXT_VARIANT (t))((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2477, __FUNCTION__))->type_common.next_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2477, __FUNCTION__))->type_common.next_variant)
;
2478 break;
2479 }
2480 }
2481 else
2482 for (tree t = TYPE_MAIN_VARIANT (remove)((tree_class_check ((remove), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2482, __FUNCTION__))->type_common.main_variant)
; ;
2483 t = TYPE_NEXT_VARIANT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2483, __FUNCTION__))->type_common.next_variant)
)
2484 if (TYPE_NEXT_VARIANT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2484, __FUNCTION__))->type_common.next_variant)
== remove)
2485 {
2486 TYPE_NEXT_VARIANT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2486, __FUNCTION__))->type_common.next_variant)
= TYPE_NEXT_VARIANT (remove)((tree_class_check ((remove), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2486, __FUNCTION__))->type_common.next_variant)
;
2487 break;
2488 }
2489 }
2490 }
2491 else if (merge_attr)
2492 newtype = merge_types (TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2492, __FUNCTION__))->typed.type)
, TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2492, __FUNCTION__))->typed.type)
);
2493 else
2494 newtype = TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2494, __FUNCTION__))->typed.type)
;
2495
2496 if (VAR_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL))
2497 {
2498 DECL_THIS_EXTERN (newdecl)((contains_struct_check (((tree_check3 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2498, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL), (PARM_DECL
)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2498, __FUNCTION__))->decl_common.lang_flag_2)
|= DECL_THIS_EXTERN (olddecl)((contains_struct_check (((tree_check3 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2498, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL), (PARM_DECL
)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2498, __FUNCTION__))->decl_common.lang_flag_2)
;
2499 /* For already initialized vars, TREE_READONLY could have been
2500 cleared in cp_finish_decl, because the var needs runtime
2501 initialization or destruction. Make sure not to set
2502 TREE_READONLY on it again. */
2503 if (DECL_INITIALIZED_P (olddecl)(((tree_not_check2 (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2503, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2503, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1))
2504 && !DECL_EXTERNAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2504, __FUNCTION__))->decl_common.decl_flag_1)
2505 && !TREE_READONLY (olddecl)((non_type_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2505, __FUNCTION__))->base.readonly_flag)
)
2506 TREE_READONLY (newdecl)((non_type_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2506, __FUNCTION__))->base.readonly_flag)
= 0;
2507 DECL_INITIALIZED_P (newdecl)(((tree_not_check2 (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2507, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2507, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1))
|= DECL_INITIALIZED_P (olddecl)(((tree_not_check2 (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2507, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2507, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1))
;
2508 DECL_NONTRIVIALLY_INITIALIZED_P (newdecl)(((tree_not_check2 (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2508, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2508, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_6))
2509 |= DECL_NONTRIVIALLY_INITIALIZED_P (olddecl)(((tree_not_check2 (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2509, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2509, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_6))
;
2510 if (DECL_DEPENDENT_INIT_P (olddecl)(((contains_struct_check (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2510, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2510, __FUNCTION__))->decl_common.lang_specific) &&
((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2510, __FUNCTION__))->decl_common.lang_specific)->u.base
.dependent_init_p)
)
2511 SET_DECL_DEPENDENT_INIT_P (newdecl, true)(((contains_struct_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2511, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2511, __FUNCTION__))->decl_common.lang_specific)->u.base
.dependent_init_p = (true))
;
2512 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (newdecl)(((tree_not_check2 (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2512, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2512, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
2513 |= DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (olddecl)(((tree_not_check2 (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2513, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2513, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
;
2514 DECL_DECLARED_CONSTEXPR_P (newdecl)((contains_struct_check (((tree_check2 (((((enum tree_code) (
newdecl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2514, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2514, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2514, __FUNCTION__))->decl_common.lang_flag_8)
2515 |= DECL_DECLARED_CONSTEXPR_P (olddecl)((contains_struct_check (((tree_check2 (((((enum tree_code) (
olddecl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2515, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2515, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2515, __FUNCTION__))->decl_common.lang_flag_8)
;
2516 DECL_DECLARED_CONSTINIT_P (newdecl)(((contains_struct_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2516, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2516, __FUNCTION__))->decl_common.lang_flag_7))
2517 |= DECL_DECLARED_CONSTINIT_P (olddecl)(((contains_struct_check (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2517, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2517, __FUNCTION__))->decl_common.lang_flag_7))
;
2518
2519 /* Merge the threadprivate attribute from OLDDECL into NEWDECL. */
2520 if (DECL_LANG_SPECIFIC (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2520, __FUNCTION__))->decl_common.lang_specific)
2521 && CP_DECL_THREADPRIVATE_P (olddecl)(((contains_struct_check (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2521, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2521, __FUNCTION__))->decl_common.lang_specific)->u.base
.threadprivate_or_deleted_p)
)
2522 {
2523 /* Allocate a LANG_SPECIFIC structure for NEWDECL, if needed. */
2524 retrofit_lang_decl (newdecl);
2525 CP_DECL_THREADPRIVATE_P (newdecl)(((contains_struct_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2525, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2525, __FUNCTION__))->decl_common.lang_specific)->u.base
.threadprivate_or_deleted_p)
= 1;
2526 }
2527 }
2528
2529 /* An explicit specialization of a function template or of a member
2530 function of a class template can be declared transaction_safe
2531 independently of whether the corresponding template entity is declared
2532 transaction_safe. */
2533 if (flag_tmglobal_options.x_flag_tm && TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
2534 && DECL_TEMPLATE_INSTANTIATION (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2534, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) & 1)
2535 && DECL_TEMPLATE_SPECIALIZATION (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2535, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) == 2)
2536 && tx_safe_fn_type_p (newtype)
2537 && !tx_safe_fn_type_p (TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2537, __FUNCTION__))->typed.type)
))
2538 newtype = tx_unsafe_fn_variant (newtype);
2539
2540 TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2540, __FUNCTION__))->typed.type)
= TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2540, __FUNCTION__))->typed.type)
= newtype;
2541
2542 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
2543 check_default_args (newdecl);
2544
2545 /* Lay the type out, unless already done. */
2546 if (! same_type_p (newtype, oldtype)comptypes ((newtype), (oldtype), 0)
2547 && TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2547, __FUNCTION__))->typed.type)
!= error_mark_nodeglobal_trees[TI_ERROR_MARK]
2548 && !(processing_template_declscope_chain->x_processing_template_decl && uses_template_parms (newdecl)))
2549 layout_type (TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2549, __FUNCTION__))->typed.type)
);
2550
2551 if ((VAR_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL)
2552 || TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == PARM_DECL
2553 || TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == RESULT_DECL
2554 || TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FIELD_DECL
2555 || TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == TYPE_DECL)
2556 && !(processing_template_declscope_chain->x_processing_template_decl && uses_template_parms (newdecl)))
2557 layout_decl (newdecl, 0);
2558
2559 /* Merge deprecatedness. */
2560 if (TREE_DEPRECATED (newdecl)((newdecl)->base.deprecated_flag))
2561 TREE_DEPRECATED (olddecl)((olddecl)->base.deprecated_flag) = 1;
2562
2563 /* Merge unavailability. */
2564 if (TREE_UNAVAILABLE (newdecl)((newdecl)->base.u.bits.unavailable_flag))
2565 TREE_UNAVAILABLE (olddecl)((olddecl)->base.u.bits.unavailable_flag) = 1;
2566
2567 /* Preserve function specific target and optimization options */
2568 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
2569 {
2570 if (DECL_FUNCTION_SPECIFIC_TARGET (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2570, __FUNCTION__, (FUNCTION_DECL)))->function_decl.function_specific_target
)
2571 && !DECL_FUNCTION_SPECIFIC_TARGET (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2571, __FUNCTION__, (FUNCTION_DECL)))->function_decl.function_specific_target
)
)
2572 DECL_FUNCTION_SPECIFIC_TARGET (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2572, __FUNCTION__, (FUNCTION_DECL)))->function_decl.function_specific_target
)
2573 = DECL_FUNCTION_SPECIFIC_TARGET (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2573, __FUNCTION__, (FUNCTION_DECL)))->function_decl.function_specific_target
)
;
2574
2575 if (DECL_FUNCTION_SPECIFIC_OPTIMIZATION (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2575, __FUNCTION__, (FUNCTION_DECL)))->function_decl.function_specific_optimization
)
2576 && !DECL_FUNCTION_SPECIFIC_OPTIMIZATION (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2576, __FUNCTION__, (FUNCTION_DECL)))->function_decl.function_specific_optimization
)
)
2577 DECL_FUNCTION_SPECIFIC_OPTIMIZATION (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2577, __FUNCTION__, (FUNCTION_DECL)))->function_decl.function_specific_optimization
)
2578 = DECL_FUNCTION_SPECIFIC_OPTIMIZATION (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2578, __FUNCTION__, (FUNCTION_DECL)))->function_decl.function_specific_optimization
)
;
2579
2580 if (!DECL_UNIQUE_FRIEND_P (olddecl)(((contains_struct_check (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2580, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2580, __FUNCTION__))->decl_common.lang_specific) ->u.
base.friend_or_tls)
)
2581 DECL_UNIQUE_FRIEND_P (newdecl)(((contains_struct_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2581, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2581, __FUNCTION__))->decl_common.lang_specific) ->u.
base.friend_or_tls)
= false;
2582 }
2583 else
2584 {
2585 /* Merge the const type qualifier. */
2586 if (TREE_READONLY (newdecl)((non_type_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2586, __FUNCTION__))->base.readonly_flag)
)
2587 TREE_READONLY (olddecl)((non_type_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2587, __FUNCTION__))->base.readonly_flag)
= 1;
2588 /* Merge the volatile type qualifier. */
2589 if (TREE_THIS_VOLATILE (newdecl)((newdecl)->base.volatile_flag))
2590 TREE_THIS_VOLATILE (olddecl)((olddecl)->base.volatile_flag) = 1;
2591 }
2592
2593 /* Merge the initialization information. */
2594 if (DECL_INITIAL (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2594, __FUNCTION__))->decl_common.initial)
== NULL_TREE(tree) __null
2595 && DECL_INITIAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2595, __FUNCTION__))->decl_common.initial)
!= NULL_TREE(tree) __null)
2596 {
2597 DECL_INITIAL (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2597, __FUNCTION__))->decl_common.initial)
= DECL_INITIAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2597, __FUNCTION__))->decl_common.initial)
;
2598 DECL_SOURCE_LOCATION (newdecl)((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2598, __FUNCTION__))->decl_minimal.locus)
= DECL_SOURCE_LOCATION (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2598, __FUNCTION__))->decl_minimal.locus)
;
2599 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
2600 {
2601 DECL_SAVED_TREE (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2601, __FUNCTION__, (FUNCTION_DECL)))->function_decl.saved_tree
)
= DECL_SAVED_TREE (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2601, __FUNCTION__, (FUNCTION_DECL)))->function_decl.saved_tree
)
;
2602 DECL_STRUCT_FUNCTION (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2602, __FUNCTION__, (FUNCTION_DECL)))->function_decl.f)
= DECL_STRUCT_FUNCTION (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2602, __FUNCTION__, (FUNCTION_DECL)))->function_decl.f)
;
2603 }
2604 }
2605
2606 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
2607 {
2608 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2608, __FUNCTION__, (FUNCTION_DECL)))->function_decl.no_instrument_function_entry_exit
)
2609 |= DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2609, __FUNCTION__, (FUNCTION_DECL)))->function_decl.no_instrument_function_entry_exit
)
;
2610 DECL_NO_LIMIT_STACK (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2610, __FUNCTION__, (FUNCTION_DECL)))->function_decl.no_limit_stack
)
|= DECL_NO_LIMIT_STACK (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2610, __FUNCTION__, (FUNCTION_DECL)))->function_decl.no_limit_stack
)
;
2611 if (DECL_IS_OPERATOR_NEW_P (olddecl)(((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2611, __FUNCTION__, (FUNCTION_DECL)))->function_decl.decl_type
) == OPERATOR_NEW)
)
2612 DECL_SET_IS_OPERATOR_NEW (newdecl, true)set_function_decl_type ((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2612, __FUNCTION__, (FUNCTION_DECL))), OPERATOR_NEW, true)
;
2613 DECL_LOOPING_CONST_OR_PURE_P (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2613, __FUNCTION__, (FUNCTION_DECL)))->function_decl.looping_const_or_pure_flag
)
2614 |= DECL_LOOPING_CONST_OR_PURE_P (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2614, __FUNCTION__, (FUNCTION_DECL)))->function_decl.looping_const_or_pure_flag
)
;
2615 DECL_IS_REPLACEABLE_OPERATOR (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2615, __FUNCTION__, (FUNCTION_DECL)))->function_decl.replaceable_operator
)
2616 |= DECL_IS_REPLACEABLE_OPERATOR (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2616, __FUNCTION__, (FUNCTION_DECL)))->function_decl.replaceable_operator
)
;
2617
2618 if (merge_attr)
2619 merge_attribute_bits (newdecl, olddecl);
2620 else
2621 {
2622 /* Merge the noreturn bit. */
2623 TREE_THIS_VOLATILE (olddecl)((olddecl)->base.volatile_flag) = TREE_THIS_VOLATILE (newdecl)((newdecl)->base.volatile_flag);
2624 TREE_READONLY (olddecl)((non_type_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2624, __FUNCTION__))->base.readonly_flag)
= TREE_READONLY (newdecl)((non_type_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2624, __FUNCTION__))->base.readonly_flag)
;
2625 TREE_NOTHROW (olddecl)((olddecl)->base.nothrow_flag) = TREE_NOTHROW (newdecl)((newdecl)->base.nothrow_flag);
2626 DECL_IS_MALLOC (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2626, __FUNCTION__, (FUNCTION_DECL)))->function_decl.malloc_flag
)
= DECL_IS_MALLOC (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2626, __FUNCTION__, (FUNCTION_DECL)))->function_decl.malloc_flag
)
;
2627 DECL_PURE_P (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2627, __FUNCTION__, (FUNCTION_DECL)))->function_decl.pure_flag
)
= DECL_PURE_P (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2627, __FUNCTION__, (FUNCTION_DECL)))->function_decl.pure_flag
)
;
2628 }
2629 /* Keep the old RTL. */
2630 COPY_DECL_RTL (olddecl, newdecl)((contains_struct_check ((newdecl), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2630, __FUNCTION__))->decl_with_rtl.rtl = (contains_struct_check
((olddecl), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2630, __FUNCTION__))->decl_with_rtl.rtl)
;
2631 }
2632 else if (VAR_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL)
2633 && (DECL_SIZE (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2633, __FUNCTION__))->decl_common.size)
|| !DECL_SIZE (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2633, __FUNCTION__))->decl_common.size)
))
2634 {
2635 /* Keep the old RTL. We cannot keep the old RTL if the old
2636 declaration was for an incomplete object and the new
2637 declaration is not since many attributes of the RTL will
2638 change. */
2639 COPY_DECL_RTL (olddecl, newdecl)((contains_struct_check ((newdecl), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2639, __FUNCTION__))->decl_with_rtl.rtl = (contains_struct_check
((olddecl), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2639, __FUNCTION__))->decl_with_rtl.rtl)
;
2640 }
2641 }
2642 /* If cannot merge, then use the new type and qualifiers,
2643 and don't preserve the old rtl. */
2644 else
2645 {
2646 /* Clean out any memory we had of the old declaration. */
2647 tree oldstatic = value_member (olddecl, static_aggregates);
2648 if (oldstatic)
2649 TREE_VALUE (oldstatic)((tree_check ((oldstatic), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2649, __FUNCTION__, (TREE_LIST)))->list.value)
= error_mark_nodeglobal_trees[TI_ERROR_MARK];
2650
2651 TREE_TYPE (olddecl)((contains_struct_check ((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2651, __FUNCTION__))->typed.type)
= TREE_TYPE (newdecl)((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2651, __FUNCTION__))->typed.type)
;
2652 TREE_READONLY (olddecl)((non_type_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2652, __FUNCTION__))->base.readonly_flag)
= TREE_READONLY (newdecl)((non_type_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2652, __FUNCTION__))->base.readonly_flag)
;
2653 TREE_THIS_VOLATILE (olddecl)((olddecl)->base.volatile_flag) = TREE_THIS_VOLATILE (newdecl)((newdecl)->base.volatile_flag);
2654 TREE_NOTHROW (olddecl)((olddecl)->base.nothrow_flag) = TREE_NOTHROW (newdecl)((newdecl)->base.nothrow_flag);
2655 TREE_SIDE_EFFECTS (olddecl)((non_type_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2655, __FUNCTION__))->base.side_effects_flag)
= TREE_SIDE_EFFECTS (newdecl)((non_type_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2655, __FUNCTION__))->base.side_effects_flag)
;
2656 }
2657
2658 /* Merge the storage class information. */
2659 merge_weak (newdecl, olddecl);
2660
2661 DECL_DEFER_OUTPUT (newdecl)((contains_struct_check ((newdecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2661, __FUNCTION__))->decl_with_vis.defer_output)
|= DECL_DEFER_OUTPUT (olddecl)((contains_struct_check ((olddecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2661, __FUNCTION__))->decl_with_vis.defer_output)
;
2662 TREE_PUBLIC (newdecl)((newdecl)->base.public_flag) = TREE_PUBLIC (olddecl)((olddecl)->base.public_flag);
2663 TREE_STATIC (olddecl)((olddecl)->base.static_flag) = TREE_STATIC (newdecl)((newdecl)->base.static_flag) |= TREE_STATIC (olddecl)((olddecl)->base.static_flag);
2664 if (! DECL_EXTERNAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2664, __FUNCTION__))->decl_common.decl_flag_1)
)
2665 DECL_EXTERNAL (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2665, __FUNCTION__))->decl_common.decl_flag_1)
= 0;
2666 if (! DECL_COMDAT (olddecl)((contains_struct_check ((olddecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2666, __FUNCTION__))->decl_with_vis.comdat_flag)
)
2667 DECL_COMDAT (newdecl)((contains_struct_check ((newdecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2667, __FUNCTION__))->decl_with_vis.comdat_flag)
= 0;
2668
2669 if (VAR_OR_FUNCTION_DECL_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL || ((
enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
&& DECL_LOCAL_DECL_P (newdecl)((contains_struct_check (((tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2669, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2669, __FUNCTION__))->decl_common.lang_flag_0)
)
2670 {
2671 if (!DECL_LOCAL_DECL_P (olddecl)((contains_struct_check (((tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2671, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2671, __FUNCTION__))->decl_common.lang_flag_0)
)
2672 /* This can happen if olddecl was brought in from the
2673 enclosing namespace via a using-decl. The new decl is
2674 then not a block-scope extern at all. */
2675 DECL_LOCAL_DECL_P (newdecl)((contains_struct_check (((tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2675, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2675, __FUNCTION__))->decl_common.lang_flag_0)
= false;
2676 else
2677 {
2678 retrofit_lang_decl (newdecl);
2679 tree alias = DECL_LOCAL_DECL_ALIAS (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((void)(!(((contains_struct_check (((tree_check2 ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__), 0 : 0)), newdecl)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__))->decl_common.lang_specific); if (!(
(((enum tree_code) ((((void)(!(((contains_struct_check (((tree_check2
((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__), 0 : 0)), newdecl))->base.code) == VAR_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__), 0 : 0)), newdecl))->base.code) == FUNCTION_DECL
) || ((enum tree_code) ((((void)(!(((contains_struct_check ((
(tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__), 0 : 0)), newdecl))->base.code) == FIELD_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__), 0 : 0)), newdecl))->base.code) == CONST_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__), 0 : 0)), newdecl))->base.code) == TYPE_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__), 0 : 0)), newdecl))->base.code) == TEMPLATE_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__), 0 : 0)), newdecl))->base.code) == USING_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__), 0 : 0)), newdecl))->base.code) == CONCEPT_DECL
)) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2679, __FUNCTION__); &lt->u.min; })->access)
2680 = DECL_LOCAL_DECL_ALIAS (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((void)(!(((contains_struct_check (((tree_check2 ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__), 0 : 0)), olddecl)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__))->decl_common.lang_specific); if (!(
(((enum tree_code) ((((void)(!(((contains_struct_check (((tree_check2
((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__), 0 : 0)), olddecl))->base.code) == VAR_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__), 0 : 0)), olddecl))->base.code) == FUNCTION_DECL
) || ((enum tree_code) ((((void)(!(((contains_struct_check ((
(tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__), 0 : 0)), olddecl))->base.code) == FIELD_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__), 0 : 0)), olddecl))->base.code) == CONST_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__), 0 : 0)), olddecl))->base.code) == TYPE_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__), 0 : 0)), olddecl))->base.code) == TEMPLATE_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__), 0 : 0)), olddecl))->base.code) == USING_DECL
|| ((enum tree_code) ((((void)(!(((contains_struct_check (((
tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__))->decl_common.lang_flag_0)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__), 0 : 0)), olddecl))->base.code) == CONCEPT_DECL
)) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2680, __FUNCTION__); &lt->u.min; })->access)
;
2681 DECL_ATTRIBUTES (alias)((contains_struct_check ((alias), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2681, __FUNCTION__))->decl_common.attributes)
2682 = (*targetm.merge_decl_attributes) (alias, newdecl);
2683 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
2684 merge_attribute_bits (newdecl, alias);
2685 }
2686 }
2687
2688 new_template_info = NULL_TREE(tree) __null;
2689 if (DECL_LANG_SPECIFIC (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2689, __FUNCTION__))->decl_common.lang_specific)
&& DECL_LANG_SPECIFIC (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2689, __FUNCTION__))->decl_common.lang_specific)
)
2690 {
2691 bool new_redefines_gnu_inline = false;
2692
2693 if (new_defines_function
2694 && ((DECL_INTERFACE_KNOWN (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2694, __FUNCTION__))->decl_common.lang_flag_5)
2695 && TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL)
2696 || (TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
2697 && (TREE_CODE (DECL_TEMPLATE_RESULT (olddecl))((enum tree_code) (((struct tree_template_decl *)(const_cast<
union tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2697, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code)
2698 == FUNCTION_DECL))))
2699 new_redefines_gnu_inline = GNU_INLINE_P (STRIP_TEMPLATE (olddecl))(((tree_check (((((enum tree_code) (olddecl)->base.code) ==
TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast<
union tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2699, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2699, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
) && lookup_attribute ("gnu_inline", ((contains_struct_check
(((((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2699, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2699, __FUNCTION__))->decl_common.attributes)))
;
2700
2701 if (!new_redefines_gnu_inline)
2702 {
2703 DECL_INTERFACE_KNOWN (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2703, __FUNCTION__))->decl_common.lang_flag_5)
|= DECL_INTERFACE_KNOWN (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2703, __FUNCTION__))->decl_common.lang_flag_5)
;
2704 DECL_NOT_REALLY_EXTERN (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2704, __FUNCTION__))->decl_common.lang_specific)->u.base
.not_really_extern)
|= DECL_NOT_REALLY_EXTERN (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2704, __FUNCTION__))->decl_common.lang_specific)->u.base
.not_really_extern)
;
2705 DECL_COMDAT (newdecl)((contains_struct_check ((newdecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2705, __FUNCTION__))->decl_with_vis.comdat_flag)
|= DECL_COMDAT (olddecl)((contains_struct_check ((olddecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2705, __FUNCTION__))->decl_with_vis.comdat_flag)
;
2706 }
2707
2708 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) != TYPE_DECL)
2709 {
2710 DECL_TEMPLATE_INSTANTIATED (newdecl)((contains_struct_check (((tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2710, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2710, __FUNCTION__))->decl_common.lang_flag_1)
2711 |= DECL_TEMPLATE_INSTANTIATED (olddecl)((contains_struct_check (((tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2711, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2711, __FUNCTION__))->decl_common.lang_flag_1)
;
2712 DECL_ODR_USED (newdecl)(((contains_struct_check (((tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2712, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2712, __FUNCTION__))->decl_common.lang_specific) ->u.
base.odr_used)
|= DECL_ODR_USED (olddecl)(((contains_struct_check (((tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2712, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2712, __FUNCTION__))->decl_common.lang_specific) ->u.
base.odr_used)
;
2713
2714 /* If the OLDDECL is an instantiation and/or specialization,
2715 then the NEWDECL must be too. But, it may not yet be marked
2716 as such if the caller has created NEWDECL, but has not yet
2717 figured out that it is a redeclaration. */
2718 if (!DECL_USE_TEMPLATE (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2718, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template)
)
2719 DECL_USE_TEMPLATE (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2719, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template)
= DECL_USE_TEMPLATE (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2719, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template)
;
2720
2721 if (!DECL_TEMPLATE_SPECIALIZATION (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2721, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) == 2)
)
2722 DECL_INITIALIZED_IN_CLASS_P (newdecl)(((contains_struct_check (((tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2722, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2722, __FUNCTION__))->decl_common.lang_specific) ->u.
base.initialized_in_class)
2723 |= DECL_INITIALIZED_IN_CLASS_P (olddecl)(((contains_struct_check (((tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2723, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2723, __FUNCTION__))->decl_common.lang_specific) ->u.
base.initialized_in_class)
;
2724 }
2725
2726 /* Don't really know how much of the language-specific
2727 values we should copy from old to new. */
2728 DECL_IN_AGGR_P (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2728, __FUNCTION__))->decl_common.lang_flag_3))
= DECL_IN_AGGR_P (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2728, __FUNCTION__))->decl_common.lang_flag_3))
;
2729
2730 if (LANG_DECL_HAS_MIN (newdecl)((((enum tree_code) (newdecl)->base.code) == VAR_DECL || (
(enum tree_code) (newdecl)->base.code) == FUNCTION_DECL) ||
((enum tree_code) (newdecl)->base.code) == FIELD_DECL || (
(enum tree_code) (newdecl)->base.code) == CONST_DECL || ((
enum tree_code) (newdecl)->base.code) == TYPE_DECL || ((enum
tree_code) (newdecl)->base.code) == TEMPLATE_DECL || ((enum
tree_code) (newdecl)->base.code) == USING_DECL || ((enum tree_code
) (newdecl)->base.code) == CONCEPT_DECL)
)
2731 {
2732 DECL_ACCESS (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2732, __FUNCTION__))->decl_common.lang_specific); if (!(
(((enum tree_code) (newdecl)->base.code) == VAR_DECL || ((
enum tree_code) (newdecl)->base.code) == FUNCTION_DECL) ||
((enum tree_code) (newdecl)->base.code) == FIELD_DECL || (
(enum tree_code) (newdecl)->base.code) == CONST_DECL || ((
enum tree_code) (newdecl)->base.code) == TYPE_DECL || ((enum
tree_code) (newdecl)->base.code) == TEMPLATE_DECL || ((enum
tree_code) (newdecl)->base.code) == USING_DECL || ((enum tree_code
) (newdecl)->base.code) == CONCEPT_DECL)) lang_check_failed
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2732, __FUNCTION__); &lt->u.min; })->access)
= DECL_ACCESS (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2732, __FUNCTION__))->decl_common.lang_specific); if (!(
(((enum tree_code) (olddecl)->base.code) == VAR_DECL || ((
enum tree_code) (olddecl)->base.code) == FUNCTION_DECL) ||
((enum tree_code) (olddecl)->base.code) == FIELD_DECL || (
(enum tree_code) (olddecl)->base.code) == CONST_DECL || ((
enum tree_code) (olddecl)->base.code) == TYPE_DECL || ((enum
tree_code) (olddecl)->base.code) == TEMPLATE_DECL || ((enum
tree_code) (olddecl)->base.code) == USING_DECL || ((enum tree_code
) (olddecl)->base.code) == CONCEPT_DECL)) lang_check_failed
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2732, __FUNCTION__); &lt->u.min; })->access)
;
2733 if (DECL_TEMPLATE_INFO (newdecl)(((contains_struct_check ((template_info_decl_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2733, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2733, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)
)
2734 {
2735 new_template_info = DECL_TEMPLATE_INFO (newdecl)(((contains_struct_check ((template_info_decl_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2735, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2735, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)
;
2736 if (DECL_TEMPLATE_INSTANTIATION (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2736, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) & 1)
2737 && DECL_TEMPLATE_SPECIALIZATION (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2737, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) == 2)
)
2738 /* Remember the presence of explicit specialization args. */
2739 TINFO_USED_TEMPLATE_ID (DECL_TEMPLATE_INFO (olddecl))(((tree_not_check2 (((tree_check (((((contains_struct_check (
(template_info_decl_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2739, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2739, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2739, __FUNCTION__, (TEMPLATE_INFO)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2739, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1))
2740 = TINFO_USED_TEMPLATE_ID (new_template_info)(((tree_not_check2 (((tree_check ((new_template_info), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2740, __FUNCTION__, (TEMPLATE_INFO)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2740, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1))
;
2741 }
2742
2743 /* We don't want to copy template info from a non-templated friend
2744 (PR105761), but these shouldn't have DECL_TEMPLATE_INFO now. */
2745 gcc_checking_assert (!DECL_TEMPLATE_INFO (olddecl)((void)(!(!(((contains_struct_check ((template_info_decl_check
((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2745, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2745, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info) || !non_templated_friend_p (olddecl)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2746, __FUNCTION__), 0 : 0))
2746 || !non_templated_friend_p (olddecl))((void)(!(!(((contains_struct_check ((template_info_decl_check
((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2745, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2745, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info) || !non_templated_friend_p (olddecl)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2746, __FUNCTION__), 0 : 0))
;
2747 DECL_TEMPLATE_INFO (newdecl)(((contains_struct_check ((template_info_decl_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2747, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2747, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)
= DECL_TEMPLATE_INFO (olddecl)(((contains_struct_check ((template_info_decl_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2747, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2747, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)
;
2748 }
2749
2750 if (DECL_DECLARES_FUNCTION_P (newdecl)(((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2750, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2750, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL))
)
2751 {
2752 /* Only functions have these fields. */
2753 DECL_NONCONVERTING_P (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2753, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2753, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2753, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2753, __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/decl.cc"
, 2753, __FUNCTION__); &lt->u.fn; })->nonconverting
)
= DECL_NONCONVERTING_P (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2753, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2753, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2753, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2753, __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/decl.cc"
, 2753, __FUNCTION__); &lt->u.fn; })->nonconverting
)
;
2754 DECL_BEFRIENDING_CLASSES (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2754, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2754, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2754, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2754, __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/decl.cc"
, 2754, __FUNCTION__); &lt->u.fn; })->befriending_classes
)
2755 = chainon (DECL_BEFRIENDING_CLASSES (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2755, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2755, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2755, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2755, __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/decl.cc"
, 2755, __FUNCTION__); &lt->u.fn; })->befriending_classes
)
,
2756 DECL_BEFRIENDING_CLASSES (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2756, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2756, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2756, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2756, __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/decl.cc"
, 2756, __FUNCTION__); &lt->u.fn; })->befriending_classes
)
);
2757 /* DECL_THUNKS is only valid for virtual functions,
2758 otherwise it is a DECL_FRIEND_CONTEXT. */
2759 if (DECL_VIRTUAL_P (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2759, __FUNCTION__))->decl_common.virtual_flag)
)
2760 SET_DECL_THUNKS (newdecl, DECL_THUNKS (olddecl))(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2760, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2760, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2760, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2760, __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/decl.cc"
, 2760, __FUNCTION__); &lt->u.fn; })->context = (((
(contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2760, __FUNCTION__))->decl_common.virtual_flag) ? __extension__
({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code
) (olddecl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2760, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2760, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2760, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2760, __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/decl.cc"
, 2760, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)))
;
2761 else if (tree fc = DECL_FRIEND_CONTEXT (newdecl)(((((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2761, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2761, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && !((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2761, __FUNCTION__))->decl_common.virtual_flag) &&
!((tree_check (((((enum tree_code) (newdecl)->base.code) ==
TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast<
union tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2761, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2761, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
)) ? __extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2761, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2761, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2761, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2761, __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/decl.cc"
, 2761, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)
)
2762 SET_DECL_FRIEND_CONTEXT (olddecl, fc)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2762, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2762, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2762, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2762, __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/decl.cc"
, 2762, __FUNCTION__); &lt->u.fn; })->context = (fc
))
;
2763 }
2764 else if (VAR_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL))
2765 {
2766 /* Only variables have this field. */
2767 if (VAR_HAD_UNKNOWN_BOUND (olddecl)(((contains_struct_check (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2767, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2767, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2767, __FUNCTION__))->decl_common.lang_specific)->u.base
.unknown_bound_p : false)
)
2768 SET_VAR_HAD_UNKNOWN_BOUND (newdecl)(((contains_struct_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2768, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2768, __FUNCTION__))->decl_common.lang_specific)->u.base
.unknown_bound_p = true)
;
2769 }
2770 }
2771
2772 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
2773 {
2774 tree parm;
2775
2776 /* Merge parameter attributes. */
2777 tree oldarg, newarg;
2778 for (oldarg = DECL_ARGUMENTS(olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2778, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments
)
, newarg = DECL_ARGUMENTS(newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2778, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments
)
;
2779 oldarg && newarg;
2780 oldarg = DECL_CHAIN(oldarg)(((contains_struct_check (((contains_struct_check ((oldarg), (
TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2780, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2780, __FUNCTION__))->common.chain))
, newarg = DECL_CHAIN(newarg)(((contains_struct_check (((contains_struct_check ((newarg), (
TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2780, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2780, __FUNCTION__))->common.chain))
)
2781 {
2782 DECL_ATTRIBUTES (newarg)((contains_struct_check ((newarg), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2782, __FUNCTION__))->decl_common.attributes)
2783 = (*targetm.merge_decl_attributes) (oldarg, newarg);
2784 DECL_ATTRIBUTES (oldarg)((contains_struct_check ((oldarg), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2784, __FUNCTION__))->decl_common.attributes)
= DECL_ATTRIBUTES (newarg)((contains_struct_check ((newarg), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2784, __FUNCTION__))->decl_common.attributes)
;
2785 }
2786
2787 if (DECL_TEMPLATE_INSTANTIATION (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2787, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) & 1)
2788 && !DECL_TEMPLATE_INSTANTIATION (newdecl)((((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2788, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) & 1)
)
2789 {
2790 /* If newdecl is not a specialization, then it is not a
2791 template-related function at all. And that means that we
2792 should have exited above, returning 0. */
2793 gcc_assert (DECL_TEMPLATE_SPECIALIZATION (newdecl))((void)(!(((((contains_struct_check ((newdecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2793, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) == 2)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2793, __FUNCTION__), 0 : 0))
;
2794
2795 if (DECL_ODR_USED (olddecl)(((contains_struct_check (((tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2795, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2795, __FUNCTION__))->decl_common.lang_specific) ->u.
base.odr_used)
)
2796 /* From [temp.expl.spec]:
2797
2798 If a template, a member template or the member of a class
2799 template is explicitly specialized then that
2800 specialization shall be declared before the first use of
2801 that specialization that would cause an implicit
2802 instantiation to take place, in every translation unit in
2803 which such a use occurs. */
2804 error ("explicit specialization of %qD after first use",
2805 olddecl);
2806
2807 SET_DECL_TEMPLATE_SPECIALIZATION (olddecl)((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2807, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) = 2)
;
2808 DECL_COMDAT (newdecl)((contains_struct_check ((newdecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2808, __FUNCTION__))->decl_with_vis.comdat_flag)
= (TREE_PUBLIC (newdecl)((newdecl)->base.public_flag)
2809 && DECL_DECLARED_INLINE_P (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2809, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
);
2810
2811 /* Don't propagate visibility from the template to the
2812 specialization here. We'll do that in determine_visibility if
2813 appropriate. */
2814 DECL_VISIBILITY_SPECIFIED (olddecl)((contains_struct_check ((olddecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2814, __FUNCTION__))->decl_with_vis.visibility_specified
)
= 0;
2815
2816 /* [temp.expl.spec/14] We don't inline explicit specialization
2817 just because the primary template says so. */
2818 gcc_assert (!merge_attr)((void)(!(!merge_attr) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2818, __FUNCTION__), 0 : 0))
;
2819
2820 DECL_DECLARED_INLINE_P (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2820, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
2821 = DECL_DECLARED_INLINE_P (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2821, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
;
2822
2823 DECL_DISREGARD_INLINE_LIMITS (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2823, __FUNCTION__, (FUNCTION_DECL)))->function_decl.disregard_inline_limits
)
2824 = DECL_DISREGARD_INLINE_LIMITS (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2824, __FUNCTION__, (FUNCTION_DECL)))->function_decl.disregard_inline_limits
)
;
2825
2826 DECL_UNINLINABLE (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2826, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
= DECL_UNINLINABLE (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2826, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
;
2827 }
2828 else if (new_defines_function && DECL_INITIAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2828, __FUNCTION__))->decl_common.initial)
)
2829 {
2830 /* Never inline re-defined extern inline functions.
2831 FIXME: this could be better handled by keeping both
2832 function as separate declarations. */
2833 DECL_UNINLINABLE (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2833, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
= 1;
2834 }
2835 else
2836 {
2837 if (DECL_PENDING_INLINE_P (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2837, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2837, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2837, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2837, __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/decl.cc"
, 2837, __FUNCTION__); &lt->u.fn; })->pending_inline_p
)
)
2838 {
2839 DECL_PENDING_INLINE_P (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2839, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2839, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2839, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2839, __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/decl.cc"
, 2839, __FUNCTION__); &lt->u.fn; })->pending_inline_p
)
= 1;
2840 DECL_PENDING_INLINE_INFO (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2840, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2840, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2840, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2840, __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/decl.cc"
, 2840, __FUNCTION__); &lt->u.fn; })->u.pending_inline_info
)
2841 = DECL_PENDING_INLINE_INFO (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2841, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2841, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2841, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2841, __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/decl.cc"
, 2841, __FUNCTION__); &lt->u.fn; })->u.pending_inline_info
)
;
2842 }
2843 else if (DECL_PENDING_INLINE_P (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2843, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2843, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2843, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2843, __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/decl.cc"
, 2843, __FUNCTION__); &lt->u.fn; })->pending_inline_p
)
)
2844 ;
2845 else if (DECL_SAVED_AUTO_RETURN_TYPE (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) ((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2845, __FUNCTION__, (FUNCTION_DECL))))->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2845, __FUNCTION__, (FUNCTION_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2845, __FUNCTION__, (TEMPLATE_DECL))))))))->result : (tree_check
((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2845, __FUNCTION__, (FUNCTION_DECL))))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2845, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) ((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2845, __FUNCTION__, (FUNCTION_DECL))))->base.code) == FUNCTION_DECL
|| (((enum tree_code) ((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2845, __FUNCTION__, (FUNCTION_DECL))))->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2845, __FUNCTION__, (FUNCTION_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2845, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check (((tree_check
((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2845, __FUNCTION__, (FUNCTION_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2845, __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/decl.cc"
, 2845, __FUNCTION__); &lt->u.fn; }) ->u.saved_auto_return_type
)
== NULL__null)
2846 DECL_SAVED_AUTO_RETURN_TYPE (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) ((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2846, __FUNCTION__, (FUNCTION_DECL))))->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2846, __FUNCTION__, (FUNCTION_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2846, __FUNCTION__, (TEMPLATE_DECL))))))))->result : (tree_check
((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2846, __FUNCTION__, (FUNCTION_DECL))))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2846, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) ((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2846, __FUNCTION__, (FUNCTION_DECL))))->base.code) == FUNCTION_DECL
|| (((enum tree_code) ((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2846, __FUNCTION__, (FUNCTION_DECL))))->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2846, __FUNCTION__, (FUNCTION_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2846, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check (((tree_check
((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2846, __FUNCTION__, (FUNCTION_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2846, __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/decl.cc"
, 2846, __FUNCTION__); &lt->u.fn; }) ->u.saved_auto_return_type
)
2847 = DECL_SAVED_AUTO_RETURN_TYPE (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) ((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2847, __FUNCTION__, (FUNCTION_DECL))))->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2847, __FUNCTION__, (FUNCTION_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2847, __FUNCTION__, (TEMPLATE_DECL))))))))->result : (tree_check
((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2847, __FUNCTION__, (FUNCTION_DECL))))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2847, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) ((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2847, __FUNCTION__, (FUNCTION_DECL))))->base.code) == FUNCTION_DECL
|| (((enum tree_code) ((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2847, __FUNCTION__, (FUNCTION_DECL))))->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2847, __FUNCTION__, (FUNCTION_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2847, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check (((tree_check
((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2847, __FUNCTION__, (FUNCTION_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2847, __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/decl.cc"
, 2847, __FUNCTION__); &lt->u.fn; }) ->u.saved_auto_return_type
)
;
2848
2849 DECL_DECLARED_INLINE_P (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2849, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
|= DECL_DECLARED_INLINE_P (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2849, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
;
2850
2851 DECL_UNINLINABLE (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2851, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
= DECL_UNINLINABLE (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2851, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
2852 = (DECL_UNINLINABLE (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2852, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
|| DECL_UNINLINABLE (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2852, __FUNCTION__, (FUNCTION_DECL)))->function_decl.uninlinable
)
);
2853
2854 DECL_DISREGARD_INLINE_LIMITS (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2854, __FUNCTION__, (FUNCTION_DECL)))->function_decl.disregard_inline_limits
)
2855 = DECL_DISREGARD_INLINE_LIMITS (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2855, __FUNCTION__, (FUNCTION_DECL)))->function_decl.disregard_inline_limits
)
2856 = (DECL_DISREGARD_INLINE_LIMITS (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2856, __FUNCTION__, (FUNCTION_DECL)))->function_decl.disregard_inline_limits
)
2857 || DECL_DISREGARD_INLINE_LIMITS (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2857, __FUNCTION__, (FUNCTION_DECL)))->function_decl.disregard_inline_limits
)
);
2858 }
2859
2860 /* Preserve abstractness on cloned [cd]tors. */
2861 DECL_ABSTRACT_P (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2861, __FUNCTION__))->decl_common.abstract_flag)
= DECL_ABSTRACT_P (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2861, __FUNCTION__))->decl_common.abstract_flag)
;
2862
2863 /* Update newdecl's parms to point at olddecl. */
2864 for (parm = DECL_ARGUMENTS (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2864, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments
)
; parm;
2865 parm = DECL_CHAIN (parm)(((contains_struct_check (((contains_struct_check ((parm), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2865, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2865, __FUNCTION__))->common.chain))
)
2866 DECL_CONTEXT (parm)((contains_struct_check ((parm), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2866, __FUNCTION__))->decl_minimal.context)
= olddecl;
2867
2868 if (! types_match)
2869 {
2870 SET_DECL_LANGUAGE (olddecl, DECL_LANGUAGE (newdecl))(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2870, __FUNCTION__))->decl_common.lang_specific)->u.base
.language = ((((contains_struct_check ((newdecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2870, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2870, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus))))
;
2871 COPY_DECL_ASSEMBLER_NAME (newdecl, olddecl)overwrite_decl_assembler_name (olddecl, ((contains_struct_check
((newdecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2871, __FUNCTION__))->decl_with_vis.assembler_name))
;
2872 COPY_DECL_RTL (newdecl, olddecl)((contains_struct_check ((olddecl), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2872, __FUNCTION__))->decl_with_rtl.rtl = (contains_struct_check
((newdecl), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2872, __FUNCTION__))->decl_with_rtl.rtl)
;
2873 }
2874 if (! types_match || new_defines_function)
2875 {
2876 /* These are the final DECL_ARGUMENTS that will be used within the
2877 body; update any references to old DECL_ARGUMENTS in the
2878 contracts, if present. */
2879 if (tree contracts = DECL_CONTRACTS (newdecl)(find_contract (((contains_struct_check ((newdecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2879, __FUNCTION__))->decl_common.attributes)))
)
2880 remap_contracts (olddecl, newdecl, contracts, true);
2881
2882 /* These need to be copied so that the names are available.
2883 Note that if the types do match, we'll preserve inline
2884 info and other bits, but if not, we won't. */
2885 DECL_ARGUMENTS (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2885, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments
)
= DECL_ARGUMENTS (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2885, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments
)
;
2886 DECL_RESULT (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2886, __FUNCTION__, (FUNCTION_DECL)))->decl_non_common.result
)
= DECL_RESULT (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2886, __FUNCTION__, (FUNCTION_DECL)))->decl_non_common.result
)
;
2887
2888 /* In some cases, duplicate_contracts will remove contracts from
2889 OLDDECL, to avoid duplications. Sometimes, the contracts end up
2890 shared. If we removed them, re-add them. */
2891 if (!DECL_CONTRACTS (olddecl)(find_contract (((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2891, __FUNCTION__))->decl_common.attributes)))
)
2892 copy_contract_attributes (olddecl, newdecl);
2893 }
2894 /* If redeclaring a builtin function, it stays built in
2895 if newdecl is a gnu_inline definition, or if newdecl is just
2896 a declaration. */
2897 if (fndecl_built_in_p (olddecl)
2898 && (new_defines_function ? GNU_INLINE_P (newdecl)(((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2898, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
) && lookup_attribute ("gnu_inline", ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2898, __FUNCTION__))->decl_common.attributes)))
: types_match))
2899 {
2900 copy_decl_built_in_function (newdecl, olddecl);
2901 /* If we're keeping the built-in definition, keep the rtl,
2902 regardless of declaration matches. */
2903 COPY_DECL_RTL (olddecl, newdecl)((contains_struct_check ((newdecl), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2903, __FUNCTION__))->decl_with_rtl.rtl = (contains_struct_check
((olddecl), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2903, __FUNCTION__))->decl_with_rtl.rtl)
;
2904 if (DECL_BUILT_IN_CLASS (newdecl)((built_in_class) (tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2904, __FUNCTION__, (FUNCTION_DECL)))->function_decl.built_in_class
)
== BUILT_IN_NORMAL)
2905 {
2906 enum built_in_function fncode = DECL_FUNCTION_CODE (newdecl);
2907 if (builtin_decl_explicit_p (fncode))
2908 {
2909 /* A compatible prototype of these builtin functions
2910 is seen, assume the runtime implements it with
2911 the expected semantics. */
2912 switch (fncode)
2913 {
2914 case BUILT_IN_STPCPY:
2915 set_builtin_decl_implicit_p (fncode, true);
2916 break;
2917 default:
2918 set_builtin_decl_declared_p (fncode, true);
2919 break;
2920 }
2921 }
2922
2923 copy_attributes_to_builtin (newdecl);
2924 }
2925 }
2926 if (new_defines_function)
2927 /* If defining a function declared with other language
2928 linkage, use the previously declared language linkage. */
2929 SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl))(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2929, __FUNCTION__))->decl_common.lang_specific)->u.base
.language = ((((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2929, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2929, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus))))
;
2930 else if (types_match)
2931 {
2932 DECL_RESULT (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2932, __FUNCTION__, (FUNCTION_DECL)))->decl_non_common.result
)
= DECL_RESULT (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2932, __FUNCTION__, (FUNCTION_DECL)))->decl_non_common.result
)
;
2933 /* Don't clear out the arguments if we're just redeclaring a
2934 function. */
2935 if (DECL_ARGUMENTS (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2935, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments
)
)
2936 {
2937 /* If we removed contracts from previous definition, re-attach
2938 them. Otherwise, rewrite the contracts so they match the
2939 parameters of the new declaration. */
2940 if (DECL_INITIAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2940, __FUNCTION__))->decl_common.initial)
2941 && DECL_CONTRACTS (newdecl)(find_contract (((contains_struct_check ((newdecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2941, __FUNCTION__))->decl_common.attributes)))
2942 && !DECL_CONTRACTS (olddecl)(find_contract (((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2942, __FUNCTION__))->decl_common.attributes)))
)
2943 copy_contract_attributes (olddecl, newdecl);
2944 else
2945 {
2946 /* Temporarily undo the re-contexting of parameters so we can
2947 actually remap parameters. The inliner won't replace
2948 parameters if we don't do this. */
2949 tree args = DECL_ARGUMENTS (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2949, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments
)
;
2950 for (tree p = args; p; p = DECL_CHAIN (p)(((contains_struct_check (((contains_struct_check ((p), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2950, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2950, __FUNCTION__))->common.chain))
)
2951 DECL_CONTEXT (p)((contains_struct_check ((p), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2951, __FUNCTION__))->decl_minimal.context)
= newdecl;
2952
2953 /* Save new argument names for use in contracts parsing,
2954 unless we've already started parsing the body of olddecl
2955 (particular issues arise when newdecl is from a prior
2956 friend decl with no argument names, see
2957 modules/contracts-tpl-friend-1). */
2958 if (tree contracts = DECL_CONTRACTS (olddecl)(find_contract (((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2958, __FUNCTION__))->decl_common.attributes)))
)
2959 remap_contracts (newdecl, olddecl, contracts, true);
2960
2961 /* And reverse this operation again. */
2962 for (tree p = args; p; p = DECL_CHAIN (p)(((contains_struct_check (((contains_struct_check ((p), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2962, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2962, __FUNCTION__))->common.chain))
)
2963 DECL_CONTEXT (p)((contains_struct_check ((p), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2963, __FUNCTION__))->decl_minimal.context)
= olddecl;
2964 }
2965
2966 DECL_ARGUMENTS (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2966, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments
)
= DECL_ARGUMENTS (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2966, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments
)
;
2967 }
2968 }
2969 }
2970 else if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == NAMESPACE_DECL)
2971 NAMESPACE_LEVEL (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2971, __FUNCTION__))->decl_common.lang_specific); if (((
enum tree_code) (newdecl)->base.code) != NAMESPACE_DECL ||
lt->u.base.selector != lds_ns) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2971, __FUNCTION__); &lt->u.ns; })->level)
= NAMESPACE_LEVEL (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2971, __FUNCTION__))->decl_common.lang_specific); if (((
enum tree_code) (olddecl)->base.code) != NAMESPACE_DECL ||
lt->u.base.selector != lds_ns) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2971, __FUNCTION__); &lt->u.ns; })->level)
;
2972
2973 /* Now preserve various other info from the definition. */
2974 TREE_ADDRESSABLE (newdecl)((newdecl)->base.addressable_flag) = TREE_ADDRESSABLE (olddecl)((olddecl)->base.addressable_flag);
2975 TREE_ASM_WRITTEN (newdecl)((newdecl)->base.asm_written_flag) = TREE_ASM_WRITTEN (olddecl)((olddecl)->base.asm_written_flag);
2976 DECL_COMMON (newdecl)((contains_struct_check ((newdecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2976, __FUNCTION__))->decl_with_vis.common_flag)
= DECL_COMMON (olddecl)((contains_struct_check ((olddecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2976, __FUNCTION__))->decl_with_vis.common_flag)
;
2977 COPY_DECL_ASSEMBLER_NAME (olddecl, newdecl)overwrite_decl_assembler_name (newdecl, ((contains_struct_check
((olddecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2977, __FUNCTION__))->decl_with_vis.assembler_name))
;
2978
2979 /* Warn about conflicting visibility specifications. */
2980 if (DECL_VISIBILITY_SPECIFIED (olddecl)((contains_struct_check ((olddecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2980, __FUNCTION__))->decl_with_vis.visibility_specified
)
2981 && DECL_VISIBILITY_SPECIFIED (newdecl)((contains_struct_check ((newdecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2981, __FUNCTION__))->decl_with_vis.visibility_specified
)
2982 && DECL_VISIBILITY (newdecl)((contains_struct_check ((newdecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2982, __FUNCTION__))->decl_with_vis.visibility)
!= DECL_VISIBILITY (olddecl)((contains_struct_check ((olddecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2982, __FUNCTION__))->decl_with_vis.visibility)
)
2983 {
2984 auto_diagnostic_group d;
2985 if (warning_at (newdecl_loc, OPT_Wattributes,
2986 "%qD: visibility attribute ignored because it "
2987 "conflicts with previous declaration", newdecl))
2988 inform (olddecl_loc,
2989 "previous declaration of %qD", olddecl);
2990 }
2991 /* Choose the declaration which specified visibility. */
2992 if (DECL_VISIBILITY_SPECIFIED (olddecl)((contains_struct_check ((olddecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2992, __FUNCTION__))->decl_with_vis.visibility_specified
)
)
2993 {
2994 DECL_VISIBILITY (newdecl)((contains_struct_check ((newdecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2994, __FUNCTION__))->decl_with_vis.visibility)
= DECL_VISIBILITY (olddecl)((contains_struct_check ((olddecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2994, __FUNCTION__))->decl_with_vis.visibility)
;
2995 DECL_VISIBILITY_SPECIFIED (newdecl)((contains_struct_check ((newdecl), (TS_DECL_WITH_VIS), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2995, __FUNCTION__))->decl_with_vis.visibility_specified
)
= 1;
2996 }
2997 /* Init priority used to be merged from newdecl to olddecl by the memcpy,
2998 so keep this behavior. */
2999 if (VAR_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL) && DECL_HAS_INIT_PRIORITY_P (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 2999, __FUNCTION__, (VAR_DECL)))->decl_with_vis.init_priority_p
)
)
3000 {
3001 SET_DECL_INIT_PRIORITY (olddecl, DECL_INIT_PRIORITY (newdecl))(decl_init_priority_insert (olddecl, (decl_init_priority_lookup
(newdecl))))
;
3002 DECL_HAS_INIT_PRIORITY_P (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3002, __FUNCTION__, (VAR_DECL)))->decl_with_vis.init_priority_p
)
= 1;
3003 }
3004 /* Likewise for DECL_ALIGN, DECL_USER_ALIGN and DECL_PACKED. */
3005 if (DECL_ALIGN (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3005, __FUNCTION__))->decl_common.align) ? ((unsigned)1)
<< (((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3005, __FUNCTION__))->decl_common.align) - 1) : 0)
> DECL_ALIGN (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3005, __FUNCTION__))->decl_common.align) ? ((unsigned)1)
<< (((contains_struct_check ((newdecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3005, __FUNCTION__))->decl_common.align) - 1) : 0)
)
3006 {
3007 SET_DECL_ALIGN (newdecl, DECL_ALIGN (olddecl))(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3007, __FUNCTION__))->decl_common.align) = ffs_hwi ((((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3007, __FUNCTION__))->decl_common.align) ? ((unsigned)1)
<< (((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3007, __FUNCTION__))->decl_common.align) - 1) : 0)))
;
3008 DECL_USER_ALIGN (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3008, __FUNCTION__))->base.u.bits.user_align)
|= DECL_USER_ALIGN (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3008, __FUNCTION__))->base.u.bits.user_align)
;
3009 }
3010 else if (DECL_ALIGN (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3010, __FUNCTION__))->decl_common.align) ? ((unsigned)1)
<< (((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3010, __FUNCTION__))->decl_common.align) - 1) : 0)
== DECL_ALIGN (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3010, __FUNCTION__))->decl_common.align) ? ((unsigned)1)
<< (((contains_struct_check ((newdecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3010, __FUNCTION__))->decl_common.align) - 1) : 0)
3011 && DECL_USER_ALIGN (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3011, __FUNCTION__))->base.u.bits.user_align)
!= DECL_USER_ALIGN (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3011, __FUNCTION__))->base.u.bits.user_align)
)
3012 DECL_USER_ALIGN (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3012, __FUNCTION__))->base.u.bits.user_align)
= 1;
3013
3014 DECL_USER_ALIGN (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3014, __FUNCTION__))->base.u.bits.user_align)
= DECL_USER_ALIGN (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3014, __FUNCTION__))->base.u.bits.user_align)
;
3015 if (DECL_WARN_IF_NOT_ALIGN (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3015, __FUNCTION__))->decl_common.warn_if_not_align) ? (
(unsigned)1) << (((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3015, __FUNCTION__))->decl_common.warn_if_not_align) - 1
) : 0)
3016 > DECL_WARN_IF_NOT_ALIGN (newdecl)(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3016, __FUNCTION__))->decl_common.warn_if_not_align) ? (
(unsigned)1) << (((contains_struct_check ((newdecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3016, __FUNCTION__))->decl_common.warn_if_not_align) - 1
) : 0)
)
3017 SET_DECL_WARN_IF_NOT_ALIGN (newdecl,(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3018, __FUNCTION__))->decl_common.warn_if_not_align) = ffs_hwi
((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3018, __FUNCTION__))->decl_common.warn_if_not_align) ? (
(unsigned)1) << (((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3018, __FUNCTION__))->decl_common.warn_if_not_align) - 1
) : 0)))
3018 DECL_WARN_IF_NOT_ALIGN (olddecl))(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3018, __FUNCTION__))->decl_common.warn_if_not_align) = ffs_hwi
((((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3018, __FUNCTION__))->decl_common.warn_if_not_align) ? (
(unsigned)1) << (((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3018, __FUNCTION__))->decl_common.warn_if_not_align) - 1
) : 0)))
;
3019 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FIELD_DECL)
3020 DECL_PACKED (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3020, __FUNCTION__, (FIELD_DECL)))->base.u.bits.packed_flag
)
= DECL_PACKED (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3020, __FUNCTION__, (FIELD_DECL)))->base.u.bits.packed_flag
)
;
3021
3022 /* The DECL_LANG_SPECIFIC information in OLDDECL will be replaced
3023 with that from NEWDECL below. */
3024 if (DECL_LANG_SPECIFIC (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3024, __FUNCTION__))->decl_common.lang_specific)
)
3025 {
3026 gcc_checking_assert (DECL_LANG_SPECIFIC (olddecl)((void)(!(((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3026, __FUNCTION__))->decl_common.lang_specific) != ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3027, __FUNCTION__))->decl_common.lang_specific)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3027, __FUNCTION__), 0 : 0))
3027 != DECL_LANG_SPECIFIC (newdecl))((void)(!(((contains_struct_check ((olddecl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3026, __FUNCTION__))->decl_common.lang_specific) != ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3027, __FUNCTION__))->decl_common.lang_specific)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3027, __FUNCTION__), 0 : 0))
;
3028 ggc_free (DECL_LANG_SPECIFIC (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3028, __FUNCTION__))->decl_common.lang_specific)
);
3029 }
3030
3031 /* Merge the USED information. */
3032 if (TREE_USED (olddecl)((olddecl)->base.used_flag))
3033 TREE_USED (newdecl)((newdecl)->base.used_flag) = 1;
3034 else if (TREE_USED (newdecl)((newdecl)->base.used_flag))
3035 TREE_USED (olddecl)((olddecl)->base.used_flag) = 1;
3036
3037 if (VAR_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL))
3038 {
3039 if (DECL_READ_P (olddecl)((tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3039, __FUNCTION__, (VAR_DECL), (PARM_DECL)))->decl_common
.decl_read_flag)
)
3040 DECL_READ_P (newdecl)((tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3040, __FUNCTION__, (VAR_DECL), (PARM_DECL)))->decl_common
.decl_read_flag)
= 1;
3041 else if (DECL_READ_P (newdecl)((tree_check2 ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3041, __FUNCTION__, (VAR_DECL), (PARM_DECL)))->decl_common
.decl_read_flag)
)
3042 DECL_READ_P (olddecl)((tree_check2 ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3042, __FUNCTION__, (VAR_DECL), (PARM_DECL)))->decl_common
.decl_read_flag)
= 1;
3043 }
3044
3045 if (DECL_PRESERVE_P (olddecl)(contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3045, __FUNCTION__))->decl_common.preserve_flag
)
3046 DECL_PRESERVE_P (newdecl)(contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3046, __FUNCTION__))->decl_common.preserve_flag
= 1;
3047 else if (DECL_PRESERVE_P (newdecl)(contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3047, __FUNCTION__))->decl_common.preserve_flag
)
3048 DECL_PRESERVE_P (olddecl)(contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3048, __FUNCTION__))->decl_common.preserve_flag
= 1;
3049
3050 /* Merge the DECL_FUNCTION_VERSIONED information. newdecl will be copied
3051 to olddecl and deleted. */
3052 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL
3053 && DECL_FUNCTION_VERSIONED (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3053, __FUNCTION__, (FUNCTION_DECL)))->function_decl.versioned_function
)
)
3054 {
3055 /* Set the flag for newdecl so that it gets copied to olddecl. */
3056 DECL_FUNCTION_VERSIONED (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3056, __FUNCTION__, (FUNCTION_DECL)))->function_decl.versioned_function
)
= 1;
3057 /* newdecl will be purged after copying to olddecl and is no longer
3058 a version. */
3059 cgraph_node::delete_function_version_by_decl (newdecl);
3060 }
3061
3062 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
3063 {
3064 int function_size;
3065 struct symtab_node *snode = symtab_node::get (olddecl);
3066
3067 function_size = sizeof (struct tree_decl_common);
3068
3069 memcpy ((char *) olddecl + sizeof (struct tree_common),
3070 (char *) newdecl + sizeof (struct tree_common),
3071 function_size - sizeof (struct tree_common));
3072
3073 memcpy ((char *) olddecl + sizeof (struct tree_decl_common),
3074 (char *) newdecl + sizeof (struct tree_decl_common),
3075 sizeof (struct tree_function_decl) - sizeof (struct tree_decl_common));
3076
3077 /* Preserve symtab node mapping. */
3078 olddecl->decl_with_vis.symtab_node = snode;
3079
3080 if (new_template_info)
3081 /* If newdecl is a template instantiation, it is possible that
3082 the following sequence of events has occurred:
3083
3084 o A friend function was declared in a class template. The
3085 class template was instantiated.
3086
3087 o The instantiation of the friend declaration was
3088 recorded on the instantiation list, and is newdecl.
3089
3090 o Later, however, instantiate_class_template called pushdecl
3091 on the newdecl to perform name injection. But, pushdecl in
3092 turn called duplicate_decls when it discovered that another
3093 declaration of a global function with the same name already
3094 existed.
3095
3096 o Here, in duplicate_decls, we decided to clobber newdecl.
3097
3098 If we're going to do that, we'd better make sure that
3099 olddecl, and not newdecl, is on the list of
3100 instantiations so that if we try to do the instantiation
3101 again we won't get the clobbered declaration. */
3102 reregister_specialization (newdecl,
3103 new_template_info,
3104 olddecl);
3105 }
3106 else
3107 {
3108 size_t size = tree_code_size (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code));
3109
3110 memcpy ((char *) olddecl + sizeof (struct tree_common),
3111 (char *) newdecl + sizeof (struct tree_common),
3112 sizeof (struct tree_decl_common) - sizeof (struct tree_common));
3113
3114 switch (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code))
3115 {
3116 case LABEL_DECL:
3117 case VAR_DECL:
3118 case RESULT_DECL:
3119 case PARM_DECL:
3120 case FIELD_DECL:
3121 case TYPE_DECL:
3122 case CONST_DECL:
3123 {
3124 struct symtab_node *snode = NULL__null;
3125
3126 if (VAR_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL)
3127 && (TREE_STATIC (olddecl)((olddecl)->base.static_flag) || TREE_PUBLIC (olddecl)((olddecl)->base.public_flag)
3128 || DECL_EXTERNAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3128, __FUNCTION__))->decl_common.decl_flag_1)
))
3129 snode = symtab_node::get (olddecl);
3130 memcpy ((char *) olddecl + sizeof (struct tree_decl_common),
3131 (char *) newdecl + sizeof (struct tree_decl_common),
3132 size - sizeof (struct tree_decl_common)
3133 + TREE_CODE_LENGTH (TREE_CODE (newdecl))tree_code_length_tmpl <0>::tree_code_length[(int) (((enum
tree_code) (newdecl)->base.code))]
* sizeof (char *));
3134 if (VAR_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL))
3135 olddecl->decl_with_vis.symtab_node = snode;
3136 }
3137 break;
3138 default:
3139 memcpy ((char *) olddecl + sizeof (struct tree_decl_common),
3140 (char *) newdecl + sizeof (struct tree_decl_common),
3141 sizeof (struct tree_decl_non_common) - sizeof (struct tree_decl_common)
3142 + TREE_CODE_LENGTH (TREE_CODE (newdecl))tree_code_length_tmpl <0>::tree_code_length[(int) (((enum
tree_code) (newdecl)->base.code))]
* sizeof (char *));
3143 break;
3144 }
3145 }
3146
3147 if (VAR_OR_FUNCTION_DECL_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL || ((
enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
)
3148 {
3149 if (DECL_EXTERNAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3149, __FUNCTION__))->decl_common.decl_flag_1)
3150 || TREE_PUBLIC (olddecl)((olddecl)->base.public_flag)
3151 || TREE_STATIC (olddecl)((olddecl)->base.static_flag))
3152 {
3153 /* Merge the section attribute.
3154 We want to issue an error if the sections conflict but that must be
3155 done later in decl_attributes since we are called before attributes
3156 are assigned. */
3157 if (DECL_SECTION_NAME (newdecl)decl_section_name (newdecl) != NULL__null)
3158 set_decl_section_name (olddecl, newdecl);
3159
3160 if (DECL_ONE_ONLY (newdecl)(decl_comdat_group (newdecl) != (tree) __null && (((newdecl
)->base.public_flag) || ((contains_struct_check ((newdecl)
, (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3160, __FUNCTION__))->decl_common.decl_flag_1)))
)
3161 {
3162 struct symtab_node *oldsym, *newsym;
3163 if (TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL)
3164 oldsym = cgraph_node::get_create (olddecl);
3165 else
3166 oldsym = varpool_node::get_create (olddecl);
3167 newsym = symtab_node::get (newdecl);
3168 oldsym->set_comdat_group (newsym->get_comdat_group ());
3169 }
3170 }
3171
3172 if (VAR_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL)
3173 && CP_DECL_THREAD_LOCAL_P (newdecl)(((tree_not_check2 (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3173, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3173, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
)
3174 {
3175 CP_DECL_THREAD_LOCAL_P (olddecl)(((tree_not_check2 (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3175, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3175, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
= true;
3176 if (!processing_template_declscope_chain->x_processing_template_decl)
3177 set_decl_tls_model (olddecl, DECL_TLS_MODEL (newdecl)decl_tls_model (newdecl));
3178 }
3179 }
3180
3181 DECL_UID (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3181, __FUNCTION__))->decl_minimal.uid)
= olddecl_uid;
3182
3183 /* NEWDECL contains the merged attribute lists.
3184 Update OLDDECL to be the same. */
3185 DECL_ATTRIBUTES (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3185, __FUNCTION__))->decl_common.attributes)
= DECL_ATTRIBUTES (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3185, __FUNCTION__))->decl_common.attributes)
;
3186
3187 /* If OLDDECL had its DECL_RTL instantiated, re-invoke make_decl_rtl
3188 so that encode_section_info has a chance to look at the new decl
3189 flags and attributes. */
3190 if (DECL_RTL_SET_P (olddecl)(((tree_contains_struct[(((enum tree_code) (olddecl)->base
.code))][(TS_DECL_WRTL)])) && (contains_struct_check (
(olddecl), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3190, __FUNCTION__))->decl_with_rtl.rtl != __null)
3191 && (TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
3192 || (VAR_P (olddecl)(((enum tree_code) (olddecl)->base.code) == VAR_DECL)
3193 && TREE_STATIC (olddecl)((olddecl)->base.static_flag))))
3194 make_decl_rtl (olddecl);
3195
3196 /* The NEWDECL will no longer be needed. Because every out-of-class
3197 declaration of a member results in a call to duplicate_decls,
3198 freeing these nodes represents in a significant savings.
3199
3200 Before releasing the node, be sore to remove function from symbol
3201 table that might have been inserted there to record comdat group.
3202 Be sure to however do not free DECL_STRUCT_FUNCTION because this
3203 structure is shared in between newdecl and oldecl. */
3204 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
3205 DECL_STRUCT_FUNCTION (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3205, __FUNCTION__, (FUNCTION_DECL)))->function_decl.f)
= NULL__null;
3206 if (VAR_OR_FUNCTION_DECL_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL || ((
enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
)
3207 {
3208 struct symtab_node *snode = symtab_node::get (newdecl);
3209 if (snode)
3210 snode->remove ();
3211 }
3212
3213 if (TREE_CODE (olddecl)((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL)
3214 {
3215 tree clone;
3216 FOR_EACH_CLONE (clone, olddecl)if (!(((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL
&& ((((contains_struct_check ((olddecl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__))->decl_minimal.name) == cp_global_trees
[CPTI_CTOR_IDENTIFIER]) || (((contains_struct_check ((olddecl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__))->decl_minimal.name) == cp_global_trees
[CPTI_DTOR_IDENTIFIER])))) ; else for (clone = (((contains_struct_check
(((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__))->common.chain)); clone && (
((contains_struct_check ((clone), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__))->decl_minimal.name) && ((!(
(tree_not_check2 (((tree_check ((((contains_struct_check ((clone
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & ((tree_not_check2 (((tree_check ((((contains_struct_check
((clone), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1)) && !((((contains_struct_check ((clone)
, (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__))->decl_minimal.name) == cp_global_trees
[CPTI_CTOR_IDENTIFIER]) || (((contains_struct_check ((clone),
(TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__))->decl_minimal.name) == cp_global_trees
[CPTI_DTOR_IDENTIFIER]))); clone = (((contains_struct_check (
((contains_struct_check ((clone), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3216, __FUNCTION__))->common.chain)))
3217 {
3218 DECL_ATTRIBUTES (clone)((contains_struct_check ((clone), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3218, __FUNCTION__))->decl_common.attributes)
= DECL_ATTRIBUTES (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3218, __FUNCTION__))->decl_common.attributes)
;
3219 DECL_PRESERVE_P (clone)(contains_struct_check ((clone), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3219, __FUNCTION__))->decl_common.preserve_flag
|= DECL_PRESERVE_P (olddecl)(contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3219, __FUNCTION__))->decl_common.preserve_flag
;
3220 }
3221 }
3222
3223 /* Remove the associated constraints for newdecl, if any, before
3224 reclaiming memory. */
3225 if (flag_conceptsglobal_options.x_flag_concepts)
3226 remove_constraints (newdecl);
3227
3228 ggc_free (newdecl);
3229
3230 return olddecl;
3231}
3232
3233/* Return zero if the declaration NEWDECL is valid
3234 when the declaration OLDDECL (assumed to be for the same name)
3235 has already been seen.
3236 Otherwise return an error message format string with a %s
3237 where the identifier should go. */
3238
3239static const char *
3240redeclaration_error_message (tree newdecl, tree olddecl)
3241{
3242 if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == TYPE_DECL)
3243 {
3244 /* Because C++ can put things into name space for free,
3245 constructs like "typedef struct foo { ... } foo"
3246 would look like an erroneous redeclaration. */
3247 if (same_type_p (TREE_TYPE (newdecl), TREE_TYPE (olddecl))comptypes ((((contains_struct_check ((newdecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3247, __FUNCTION__))->typed.type)), (((contains_struct_check
((olddecl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3247, __FUNCTION__))->typed.type)), 0)
)
3248 return NULL__null;
3249 else
3250 return G_("redefinition of %q#D")"redefinition of %q#D";
3251 }
3252 else if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL)
3253 {
3254 /* If this is a pure function, its olddecl will actually be
3255 the original initialization to `0' (which we force to call
3256 abort()). Don't complain about redefinition in this case. */
3257 if (DECL_LANG_SPECIFIC (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3257, __FUNCTION__))->decl_common.lang_specific)
&& DECL_PURE_VIRTUAL_P (olddecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3257, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3257, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (olddecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (olddecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3257, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3257, __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/decl.cc"
, 3257, __FUNCTION__); &lt->u.fn; })->pure_virtual)
3258 && DECL_INITIAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3258, __FUNCTION__))->decl_common.initial)
== NULL_TREE(tree) __null)
3259 return NULL__null;
3260
3261 /* If both functions come from different namespaces, this is not
3262 a redeclaration - this is a conflict with a used function. */
3263 if (DECL_NAMESPACE_SCOPE_P (olddecl)(!(((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3263, __FUNCTION__))->decl_common.lang_flag_0) &&
(((enum tree_code) (olddecl)->base.code) == CONST_DECL ||
((enum tree_code) (olddecl)->base.code) == PARM_DECL || (
(enum tree_code) (olddecl)->base.code) == TYPE_DECL || ((enum
tree_code) (olddecl)->base.code) == TEMPLATE_DECL)) &&
((enum tree_code) ((!(! (((contains_struct_check ((olddecl),
(TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3263, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3263, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((olddecl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3263, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL]))->base.code) == NAMESPACE_DECL)
3264 && DECL_CONTEXT (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3264, __FUNCTION__))->decl_minimal.context)
!= DECL_CONTEXT (newdecl)((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3264, __FUNCTION__))->decl_minimal.context)
3265 && ! decls_match (olddecl, newdecl))
3266 return G_("%qD conflicts with used function")"%qD conflicts with used function";
3267
3268 /* We'll complain about linkage mismatches in
3269 warn_extern_redeclared_static. */
3270
3271 /* Defining the same name twice is no good. */
3272 if (decl_defined_p (olddecl)
3273 && decl_defined_p (newdecl))
3274 {
3275 if (DECL_NAME (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3275, __FUNCTION__))->decl_minimal.name)
== NULL_TREE(tree) __null)
3276 return G_("%q#D not declared in class")"%q#D not declared in class";
3277 else if (!GNU_INLINE_P (olddecl)(((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3277, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
) && lookup_attribute ("gnu_inline", ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3277, __FUNCTION__))->decl_common.attributes)))
3278 || GNU_INLINE_P (newdecl)(((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3278, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
) && lookup_attribute ("gnu_inline", ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3278, __FUNCTION__))->decl_common.attributes)))
)
3279 return G_("redefinition of %q#D")"redefinition of %q#D";
3280 }
3281
3282 if (DECL_DECLARED_INLINE_P (olddecl)((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3282, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
&& DECL_DECLARED_INLINE_P (newdecl)((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3282, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
)
3283 {
3284 bool olda = GNU_INLINE_P (olddecl)(((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3284, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
) && lookup_attribute ("gnu_inline", ((contains_struct_check
((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3284, __FUNCTION__))->decl_common.attributes)))
;
3285 bool newa = GNU_INLINE_P (newdecl)(((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3285, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
) && lookup_attribute ("gnu_inline", ((contains_struct_check
((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3285, __FUNCTION__))->decl_common.attributes)))
;
3286
3287 if (olda != newa)
3288 {
3289 if (newa)
3290 return G_("%q+D redeclared inline with ""%q+D redeclared inline with " "%<gnu_inline%> attribute"
3291 "%<gnu_inline%> attribute")"%q+D redeclared inline with " "%<gnu_inline%> attribute";
3292 else
3293 return G_("%q+D redeclared inline without ""%q+D redeclared inline without " "%<gnu_inline%> attribute"
3294 "%<gnu_inline%> attribute")"%q+D redeclared inline without " "%<gnu_inline%> attribute";
3295 }
3296 }
3297
3298 if (deduction_guide_p (olddecl)
3299 && deduction_guide_p (newdecl))
3300 return G_("deduction guide %q+D redeclared")"deduction guide %q+D redeclared";
3301
3302 /* [class.compare.default]: A definition of a comparison operator as
3303 defaulted that appears in a class shall be the first declaration of
3304 that function. */
3305 special_function_kind sfk = special_function_p (olddecl);
3306 if (sfk == sfk_comparison && DECL_DEFAULTED_FN (newdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3306, __FUNCTION__, (TEMPLATE_DECL))))))))->result : newdecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3306, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (newdecl)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3306, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((newdecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3306, __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/decl.cc"
, 3306, __FUNCTION__); &lt->u.fn; })->defaulted_p)
)
3307 return G_("comparison operator %q+D defaulted after ""comparison operator %q+D defaulted after " "its first declaration"
3308 "its first declaration")"comparison operator %q+D defaulted after " "its first declaration";
3309
3310 check_abi_tag_redeclaration
3311 (olddecl, lookup_attribute ("abi_tag", DECL_ATTRIBUTES (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3311, __FUNCTION__))->decl_common.attributes)
),
3312 lookup_attribute ("abi_tag", DECL_ATTRIBUTES (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3312, __FUNCTION__))->decl_common.attributes)
));
3313
3314 return NULL__null;
3315 }
3316 else if (TREE_CODE (newdecl)((enum tree_code) (newdecl)->base.code) == TEMPLATE_DECL)
3317 {
3318 tree nt, ot;
3319
3320 if (TREE_CODE (DECL_TEMPLATE_RESULT (newdecl))((enum tree_code) (((struct tree_template_decl *)(const_cast<
union tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3320, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code)
== CONCEPT_DECL)
3321 return G_("redefinition of %q#D")"redefinition of %q#D";
3322
3323 if (TREE_CODE (DECL_TEMPLATE_RESULT (newdecl))((enum tree_code) (((struct tree_template_decl *)(const_cast<
union tree_node *> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3323, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code)
!= FUNCTION_DECL)
3324 return redeclaration_error_message (DECL_TEMPLATE_RESULT (newdecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3324, __FUNCTION__, (TEMPLATE_DECL))))))))->result
,
3325 DECL_TEMPLATE_RESULT (olddecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3325, __FUNCTION__, (TEMPLATE_DECL))))))))->result
);
3326
3327 if (DECL_TEMPLATE_RESULT (newdecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3327, __FUNCTION__, (TEMPLATE_DECL))))))))->result
== DECL_TEMPLATE_RESULT (olddecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3327, __FUNCTION__, (TEMPLATE_DECL))))))))->result
)
3328 return NULL__null;
3329
3330 nt = DECL_TEMPLATE_RESULT (newdecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3330, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
3331 if (DECL_TEMPLATE_INFO (nt)(((contains_struct_check ((template_info_decl_check ((nt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3331, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3331, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)
)
3332 nt = DECL_TEMPLATE_RESULT (template_for_substitution (nt))((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((template_for_substitution (nt)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3332, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
3333 ot = DECL_TEMPLATE_RESULT (olddecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3333, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
3334 if (DECL_TEMPLATE_INFO (ot)(((contains_struct_check ((template_info_decl_check ((ot), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3334, __FUNCTION__)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3334, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)
)
3335 ot = DECL_TEMPLATE_RESULT (template_for_substitution (ot))((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((template_for_substitution (ot)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3335, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
3336 if (DECL_INITIAL (nt)((contains_struct_check ((nt), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3336, __FUNCTION__))->decl_common.initial)
&& DECL_INITIAL (ot)((contains_struct_check ((ot), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3336, __FUNCTION__))->decl_common.initial)
3337 && (!GNU_INLINE_P (ot)(((tree_check ((ot), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3337, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
) && lookup_attribute ("gnu_inline", ((contains_struct_check
((ot), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3337, __FUNCTION__))->decl_common.attributes)))
|| GNU_INLINE_P (nt)(((tree_check ((nt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3337, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
) && lookup_attribute ("gnu_inline", ((contains_struct_check
((nt), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3337, __FUNCTION__))->decl_common.attributes)))
))
3338 return G_("redefinition of %q#D")"redefinition of %q#D";
3339
3340 if (DECL_DECLARED_INLINE_P (ot)((tree_check ((ot), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3340, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
&& DECL_DECLARED_INLINE_P (nt)((tree_check ((nt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3340, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
)
)
3341 {
3342 bool olda = GNU_INLINE_P (ot)(((tree_check ((ot), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3342, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
) && lookup_attribute ("gnu_inline", ((contains_struct_check
((ot), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3342, __FUNCTION__))->decl_common.attributes)))
;
3343 bool newa = GNU_INLINE_P (nt)(((tree_check ((nt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3343, __FUNCTION__, (FUNCTION_DECL)))->function_decl.declared_inline_flag
) && lookup_attribute ("gnu_inline", ((contains_struct_check
((nt), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3343, __FUNCTION__))->decl_common.attributes)))
;
3344
3345 if (olda != newa)
3346 {
3347 if (newa)
3348 return G_("%q+D redeclared inline with ""%q+D redeclared inline with " "%<gnu_inline%> attribute"
3349 "%<gnu_inline%> attribute")"%q+D redeclared inline with " "%<gnu_inline%> attribute";
3350 else
3351 return G_("%q+D redeclared inline without ""%q+D redeclared inline without " "%<gnu_inline%> attribute"
3352 "%<gnu_inline%> attribute")"%q+D redeclared inline without " "%<gnu_inline%> attribute";
3353 }
3354 }
3355
3356 if (deduction_guide_p (olddecl)
3357 && deduction_guide_p (newdecl))
3358 return G_("deduction guide %q+D redeclared")"deduction guide %q+D redeclared";
3359
3360 /* Core issue #226 (C++11):
3361
3362 If a friend function template declaration specifies a
3363 default template-argument, that declaration shall be a
3364 definition and shall be the only declaration of the
3365 function template in the translation unit. */
3366 if ((cxx_dialect != cxx98)
3367 && TREE_CODE (ot)((enum tree_code) (ot)->base.code) == FUNCTION_DECL && DECL_UNIQUE_FRIEND_P (ot)(((contains_struct_check (((tree_check ((ot), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3367, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3367, __FUNCTION__))->decl_common.lang_specific) ->u.
base.friend_or_tls)
3368 && !check_default_tmpl_args (nt, DECL_TEMPLATE_PARMS (newdecl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3368, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments
,
3369 /*is_primary=*/true,
3370 /*is_partial=*/false,
3371 /*is_friend_decl=*/2))
3372 return G_("redeclaration of friend %q#D ""redeclaration of friend %q#D " "may not have default template arguments"
3373 "may not have default template arguments")"redeclaration of friend %q#D " "may not have default template arguments";
3374
3375 return NULL__null;
3376 }
3377 else if (VAR_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL)
3378 && (CP_DECL_THREAD_LOCAL_P (newdecl)(((tree_not_check2 (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3378, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3378, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
3379 != CP_DECL_THREAD_LOCAL_P (olddecl)(((tree_not_check2 (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3379, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3379, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
)
3380 && (! DECL_LANG_SPECIFIC (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3380, __FUNCTION__))->decl_common.lang_specific)
3381 || ! CP_DECL_THREADPRIVATE_P (olddecl)(((contains_struct_check (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3381, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3381, __FUNCTION__))->decl_common.lang_specific)->u.base
.threadprivate_or_deleted_p)
3382 || CP_DECL_THREAD_LOCAL_P (newdecl)(((tree_not_check2 (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3382, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3382, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
))
3383 {
3384 /* Only variables can be thread-local, and all declarations must
3385 agree on this property. */
3386 if (CP_DECL_THREAD_LOCAL_P (newdecl)(((tree_not_check2 (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3386, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3386, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
)
3387 return G_("thread-local declaration of %q#D follows ""thread-local declaration of %q#D follows " "non-thread-local declaration"
3388 "non-thread-local declaration")"thread-local declaration of %q#D follows " "non-thread-local declaration";
3389 else
3390 return G_("non-thread-local declaration of %q#D follows ""non-thread-local declaration of %q#D follows " "thread-local declaration"
3391 "thread-local declaration")"non-thread-local declaration of %q#D follows " "thread-local declaration";
3392 }
3393 else if (toplevel_bindings_p () || DECL_NAMESPACE_SCOPE_P (newdecl)(!(((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3393, __FUNCTION__))->decl_common.lang_flag_0) &&
(((enum tree_code) (newdecl)->base.code) == CONST_DECL ||
((enum tree_code) (newdecl)->base.code) == PARM_DECL || (
(enum tree_code) (newdecl)->base.code) == TYPE_DECL || ((enum
tree_code) (newdecl)->base.code) == TEMPLATE_DECL)) &&
((enum tree_code) ((!(! (((contains_struct_check ((newdecl),
(TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3393, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3393, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((newdecl
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3393, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL]))->base.code) == NAMESPACE_DECL)
)
3394 {
3395 /* The objects have been declared at namespace scope. If either
3396 is a member of an anonymous union, then this is an invalid
3397 redeclaration. For example:
3398
3399 int i;
3400 union { int i; };
3401
3402 is invalid. */
3403 if ((VAR_P (newdecl)(((enum tree_code) (newdecl)->base.code) == VAR_DECL) && DECL_ANON_UNION_VAR_P (newdecl)(((contains_struct_check (((tree_check ((newdecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3403, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3403, __FUNCTION__))->decl_common.lang_flag_4))
)
3404 || (VAR_P (olddecl)(((enum tree_code) (olddecl)->base.code) == VAR_DECL) && DECL_ANON_UNION_VAR_P (olddecl)(((contains_struct_check (((tree_check ((olddecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3404, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3404, __FUNCTION__))->decl_common.lang_flag_4))
))
3405 return G_("redeclaration of %q#D")"redeclaration of %q#D";
3406 /* If at least one declaration is a reference, there is no
3407 conflict. For example:
3408
3409 int i = 3;
3410 extern int i;
3411
3412 is valid. */
3413 if (DECL_EXTERNAL (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3413, __FUNCTION__))->decl_common.decl_flag_1)
|| DECL_EXTERNAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3413, __FUNCTION__))->decl_common.decl_flag_1)
)
3414 return NULL__null;
3415
3416 /* Static data member declared outside a class definition
3417 if the variable is defined within the class with constexpr
3418 specifier is declaration rather than definition (and
3419 deprecated). */
3420 if (cxx_dialect >= cxx17
3421 && VAR_P (olddecl)(((enum tree_code) (olddecl)->base.code) == VAR_DECL)
3422 && DECL_CLASS_SCOPE_P (olddecl)(((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3422, __FUNCTION__))->decl_minimal.context) && (
tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3422, __FUNCTION__))->decl_minimal.context))->base.code
))] == tcc_type))
3423 && DECL_DECLARED_CONSTEXPR_P (olddecl)((contains_struct_check (((tree_check2 (((((enum tree_code) (
olddecl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((olddecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3423, __FUNCTION__, (TEMPLATE_DECL))))))))->result : olddecl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3423, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3423, __FUNCTION__))->decl_common.lang_flag_8)
3424 && !DECL_INITIAL (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3424, __FUNCTION__))->decl_common.initial)
)
3425 {
3426 DECL_EXTERNAL (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3426, __FUNCTION__))->decl_common.decl_flag_1)
= 1;
3427 /* For now, only warn with explicit -Wdeprecated. */
3428 if (OPTION_SET_P (warn_deprecated)global_options_set.x_warn_deprecated)
3429 {
3430 auto_diagnostic_group d;
3431 if (warning_at (DECL_SOURCE_LOCATION (newdecl)((contains_struct_check ((newdecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3431, __FUNCTION__))->decl_minimal.locus)
, OPT_Wdeprecated,
3432 "redundant redeclaration of %<constexpr%> "
3433 "static data member %qD", newdecl))
3434 inform (DECL_SOURCE_LOCATION (olddecl)((contains_struct_check ((olddecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3434, __FUNCTION__))->decl_minimal.locus)
,
3435 "previous declaration of %qD", olddecl);
3436 }
3437 return NULL__null;
3438 }
3439
3440 /* Reject two definitions. */
3441 return G_("redefinition of %q#D")"redefinition of %q#D";
3442 }
3443 else
3444 {
3445 /* Objects declared with block scope: */
3446 /* Reject two definitions, and reject a definition
3447 together with an external reference. */
3448 if (!(DECL_EXTERNAL (newdecl)((contains_struct_check ((newdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3448, __FUNCTION__))->decl_common.decl_flag_1)
&& DECL_EXTERNAL (olddecl)((contains_struct_check ((olddecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3448, __FUNCTION__))->decl_common.decl_flag_1)
))
3449 return G_("redeclaration of %q#D")"redeclaration of %q#D";
3450 return NULL__null;
3451 }
3452}
3453
3454
3455/* Hash and equality functions for the named_label table. */
3456
3457hashval_t
3458named_label_hash::hash (const value_type entry)
3459{
3460 return IDENTIFIER_HASH_VALUE (entry->name)((tree_check ((entry->name), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3460, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.hash_value
)
;
3461}
3462
3463bool
3464named_label_hash::equal (const value_type entry, compare_type name)
3465{
3466 return name == entry->name;
3467}
3468
3469/* Look for a label named ID in the current function. If one cannot
3470 be found, create one. Return the named_label_entry, or NULL on
3471 failure. */
3472
3473static named_label_entry *
3474lookup_label_1 (tree id, bool making_local_p)
3475{
3476 auto_cond_timevar tv (TV_NAME_LOOKUP);
3477
3478 /* You can't use labels at global scope. */
3479 if (current_function_decl == NULL_TREE(tree) __null)
3480 {
3481 error ("label %qE referenced outside of any function", id);
3482 return NULL__null;
3483 }
3484
3485 if (!named_labels((cfun + 0)->language)->x_named_labels)
3486 named_labels((cfun + 0)->language)->x_named_labels = hash_table<named_label_hash>::create_ggc (13);
3487
3488 hashval_t hash = IDENTIFIER_HASH_VALUE (id)((tree_check ((id), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3488, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.hash_value
)
;
3489 named_label_entry **slot
3490 = named_labels((cfun + 0)->language)->x_named_labels->find_slot_with_hash (id, hash, INSERT);
3491 named_label_entry *old = *slot;
3492
3493 if (old && old->label_decl)
3494 {
3495 if (!making_local_p)
3496 return old;
3497
3498 if (old->binding_level == current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
)
3499 {
3500 error ("local label %qE conflicts with existing label", id);
3501 inform (DECL_SOURCE_LOCATION (old->label_decl)((contains_struct_check ((old->label_decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3501, __FUNCTION__))->decl_minimal.locus)
, "previous label");
3502 return NULL__null;
3503 }
3504 }
3505
3506 /* We are making a new decl, create or reuse the named_label_entry */
3507 named_label_entry *ent = NULL__null;
3508 if (old && !old->label_decl)
3509 ent = old;
3510 else
3511 {
3512 ent = ggc_cleared_alloc<named_label_entry> ();
3513 ent->name = id;
3514 ent->outer = old;
3515 *slot = ent;
3516 }
3517
3518 /* Now create the LABEL_DECL. */
3519 tree decl = build_decl (input_location, LABEL_DECL, id, void_type_nodeglobal_trees[TI_VOID_TYPE]);
3520
3521 DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3521, __FUNCTION__))->decl_minimal.context)
= current_function_decl;
3522 SET_DECL_MODE (decl, VOIDmode)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3522, __FUNCTION__))->decl_common.mode = (((void) 0, E_VOIDmode
)))
;
3523 if (making_local_p)
3524 {
3525 C_DECLARED_LABEL_FLAG (decl)((tree_not_check2 ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3525, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1)
= true;
3526 DECL_CHAIN (decl)(((contains_struct_check (((contains_struct_check ((decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3526, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3526, __FUNCTION__))->common.chain))
= current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->names;
3527 current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->names = decl;
3528 }
3529
3530 ent->label_decl = decl;
3531
3532 return ent;
3533}
3534
3535/* Wrapper for lookup_label_1. */
3536
3537tree
3538lookup_label (tree id)
3539{
3540 named_label_entry *ent = lookup_label_1 (id, false);
3541 return ent ? ent->label_decl : NULL_TREE(tree) __null;
3542}
3543
3544tree
3545declare_local_label (tree id)
3546{
3547 named_label_entry *ent = lookup_label_1 (id, true);
3548 return ent ? ent->label_decl : NULL_TREE(tree) __null;
3549}
3550
3551/* Returns nonzero if it is ill-formed to jump past the declaration of
3552 DECL. Returns 2 if it's also a real problem. */
3553
3554static int
3555decl_jump_unsafe (tree decl)
3556{
3557 /* [stmt.dcl]/3: A program that jumps from a point where a local variable
3558 with automatic storage duration is not in scope to a point where it is
3559 in scope is ill-formed unless the variable has scalar type, class type
3560 with a trivial default constructor and a trivial destructor, a
3561 cv-qualified version of one of these types, or an array of one of the
3562 preceding types and is declared without an initializer (8.5). */
3563 tree type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3563, __FUNCTION__))->typed.type)
;
3564
3565 if (!VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL) || TREE_STATIC (decl)((decl)->base.static_flag)
3566 || type == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3567 return 0;
3568
3569 if (DECL_NONTRIVIALLY_INITIALIZED_P (decl)(((tree_not_check2 (((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3569, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3569, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_6))
3570 || variably_modified_type_p (type, NULL_TREE(tree) __null))
3571 return 2;
3572
3573 if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)(((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3573, __FUNCTION__))->type_common.lang_flag_4))
)
3574 return 1;
3575
3576 return 0;
3577}
3578
3579/* A subroutine of check_previous_goto_1 and check_goto to identify a branch
3580 to the user. */
3581
3582static bool
3583identify_goto (tree decl, location_t loc, const location_t *locus,
3584 diagnostic_t diag_kind)
3585{
3586 bool complained
3587 = emit_diagnostic (diag_kind, loc, 0,
3588 decl ? N_("jump to label %qD")"jump to label %qD"
3589 : N_("jump to case label")"jump to case label", decl);
3590 if (complained && locus)
3591 inform (*locus, " from here");
3592 return complained;
3593}
3594
3595/* Check that a single previously seen jump to a newly defined label
3596 is OK. DECL is the LABEL_DECL or 0; LEVEL is the binding_level for
3597 the jump context; NAMES are the names in scope in LEVEL at the jump
3598 context; LOCUS is the source position of the jump or 0. Returns
3599 true if all is well. */
3600
3601static bool
3602check_previous_goto_1 (tree decl, cp_binding_level* level, tree names,
3603 bool exited_omp, const location_t *locus)
3604{
3605 cp_binding_level *b;
3606 bool complained = false;
3607 int identified = 0;
3608 bool saw_eh = false, saw_omp = false, saw_tm = false, saw_cxif = false;
3609 bool saw_ceif = false, saw_se = false;
3610
3611 if (exited_omp)
3612 {
3613 complained = identify_goto (decl, input_location, locus, DK_ERROR);
3614 if (complained)
3615 inform (input_location, " exits OpenMP structured block");
3616 saw_omp = true;
3617 identified = 2;
3618 }
3619
3620 for (b = current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
; b ; b = b->level_chain)
3621 {
3622 tree new_decls, old_decls = (b == level ? names : NULL_TREE(tree) __null);
3623
3624 for (new_decls = b->names; new_decls != old_decls;
3625 new_decls = (DECL_P (new_decls)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (new_decls)->base.code))] == tcc_declaration)
? DECL_CHAIN (new_decls)(((contains_struct_check (((contains_struct_check ((new_decls
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3625, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3625, __FUNCTION__))->common.chain))
3626 : TREE_CHAIN (new_decls)((contains_struct_check ((new_decls), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3626, __FUNCTION__))->common.chain)
))
3627 {
3628 int problem = decl_jump_unsafe (new_decls);
3629 if (! problem)
3630 continue;
3631
3632 if (!identified)
3633 {
3634 complained = identify_goto (decl, input_location, locus,
3635 problem > 1
3636 ? DK_ERROR : DK_PERMERROR);
3637 identified = 1;
3638 }
3639 if (complained)
3640 {
3641 if (problem > 1)
3642 inform (DECL_SOURCE_LOCATION (new_decls)((contains_struct_check ((new_decls), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3642, __FUNCTION__))->decl_minimal.locus)
,
3643 " crosses initialization of %q#D", new_decls);
3644 else
3645 inform (DECL_SOURCE_LOCATION (new_decls)((contains_struct_check ((new_decls), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3645, __FUNCTION__))->decl_minimal.locus)
,
3646 " enters scope of %q#D, which has "
3647 "non-trivial destructor", new_decls);
3648 }
3649 }
3650
3651 if (b == level)
3652 break;
3653
3654 const char *inf = NULL__null;
3655 location_t loc = input_location;
3656 switch (b->kind)
3657 {
3658 case sk_try:
3659 if (!saw_eh)
3660 inf = G_(" enters %<try%> block")" enters %<try%> block";
3661 saw_eh = true;
3662 break;
3663
3664 case sk_catch:
3665 if (!saw_eh)
3666 inf = G_(" enters %<catch%> block")" enters %<catch%> block";
3667 saw_eh = true;
3668 break;
3669
3670 case sk_omp:
3671 if (!saw_omp)
3672 inf = G_(" enters OpenMP structured block")" enters OpenMP structured block";
3673 saw_omp = true;
3674 break;
3675
3676 case sk_transaction:
3677 if (!saw_tm)
3678 inf = G_(" enters synchronized or atomic statement")" enters synchronized or atomic statement";
3679 saw_tm = true;
3680 break;
3681
3682 case sk_stmt_expr:
3683 if (!saw_se)
3684 inf = G_(" enters statement expression")" enters statement expression";
3685 saw_se = true;
3686 break;
3687
3688 case sk_block:
3689 if (!saw_cxif && level_for_constexpr_if (b->level_chain))
3690 {
3691 inf = G_(" enters %<constexpr if%> statement")" enters %<constexpr if%> statement";
3692 loc = EXPR_LOCATION (b->level_chain->this_entity)((((b->level_chain->this_entity)) && ((tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) ((b->level_chain
->this_entity))->base.code))]) >= tcc_reference &&
(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum
tree_code) ((b->level_chain->this_entity))->base.code
))]) <= tcc_expression)) ? (b->level_chain->this_entity
)->exp.locus : ((location_t) 0))
;
3693 saw_cxif = true;
3694 }
3695 else if (!saw_ceif && level_for_consteval_if (b->level_chain))
3696 {
3697 inf = G_(" enters %<consteval if%> statement")" enters %<consteval if%> statement";
3698 loc = EXPR_LOCATION (b->level_chain->this_entity)((((b->level_chain->this_entity)) && ((tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) ((b->level_chain
->this_entity))->base.code))]) >= tcc_reference &&
(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum
tree_code) ((b->level_chain->this_entity))->base.code
))]) <= tcc_expression)) ? (b->level_chain->this_entity
)->exp.locus : ((location_t) 0))
;
3699 saw_ceif = true;
3700 }
3701 break;
3702
3703 default:
3704 break;
3705 }
3706
3707 if (inf)
3708 {
3709 if (identified < 2)
3710 complained = identify_goto (decl, input_location, locus, DK_ERROR);
3711 identified = 2;
3712 if (complained)
3713 inform (loc, inf);
3714 }
3715 }
3716
3717 return !identified;
3718}
3719
3720static void
3721check_previous_goto (tree decl, struct named_label_use_entry *use)
3722{
3723 check_previous_goto_1 (decl, use->binding_level,
3724 use->names_in_scope, use->in_omp_scope,
3725 &use->o_goto_locus);
3726}
3727
3728static bool
3729check_switch_goto (cp_binding_level* level)
3730{
3731 return check_previous_goto_1 (NULL_TREE(tree) __null, level, level->names, false, NULL__null);
3732}
3733
3734/* Check that a new jump to a label DECL is OK. Called by
3735 finish_goto_stmt. */
3736
3737void
3738check_goto (tree decl)
3739{
3740 /* We can't know where a computed goto is jumping.
3741 So we assume that it's OK. */
3742 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) != LABEL_DECL)
3743 return;
3744
3745 hashval_t hash = IDENTIFIER_HASH_VALUE (DECL_NAME (decl))((tree_check ((((contains_struct_check ((decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3745, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3745, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.hash_value
)
;
3746 named_label_entry **slot
3747 = named_labels((cfun + 0)->language)->x_named_labels->find_slot_with_hash (DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3747, __FUNCTION__))->decl_minimal.name)
, hash, NO_INSERT);
3748 named_label_entry *ent = *slot;
3749
3750 /* If the label hasn't been defined yet, defer checking. */
3751 if (! DECL_INITIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/decl.cc"
, 3751, __FUNCTION__))->decl_common.initial)
)
3752 {
3753 /* Don't bother creating another use if the last goto had the
3754 same data, and will therefore create the same set of errors. */
3755 if (ent->uses
3756 && ent->uses->names_in_scope == current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->names)
3757 return;
3758
3759 named_label_use_entry *new_use
3760 = ggc_alloc<named_label_use_entry> ();
3761 new_use->binding_level = current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
;
3762 new_use->names_in_scope = current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->names;
3763 new_use->o_goto_locus = input_location;
3764 new_use->in_omp_scope = false;
3765
3766 new_use->next = ent->uses;
3767 ent->uses = new_use;
3768 return;
3769 }
3770
3771 bool saw_catch = false, complained = false;
3772 int identified = 0;
3773 tree bad;
3774 unsigned ix;
3775
3776 if (ent->in_try_scope || ent->in_catch_scope || ent->in_transaction_scope
3777 || ent->in_constexpr_if || ent->in_consteval_if
3778 || ent->in_omp_scope || ent->in_stmt_expr
3779 || !vec_safe_is_empty (ent->bad_decls))