aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@baylibre.com>2024-04-10 10:51:48 +0200
committerThomas Schwinge <tschwinge@baylibre.com>2024-04-10 10:51:48 +0200
commitd1a0609b7e62b21d747dfaa0c0f84e51099bd952 (patch)
tree1590cefc5d3029ec267378fddae9bfbb3ed9af95
parentc9e59de17dd46032f7c63463b8738b287ae34f8c (diff)
parent484f48f03cf9a382b3bcf4dadac09c4ee59c2ddf (diff)
downloadgcc-d1a0609b7e62b21d747dfaa0c0f84e51099bd952.zip
gcc-d1a0609b7e62b21d747dfaa0c0f84e51099bd952.tar.gz
gcc-d1a0609b7e62b21d747dfaa0c0f84e51099bd952.tar.bz2
Merge commit '2341df1cb9b3681bfefe29207887b2b3dc271a95^' into HEAD
-rw-r--r--ChangeLog10
-rw-r--r--gcc/ChangeLog214
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/attribs.h2
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/common.opt2
-rw-r--r--gcc/config/aarch64/aarch64-cores.def1
-rw-r--r--gcc/config/aarch64/aarch64-tune.md2
-rw-r--r--gcc/config/aarch64/predicates.md6
-rw-r--r--gcc/config/i386/i386-options.cc2
-rw-r--r--gcc/config/loongarch/loongarch.cc5
-rw-r--r--gcc/config/mips/mips.cc2
-rw-r--r--gcc/config/riscv/riscv-opts.h9
-rw-r--r--gcc/config/riscv/riscv-vsetvl.cc63
-rw-r--r--gcc/config/riscv/riscv.opt14
-rw-r--r--gcc/cp/ChangeLog50
-rw-r--r--gcc/cp/decl.cc7
-rw-r--r--gcc/cp/decl2.cc10
-rw-r--r--gcc/cp/module.cc24
-rw-r--r--gcc/cp/name-lookup.cc15
-rw-r--r--gcc/cp/name-lookup.h3
-rw-r--r--gcc/cp/parser.cc21
-rw-r--r--gcc/cp/pt.cc4
-rw-r--r--gcc/doc/extend.texi821
-rw-r--r--gcc/doc/invoke.texi233
-rw-r--r--gcc/gengtype.cc4
-rw-r--r--gcc/gimple-lower-bitint.cc18
-rw-r--r--gcc/gimple-ssa-warn-access.cc9
-rw-r--r--gcc/ipa-polymorphic-call.cc1
-rw-r--r--gcc/ipa-strub.cc19
-rw-r--r--gcc/omp-expand.cc6
-rw-r--r--gcc/omp-general.cc21
-rw-r--r--gcc/predict.cc131
-rw-r--r--gcc/predict.def10
-rw-r--r--gcc/rust/ChangeLog8325
-rw-r--r--gcc/sched-deps.cc48
-rw-r--r--gcc/testsuite/ChangeLog1781
-rw-r--r--gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics3.C106
-rw-r--r--gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics9.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class61.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class62.C8
-rw-r--r--gcc/testsuite/g++.dg/modules/merge-16.h10
-rw-r--r--gcc/testsuite/g++.dg/modules/merge-16_a.C7
-rw-r--r--gcc/testsuite/g++.dg/modules/merge-16_b.C5
-rw-r--r--gcc/testsuite/g++.dg/modules/pr113292_a.H34
-rw-r--r--gcc/testsuite/g++.dg/modules/pr113292_b.C13
-rw-r--r--gcc/testsuite/g++.dg/modules/pr113292_c.C11
-rw-r--r--gcc/testsuite/g++.dg/pr99966.C2
-rw-r--r--gcc/testsuite/g++.target/loongarch/got-load.C19
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr110251.c27
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr113221-1.c12
-rw-r--r--gcc/testsuite/gcc.dg/array-quals-1.c20
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-flag-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c2
-rw-r--r--gcc/testsuite/gcc.dg/bitint-70.c14
-rw-r--r--gcc/testsuite/gcc.dg/bitint-71.c18
-rw-r--r--gcc/testsuite/gcc.dg/bitint-72.c16
-rw-r--r--gcc/testsuite/gcc.dg/c23-tag-alias-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/c23-tag-alias-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/cmp-mem-const-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/cmp-mem-const-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/cmp-mem-const-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/cmp-mem-const-6.c2
-rw-r--r--gcc/testsuite/gcc.dg/gnu23-tag-alias-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/memcmp-1.c35
-rw-r--r--gcc/testsuite/gcc.dg/pr111409.c2
-rw-r--r--gcc/testsuite/gcc.dg/predict-18.c6
-rw-r--r--gcc/testsuite/gcc.dg/predict-23.c11
-rw-r--r--gcc/testsuite/gcc.dg/scantest-lto.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/bitint-50.c31
-rw-r--r--gcc/testsuite/gcc.dg/torture/inline-mem-cpy-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/predict-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/predict-2.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/predict-3.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/sra-17.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/sra-18.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-43.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr112774.c (renamed from gcc/testsuite/gcc.dg/tree-ssa/scev-16.c)3
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr113371.c19
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr113431.c18
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-early-break_106-pr113374.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/sse4_1-stv-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips.exp1
-rw-r--r--gcc/testsuite/gcc.target/mips/xgot-n32-avoid-gp.c11
-rw-r--r--gcc/testsuite/gcc.target/mips/xgot-n32-need-gp.c11
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-extract-char.p7.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-1.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-2.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-3.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vlmax_conflict-4.c5
-rw-r--r--gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vlmax_conflict-5.c10
-rw-r--r--gcc/tree-into-ssa.cc2
-rw-r--r--gcc/tree-ssa-operands.h3
-rw-r--r--gcc/tree-vect-data-refs.cc11
-rw-r--r--gcc/tree-vect-loop-manip.cc205
-rw-r--r--gcc/tree-vect-loop.cc6
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.c/bitint-1.c65
-rw-r--r--libgrust/ChangeLog676
-rw-r--r--libsanitizer/ChangeLog7
-rw-r--r--libsanitizer/interception/interception.h5
-rw-r--r--libsanitizer/sanitizer_common/sanitizer_asm.h23
-rw-r--r--libstdc++-v3/ChangeLog49
-rw-r--r--libstdc++-v3/acinclude.m430
-rw-r--r--libstdc++-v3/config.h.in3
-rwxr-xr-xlibstdc++-v3/configure70
-rw-r--r--libstdc++-v3/configure.ac3
-rw-r--r--libstdc++-v3/include/Makefile.am2
-rw-r--r--libstdc++-v3/include/Makefile.in2
-rw-r--r--libstdc++-v3/include/bits/locale_classes.h14
-rw-r--r--libstdc++-v3/include/bits/text_encoding-data.h902
-rw-r--r--libstdc++-v3/include/bits/unicode.h75
-rw-r--r--libstdc++-v3/include/bits/version.def10
-rw-r--r--libstdc++-v3/include/bits/version.h13
-rw-r--r--libstdc++-v3/include/std/ranges2
-rw-r--r--libstdc++-v3/include/std/text_encoding678
-rw-r--r--libstdc++-v3/python/libstdcxx/v6/printers.py17
-rwxr-xr-xlibstdc++-v3/scripts/gen_text_encoding_data.py70
-rw-r--r--libstdc++-v3/src/Makefile.am3
-rw-r--r--libstdc++-v3/src/Makefile.in7
-rw-r--r--libstdc++-v3/src/c++26/Makefile.am109
-rw-r--r--libstdc++-v3/src/c++26/Makefile.in747
-rw-r--r--libstdc++-v3/src/c++26/text_encoding.cc91
-rw-r--r--libstdc++-v3/src/experimental/Makefile.am2
-rw-r--r--libstdc++-v3/src/experimental/Makefile.in2
-rw-r--r--libstdc++-v3/testsuite/22_locale/locale/encoding.cc36
-rw-r--r--libstdc++-v3/testsuite/ext/unicode/charset_alias_match.cc18
-rw-r--r--libstdc++-v3/testsuite/std/ranges/cartesian_product/1.cc6
-rw-r--r--libstdc++-v3/testsuite/std/text_encoding/cons.cc113
-rw-r--r--libstdc++-v3/testsuite/std/text_encoding/members.cc86
-rw-r--r--libstdc++-v3/testsuite/std/text_encoding/requirements.cc77
134 files changed, 15957 insertions, 812 deletions
diff --git a/ChangeLog b/ChangeLog
index 644bea9..9845720 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Makefile.def: Add a dependency to libgrust for all-gcc.
+ * Makefile.in: Regenerate the file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Makefile.def: Add libgrust target to bootstrap.
+ * Makefile.in: Regenerate.
+
2024-01-15 Andrew Pinski <quic_apinski@quicinc.com>
* MAINTAINERS (DCO): Add myself.
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9fd99c0..73bfc40 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,217 @@
+2024-01-17 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR middle-end/111659
+ * doc/extend.texi (Common Variable Attributes): Fix long lines
+ in documentation of strict_flex_array + other minor copy-editing.
+ Add a cross-reference to -Wstrict-flex-arrays.
+ * doc/invoke.texi (Option Summary): Fix whitespace in tables
+ before -fstrict-flex-arrays and -Wstrict-flex-arrays.
+ (C Dialect Options): Combine the docs for the two
+ -fstrict-flex-arrays forms into a single entry. Note this option
+ is for C/C++ only. Add a cross-reference to -Wstrict-flex-arrays.
+ (Warning Options): Note -Wstrict-flex-arrays is for C/C++ only.
+ Minor copy-editing. Add cross references to the strict_flex_array
+ attribute and -fstrict-flex-arrays option. Add note that this
+ option depends on -ftree-vrp.
+
+2024-01-17 Andrew Pinski <quic_apinski@quicinc.com>
+
+ PR target/113221
+ * config/aarch64/predicates.md (aarch64_ldp_reg_operand): For subreg,
+ only allow REG operands instead of allowing all.
+
+2024-01-17 Vineet Gupta <vineetg@rivosinc.com>
+
+ * config/riscv/riscv-vsetvl.cc (earliest_fuse_vsetvl_info):
+ Remove redundant checks in else condition for readablity.
+ (earliest_fuse_vsetvl_info) Print iteration count in debug
+ prints.
+ (earliest_fuse_vsetvl_info) Fix misleading vsetvl info
+ dump details in certain cases.
+
+2024-01-17 Vineet Gupta <vineetg@rivosinc.com>
+
+ * config/riscv/riscv.opt: New -param=vsetvl-strategy.
+ * config/riscv/riscv-opts.h: New enum vsetvl_strategy_enum.
+ * config/riscv/riscv-vsetvl.cc
+ (pre_vsetvl::pre_global_vsetvl_info): Use vsetvl_strategy.
+ (pass_vsetvl::execute): Use vsetvl_strategy.
+
+2024-01-17 Jan Hubicka <jh@suse.cz>
+
+ * ipa-polymorphic-call.cc (ipa_polymorphic_call_context::set_by_invariant): Remove
+ accidental hack reseting offset.
+
+2024-01-17 Jan Hubicka <jh@suse.cz>
+
+ * config/i386/i386-options.cc (ix86_option_override_internal): Fix
+ handling of X86_TUNE_AVOID_512FMA_CHAINS.
+
+2024-01-17 Jan Hubicka <jh@suse.cz>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/110852
+ * predict.cc (expr_expected_value_1): Fix profile merging of PHI and
+ binary operations
+ (get_predictor_value): Handle PRED_COMBINED_VALUE_PREDICTIONS and
+ PRED_COMBINED_VALUE_PREDICTIONS_PHI
+ * predict.def (PRED_COMBINED_VALUE_PREDICTIONS): New predictor.
+ (PRED_COMBINED_VALUE_PREDICTIONS_PHI): New predictor.
+
+2024-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/113421
+ * gimple-lower-bitint.cc (stmt_needs_operand_addr): Adjust function
+ comment.
+ (bitint_dom_walker::before_dom_children): Add g temporary to simplify
+ formatting. Start at vop rather than cvop even if stmt is a store
+ and needs_operand_addr.
+
+2024-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/113410
+ * gimple-ssa-warn-access.cc (pass_waccess::maybe_check_access_sizes):
+ If access_nelts is integral with larger precision than sizetype,
+ fold_convert it to sizetype.
+
+2024-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/113408
+ * gimple-lower-bitint.cc (bitint_large_huge::handle_stmt): For
+ VIEW_CONVERT_EXPR, pass TREE_OPERAND (rhs1, 0) rather than rhs1
+ to handle_cast.
+
+2024-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/113406
+ * ipa-strub.cc (pass_ipa_strub::execute): Check aggregate_value_p
+ regardless of whether is_gimple_reg_type (restype) or not.
+
+2024-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ * tree-into-ssa.cc (pass_build_ssa::gate): Fix comment typo,
+ funcions -> functions, and use were instead of was.
+ * gengtype.cc (dump_typekind): Fix comment typos, funcion -> function
+ and guaranteee -> guarantee.
+ * attribs.h (struct attr_access): Fix comment typo funcion -> function.
+
+2024-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/113409
+ * omp-general.cc (omp_adjust_for_condition): Handle BITINT_TYPE like
+ INTEGER_TYPE.
+ (omp_extract_for_data): Use build_bitint_type rather than
+ build_nonstandard_integer_type if either iter_type or loop->v type
+ is BITINT_TYPE.
+ * omp-expand.cc (expand_omp_for_generic,
+ expand_omp_taskloop_for_outer, expand_omp_taskloop_for_inner): Handle
+ BITINT_TYPE like INTEGER_TYPE.
+
+2024-01-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/113371
+ * tree-vect-data-refs.cc (vect_enhance_data_refs_alignment):
+ Do not peel when LOOP_VINFO_EARLY_BREAKS_VECT_PEELED.
+ * tree-vect-loop-manip.cc (vect_do_peeling): Assert we do
+ not perform prologue peeling when LOOP_VINFO_EARLY_BREAKS_VECT_PEELED.
+
+2024-01-17 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
+
+ PR rtl-optimization/96388
+ PR rtl-optimization/111554
+ * sched-deps.cc (find_inc): Avoid exponential behavior.
+
+2024-01-17 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR c/111693
+ * doc/invoke.texi (Option Summary): Move -Wuseless-cast
+ from C++ Language Options to Warning Options. Add entry for
+ -Wuse-after-free.
+ (C++ Dialect Options): Move -Wuse-after-free and -Wuseless-cast
+ from here....
+ (Warning Options): ...to here. Minor copy-editing to fix typo
+ and grammar.
+
+2024-01-17 YunQiang Su <syq@gcc.gnu.org>
+
+ * config/mips/mips.cc (mips_compute_frame_info): If another
+ register is used as global_pointer, mark $GP live false.
+
+2024-01-17 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR target/112973
+ * doc/extend.texi (BPF Built-in Functions): Wrap long lines and
+ give the section a light copy-editing pass.
+
+2024-01-16 Wilco Dijkstra <wilco.dijkstra@arm.com>
+
+ * config/aarch64/aarch64-cores.def (AARCH64_CORE): Add 'cobalt-100' CPU.
+ * config/aarch64/aarch64-tune.md: Regenerated.
+ * doc/invoke.texi (-mcpu): Add cobalt-100 core.
+
+2024-01-16 Wilco Dijkstra <wilco.dijkstra@arm.com>
+
+ PR target/112573
+ * config/aarch64/aarch64.cc (aarch64_legitimize_address): Reassociate
+ badly formed CONST expressions.
+
+2024-01-16 Daniel Cederman <cederman@gaisler.com>
+
+ * config/sparc/sparc.cc (next_active_non_empty_insn): Length 0 treated as empty
+
+2024-01-16 Daniel Cederman <cederman@gaisler.com>
+
+ * config/sparc/sparc.cc (atomic_insn_for_leon3_p): Treat membar_storeload as atomic
+ * config/sparc/sync.md (membar_storeload): Turn into named insn
+ and add GR712RC errata workaround.
+ (membar_v8): Add GR712RC errata workaround.
+
+2024-01-16 Andreas Larsson <andreas@gaisler.com>
+
+ * config/sparc/sync.md (*membar_storeload_leon3): Remove
+ (*membar_storeload): Enable for LEON
+
+2024-01-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/113372
+ PR middle-end/90348
+ PR middle-end/110115
+ PR middle-end/111422
+ * cfgexpand.cc (add_scope_conflicts_2): New function.
+ (add_scope_conflicts_1): Use it.
+
+2024-01-16 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/avr-mcus.def (avr16eb14, avr16eb20, avr16eb28, avr16eb32)
+ (avr16ea28, avr16ea32, avr16ea48, avr32ea28, avr32ea32, avr32ea48): Add.
+ * doc/avr-mmcu.texi: Regenerate.
+
+2024-01-16 Feng Xue <fxue@os.amperecomputing.com>
+
+ PR tree-optimization/113091
+ * tree-vect-slp.cc (vect_slp_has_scalar_use): New function.
+ (vect_bb_slp_mark_live_stmts): New parameter scalar_use_map, check
+ scalar use with new function.
+ (vect_bb_slp_mark_live_stmts): New function as entry to existing
+ overriden functions with same name.
+ (vect_slp_analyze_operations): Call new entry function to mark
+ live statements.
+
+2024-01-16 Juzhe-Zhong <juzhe.zhong@rivai.ai>
+
+ PR target/113404
+ * config/riscv/riscv.cc (riscv_override_options_internal): Report sorry
+ for RVV in big-endian mode.
+
+2024-01-16 Yanzhang Wang <yanzhang.wang@intel.com>
+
+ * config/riscv/riscv.cc (riscv_arg_has_vector): Delete.
+ (riscv_pass_in_vector_p): Delete.
+ (riscv_init_cumulative_args): Delete the checking.
+ (riscv_get_arg_info): Delete the checking.
+ (riscv_function_value): Delete the checking.
+ * config/riscv/riscv.h: Delete the member for checking.
+
2024-01-15 Georg-Johann Lay <avr@gjlay.de>
* doc/invoke.texi (AVR Options) [-mskip-bug]: Add documentation.
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 9952a5e..dfe204e 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20240116
+20240118
diff --git a/gcc/attribs.h b/gcc/attribs.h
index 4d491e0..99c4575 100644
--- a/gcc/attribs.h
+++ b/gcc/attribs.h
@@ -324,7 +324,7 @@ struct attr_access
in TREE_VALUE and their positions in the argument list (stored
in TREE_PURPOSE). Each expression may be a PARM_DECL or some
other DECL (for ordinary variables), or an EXPR for other
- expressions (e.g., funcion calls). */
+ expressions (e.g., function calls). */
tree size;
/* The zero-based position of each of the formal function arguments.
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 47019bd..6038d47 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,9 @@
+2024-01-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/113397
+ * c-ada-spec.cc (check_type_name_conflict): Add guard for the
+ presence of DECL_NAME on a TYPE_DECL.
+
2024-01-11 Julian Brown <julian@codesourcery.com>
* c-pretty-print.cc (c_pretty_printer::postfix_expression,
diff --git a/gcc/common.opt b/gcc/common.opt
index 5f0a101..7dc380c 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1262,7 +1262,7 @@ Common Var(flag_cprop_registers) Optimization
Perform a register copy-propagation optimization pass.
ffold-mem-offsets
-Target Bool Var(flag_fold_mem_offsets) Init(1)
+Common Var(flag_fold_mem_offsets) Init(1) Optimization
Fold instructions calculating memory offsets to the memory access instruction if possible.
fcrossjumping
diff --git a/gcc/config/aarch64/aarch64-cores.def b/gcc/config/aarch64/aarch64-cores.def
index 054862f..7ebefcf 100644
--- a/gcc/config/aarch64/aarch64-cores.def
+++ b/gcc/config/aarch64/aarch64-cores.def
@@ -186,6 +186,7 @@ AARCH64_CORE("cortex-x3", cortexx3, cortexa57, V9A, (SVE2_BITPERM, MEMTAG, I8M
AARCH64_CORE("cortex-x4", cortexx4, cortexa57, V9_2A, (SVE2_BITPERM, MEMTAG, PROFILE), neoversen2, 0x41, 0xd81, -1)
AARCH64_CORE("neoverse-n2", neoversen2, cortexa57, V9A, (I8MM, BF16, SVE2_BITPERM, RNG, MEMTAG, PROFILE), neoversen2, 0x41, 0xd49, -1)
+AARCH64_CORE("cobalt-100", cobalt100, cortexa57, V9A, (I8MM, BF16, SVE2_BITPERM, RNG, MEMTAG, PROFILE), neoversen2, 0x6d, 0xd49, -1)
AARCH64_CORE("neoverse-v2", neoversev2, cortexa57, V9A, (I8MM, BF16, SVE2_BITPERM, RNG, MEMTAG, PROFILE), neoversev2, 0x41, 0xd4f, -1)
AARCH64_CORE("demeter", demeter, cortexa57, V9A, (I8MM, BF16, SVE2_BITPERM, RNG, MEMTAG, PROFILE), neoversev2, 0x41, 0xd4f, -1)
diff --git a/gcc/config/aarch64/aarch64-tune.md b/gcc/config/aarch64/aarch64-tune.md
index 98e6882..abd3c9e 100644
--- a/gcc/config/aarch64/aarch64-tune.md
+++ b/gcc/config/aarch64/aarch64-tune.md
@@ -1,5 +1,5 @@
;; -*- buffer-read-only: t -*-
;; Generated automatically by gentune.sh from aarch64-cores.def
(define_attr "tune"
- "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,ampere1b,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa520,cortexa710,cortexa715,cortexa720,cortexx2,cortexx3,cortexx4,neoversen2,neoversev2,demeter,generic,generic_armv8_a,generic_armv9_a"
+ "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,ampere1b,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa520,cortexa710,cortexa715,cortexa720,cortexx2,cortexx3,cortexx4,neoversen2,cobalt100,neoversev2,demeter,generic,generic_armv8_a,generic_armv9_a"
(const (symbol_ref "((enum attr_tune) aarch64_tune)")))
diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md
index 8a204e4..b895f5d 100644
--- a/gcc/config/aarch64/predicates.md
+++ b/gcc/config/aarch64/predicates.md
@@ -313,7 +313,11 @@
(define_special_predicate "aarch64_ldp_reg_operand"
(and
- (match_code "reg,subreg")
+ (ior
+ (match_code "reg")
+ (and
+ (match_code "subreg")
+ (match_test "REG_P (SUBREG_REG (op))")))
(match_test "aarch64_ldpstp_operand_mode_p (GET_MODE (op))")
(ior
(match_test "mode == VOIDmode")
diff --git a/gcc/config/i386/i386-options.cc b/gcc/config/i386/i386-options.cc
index 3605c2c..b6f634e 100644
--- a/gcc/config/i386/i386-options.cc
+++ b/gcc/config/i386/i386-options.cc
@@ -3248,7 +3248,7 @@ ix86_option_override_internal (bool main_args_p,
= (cf_protection_level) (opts->x_flag_cf_protection | CF_SET);
}
- if (ix86_tune_features [X86_TUNE_AVOID_256FMA_CHAINS])
+ if (ix86_tune_features [X86_TUNE_AVOID_512FMA_CHAINS])
SET_OPTION_IF_UNSET (opts, opts_set, param_avoid_fma_max_bits, 512);
else if (ix86_tune_features [X86_TUNE_AVOID_256FMA_CHAINS])
SET_OPTION_IF_UNSET (opts, opts_set, param_avoid_fma_max_bits, 256);
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index 3b8559b..8246747 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -3202,6 +3202,11 @@ loongarch_split_symbol (rtx temp, rtx addr, machine_mode mode, rtx *low_out)
rtx mem = gen_rtx_MEM (Pmode, low);
*low_out = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, mem),
UNSPEC_LOAD_FROM_GOT);
+
+ /* Nonzero in a mem, if the memory is statically allocated and
+ read-only. A common example of the later is a shared library’s
+ global offset table. */
+ MEM_READONLY_P (mem) = 1;
}
break;
diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
index e752019..30e9981 100644
--- a/gcc/config/mips/mips.cc
+++ b/gcc/config/mips/mips.cc
@@ -11353,6 +11353,8 @@ mips_compute_frame_info (void)
in, which is why the global_pointer field is initialised here and not
earlier. */
cfun->machine->global_pointer = mips_global_pointer ();
+ if (cfun->machine->global_pointer != GLOBAL_POINTER_REGNUM)
+ df_set_regs_ever_live (GLOBAL_POINTER_REGNUM, false);
offset = frame->args_size + frame->cprestore_size;
diff --git a/gcc/config/riscv/riscv-opts.h b/gcc/config/riscv/riscv-opts.h
index ff4406a..ca57ddd 100644
--- a/gcc/config/riscv/riscv-opts.h
+++ b/gcc/config/riscv/riscv-opts.h
@@ -116,6 +116,15 @@ enum stringop_strategy_enum {
STRATEGY_AUTO = STRATEGY_SCALAR | STRATEGY_VECTOR
};
+/* Behavior of VSETVL Pass. */
+enum vsetvl_strategy_enum {
+ /* Simple: Insert a vsetvl* instruction for each Vector instruction. */
+ VSETVL_SIMPLE = 1,
+ /* Optimized: Run LCM dataflow analysis to reduce vsetvl* insns and
+ delete any redundant ones generated in the process. */
+ VSETVL_OPT = 2
+};
+
#define TARGET_ZICOND_LIKE (TARGET_ZICOND || (TARGET_XVENTANACONDOPS && TARGET_64BIT))
/* Bit of riscv_zvl_flags will set contintuly, N-1 bit will set if N-bit is
diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc
index df7ed14..2067073 100644
--- a/gcc/config/riscv/riscv-vsetvl.cc
+++ b/gcc/config/riscv/riscv-vsetvl.cc
@@ -2254,6 +2254,22 @@ private:
return true;
}
+ bool has_compatible_reaching_vsetvl_p (vsetvl_info info)
+ {
+ unsigned int index;
+ sbitmap_iterator sbi;
+ EXECUTE_IF_SET_IN_BITMAP (m_vsetvl_def_in[info.get_bb ()->index ()], 0,
+ index, sbi)
+ {
+ const auto prev_info = *m_vsetvl_def_exprs[index];
+ if (!prev_info.valid_p ())
+ continue;
+ if (m_dem.compatible_p (prev_info, info))
+ return true;
+ }
+ return false;
+ }
+
bool preds_all_same_avl_and_ratio_p (const vsetvl_info &curr_info)
{
gcc_assert (
@@ -2343,7 +2359,7 @@ public:
void compute_lcm_local_properties ();
void fuse_local_vsetvl_info ();
- bool earliest_fuse_vsetvl_info ();
+ bool earliest_fuse_vsetvl_info (int iter);
void pre_global_vsetvl_info ();
void emit_vsetvl ();
void cleaup ();
@@ -2961,7 +2977,7 @@ pre_vsetvl::fuse_local_vsetvl_info ()
bool
-pre_vsetvl::earliest_fuse_vsetvl_info ()
+pre_vsetvl::earliest_fuse_vsetvl_info (int iter)
{
compute_avl_def_data ();
compute_vsetvl_def_data ();
@@ -2984,7 +3000,8 @@ pre_vsetvl::earliest_fuse_vsetvl_info ()
if (dump_file && (dump_flags & TDF_DETAILS))
{
- fprintf (dump_file, "\n Compute LCM earliest insert data:\n\n");
+ fprintf (dump_file, "\n Compute LCM earliest insert data (lift %d):\n\n",
+ iter);
fprintf (dump_file, " Expression List (%u):\n", num_exprs);
for (unsigned i = 0; i < num_exprs; i++)
{
@@ -3032,7 +3049,7 @@ pre_vsetvl::earliest_fuse_vsetvl_info ()
if (dump_file && (dump_flags & TDF_DETAILS))
{
- fprintf (dump_file, " Fused global info result:\n");
+ fprintf (dump_file, " Fused global info result (lift %d):\n", iter);
}
bool changed = false;
@@ -3075,22 +3092,8 @@ pre_vsetvl::earliest_fuse_vsetvl_info ()
{
vsetvl_info new_curr_info = curr_info;
new_curr_info.set_bb (crtl->ssa->bb (eg->dest));
- bool has_compatible_p = false;
- unsigned int def_expr_index;
- sbitmap_iterator sbi2;
- EXECUTE_IF_SET_IN_BITMAP (
- m_vsetvl_def_in[new_curr_info.get_bb ()->index ()], 0,
- def_expr_index, sbi2)
- {
- vsetvl_info &prev_info = *m_vsetvl_def_exprs[def_expr_index];
- if (!prev_info.valid_p ())
- continue;
- if (m_dem.compatible_p (prev_info, new_curr_info))
- {
- has_compatible_p = true;
- break;
- }
- }
+ bool has_compatible_p
+ = has_compatible_reaching_vsetvl_p (new_curr_info);
if (!has_compatible_p)
{
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -3142,20 +3145,22 @@ pre_vsetvl::earliest_fuse_vsetvl_info ()
if (src_block_info.has_info ())
src_block_info.probability += dest_block_info.probability;
}
- else if (src_block_info.has_info ()
- && !m_dem.compatible_p (prev_info, curr_info))
+ else
{
/* Cancel lift up if probabilities are equal. */
- if (successors_probability_equal_p (eg->src))
+ if (successors_probability_equal_p (eg->src)
+ || (dest_block_info.probability
+ > src_block_info.probability
+ && !has_compatible_reaching_vsetvl_p (curr_info)))
{
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file,
- " Change empty bb %u to from:",
+ " Reset bb %u:",
eg->src->index);
prev_info.dump (dump_file, " ");
- fprintf (dump_file,
- " to (higher probability):");
+ fprintf (dump_file, " due to (same probability or no "
+ "compatible reaching):");
curr_info.dump (dump_file, " ");
}
src_block_info.set_empty_info ();
@@ -3170,7 +3175,7 @@ pre_vsetvl::earliest_fuse_vsetvl_info ()
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file,
- " Change empty bb %u to from:",
+ " Change bb %u from:",
eg->src->index);
prev_info.dump (dump_file, " ");
fprintf (dump_file,
@@ -3627,7 +3632,7 @@ pass_vsetvl::lazy_vsetvl ()
{
if (dump_file)
fprintf (dump_file, " Try lift up %d.\n\n", fused_count);
- changed = pre.earliest_fuse_vsetvl_info ();
+ changed = pre.earliest_fuse_vsetvl_info (fused_count);
fused_count += 1;
} while (changed);
@@ -3671,7 +3676,7 @@ pass_vsetvl::execute (function *)
if (!has_vector_insn (cfun))
return 0;
- if (!optimize)
+ if (!optimize || vsetvl_strategy & VSETVL_SIMPLE)
simple_vsetvl ();
else
lazy_vsetvl ();
diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt
index 44ed6d6..fd4f1a4 100644
--- a/gcc/config/riscv/riscv.opt
+++ b/gcc/config/riscv/riscv.opt
@@ -547,6 +547,20 @@ Enable the use of vector registers for function arguments and return value.
This is an experimental switch and may be subject to change in the future.
Enum
+Name(vsetvl_strategy) Type(enum vsetvl_strategy_enum)
+Valid arguments to -param=vsetvl-strategy=:
+
+EnumValue
+Enum(vsetvl_strategy) String(simple) Value(VSETVL_SIMPLE)
+
+EnumValue
+Enum(vsetvl_strategy) String(optim) Value(VSETVL_OPT)
+
+-param=vsetvl-strategy=
+Target Undocumented RejectNegative Joined Enum(vsetvl_strategy) Var(vsetvl_strategy) Init(VSETVL_OPT)
+-param=vsetvl-strategy=<string> Set the optimization level of VSETVL insert pass.
+
+Enum
Name(stringop_strategy) Type(enum stringop_strategy_enum)
Valid arguments to -mstringop-strategy=:
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 49e93ec..98267cd 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,53 @@
+2024-01-17 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/112588
+ * module.cc (trees_in::read_function_def): Don't overwrite
+ arguments.
+
+2024-01-17 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/113242
+ PR c++/99493
+ * pt.cc (invalid_tparm_referent_p) <case ADDR_EXPR>: Suppress
+ DECL_ARTIFICIAL rejection test for class NTTP objects.
+
+2024-01-16 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/113292
+ * decl2.cc (get_tls_wrapper_fn): Set DECL_CONTEXT.
+ (c_parse_final_cleanups): Suppress warning for no definition of
+ TLS wrapper functions in header modules.
+ * module.cc (trees_out::lang_decl_vals): Write wrapped variable
+ for TLS wrapper functions.
+ (trees_in::lang_decl_vals): Read it.
+ (trees_out::decl_value): Write TLS model for thread-local vars.
+ (trees_in::decl_value): Read it for new decls. Remember to emit
+ definitions of TLS wrapper functions later.
+
+2024-01-16 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ * name-lookup.h (enum scope_kind): Add 'sk_count'.
+ * name-lookup.cc (cp_binding_level_descriptor): Add missing
+ scope kinds. Add assertion that the list is up to date. Fix
+ handling of explicit_spec_p.
+
+2024-01-16 Marek Polacek <polacek@redhat.com>
+
+ * decl.cc (grokdeclarator) <case cdk_function>: Tweak diagnostic
+ messages.
+
+2024-01-16 Marek Polacek <polacek@redhat.com>
+
+ PR c++/113340
+ * decl.cc (grokdeclarator) <case cdk_function>: Clear
+ is_xobj_member_function in case of an error.
+
+2024-01-16 waffl3x <waffl3x@protonmail.com>
+
+ PR c++/113307
+ * parser.cc (cp_parser_parameter_declaration): Reject packs
+ on xobj params.
+
2024-01-15 Marek Polacek <polacek@redhat.com>
PR c++/110065
diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
index b10a72a..322e48d 100644
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -13394,12 +13394,12 @@ grokdeclarator (const cp_declarator *declarator,
gcc_rich_location bad_xobj_parm
(DECL_SOURCE_LOCATION (TREE_VALUE (parm)));
error_at (&bad_xobj_parm,
- "Only the first parameter of a member function "
- "can be declared as an explicit object parameter");
+ "only the first parameter of a member function "
+ "can be declared as an explicit object parameter");
}
if (bad_xobj_parm_encountered && xobj_parm)
inform (DECL_SOURCE_LOCATION (xobj_parm),
- "Valid explicit object parameter declared here");
+ "valid explicit object parameter declared here");
}
if (reqs)
@@ -13743,6 +13743,7 @@ grokdeclarator (const cp_declarator *declarator,
"destructors may not have parameters");
arg_types = void_list_node;
parms = NULL_TREE;
+ is_xobj_member_function = false;
}
type = build_function_type (type, arg_types);
diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc
index fdc52a0..91d4e2e 100644
--- a/gcc/cp/decl2.cc
+++ b/gcc/cp/decl2.cc
@@ -3897,6 +3897,7 @@ get_tls_wrapper_fn (tree var)
TREE_PUBLIC (fn) = TREE_PUBLIC (var);
DECL_ARTIFICIAL (fn) = true;
DECL_IGNORED_P (fn) = 1;
+ DECL_CONTEXT (fn) = DECL_CONTEXT (var);
/* The wrapper is inline and emitted everywhere var is used. */
DECL_DECLARED_INLINE_P (fn) = true;
if (TREE_PUBLIC (var))
@@ -5326,10 +5327,11 @@ c_parse_final_cleanups (void)
#pragma interface, etc.) we decided not to emit the
definition here. */
&& !DECL_INITIAL (decl)
- /* A defaulted fn in a header module can be synthesized on
- demand later. (In non-header modules we should have
- synthesized it above.) */
- && !(DECL_DEFAULTED_FN (decl) && header_module_p ())
+ /* A defaulted fn or TLS wrapper in a header module can be
+ synthesized on demand later. (In non-header modules we
+ should have synthesized it above.) */
+ && !(header_module_p ()
+ && (DECL_DEFAULTED_FN (decl) || decl_tls_wrapper_p (decl)))
/* Don't complain if the template was defined. */
&& !(DECL_TEMPLATE_INSTANTIATION (decl)
&& DECL_INITIAL (DECL_TEMPLATE_RESULT
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index aa75e28..8db662c 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -6950,6 +6950,9 @@ trees_out::lang_decl_vals (tree t)
if (streaming_p ())
wi (lang->u.fn.u5.fixed_offset);
}
+ else if (decl_tls_wrapper_p (t))
+ /* The wrapped variable. */
+ WT (lang->u.fn.befriending_classes);
else
WT (lang->u.fn.u5.cloned_function);
@@ -7029,6 +7032,8 @@ trees_in::lang_decl_vals (tree t)
RT (lang->u.fn.befriending_classes);
lang->u.fn.u5.fixed_offset = wi ();
}
+ else if (decl_tls_wrapper_p (t))
+ RT (lang->u.fn.befriending_classes);
else
RT (lang->u.fn.u5.cloned_function);
@@ -7928,6 +7933,9 @@ trees_out::decl_value (tree decl, depset *dep)
decl, cloned_p ? "" : "not ");
}
+ if (streaming_p () && VAR_P (decl) && CP_DECL_THREAD_LOCAL_P (decl))
+ u (decl_tls_model (decl));
+
if (streaming_p ())
dump (dumper::TREE) && dump ("Written decl:%d %C:%N", tag,
TREE_CODE (decl), decl);
@@ -8275,6 +8283,13 @@ trees_in::decl_value ()
look like templates. */
if (!install_implicit_member (inner))
set_overrun ();
+
+ /* When importing a TLS wrapper from a header unit, we haven't
+ actually emitted its definition yet. Remember it so we can
+ do this later. */
+ if (state->is_header ()
+ && decl_tls_wrapper_p (decl))
+ note_vague_linkage_fn (decl);
}
else
{
@@ -8358,6 +8373,13 @@ trees_in::decl_value ()
}
}
+ if (VAR_P (decl) && CP_DECL_THREAD_LOCAL_P (decl))
+ {
+ enum tls_model model = tls_model (u ());
+ if (is_new)
+ set_decl_tls_model (decl, model);
+ }
+
if (!NAMESPACE_SCOPE_P (inner)
&& ((TREE_CODE (inner) == TYPE_DECL
&& !is_typedef
@@ -11681,8 +11703,6 @@ trees_in::read_function_def (tree decl, tree maybe_template)
DECL_RESULT (decl) = result;
DECL_INITIAL (decl) = initial;
DECL_SAVED_TREE (decl) = saved;
- if (maybe_dup)
- DECL_ARGUMENTS (decl) = DECL_ARGUMENTS (maybe_dup);
if (context)
SET_DECL_FRIEND_CONTEXT (decl, context);
diff --git a/gcc/cp/name-lookup.cc b/gcc/cp/name-lookup.cc
index d827d33..15b5fba 100644
--- a/gcc/cp/name-lookup.cc
+++ b/gcc/cp/name-lookup.cc
@@ -4464,14 +4464,23 @@ cp_binding_level_descriptor (cp_binding_level *scope)
"try-scope",
"catch-scope",
"for-scope",
+ "cond-init-scope",
+ "stmt-expr-scope",
"function-parameter-scope",
"class-scope",
+ "enum-scope",
"namespace-scope",
"template-parameter-scope",
- "template-explicit-spec-scope"
+ "template-explicit-spec-scope",
+ "transaction-scope",
+ "openmp-scope"
};
- const scope_kind kind = scope->explicit_spec_p
- ? sk_template_spec : scope->kind;
+ static_assert (ARRAY_SIZE (scope_kind_names) == sk_count,
+ "must keep names aligned with scope_kind enum");
+
+ scope_kind kind = scope->kind;
+ if (kind == sk_template_parms && scope->explicit_spec_p)
+ kind = sk_template_spec;
return scope_kind_names[kind];
}
diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h
index 4f8454e..d237132 100644
--- a/gcc/cp/name-lookup.h
+++ b/gcc/cp/name-lookup.h
@@ -213,7 +213,8 @@ enum scope_kind {
explicit specialization is introduced by
"template <>", this scope is always empty. */
sk_transaction, /* A synchronized or atomic statement. */
- sk_omp /* An OpenMP structured block. */
+ sk_omp, /* An OpenMP structured block. */
+ sk_count /* Number of scope_kind enumerations. */
};
struct GTY(()) cp_class_binding {
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index c7ad3ec..3748ccd 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -25714,6 +25714,25 @@ cp_parser_parameter_declaration (cp_parser *parser,
for a C-style variadic function. */
token = cp_lexer_peek_token (parser->lexer);
+ bool const xobj_param_p
+ = decl_spec_seq_has_spec_p (&decl_specifiers, ds_this);
+
+ if (xobj_param_p
+ && ((declarator && declarator->parameter_pack_p)
+ || cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS)))
+ {
+ location_t xobj_param
+ = make_location (decl_specifiers.locations[ds_this],
+ decl_spec_token_start->location,
+ input_location);
+ error_at (xobj_param,
+ "an explicit object parameter cannot "
+ "be a function parameter pack");
+ /* Suppress errors that occur down the line. */
+ if (declarator)
+ declarator->parameter_pack_p = false;
+ }
+
/* If a function parameter pack was specified and an implicit template
parameter was introduced during cp_parser_parameter_declaration,
change any implicit parameters introduced into packs. */
@@ -25837,7 +25856,7 @@ cp_parser_parameter_declaration (cp_parser *parser,
if (default_argument)
STRIP_ANY_LOCATION_WRAPPER (default_argument);
- if (decl_spec_seq_has_spec_p (&decl_specifiers, ds_this))
+ if (xobj_param_p)
{
if (default_argument)
{
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index b611723..f82d018 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -7217,8 +7217,10 @@ invalid_tparm_referent_p (tree type, tree expr, tsubst_flags_t complain)
* a string literal (5.13.5),
* the result of a typeid expression (8.2.8), or
* a predefined __func__ variable (11.4.1). */
- else if (VAR_P (decl) && DECL_ARTIFICIAL (decl))
+ else if (VAR_P (decl) && DECL_ARTIFICIAL (decl)
+ && !DECL_NTTP_OBJECT_P (decl))
{
+ gcc_checking_assert (DECL_TINFO_P (decl) || DECL_FNAME_P (decl));
if (complain & tf_error)
error ("the address of %qD is not a valid template argument",
decl);
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index b9129d1..d1893ad 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -3028,19 +3028,6 @@ types (@pxref{Variable Attributes}, @pxref{Type Attributes}.)
The message attached to the attribute is affected by the setting of
the @option{-fmessage-length} option.
-@cindex @code{unavailable} function attribute
-@item unavailable
-@itemx unavailable (@var{msg})
-The @code{unavailable} attribute results in an error if the function
-is used anywhere in the source file. This is useful when identifying
-functions that have been removed from a particular variation of an
-interface. Other than emitting an error rather than a warning, the
-@code{unavailable} attribute behaves in the same manner as
-@code{deprecated}.
-
-The @code{unavailable} attribute can also be used for variables and
-types (@pxref{Variable Attributes}, @pxref{Type Attributes}.)
-
@cindex @code{error} function attribute
@cindex @code{warning} function attribute
@item error ("@var{message}")
@@ -3666,6 +3653,10 @@ This attribute locally overrides the @option{-fstack-limit-register}
and @option{-fstack-limit-symbol} command-line options; it has the effect
of disabling stack limit checking in the function it applies to.
+@cindex @code{no_stack_protector} function attribute
+@item no_stack_protector
+This attribute prevents stack protection code for the function.
+
@cindex @code{noclone} function attribute
@item noclone
This function attribute prevents a function from being considered for
@@ -3761,63 +3752,6 @@ my_memcpy (void *dest, const void *src, size_t len)
__attribute__((nonnull));
@end smallexample
-@cindex @code{null_terminated_string_arg} function attribute
-@item null_terminated_string_arg
-@itemx null_terminated_string_arg (@var{N})
-The @code{null_terminated_string_arg} attribute may be applied to a
-function that takes a @code{char *} or @code{const char *} at
-referenced argument @var{N}.
-
-It indicates that the passed argument must be a C-style null-terminated
-string. Specifically, the presence of the attribute implies that, if
-the pointer is non-null, the function may scan through the referenced
-buffer looking for the first zero byte.
-
-In particular, when the analyzer is enabled (via @option{-fanalyzer}),
-if the pointer is non-null, it will simulate scanning for the first
-zero byte in the referenced buffer, and potentially emit
-@option{-Wanalyzer-use-of-uninitialized-value}
-or @option{-Wanalyzer-out-of-bounds} on improperly terminated buffers.
-
-For example, given the following:
-
-@smallexample
-char *example_1 (const char *p)
- __attribute__((null_terminated_string_arg (1)));
-@end smallexample
-
-the analyzer will check that any non-null pointers passed to the function
-are validly terminated.
-
-If the parameter must be non-null, it is appropriate to use both this
-attribute and the attribute @code{nonnull}, such as in:
-
-@smallexample
-extern char *example_2 (const char *p)
- __attribute__((null_terminated_string_arg (1),
- nonnull (1)));
-@end smallexample
-
-See the @code{nonnull} attribute for more information and
-caveats.
-
-If the pointer argument is also referred to by an @code{access} attribute on the
-function with @var{access-mode} either @code{read_only} or @code{read_write}
-and the latter attribute has the optional @var{size-index} argument
-referring to a size argument, this expressses the maximum size of the access.
-For example, given:
-
-@smallexample
-extern char *example_fn (const char *p, size_t n)
- __attribute__((null_terminated_string_arg (1),
- access (read_only, 1, 2),
- nonnull (1)));
-@end smallexample
-
-the analyzer will require the first parameter to be non-null, and either
-be validly null-terminated, or validly readable up to the size specified by
-the second parameter.
-
@cindex @code{noplt} function attribute
@item noplt
The @code{noplt} attribute is the counterpart to option @option{-fno-plt}.
@@ -3896,6 +3830,63 @@ the standard C library can be guaranteed not to throw an exception
with the notable exceptions of @code{qsort} and @code{bsearch} that
take function pointer arguments.
+@cindex @code{null_terminated_string_arg} function attribute
+@item null_terminated_string_arg
+@itemx null_terminated_string_arg (@var{N})
+The @code{null_terminated_string_arg} attribute may be applied to a
+function that takes a @code{char *} or @code{const char *} at
+referenced argument @var{N}.
+
+It indicates that the passed argument must be a C-style null-terminated
+string. Specifically, the presence of the attribute implies that, if
+the pointer is non-null, the function may scan through the referenced
+buffer looking for the first zero byte.
+
+In particular, when the analyzer is enabled (via @option{-fanalyzer}),
+if the pointer is non-null, it will simulate scanning for the first
+zero byte in the referenced buffer, and potentially emit
+@option{-Wanalyzer-use-of-uninitialized-value}
+or @option{-Wanalyzer-out-of-bounds} on improperly terminated buffers.
+
+For example, given the following:
+
+@smallexample
+char *example_1 (const char *p)
+ __attribute__((null_terminated_string_arg (1)));
+@end smallexample
+
+the analyzer will check that any non-null pointers passed to the function
+are validly terminated.
+
+If the parameter must be non-null, it is appropriate to use both this
+attribute and the attribute @code{nonnull}, such as in:
+
+@smallexample
+extern char *example_2 (const char *p)
+ __attribute__((null_terminated_string_arg (1),
+ nonnull (1)));
+@end smallexample
+
+See the @code{nonnull} attribute for more information and
+caveats.
+
+If the pointer argument is also referred to by an @code{access} attribute on the
+function with @var{access-mode} either @code{read_only} or @code{read_write}
+and the latter attribute has the optional @var{size-index} argument
+referring to a size argument, this expressses the maximum size of the access.
+For example, given:
+
+@smallexample
+extern char *example_fn (const char *p, size_t n)
+ __attribute__((null_terminated_string_arg (1),
+ access (read_only, 1, 2),
+ nonnull (1)));
+@end smallexample
+
+the analyzer will require the first parameter to be non-null, and either
+be validly null-terminated, or validly readable up to the size specified by
+the second parameter.
+
@cindex @code{optimize} function attribute
@item optimize (@var{level}, @dots{})
@item optimize (@var{string}, @dots{})
@@ -3997,6 +3988,16 @@ diagnosed. Because a pure function cannot have any observable side
effects it does not make sense for such a function to return @code{void}.
Declaring such a function is diagnosed.
+@cindex @code{retain} function attribute
+@item retain
+For ELF targets that support the GNU or FreeBSD OSABIs, this attribute
+will save the function from linker garbage collection. To support
+this behavior, functions that have not been placed in specific sections
+(e.g. by the @code{section} attribute, or the @code{-ffunction-sections}
+option), will be placed in new, unique sections.
+
+This additional functionality requires Binutils version 2.36 or later.
+
@cindex @code{returns_nonnull} function attribute
@item returns_nonnull
The @code{returns_nonnull} attribute specifies that the function
@@ -4099,54 +4100,6 @@ This attribute adds stack protection code to the function if
flags @option{-fstack-protector}, @option{-fstack-protector-strong}
or @option{-fstack-protector-explicit} are set.
-@cindex @code{no_stack_protector} function attribute
-@item no_stack_protector
-This attribute prevents stack protection code for the function.
-
-@cindex @code{target} function attribute
-@item target (@var{string}, @dots{})
-Multiple target back ends implement the @code{target} attribute
-to specify that a function is to
-be compiled with different target options than specified on the
-command line. The original target command-line options are ignored.
-One or more strings can be provided as arguments.
-Each string consists of one or more comma-separated suffixes to
-the @code{-m} prefix jointly forming the name of a machine-dependent
-option. @xref{Submodel Options,,Machine-Dependent Options}.
-
-The @code{target} attribute can be used for instance to have a function
-compiled with a different ISA (instruction set architecture) than the
-default. @samp{#pragma GCC target} can be used to specify target-specific
-options for more than one function. @xref{Function Specific Option Pragmas},
-for details about the pragma.
-
-For instance, on an x86, you could declare one function with the
-@code{target("sse4.1,arch=core2")} attribute and another with
-@code{target("sse4a,arch=amdfam10")}. This is equivalent to
-compiling the first function with @option{-msse4.1} and
-@option{-march=core2} options, and the second function with
-@option{-msse4a} and @option{-march=amdfam10} options. It is up to you
-to make sure that a function is only invoked on a machine that
-supports the particular ISA it is compiled for (for example by using
-@code{cpuid} on x86 to determine what feature bits and architecture
-family are used).
-
-@smallexample
-int core2_func (void) __attribute__ ((__target__ ("arch=core2")));
-int sse3_func (void) __attribute__ ((__target__ ("sse3")));
-@end smallexample
-
-Providing multiple strings as arguments separated by commas to specify
-multiple options is equivalent to separating the option suffixes with
-a comma (@samp{,}) within a single string. Spaces are not permitted
-within the strings.
-
-The options supported are specific to each target; refer to @ref{x86
-Function Attributes}, @ref{PowerPC Function Attributes},
-@ref{ARM Function Attributes}, @ref{AArch64 Function Attributes},
-@ref{Nios II Function Attributes}, and @ref{S/390 Function Attributes}
-for details.
-
@cindex @code{symver} function attribute
@item symver ("@var{name2}@@@var{nodename}")
On ELF targets this attribute creates a symbol version. The @var{name2} part
@@ -4218,6 +4171,50 @@ The analyzer will pay particular attention to such functions when
@option{-Wanalyzer-tainted-offset},
and @option{-Wanalyzer-tainted-size}.
+@cindex @code{target} function attribute
+@item target (@var{string}, @dots{})
+Multiple target back ends implement the @code{target} attribute
+to specify that a function is to
+be compiled with different target options than specified on the
+command line. The original target command-line options are ignored.
+One or more strings can be provided as arguments.
+Each string consists of one or more comma-separated suffixes to
+the @code{-m} prefix jointly forming the name of a machine-dependent
+option. @xref{Submodel Options,,Machine-Dependent Options}.
+
+The @code{target} attribute can be used for instance to have a function
+compiled with a different ISA (instruction set architecture) than the
+default. @samp{#pragma GCC target} can be used to specify target-specific
+options for more than one function. @xref{Function Specific Option Pragmas},
+for details about the pragma.
+
+For instance, on an x86, you could declare one function with the
+@code{target("sse4.1,arch=core2")} attribute and another with
+@code{target("sse4a,arch=amdfam10")}. This is equivalent to
+compiling the first function with @option{-msse4.1} and
+@option{-march=core2} options, and the second function with
+@option{-msse4a} and @option{-march=amdfam10} options. It is up to you
+to make sure that a function is only invoked on a machine that
+supports the particular ISA it is compiled for (for example by using
+@code{cpuid} on x86 to determine what feature bits and architecture
+family are used).
+
+@smallexample
+int core2_func (void) __attribute__ ((__target__ ("arch=core2")));
+int sse3_func (void) __attribute__ ((__target__ ("sse3")));
+@end smallexample
+
+Providing multiple strings as arguments separated by commas to specify
+multiple options is equivalent to separating the option suffixes with
+a comma (@samp{,}) within a single string. Spaces are not permitted
+within the strings.
+
+The options supported are specific to each target; refer to @ref{x86
+Function Attributes}, @ref{PowerPC Function Attributes},
+@ref{ARM Function Attributes}, @ref{AArch64 Function Attributes},
+@ref{Nios II Function Attributes}, and @ref{S/390 Function Attributes}
+for details.
+
@cindex @code{target_clones} function attribute
@item target_clones (@var{options})
The @code{target_clones} attribute is used to specify that a function
@@ -4246,6 +4243,19 @@ from a @code{target_clone} caller will not lead to copying
If you want to enforce such behaviour,
we recommend declaring the calling function with the @code{flatten} attribute?
+@cindex @code{unavailable} function attribute
+@item unavailable
+@itemx unavailable (@var{msg})
+The @code{unavailable} attribute results in an error if the function
+is used anywhere in the source file. This is useful when identifying
+functions that have been removed from a particular variation of an
+interface. Other than emitting an error rather than a warning, the
+@code{unavailable} attribute behaves in the same manner as
+@code{deprecated}.
+
+The @code{unavailable} attribute can also be used for variables and
+types (@pxref{Variable Attributes}, @pxref{Type Attributes}.)
+
@cindex @code{unused} function attribute
@item unused
This attribute, attached to a function, means that the function is meant
@@ -4263,16 +4273,6 @@ When applied to a member function of a C++ class template, the
attribute also means that the function is instantiated if the
class itself is instantiated.
-@cindex @code{retain} function attribute
-@item retain
-For ELF targets that support the GNU or FreeBSD OSABIs, this attribute
-will save the function from linker garbage collection. To support
-this behavior, functions that have not been placed in specific sections
-(e.g. by the @code{section} attribute, or the @code{-ffunction-sections}
-option), will be placed in new, unique sections.
-
-This additional functionality requires Binutils version 2.36 or later.
-
@cindex @code{visibility} function attribute
@item visibility ("@var{visibility_type}")
This attribute affects the linkage of the declaration to which it is attached.
@@ -7636,6 +7636,7 @@ which syntax you use. @xref{Attribute Syntax}, for details.
The following attributes are supported on most targets.
@table @code
+@c Keep this table alphabetized by attribute name. Treat _ as space.
@cindex @code{alias} variable attribute
@item alias ("@var{target}")
@@ -7742,67 +7743,6 @@ align them on any target.
The @code{aligned} attribute can also be used for functions
(@pxref{Common Function Attributes}.)
-@cindex @code{warn_if_not_aligned} variable attribute
-@item warn_if_not_aligned (@var{alignment})
-This attribute specifies a threshold for the structure field, measured
-in bytes. If the structure field is aligned below the threshold, a
-warning will be issued. For example, the declaration:
-
-@smallexample
-struct foo
-@{
- int i1;
- int i2;
- unsigned long long x __attribute__ ((warn_if_not_aligned (16)));
-@};
-@end smallexample
-
-@noindent
-causes the compiler to issue an warning on @code{struct foo}, like
-@samp{warning: alignment 8 of 'struct foo' is less than 16}.
-The compiler also issues a warning, like @samp{warning: 'x' offset
-8 in 'struct foo' isn't aligned to 16}, when the structure field has
-the misaligned offset:
-
-@smallexample
-struct __attribute__ ((aligned (16))) foo
-@{
- int i1;
- int i2;
- unsigned long long x __attribute__ ((warn_if_not_aligned (16)));
-@};
-@end smallexample
-
-This warning can be disabled by @option{-Wno-if-not-aligned}.
-The @code{warn_if_not_aligned} attribute can also be used for types
-(@pxref{Common Type Attributes}.)
-
-@cindex @code{strict_flex_array} variable attribute
-@item strict_flex_array (@var{level})
-The @code{strict_flex_array} attribute should be attached to the trailing
-array field of a structure. It controls when to treat the trailing array
-field of a structure as a flexible array member for the purposes of accessing
-the elements of such an array.
-@var{level} must be an integer betwen 0 to 3.
-
-@var{level}=0 is the least strict level, all trailing arrays of structures
-are treated as flexible array members. @var{level}=3 is the strictest level,
-only when the trailing array is declared as a flexible array member per C99
-standard onwards (@samp{[]}), it is treated as a flexible array member.
-
-There are two more levels in between 0 and 3, which are provided to support
-older codes that use GCC zero-length array extension (@samp{[0]}) or one-element
-array as flexible array members (@samp{[1]}):
-When @var{level} is 1, the trailing array is treated as a flexible array member
-when it is declared as either @samp{[]}, @samp{[0]}, or @samp{[1]};
-When @var{level} is 2, the trailing array is treated as a flexible array member
-when it is declared as either @samp{[]}, or @samp{[0]}.
-
-This attribute can be used with or without the @option{-fstrict-flex-arrays}.
-When both the attribute and the option present at the same time, the level of
-the strictness for the specific trailing array field is determined by the
-attribute.
-
@cindex @code{alloc_size} variable attribute
@item alloc_size (@var{position})
@itemx alloc_size (@var{position-1}, @var{position-2})
@@ -7906,22 +7846,6 @@ types (@pxref{Common Function Attributes},
The message attached to the attribute is affected by the setting of
the @option{-fmessage-length} option.
-@cindex @code{unavailable} variable attribute
-@item unavailable
-@itemx unavailable (@var{msg})
-The @code{unavailable} attribute indicates that the variable so marked
-is not available, if it is used anywhere in the source file. It behaves
-in the same manner as the @code{deprecated} attribute except that the
-compiler will emit an error rather than a warning.
-
-It is expected that items marked as @code{deprecated} will eventually be
-withdrawn from interfaces, and then become unavailable. This attribute
-allows for marking them appropriately.
-
-The @code{unavailable} attribute can also be used for functions and
-types (@pxref{Common Function Attributes},
-@pxref{Common Type Attributes}).
-
@cindex @code{mode} variable attribute
@item mode (@var{mode})
This attribute specifies the data type for the declaration---whichever
@@ -7935,6 +7859,21 @@ indicate the mode corresponding to a one-byte integer, @code{word} or
@code{__word__} for the mode of a one-word integer, and @code{pointer}
or @code{__pointer__} for the mode used to represent pointers.
+@cindex @code{no_icf} variable attribute
+@item no_icf
+This variable attribute prevents a variable from being merged with another
+equivalent variable.
+
+@cindex @code{noinit} variable attribute
+@item noinit
+Any data with the @code{noinit} attribute will not be initialized by
+the C runtime startup code, or the program loader. Not initializing
+data in this way can reduce program startup times.
+
+This attribute is specific to ELF targets and relies on the linker
+script to place sections with the @code{.noinit} prefix in the right
+location.
+
@cindex @code{nonstring} variable attribute
@item nonstring
The @code{nonstring} variable attribute specifies that an object or member
@@ -7970,6 +7909,32 @@ int f (struct Data *pd, const char *s)
@}
@end smallexample
+@cindex @code{objc_nullability} variable attribute
+@item objc_nullability (@var{nullability kind}) @r{(Objective-C and Objective-C++ only)}
+This attribute applies to pointer variables only. It allows marking the
+pointer with one of four possible values describing the conditions under
+which the pointer might have a @code{nil} value. In most cases, the
+attribute is intended to be an internal representation for property and
+method nullability (specified by language keywords); it is not recommended
+to use it directly.
+
+When @var{nullability kind} is @code{"unspecified"} or @code{0}, nothing is
+known about the conditions in which the pointer might be @code{nil}. Making
+this state specific serves to avoid false positives in diagnostics.
+
+When @var{nullability kind} is @code{"nonnull"} or @code{1}, the pointer has
+no meaning if it is @code{nil} and thus the compiler is free to emit
+diagnostics if it can be determined that the value will be @code{nil}.
+
+When @var{nullability kind} is @code{"nullable"} or @code{2}, the pointer might
+be @code{nil} and carry meaning as such.
+
+When @var{nullability kind} is @code{"resettable"} or @code{3} (used only in
+the context of property attribute lists) this describes the case in which a
+property setter may take the value @code{nil} (which perhaps causes the
+property to be reset in some manner to a default) but for which the property
+getter will never validly return @code{nil}.
+
@cindex @code{packed} variable attribute
@item packed
The @code{packed} attribute specifies that a structure member should have
@@ -7994,6 +7959,18 @@ been fixed in GCC 4.4 but the change can lead to differences in the
structure layout. See the documentation of
@option{-Wpacked-bitfield-compat} for more information.
+@cindex @code{persistent} variable attribute
+@item persistent
+Any data with the @code{persistent} attribute will not be initialized by
+the C runtime startup code, but will be initialized by the program
+loader. This enables the value of the variable to @samp{persist}
+between processor resets.
+
+This attribute is specific to ELF targets and relies on the linker
+script to place the sections with the @code{.persistent} prefix in the
+right location. Specifically, some type of non-volatile, writeable
+memory is required.
+
@cindex @code{section} variable attribute
@item section ("@var{section-name}")
Normally, the compiler places the objects it generates in sections like
@@ -8043,6 +8020,38 @@ attribute is not available on all platforms.
If you need to map the entire contents of a module to a particular
section, consider using the facilities of the linker instead.
+@cindex @code{strict_flex_array} variable attribute
+@item strict_flex_array (@var{level})
+The @code{strict_flex_array} attribute should be attached to the trailing
+array field of a structure. It controls when to treat the trailing array
+field of a structure as a flexible array member for the purposes of accessing
+the elements of such an array.
+@var{level} must be an integer betwen 0 to 3.
+
+@var{level}=0 is the least strict level, all trailing arrays of structures
+are treated as flexible array members. @var{level}=3 is the strictest level,
+only when the trailing array is declared as a flexible array member per C99
+standard onwards (@samp{[]}), it is treated as a flexible array member.
+
+There are two more levels in between 0 and 3, which are provided to
+support older codes that use GCC zero-length array extension
+(@samp{[0]}) or one-element array as flexible array members
+(@samp{[1]}). When @var{level} is 1, the trailing array is treated as
+a flexible array member when it is declared as either @samp{[]},
+@samp{[0]}, or @samp{[1]}; When @var{level} is 2, the trailing array
+is treated as a flexible array member when it is declared as either
+@samp{[]}, or @samp{[0]}.
+
+This attribute can be used with or without the
+@option{-fstrict-flex-arrays} command-line option. When both the
+attribute and the option are present at the same time, the level of
+the strictness for the specific trailing array field is determined by
+the attribute.
+
+The @code{strict_flex_array} attribute interacts with the
+@option{-Wstrict-flex-arrays} option. @xref{Warning Options}, for more
+information.
+
@cindex @code{tls_model} variable attribute
@item tls_model ("@var{tls_model}")
The @code{tls_model} attribute sets thread-local storage model
@@ -8054,6 +8063,22 @@ The @var{tls_model} argument should be one of @code{global-dynamic},
Not all targets support this attribute.
+@cindex @code{unavailable} variable attribute
+@item unavailable
+@itemx unavailable (@var{msg})
+The @code{unavailable} attribute indicates that the variable so marked
+is not available, if it is used anywhere in the source file. It behaves
+in the same manner as the @code{deprecated} attribute except that the
+compiler will emit an error rather than a warning.
+
+It is expected that items marked as @code{deprecated} will eventually be
+withdrawn from interfaces, and then become unavailable. This attribute
+allows for marking them appropriately.
+
+The @code{unavailable} attribute can also be used for functions and
+types (@pxref{Common Function Attributes},
+@pxref{Common Type Attributes}).
+
@cindex @code{unused} variable attribute
@item unused
This attribute, attached to a variable or structure field, means that
@@ -8136,63 +8161,45 @@ This attribute affects the linkage of the declaration to which it is attached.
The @code{visibility} attribute is described in
@ref{Common Function Attributes}.
-@cindex @code{weak} variable attribute
-@item weak
-The @code{weak} attribute is described in
-@ref{Common Function Attributes}.
-
-@cindex @code{noinit} variable attribute
-@item noinit
-Any data with the @code{noinit} attribute will not be initialized by
-the C runtime startup code, or the program loader. Not initializing
-data in this way can reduce program startup times.
-
-This attribute is specific to ELF targets and relies on the linker
-script to place sections with the @code{.noinit} prefix in the right
-location.
-
-@cindex @code{persistent} variable attribute
-@item persistent
-Any data with the @code{persistent} attribute will not be initialized by
-the C runtime startup code, but will be initialized by the program
-loader. This enables the value of the variable to @samp{persist}
-between processor resets.
-
-This attribute is specific to ELF targets and relies on the linker
-script to place the sections with the @code{.persistent} prefix in the
-right location. Specifically, some type of non-volatile, writeable
-memory is required.
-
-@cindex @code{no_icf} variable attribute
-@item no_icf
-This variable attribute prevents a variable from being merged with another
-equivalent variable.
+@cindex @code{warn_if_not_aligned} variable attribute
+@item warn_if_not_aligned (@var{alignment})
+This attribute specifies a threshold for the structure field, measured
+in bytes. If the structure field is aligned below the threshold, a
+warning will be issued. For example, the declaration:
-@cindex @code{objc_nullability} variable attribute
-@item objc_nullability (@var{nullability kind}) @r{(Objective-C and Objective-C++ only)}
-This attribute applies to pointer variables only. It allows marking the
-pointer with one of four possible values describing the conditions under
-which the pointer might have a @code{nil} value. In most cases, the
-attribute is intended to be an internal representation for property and
-method nullability (specified by language keywords); it is not recommended
-to use it directly.
+@smallexample
+struct foo
+@{
+ int i1;
+ int i2;
+ unsigned long long x __attribute__ ((warn_if_not_aligned (16)));
+@};
+@end smallexample
-When @var{nullability kind} is @code{"unspecified"} or @code{0}, nothing is
-known about the conditions in which the pointer might be @code{nil}. Making
-this state specific serves to avoid false positives in diagnostics.
+@noindent
+causes the compiler to issue an warning on @code{struct foo}, like
+@samp{warning: alignment 8 of 'struct foo' is less than 16}.
+The compiler also issues a warning, like @samp{warning: 'x' offset
+8 in 'struct foo' isn't aligned to 16}, when the structure field has
+the misaligned offset:
-When @var{nullability kind} is @code{"nonnull"} or @code{1}, the pointer has
-no meaning if it is @code{nil} and thus the compiler is free to emit
-diagnostics if it can be determined that the value will be @code{nil}.
+@smallexample
+struct __attribute__ ((aligned (16))) foo
+@{
+ int i1;
+ int i2;
+ unsigned long long x __attribute__ ((warn_if_not_aligned (16)));
+@};
+@end smallexample
-When @var{nullability kind} is @code{"nullable"} or @code{2}, the pointer might
-be @code{nil} and carry meaning as such.
+This warning can be disabled by @option{-Wno-if-not-aligned}.
+The @code{warn_if_not_aligned} attribute can also be used for types
+(@pxref{Common Type Attributes}.)
-When @var{nullability kind} is @code{"resettable"} or @code{3} (used only in
-the context of property attribute lists) this describes the case in which a
-property setter may take the value @code{nil} (which perhaps causes the
-property to be reset in some manner to a default) but for which the property
-getter will never validly return @code{nil}.
+@cindex @code{weak} variable attribute
+@item weak
+The @code{weak} attribute is described in
+@ref{Common Function Attributes}.
@end table
@@ -8732,6 +8739,8 @@ the closing brace. You can also include type attributes in a
The following type attributes are supported on most targets.
@table @code
+@c Keep this table alphabetized by attribute name. Treat _ as space.
+
@cindex @code{aligned} type attribute
@item aligned
@itemx aligned (@var{alignment})
@@ -8818,58 +8827,6 @@ attribute must be specified as well. When used as part of a typedef, the
@code{aligned} attribute can both increase and decrease alignment, and
specifying the @code{packed} attribute generates a warning.
-@cindex @code{warn_if_not_aligned} type attribute
-@item warn_if_not_aligned (@var{alignment})
-This attribute specifies a threshold for the structure field, measured
-in bytes. If the structure field is aligned below the threshold, a
-warning will be issued. For example, the declaration:
-
-@smallexample
-typedef unsigned long long __u64
- __attribute__((aligned (4), warn_if_not_aligned (8)));
-
-struct foo
-@{
- int i1;
- int i2;
- __u64 x;
-@};
-@end smallexample
-
-@noindent
-causes the compiler to issue an warning on @code{struct foo}, like
-@samp{warning: alignment 4 of 'struct foo' is less than 8}.
-It is used to define @code{struct foo} in such a way that
-@code{struct foo} has the same layout and the structure field @code{x}
-has the same alignment when @code{__u64} is aligned at either 4 or
-8 bytes. Align @code{struct foo} to 8 bytes:
-
-@smallexample
-struct __attribute__ ((aligned (8))) foo
-@{
- int i1;
- int i2;
- __u64 x;
-@};
-@end smallexample
-
-@noindent
-silences the warning. The compiler also issues a warning, like
-@samp{warning: 'x' offset 12 in 'struct foo' isn't aligned to 8},
-when the structure field has the misaligned offset:
-
-@smallexample
-struct __attribute__ ((aligned (8))) foo
-@{
- int i1;
- int i2;
- int i3;
- __u64 x;
-@};
-@end smallexample
-
-This warning can be disabled by @option{-Wno-if-not-aligned}.
-
@cindex @code{alloc_size} type attribute
@item alloc_size (@var{position})
@itemx alloc_size (@var{position-1}, @var{position-2})
@@ -8968,17 +8925,6 @@ variables (@pxref{Function Attributes}, @pxref{Variable Attributes}.)
The message attached to the attribute is affected by the setting of
the @option{-fmessage-length} option.
-@cindex @code{unavailable} type attribute
-@item unavailable
-@itemx unavailable (@var{msg})
-The @code{unavailable} attribute behaves in the same manner as the
-@code{deprecated} one, but emits an error rather than a warning. It is
-used to indicate that a (perhaps previously @code{deprecated}) type is
-no longer usable.
-
-The @code{unavailable} attribute can also be used for functions and
-variables (@pxref{Function Attributes}, @pxref{Variable Attributes}.)
-
@cindex @code{designated_init} type attribute
@item designated_init
This attribute may only be applied to structure types. It indicates
@@ -9110,6 +9056,12 @@ indicate the mode corresponding to a one-byte integer, @code{word} or
@code{__word__} for the mode of a one-word integer, and @code{pointer}
or @code{__pointer__} for the mode used to represent pointers.
+@cindex @code{objc_root_class} type attribute
+@item objc_root_class @r{(Objective-C and Objective-C++ only)}
+This attribute marks a class as being a root class, and thus allows
+the compiler to elide any warnings about a missing superclass and to
+make additional checks for mandatory methods as needed.
+
@cindex @code{packed} type attribute
@item packed
This attribute, attached to a @code{struct}, @code{union}, or C++ @code{class}
@@ -9193,68 +9145,6 @@ is not supported; that is to say, if a given scalar object can be accessed
through distinct types that assign a different storage order to it, then the
behavior is undefined.
-@cindex @code{transparent_union} type attribute
-@item transparent_union
-
-This attribute, attached to a @code{union} type definition, indicates
-that any function parameter having that union type causes calls to that
-function to be treated in a special way.
-
-First, the argument corresponding to a transparent union type can be of
-any type in the union; no cast is required. Also, if the union contains
-a pointer type, the corresponding argument can be a null pointer
-constant or a void pointer expression; and if the union contains a void
-pointer type, the corresponding argument can be any pointer expression.
-If the union member type is a pointer, qualifiers like @code{const} on
-the referenced type must be respected, just as with normal pointer
-conversions.
-
-Second, the argument is passed to the function using the calling
-conventions of the first member of the transparent union, not the calling
-conventions of the union itself. All members of the union must have the
-same machine representation; this is necessary for this argument passing
-to work properly.
-
-Transparent unions are designed for library functions that have multiple
-interfaces for compatibility reasons. For example, suppose the
-@code{wait} function must accept either a value of type @code{int *} to
-comply with POSIX, or a value of type @code{union wait *} to comply with
-the 4.1BSD interface. If @code{wait}'s parameter were @code{void *},
-@code{wait} would accept both kinds of arguments, but it would also
-accept any other pointer type and this would make argument type checking
-less useful. Instead, @code{<sys/wait.h>} might define the interface
-as follows:
-
-@smallexample
-typedef union __attribute__ ((__transparent_union__))
- @{
- int *__ip;
- union wait *__up;
- @} wait_status_ptr_t;
-
-pid_t wait (wait_status_ptr_t);
-@end smallexample
-
-@noindent
-This interface allows either @code{int *} or @code{union wait *}
-arguments to be passed, using the @code{int *} calling convention.
-The program can call @code{wait} with arguments of either type:
-
-@smallexample
-int w1 () @{ int w; return wait (&w); @}
-int w2 () @{ union wait w; return wait (&w); @}
-@end smallexample
-
-@noindent
-With this interface, @code{wait}'s implementation might look like this:
-
-@smallexample
-pid_t wait (wait_status_ptr_t p)
-@{
- return waitpid (-1, p.__ip, 0);
-@}
-@end smallexample
-
@cindex @code{strub} type attribute
@item strub
This attribute defines stack-scrubbing properties of functions and
@@ -9517,6 +9407,79 @@ __attribute__ ((noipa)) void flop (void) @{@}
inline __attribute__ ((noclone, always_inline)) void flip (void) @{@}
@end smallexample
+@cindex @code{transparent_union} type attribute
+@item transparent_union
+
+This attribute, attached to a @code{union} type definition, indicates
+that any function parameter having that union type causes calls to that
+function to be treated in a special way.
+
+First, the argument corresponding to a transparent union type can be of
+any type in the union; no cast is required. Also, if the union contains
+a pointer type, the corresponding argument can be a null pointer
+constant or a void pointer expression; and if the union contains a void
+pointer type, the corresponding argument can be any pointer expression.
+If the union member type is a pointer, qualifiers like @code{const} on
+the referenced type must be respected, just as with normal pointer
+conversions.
+
+Second, the argument is passed to the function using the calling
+conventions of the first member of the transparent union, not the calling
+conventions of the union itself. All members of the union must have the
+same machine representation; this is necessary for this argument passing
+to work properly.
+
+Transparent unions are designed for library functions that have multiple
+interfaces for compatibility reasons. For example, suppose the
+@code{wait} function must accept either a value of type @code{int *} to
+comply with POSIX, or a value of type @code{union wait *} to comply with
+the 4.1BSD interface. If @code{wait}'s parameter were @code{void *},
+@code{wait} would accept both kinds of arguments, but it would also
+accept any other pointer type and this would make argument type checking
+less useful. Instead, @code{<sys/wait.h>} might define the interface
+as follows:
+
+@smallexample
+typedef union __attribute__ ((__transparent_union__))
+ @{
+ int *__ip;
+ union wait *__up;
+ @} wait_status_ptr_t;
+
+pid_t wait (wait_status_ptr_t);
+@end smallexample
+
+@noindent
+This interface allows either @code{int *} or @code{union wait *}
+arguments to be passed, using the @code{int *} calling convention.
+The program can call @code{wait} with arguments of either type:
+
+@smallexample
+int w1 () @{ int w; return wait (&w); @}
+int w2 () @{ union wait w; return wait (&w); @}
+@end smallexample
+
+@noindent
+With this interface, @code{wait}'s implementation might look like this:
+
+@smallexample
+pid_t wait (wait_status_ptr_t p)
+@{
+ return waitpid (-1, p.__ip, 0);
+@}
+@end smallexample
+
+@cindex @code{unavailable} type attribute
+@item unavailable
+@itemx unavailable (@var{msg})
+The @code{unavailable} attribute behaves in the same manner as the
+@code{deprecated} one, but emits an error rather than a warning. It is
+used to indicate that a (perhaps previously @code{deprecated}) type is
+no longer usable.
+
+The @code{unavailable} attribute can also be used for functions and
+variables (@pxref{Function Attributes}, @pxref{Variable Attributes}.)
+
@cindex @code{unused} type attribute
@item unused
When attached to a type (including a @code{union} or a @code{struct}),
@@ -9574,11 +9537,57 @@ and caught in another, the class must have default visibility.
Otherwise the two shared objects are unable to use the same
typeinfo node and exception handling will break.
-@cindex @code{objc_root_class} type attribute
-@item objc_root_class @r{(Objective-C and Objective-C++ only)}
-This attribute marks a class as being a root class, and thus allows
-the compiler to elide any warnings about a missing superclass and to
-make additional checks for mandatory methods as needed.
+@cindex @code{warn_if_not_aligned} type attribute
+@item warn_if_not_aligned (@var{alignment})
+This attribute specifies a threshold for the structure field, measured
+in bytes. If the structure field is aligned below the threshold, a
+warning will be issued. For example, the declaration:
+
+@smallexample
+typedef unsigned long long __u64
+ __attribute__((aligned (4), warn_if_not_aligned (8)));
+
+struct foo
+@{
+ int i1;
+ int i2;
+ __u64 x;
+@};
+@end smallexample
+
+@noindent
+causes the compiler to issue an warning on @code{struct foo}, like
+@samp{warning: alignment 4 of 'struct foo' is less than 8}.
+It is used to define @code{struct foo} in such a way that
+@code{struct foo} has the same layout and the structure field @code{x}
+has the same alignment when @code{__u64} is aligned at either 4 or
+8 bytes. Align @code{struct foo} to 8 bytes:
+
+@smallexample
+struct __attribute__ ((aligned (8))) foo
+@{
+ int i1;
+ int i2;
+ __u64 x;
+@};
+@end smallexample
+
+@noindent
+silences the warning. The compiler also issues a warning, like
+@samp{warning: 'x' offset 12 in 'struct foo' isn't aligned to 8},
+when the structure field has the misaligned offset:
+
+@smallexample
+struct __attribute__ ((aligned (8))) foo
+@{
+ int i1;
+ int i2;
+ int i3;
+ __u64 x;
+@};
+@end smallexample
+
+This warning can be disabled by @option{-Wno-if-not-aligned}.
@end table
@@ -16832,19 +16841,27 @@ void __builtin_bfin_ssync (void);
The following built-in functions are available for eBPF targets.
@defbuiltin{{unsigned long long} __builtin_bpf_load_byte (unsigned long long @var{offset})}
-Load a byte from the @code{struct sk_buff} packet data pointed by the register @code{%r6} and return it.
+Load a byte from the @code{struct sk_buff} packet data pointed to by the
+register @code{%r6}, and return it.
@enddefbuiltin
@defbuiltin{{unsigned long long} __builtin_bpf_load_half (unsigned long long @var{offset})}
-Load 16 bits from the @code{struct sk_buff} packet data pointed by the register @code{%r6} and return it.
+Load 16 bits from the @code{struct sk_buff} packet data pointed to by the
+register @code{%r6}, and return it.
@enddefbuiltin
@defbuiltin{{unsigned long long} __builtin_bpf_load_word (unsigned long long @var{offset})}
-Load 32 bits from the @code{struct sk_buff} packet data pointed by the register @code{%r6} and return it.
+Load 32 bits from the @code{struct sk_buff} packet data pointed to by the
+register @code{%r6}, and return it.
@enddefbuiltin
-@defbuiltin{{void *} __builtin_preserve_access_index (@var{expr})}
-BPF Compile Once-Run Everywhere (CO-RE) support. Instruct GCC to generate CO-RE relocation records for any accesses to aggregate data structures (struct, union, array types) in @var{expr}. This builtin is otherwise transparent, the return value is whatever @var{expr} evaluates to. It is also overloaded: @var{expr} may be of any type (not necessarily a pointer), the return type is the same. Has no effect if @code{-mco-re} is not in effect (either specified or implied).
+@defbuiltin{@var{type} __builtin_preserve_access_index (@var{type} @var{expr})}
+BPF Compile Once-Run Everywhere (CO-RE) support. Instruct GCC to
+generate CO-RE relocation records for any accesses to aggregate
+data structures (struct, union, array types) in @var{expr}. This builtin
+is otherwise transparent; @var{expr} may have any type and its value is
+returned. This builtin has no effect if @code{-mco-re} is not in effect
+(either specified or implied).
@enddefbuiltin
@defbuiltin{{unsigned int} __builtin_preserve_field_info (@var{expr}, unsigned int @var{kind})}
@@ -16946,36 +16963,38 @@ The return value is the enum value in the target kernel.
@defbuiltin{{unsigned int} __builtin_btf_type_id (@var{type}, unsigned int @var{kind})}
BPF Compile Once-Run Everywhere (CO-RE) support. This builtin is used to get
-the BTF type ID of a specified type. Depending on the @var{kind} argument, it
-will either return the ID of the local BTF information, or the BTF type ID in
+the BTF type ID of a specified @var{type}.
+Depending on the @var{kind} argument, it
+either returns the ID of the local BTF information, or the BTF type ID in
the target kernel.
The following values are supported for @var{kind}:
@table @code
@item BTF_TYPE_ID_LOCAL = 0
-Return the local BTF type ID. Always succeeds.
+Return the local BTF type ID. Always succeeds.
@item BTF_TYPE_ID_TARGET = 1
-Return the target BTF type ID. If type does not exist in the target, returns 0.
+Return the target BTF type ID. If @var{type} does not exist in the target,
+returns 0.
@end table
@enddefbuiltin
@defbuiltin{{unsigned int} __builtin_preserve_type_info (@var{type}, unsigned int @var{kind})}
BPF Compile Once-Run Everywhere (CO-RE) support. This builtin performs named
type (struct/union/enum/typedef) verifications. The type of verification
-dependents on the @var{kind} argument provided. This builtin will always
-return 0 if type does not exists in the target kernel.
+depends on the @var{kind} argument provided. This builtin always
+returns 0 if @var{type} does not exist in the target kernel.
The following values are supported for @var{kind}:
@table @code
@item BTF_TYPE_EXISTS = 0
-Checks if type exists in the target.
+Checks if @var{type} exists in the target.
@item BTF_TYPE_MATCHES = 1
-Checks if type matches the local definition in the target kernel.
+Checks if @var{type} matches the local definition in the target kernel.
@item BTF_TYPE_SIZE = 2
-Returns the size of the type within the target.
+Returns the size of the @var{type} within the target.
@end table
@enddefbuiltin
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 01170c0..4d43dda 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -207,7 +207,7 @@ in the following sections.
-fopenmp -fopenmp-simd -fopenmp-target-simd-clone@r{[}=@var{device-type}@r{]}
-fpermitted-flt-eval-methods=@var{standard}
-fplan9-extensions -fsigned-bitfields -funsigned-bitfields
--fsigned-char -funsigned-char -fstrict-flex-arrays[=@var{n}]
+-fsigned-char -funsigned-char -fstrict-flex-arrays[=@var{n}]
-fsso-struct=@var{endianness}}
@item C++ Language Options
@@ -271,8 +271,7 @@ in the following sections.
-Woverloaded-virtual -Wno-pmf-conversions -Wself-move -Wsign-promo
-Wsized-deallocation -Wsuggest-final-methods
-Wsuggest-final-types -Wsuggest-override
--Wno-terminate -Wuseless-cast -Wno-vexing-parse
--Wvirtual-inheritance
+-Wno-terminate -Wno-vexing-parse -Wvirtual-inheritance
-Wno-virtual-move-assign -Wvolatile -Wzero-as-null-pointer-constant}
@item Objective-C and Objective-C++ Language Options
@@ -406,12 +405,12 @@ Objective-C and Objective-C++ Dialects}.
-Wstrict-aliasing=n -Wstrict-overflow -Wstrict-overflow=@var{n}
-Wstring-compare
-Wno-stringop-overflow -Wno-stringop-overread
--Wno-stringop-truncation -Wstrict-flex-arrays
+-Wno-stringop-truncation -Wstrict-flex-arrays
-Wsuggest-attribute=@r{[}pure@r{|}const@r{|}noreturn@r{|}format@r{|}malloc@r{]}
-Wswitch -Wno-switch-bool -Wswitch-default -Wswitch-enum
-Wno-switch-outside-range -Wno-switch-unreachable -Wsync-nand
-Wsystem-headers -Wtautological-compare -Wtrampolines -Wtrigraphs
--Wtrivial-auto-var-init -Wtsan -Wtype-limits -Wundef
+-Wtrivial-auto-var-init -Wno-tsan -Wtype-limits -Wundef
-Wuninitialized -Wunknown-pragmas
-Wunsuffixed-float-constants -Wunused
-Wunused-but-set-parameter -Wunused-but-set-variable
@@ -420,11 +419,12 @@ Objective-C and Objective-C++ Dialects}.
-Wunused-macros
-Wunused-parameter -Wno-unused-result
-Wunused-value -Wunused-variable
+-Wuse-after-free -Wuse-after-free=@var{n} -Wuseless-cast
-Wno-varargs -Wvariadic-macros
-Wvector-operation-performance
-Wvla -Wvla-larger-than=@var{byte-size} -Wno-vla-larger-than
-Wvolatile-register-var -Wwrite-strings
--Wxor-used-as-pow
+-Wno-xor-used-as-pow
-Wzero-length-bounds}
@item Static Analyzer Options
@@ -2945,22 +2945,22 @@ is always just like one of those two.
@opindex fstrict-flex-arrays
@opindex fno-strict-flex-arrays
-@item -fstrict-flex-arrays
-Control when to treat the trailing array of a structure as a flexible array
-member for the purpose of accessing the elements of such an array.
-The positive form is equivalent to @option{-fstrict-flex-arrays=3}, which is the
-strictest. A trailing array is treated as a flexible array member only when it
-is declared as a flexible array member per C99 standard onwards.
-The negative form is equivalent to @option{-fstrict-flex-arrays=0}, which is the
-least strict. All trailing arrays of structures are treated as flexible array
-members.
-
@opindex fstrict-flex-arrays=@var{level}
-@item -fstrict-flex-arrays=@var{level}
+@item -fstrict-flex-arrays @r{(C and C++ only)}
+@itemx -fstrict-flex-arrays=@var{level} @r{(C and C++ only)}
Control when to treat the trailing array of a structure as a flexible array
member for the purpose of accessing the elements of such an array. The value
of @var{level} controls the level of strictness.
+@option{-fstrict-flex-arrays} is equivalent to
+@option{-fstrict-flex-arrays=3}, which is the strictest; all
+trailing arrays of structures are treated as flexible array members.
+
+The negative form @option{-fno-strict-flex-arrays} is equivalent to
+@option{-fstrict-flex-arrays=0}, which is the least strict. In this
+case a trailing array is treated as a flexible array member only when
+it is declared as a flexible array member per C99 standard onwards.
+
The possible values of @var{level} are the same as for the
@code{strict_flex_array} attribute (@pxref{Variable Attributes}).
@@ -2968,6 +2968,10 @@ You can control this behavior for a specific trailing array field of a
structure by using the variable attribute @code{strict_flex_array} attribute
(@pxref{Variable Attributes}).
+The @option{-fstrict_flex_arrays} option interacts with the
+@option{-Wstrict-flex-arrays} option. @xref{Warning Options}, for more
+information.
+
@opindex fsso-struct
@item -fsso-struct=@var{endianness}
Set the default scalar storage order of structures and unions to the
@@ -4814,83 +4818,6 @@ annotations.
Warn about overriding virtual functions that are not marked with the
@code{override} keyword.
-@opindex Wuse-after-free
-@opindex Wno-use-after-free
-@item -Wuse-after-free
-@itemx -Wuse-after-free=@var{n}
-Warn about uses of pointers to dynamically allocated objects that have
-been rendered indeterminate by a call to a deallocation function.
-The warning is enabled at all optimization levels but may yield different
-results with optimization than without.
-
-@table @gcctabopt
-@item -Wuse-after-free=1
-At level 1 the warning attempts to diagnose only unconditional uses
-of pointers made indeterminate by a deallocation call or a successful
-call to @code{realloc}, regardless of whether or not the call resulted
-in an actual reallocatio of memory. This includes double-@code{free}
-calls as well as uses in arithmetic and relational expressions. Although
-undefined, uses of indeterminate pointers in equality (or inequality)
-expressions are not diagnosed at this level.
-@item -Wuse-after-free=2
-At level 2, in addition to unconditional uses, the warning also diagnoses
-conditional uses of pointers made indeterminate by a deallocation call.
-As at level 2, uses in equality (or inequality) expressions are not
-diagnosed. For example, the second call to @code{free} in the following
-function is diagnosed at this level:
-@smallexample
-struct A @{ int refcount; void *data; @};
-
-void release (struct A *p)
-@{
- int refcount = --p->refcount;
- free (p);
- if (refcount == 0)
- free (p->data); // warning: p may be used after free
-@}
-@end smallexample
-@item -Wuse-after-free=3
-At level 3, the warning also diagnoses uses of indeterminate pointers in
-equality expressions. All uses of indeterminate pointers are undefined
-but equality tests sometimes appear after calls to @code{realloc} as
-an attempt to determine whether the call resulted in relocating the object
-to a different address. They are diagnosed at a separate level to aid
-legacy code gradually transition to safe alternatives. For example,
-the equality test in the function below is diagnosed at this level:
-@smallexample
-void adjust_pointers (int**, int);
-
-void grow (int **p, int n)
-@{
- int **q = (int**)realloc (p, n *= 2);
- if (q == p)
- return;
- adjust_pointers ((int**)q, n);
-@}
-@end smallexample
-To avoid the warning at this level, store offsets into allocated memory
-instead of pointers. This approach obviates needing to adjust the stored
-pointers after reallocation.
-@end table
-
-@option{-Wuse-after-free=2} is included in @option{-Wall}.
-
-@opindex Wuseless-cast
-@opindex Wno-useless-cast
-@item -Wuseless-cast @r{(C, Objective-C, C++ and Objective-C++ only)}
-Warn when an expression is cast to its own type. This warning does not
-occur when a class object is converted to a non-reference type as that
-is a way to create a temporary:
-
-@smallexample
-struct S @{ @};
-void g (S&&);
-void f (S&& arg)
-@{
- g (S(arg)); // make arg prvalue so that it can bind to S&&
-@}
-@end smallexample
-
@opindex Wconversion-null
@opindex Wno-conversion-null
@item -Wno-conversion-null @r{(C++ and Objective-C++ only)}
@@ -7739,6 +7666,83 @@ In order to get a warning about an unused function parameter, you must
either specify @option{-Wextra -Wunused} (note that @option{-Wall} implies
@option{-Wunused}), or separately specify @option{-Wunused-parameter}.
+@opindex Wuse-after-free
+@opindex Wno-use-after-free
+@item -Wuse-after-free @r{(C, Objective-C, C++ and Objective-C++ only)}
+@itemx -Wuse-after-free=@var{n}
+Warn about uses of pointers to dynamically allocated objects that have
+been rendered indeterminate by a call to a deallocation function.
+The warning is enabled at all optimization levels but may yield different
+results with optimization than without.
+
+@table @gcctabopt
+@item -Wuse-after-free=1
+At level 1 the warning attempts to diagnose only unconditional uses
+of pointers made indeterminate by a deallocation call or a successful
+call to @code{realloc}, regardless of whether or not the call resulted
+in an actual reallocation of memory. This includes double-@code{free}
+calls as well as uses in arithmetic and relational expressions. Although
+undefined, uses of indeterminate pointers in equality (or inequality)
+expressions are not diagnosed at this level.
+@item -Wuse-after-free=2
+At level 2, in addition to unconditional uses, the warning also diagnoses
+conditional uses of pointers made indeterminate by a deallocation call.
+As at level 2, uses in equality (or inequality) expressions are not
+diagnosed. For example, the second call to @code{free} in the following
+function is diagnosed at this level:
+@smallexample
+struct A @{ int refcount; void *data; @};
+
+void release (struct A *p)
+@{
+ int refcount = --p->refcount;
+ free (p);
+ if (refcount == 0)
+ free (p->data); // warning: p may be used after free
+@}
+@end smallexample
+@item -Wuse-after-free=3
+At level 3, the warning also diagnoses uses of indeterminate pointers in
+equality expressions. All uses of indeterminate pointers are undefined
+but equality tests sometimes appear after calls to @code{realloc} as
+an attempt to determine whether the call resulted in relocating the object
+to a different address. They are diagnosed at a separate level to aid
+gradually transitioning legacy code to safe alternatives. For example,
+the equality test in the function below is diagnosed at this level:
+@smallexample
+void adjust_pointers (int**, int);
+
+void grow (int **p, int n)
+@{
+ int **q = (int**)realloc (p, n *= 2);
+ if (q == p)
+ return;
+ adjust_pointers ((int**)q, n);
+@}
+@end smallexample
+To avoid the warning at this level, store offsets into allocated memory
+instead of pointers. This approach obviates needing to adjust the stored
+pointers after reallocation.
+@end table
+
+@option{-Wuse-after-free=2} is included in @option{-Wall}.
+
+@opindex Wuseless-cast
+@opindex Wno-useless-cast
+@item -Wuseless-cast @r{(C, Objective-C, C++ and Objective-C++ only)}
+Warn when an expression is cast to its own type. This warning does not
+occur when a class object is converted to a non-reference type as that
+is a way to create a temporary:
+
+@smallexample
+struct S @{ @};
+void g (S&&);
+void f (S&& arg)
+@{
+ g (S(arg)); // make arg prvalue so that it can bind to S&&
+@}
+@end smallexample
+
@opindex Wuninitialized
@opindex Wno-uninitialized
@item -Wuninitialized
@@ -8161,28 +8165,31 @@ safe. @xref{Common Variable Attributes}.
@opindex Wstrict-flex-arrays
@opindex Wno-strict-flex-arrays
-@item -Wstrict-flex-arrays
-Warn about inproper usages of flexible array members
+@item -Wstrict-flex-arrays @r{(C and C++ only)}
+Warn about improper usages of flexible array members
according to the @var{level} of the @code{strict_flex_array (@var{level})}
attribute attached to the trailing array field of a structure if it's
available, otherwise according to the @var{level} of the option
-@option{-fstrict-flex-arrays=@var{level}}.
-
-This option is effective only when @var{level} is bigger than 0. Otherwise,
-it will be ignored with a warning.
+@option{-fstrict-flex-arrays=@var{level}}. @xref{Common Variable Attributes},
+for more information about the attribute, and @ref{C Dialect Options} for
+more information about the option. @code{-Wstrict-flex-arrays}
+is effective only when @var{level} is greater than 0.
-when @var{level}=1, warnings will be issued for a trailing array reference
+When @var{level}=1, warnings are issued for a trailing array reference
of a structure that have 2 or more elements if the trailing array is referenced
as a flexible array member.
-when @var{level}=2, in addition to @var{level}=1, additional warnings will be
+When @var{level}=2, in addition to @var{level}=1, additional warnings are
issued for a trailing one-element array reference of a structure
if the array is referenced as a flexible array member.
-when @var{level}=3, in addition to @var{level}=2, additional warnings will be
+When @var{level}=3, in addition to @var{level}=2, additional warnings are
issued for a trailing zero-length array reference of a structure
if the array is referenced as a flexible array member.
+This option is more effective when @option{-ftree-vrp} is active (the
+default for @option{-O2} and above) but some warnings may be diagnosed
+even without optimization.
@opindex Wsuggest-attribute=
@opindex Wno-suggest-attribute=
@@ -9083,14 +9090,13 @@ This warning is enabled by default.
@opindex Wtsan
@opindex Wno-tsan
-@item -Wtsan
-Warn about unsupported features in ThreadSanitizer.
+@item -Wno-tsan
+
+Disable warnings about unsupported features in ThreadSanitizer.
ThreadSanitizer does not support @code{std::atomic_thread_fence} and
can report false positives.
-This warning is enabled by default.
-
@opindex Wtype-limits
@opindex Wno-type-limits
@item -Wtype-limits
@@ -10427,17 +10433,18 @@ and/or writes to register variables. This warning is enabled by
@opindex Wxor-used-as-pow
@opindex Wno-xor-used-as-pow
-@item -Wxor-used-as-pow @r{(C, C++, Objective-C and Objective-C++ only)}
-Warn about uses of @code{^}, the exclusive or operator, where it appears
-the user meant exponentiation. Specifically, the warning occurs when the
+@item -Wno-xor-used-as-pow @r{(C, C++, Objective-C and Objective-C++ only)}
+Disable warnings about uses of @code{^}, the exclusive or operator,
+where it appears the code meant exponentiation.
+Specifically, the warning occurs when the
left-hand side is the decimal constant 2 or 10 and the right-hand side
is also a decimal constant.
In C and C++, @code{^} means exclusive or, whereas in some other languages
(e.g. TeX and some versions of BASIC) it means exponentiation.
-This warning is enabled by default. It can be silenced by converting one
-of the operands to hexadecimal.
+This warning can be silenced by converting one of the operands to
+hexadecimal as well as by compiling with @option{-Wno-xor-used-as-pow}.
@opindex Wdisabled-optimization
@opindex Wno-disabled-optimization
@@ -21166,7 +21173,7 @@ performance of the code. Permissible values for this option are:
@samp{cortex-r82}, @samp{cortex-x1}, @samp{cortex-x1c}, @samp{cortex-x2},
@samp{cortex-x3}, @samp{cortex-x4}, @samp{cortex-a510}, @samp{cortex-a520},
@samp{cortex-a710}, @samp{cortex-a715}, @samp{cortex-a720}, @samp{ampere1},
-@samp{ampere1a}, @samp{ampere1b}, and @samp{native}.
+@samp{ampere1a}, @samp{ampere1b}, @samp{cobalt-100} and @samp{native}.
The values @samp{cortex-a57.cortex-a53}, @samp{cortex-a72.cortex-a53},
@samp{cortex-a73.cortex-a35}, @samp{cortex-a73.cortex-a53},
diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc
index c87153d..6623acc 100644
--- a/gcc/gengtype.cc
+++ b/gcc/gengtype.cc
@@ -4718,8 +4718,8 @@ write_roots (pair_p variables, bool emit_pch)
}
/* Prints not-as-ugly version of a typename of T to OF. Trades the uniquness
- guaranteee for somewhat increased readability. If name conflicts do happen,
- this funcion will have to be adjusted to be more like
+ guarantee for somewhat increased readability. If name conflicts do happen,
+ this function will have to be adjusted to be more like
output_mangled_typename. */
#define INDENT 2
diff --git a/gcc/gimple-lower-bitint.cc b/gcc/gimple-lower-bitint.cc
index 672a9a3..e48125d 100644
--- a/gcc/gimple-lower-bitint.cc
+++ b/gcc/gimple-lower-bitint.cc
@@ -1975,9 +1975,12 @@ bitint_large_huge::handle_stmt (gimple *stmt, tree idx)
case INTEGER_CST:
return handle_operand (gimple_assign_rhs1 (stmt), idx);
CASE_CONVERT:
- case VIEW_CONVERT_EXPR:
return handle_cast (TREE_TYPE (gimple_assign_lhs (stmt)),
gimple_assign_rhs1 (stmt), idx);
+ case VIEW_CONVERT_EXPR:
+ return handle_cast (TREE_TYPE (gimple_assign_lhs (stmt)),
+ TREE_OPERAND (gimple_assign_rhs1 (stmt), 0),
+ idx);
default:
break;
}
@@ -5452,7 +5455,8 @@ vuse_eq (ao_ref *, tree vuse1, void *data)
/* Return true if STMT uses a library function and needs to take
address of its inputs. We need to avoid bit-fields in those
- cases. */
+ cases. Similarly, we need to avoid overlap between destination
+ and source limb arrays. */
bool
stmt_needs_operand_addr (gimple *stmt)
@@ -5571,7 +5575,8 @@ bitint_dom_walker::before_dom_children (basic_block bb)
else if (!bitmap_bit_p (m_loads, SSA_NAME_VERSION (s)))
continue;
- tree rhs1 = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (s));
+ gimple *g = SSA_NAME_DEF_STMT (s);
+ tree rhs1 = gimple_assign_rhs1 (g);
if (needs_operand_addr
&& TREE_CODE (rhs1) == COMPONENT_REF
&& DECL_BIT_FIELD_TYPE (TREE_OPERAND (rhs1, 1)))
@@ -5593,15 +5598,14 @@ bitint_dom_walker::before_dom_children (basic_block bb)
ao_ref ref;
ao_ref_init (&ref, rhs1);
- tree lvop = gimple_vuse (SSA_NAME_DEF_STMT (s));
+ tree lvop = gimple_vuse (g);
unsigned limit = 64;
tree vuse = cvop;
if (vop != cvop
&& is_gimple_assign (stmt)
&& gimple_store_p (stmt)
- && !operand_equal_p (lhs,
- gimple_assign_rhs1 (SSA_NAME_DEF_STMT (s)),
- 0))
+ && (needs_operand_addr
+ || !operand_equal_p (lhs, gimple_assign_rhs1 (g), 0)))
vuse = vop;
if (vuse != lvop
&& walk_non_aliased_vuses (&ref, vuse, false, vuse_eq,
diff --git a/gcc/gimple-ssa-warn-access.cc b/gcc/gimple-ssa-warn-access.cc
index 850aaa0..cd083ab 100644
--- a/gcc/gimple-ssa-warn-access.cc
+++ b/gcc/gimple-ssa-warn-access.cc
@@ -3406,6 +3406,15 @@ pass_waccess::maybe_check_access_sizes (rdwr_map *rwm, tree fndecl, tree fntype,
else
access_nelts = rwm->get (sizidx)->size;
+ /* If access_nelts is e.g. a PARM_DECL with larger precision than
+ sizetype, such as __int128 or _BitInt(34123) parameters,
+ cast it to sizetype. */
+ if (access_nelts
+ && INTEGRAL_TYPE_P (TREE_TYPE (access_nelts))
+ && (TYPE_PRECISION (TREE_TYPE (access_nelts))
+ > TYPE_PRECISION (sizetype)))
+ access_nelts = fold_convert (sizetype, access_nelts);
+
/* Format the value or range to avoid an explosion of messages. */
char sizstr[80];
tree sizrng[2] = { size_zero_node, build_all_ones_cst (sizetype) };
diff --git a/gcc/ipa-polymorphic-call.cc b/gcc/ipa-polymorphic-call.cc
index 8667059..81de6d7 100644
--- a/gcc/ipa-polymorphic-call.cc
+++ b/gcc/ipa-polymorphic-call.cc
@@ -766,7 +766,6 @@ ipa_polymorphic_call_context::set_by_invariant (tree cst,
tree base;
invalid = false;
- off = 0;
clear_outer_type (otr_type);
if (TREE_CODE (cst) != ADDR_EXPR)
diff --git a/gcc/ipa-strub.cc b/gcc/ipa-strub.cc
index a3c5318..e1b0701 100644
--- a/gcc/ipa-strub.cc
+++ b/gcc/ipa-strub.cc
@@ -3174,21 +3174,16 @@ pass_ipa_strub::execute (function *)
resdecl,
build_int_cst (TREE_TYPE (resdecl), 0));
}
- else if (!is_gimple_reg_type (restype))
+ else if (aggregate_value_p (resdecl, TREE_TYPE (thunk_fndecl)))
{
- if (aggregate_value_p (resdecl, TREE_TYPE (thunk_fndecl)))
+ restmp = resdecl;
+
+ if (VAR_P (restmp))
{
- restmp = resdecl;
-
- if (VAR_P (restmp))
- {
- add_local_decl (cfun, restmp);
- BLOCK_VARS (DECL_INITIAL (current_function_decl))
- = restmp;
- }
+ add_local_decl (cfun, restmp);
+ BLOCK_VARS (DECL_INITIAL (current_function_decl))
+ = restmp;
}
- else
- restmp = create_tmp_var (restype, "retval");
}
else
restmp = create_tmp_reg (restype, "retval");
diff --git a/gcc/omp-expand.cc b/gcc/omp-expand.cc
index 6b9c917..2428782 100644
--- a/gcc/omp-expand.cc
+++ b/gcc/omp-expand.cc
@@ -4075,7 +4075,7 @@ expand_omp_for_generic (struct omp_region *region,
/* See if we need to bias by LLONG_MIN. */
if (fd->iter_type == long_long_unsigned_type_node
- && TREE_CODE (type) == INTEGER_TYPE
+ && (TREE_CODE (type) == INTEGER_TYPE || TREE_CODE (type) == BITINT_TYPE)
&& !TYPE_UNSIGNED (type)
&& fd->ordered == 0)
{
@@ -7191,7 +7191,7 @@ expand_omp_taskloop_for_outer (struct omp_region *region,
/* See if we need to bias by LLONG_MIN. */
if (fd->iter_type == long_long_unsigned_type_node
- && TREE_CODE (type) == INTEGER_TYPE
+ && (TREE_CODE (type) == INTEGER_TYPE || TREE_CODE (type) == BITINT_TYPE)
&& !TYPE_UNSIGNED (type))
{
tree n1, n2;
@@ -7352,7 +7352,7 @@ expand_omp_taskloop_for_inner (struct omp_region *region,
/* See if we need to bias by LLONG_MIN. */
if (fd->iter_type == long_long_unsigned_type_node
- && TREE_CODE (type) == INTEGER_TYPE
+ && (TREE_CODE (type) == INTEGER_TYPE || TREE_CODE (type) == BITINT_TYPE)
&& !TYPE_UNSIGNED (type))
{
tree n1, n2;
diff --git a/gcc/omp-general.cc b/gcc/omp-general.cc
index bd4648f..2e31a3f 100644
--- a/gcc/omp-general.cc
+++ b/gcc/omp-general.cc
@@ -115,7 +115,8 @@ omp_adjust_for_condition (location_t loc, enum tree_code *cond_code, tree *n2,
case NE_EXPR:
gcc_assert (TREE_CODE (step) == INTEGER_CST);
- if (TREE_CODE (TREE_TYPE (v)) == INTEGER_TYPE)
+ if (TREE_CODE (TREE_TYPE (v)) == INTEGER_TYPE
+ || TREE_CODE (TREE_TYPE (v)) == BITINT_TYPE)
{
if (integer_onep (step))
*cond_code = LT_EXPR;
@@ -409,6 +410,7 @@ omp_extract_for_data (gomp_for *for_stmt, struct omp_for_data *fd,
loop->v = gimple_omp_for_index (for_stmt, i);
gcc_assert (SSA_VAR_P (loop->v));
gcc_assert (TREE_CODE (TREE_TYPE (loop->v)) == INTEGER_TYPE
+ || TREE_CODE (TREE_TYPE (loop->v)) == BITINT_TYPE
|| TREE_CODE (TREE_TYPE (loop->v)) == POINTER_TYPE);
var = TREE_CODE (loop->v) == SSA_NAME ? SSA_NAME_VAR (loop->v) : loop->v;
loop->n1 = gimple_omp_for_initial (for_stmt, i);
@@ -479,9 +481,17 @@ omp_extract_for_data (gomp_for *for_stmt, struct omp_for_data *fd,
else if (i == 0
|| TYPE_PRECISION (iter_type)
< TYPE_PRECISION (TREE_TYPE (loop->v)))
- iter_type
- = build_nonstandard_integer_type
- (TYPE_PRECISION (TREE_TYPE (loop->v)), 1);
+ {
+ if (TREE_CODE (iter_type) == BITINT_TYPE
+ || TREE_CODE (TREE_TYPE (loop->v)) == BITINT_TYPE)
+ iter_type
+ = build_bitint_type (TYPE_PRECISION (TREE_TYPE (loop->v)),
+ 1);
+ else
+ iter_type
+ = build_nonstandard_integer_type
+ (TYPE_PRECISION (TREE_TYPE (loop->v)), 1);
+ }
}
else if (iter_type != long_long_unsigned_type_node)
{
@@ -747,7 +757,8 @@ omp_extract_for_data (gomp_for *for_stmt, struct omp_for_data *fd,
if (t && integer_zerop (t))
count = build_zero_cst (long_long_unsigned_type_node);
else if ((i == 0 || count != NULL_TREE)
- && TREE_CODE (TREE_TYPE (loop->v)) == INTEGER_TYPE
+ && (TREE_CODE (TREE_TYPE (loop->v)) == INTEGER_TYPE
+ || TREE_CODE (TREE_TYPE (loop->v)) == BITINT_TYPE)
&& TREE_CONSTANT (loop->n1)
&& TREE_CONSTANT (loop->n2)
&& TREE_CODE (loop->step) == INTEGER_CST)
diff --git a/gcc/predict.cc b/gcc/predict.cc
index 84cbe3f..c1c48bf 100644
--- a/gcc/predict.cc
+++ b/gcc/predict.cc
@@ -2404,44 +2404,78 @@ expr_expected_value_1 (tree type, tree op0, enum tree_code code,
if (!bitmap_set_bit (visited, SSA_NAME_VERSION (op0)))
return NULL;
- if (gimple_code (def) == GIMPLE_PHI)
+ if (gphi *phi = dyn_cast <gphi *> (def))
{
/* All the arguments of the PHI node must have the same constant
length. */
- int i, n = gimple_phi_num_args (def);
- tree val = NULL, new_val;
+ int i, n = gimple_phi_num_args (phi);
+ tree val = NULL;
+ bool has_nonzero_edge = false;
+
+ /* If we already proved that given edge is unlikely, we do not need
+ to handle merging of the probabilities. */
+ for (i = 0; i < n && !has_nonzero_edge; i++)
+ {
+ tree arg = PHI_ARG_DEF (phi, i);
+ if (arg == PHI_RESULT (phi))
+ continue;
+ profile_count cnt = gimple_phi_arg_edge (phi, i)->count ();
+ if (!cnt.initialized_p () || cnt.nonzero_p ())
+ has_nonzero_edge = true;
+ }
for (i = 0; i < n; i++)
{
- tree arg = PHI_ARG_DEF (def, i);
+ tree arg = PHI_ARG_DEF (phi, i);
enum br_predictor predictor2;
- /* If this PHI has itself as an argument, we cannot
- determine the string length of this argument. However,
- if we can find an expected constant value for the other
- PHI args then we can still be sure that this is
- likely a constant. So be optimistic and just
- continue with the next argument. */
- if (arg == PHI_RESULT (def))
+ /* Skip self-referring parameters, since they does not change
+ expected value. */
+ if (arg == PHI_RESULT (phi))
continue;
+ /* Skip edges which we already predicted as executing
+ zero times. */
+ if (has_nonzero_edge)
+ {
+ profile_count cnt = gimple_phi_arg_edge (phi, i)->count ();
+ if (cnt.initialized_p () && !cnt.nonzero_p ())
+ continue;
+ }
HOST_WIDE_INT probability2;
- new_val = expr_expected_value (arg, visited, &predictor2,
- &probability2);
+ tree new_val = expr_expected_value (arg, visited, &predictor2,
+ &probability2);
+ /* If we know nothing about value, give up. */
+ if (!new_val)
+ return NULL;
- /* It is difficult to combine value predictors. Simply assume
- that later predictor is weaker and take its prediction. */
- if (*predictor < predictor2)
+ /* If this is a first edge, trust its prediction. */
+ if (!val)
{
+ val = new_val;
*predictor = predictor2;
*probability = probability2;
+ continue;
}
- if (!new_val)
- return NULL;
- if (!val)
- val = new_val;
- else if (!operand_equal_p (val, new_val, false))
+ /* If there are two different values, give up. */
+ if (!operand_equal_p (val, new_val, false))
return NULL;
+
+ int p1 = get_predictor_value (*predictor, *probability);
+ int p2 = get_predictor_value (predictor2, probability2);
+ /* If both predictors agree, it does not matter from which
+ edge we enter the basic block. */
+ if (*predictor == predictor2 && p1 == p2)
+ continue;
+ /* The general case has no precise solution, since we do not
+ know probabilities of incomming edges, yet.
+ Still if value is predicted over all incomming edges, we
+ can hope it will be indeed the case. Conservatively
+ downgrade prediction quality (so first match merging is not
+ performed) and take least successful prediction. */
+
+ *predictor = PRED_COMBINED_VALUE_PREDICTIONS_PHI;
+ *probability = MIN (p1, p2);
}
return val;
}
@@ -2585,6 +2619,10 @@ expr_expected_value_1 (tree type, tree op0, enum tree_code code,
tree res;
tree nop0 = op0;
tree nop1 = op1;
+
+ /* First handle situation where single op is enough to determine final
+ value. In this case we can do better job by avoiding the prediction
+ merging. */
if (TREE_CODE (op0) != INTEGER_CST)
{
/* See if expected value of op0 is good enough to determine the result. */
@@ -2592,12 +2630,18 @@ expr_expected_value_1 (tree type, tree op0, enum tree_code code,
if (nop0
&& (res = fold_build2 (code, type, nop0, op1)) != NULL
&& TREE_CODE (res) == INTEGER_CST)
+ /* We are now getting conservative probability. Consider for
+ example:
+ op0 * op1
+ If op0 is 0 with probability p, then we will ignore the
+ posibility that op0 != 0 and op1 == 0. It does not seem to be
+ worthwhile to downgrade prediciton quality for this. */
return res;
if (!nop0)
nop0 = op0;
}
- enum br_predictor predictor2;
- HOST_WIDE_INT probability2;
+ enum br_predictor predictor2 = PRED_UNCONDITIONAL;
+ HOST_WIDE_INT probability2 = -1;
if (TREE_CODE (op1) != INTEGER_CST)
{
/* See if expected value of op1 is good enough to determine the result. */
@@ -2606,6 +2650,7 @@ expr_expected_value_1 (tree type, tree op0, enum tree_code code,
&& (res = fold_build2 (code, type, op0, nop1)) != NULL
&& TREE_CODE (res) == INTEGER_CST)
{
+ /* Similarly as above we now get conservative probability. */
*predictor = predictor2;
*probability = probability2;
return res;
@@ -2613,24 +2658,40 @@ expr_expected_value_1 (tree type, tree op0, enum tree_code code,
if (!nop1)
nop1 = op1;
}
+ /* We already checked if folding one of arguments to constant is good
+ enough. Consequently failing to fold both means that we will not
+ succeed determining the value. */
if (nop0 == op0 || nop1 == op1)
return NULL;
/* Finally see if we have two known values. */
res = fold_build2 (code, type, nop0, nop1);
- if (TREE_CODE (res) == INTEGER_CST
- && TREE_CODE (nop0) == INTEGER_CST
- && TREE_CODE (nop1) == INTEGER_CST)
+ if (TREE_CODE (res) == INTEGER_CST)
{
- /* Combine binary predictions. */
- if (*probability != -1 || probability2 != -1)
+ HOST_WIDE_INT p1 = get_predictor_value (*predictor, *probability);
+ HOST_WIDE_INT p2 = get_predictor_value (predictor2, probability2);
+
+ /* If one of predictions is sure, such as PRED_UNCONDITIONAL, we
+ can ignore it. */
+ if (p2 == PROB_ALWAYS)
+ return res;
+ if (p1 == PROB_ALWAYS)
{
- HOST_WIDE_INT p1 = get_predictor_value (*predictor, *probability);
- HOST_WIDE_INT p2 = get_predictor_value (predictor2, probability2);
- *probability = RDIV (p1 * p2, REG_BR_PROB_BASE);
+ *predictor = predictor2;
+ *probability = probability2;
+ return res;
}
-
- if (predictor2 < *predictor)
- *predictor = predictor2;
+ /* Combine binary predictions.
+ Since we do not know about independence of predictors, we
+ can not determine value precisely. */
+ *probability = RDIV (p1 * p2, REG_BR_PROB_BASE);
+ /* If we no longer track useful information, give up. */
+ if (!*probability)
+ return NULL;
+ /* Otherwise mark that prediction is a result of combining
+ different heuristics, since we do not want it to participate
+ in first match merging. It is no longer reliable since
+ we do not know if the probabilities are indpenendet. */
+ *predictor = PRED_COMBINED_VALUE_PREDICTIONS;
return res;
}
@@ -2690,6 +2751,8 @@ get_predictor_value (br_predictor predictor, HOST_WIDE_INT probability)
{
case PRED_BUILTIN_EXPECT:
case PRED_BUILTIN_EXPECT_WITH_PROBABILITY:
+ case PRED_COMBINED_VALUE_PREDICTIONS_PHI:
+ case PRED_COMBINED_VALUE_PREDICTIONS:
gcc_assert (probability != -1);
return probability;
default:
diff --git a/gcc/predict.def b/gcc/predict.def
index 10cd73a..0b56784 100644
--- a/gcc/predict.def
+++ b/gcc/predict.def
@@ -94,6 +94,16 @@ DEF_PREDICTOR (PRED_LOOP_ITERATIONS_GUESSED, "guessed loop iterations",
DEF_PREDICTOR (PRED_LOOP_ITERATIONS_MAX, "guessed loop iterations",
PROB_UNINITIALIZED, PRED_FLAG_FIRST_MATCH)
+/* Prediction which is an outcome of combining multiple value predictions. */
+DEF_PREDICTOR (PRED_COMBINED_VALUE_PREDICTIONS,
+ "combined value predictions", PROB_UNINITIALIZED, 0)
+
+/* Prediction which is an outcome of combining multiple value predictions
+ on PHI statement (this is less accurate since we do not know reverse
+ edge probabilities at that time). */
+DEF_PREDICTOR (PRED_COMBINED_VALUE_PREDICTIONS_PHI,
+ "combined value predictions", PROB_UNINITIALIZED, 0)
+
/* Branch containing goto is probably not taken. */
DEF_PREDICTOR (PRED_CONTINUE, "continue", HITRATE (67), 0)
diff --git a/gcc/rust/ChangeLog b/gcc/rust/ChangeLog
index 65a4b1c..c093556 100644
--- a/gcc/rust/ChangeLog
+++ b/gcc/rust/ChangeLog
@@ -1,3 +1,8328 @@
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/tree/rust-hir-pattern.h
+ (TupleStructItems::ItemType::RANGE): Rename to...
+ (TupleStructItems::ItemType::RANGED): ...here.
+ (TupleStructItems::ItemType::NO_RANGE): Rename to...
+ (TupleStructItems::ItemType::MULTIPLE): ...here.
+ (TuplePatternItems::TuplePatternItemType): Rename to...
+ (TuplePatternItems::ItemType): ...here.
+ : Handle renames.
+ * backend/rust-compile-pattern.cc: Likewise.
+ * typecheck/rust-hir-type-check-pattern.cc: Likewise.
+ * checks/errors/borrowck/rust-bir-builder-pattern.h: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lex/rust-lex.cc (Lexer::parse_decimal_int_or_float): Remove
+ additional zero after empty floating point.
+ * parse/rust-parse-impl.h (Parser::left_denotation): Handle float with
+ empty floating point.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::generate_closure_function):
+ Fix reference to node.
+ * backend/rust-mangle.cc (struct V0Path): Modified to accept closures.
+ (v0_crate_path): Modified to accept closures.
+ (v0_closure): New function to mangle closures.
+ (v0_path): Modified to accept closures
+ * util/rust-mapping-common.h (UNKNOWN_NODEID): Change to UINT32_MAX.
+ (UNKNOWN_HIRID): Change to UINT32_MAX.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Move from here...
+ * ast/rust-ast-visitor.h: ... to here.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Move to header
+ file.
+ (TokenCollector::visit_items_joined_by_separator): Likewise.
+ (TokenCollector::visit_as_line): Likewise.
+ (TokenCollector::visit_items_as_lines): Likewise.
+ (TokenCollector::visit_items_as_block): Likewise.
+ * ast/rust-ast-collector.h: Add implementation.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Add visitor for
+ VariadicParam and remove Self parameter visitor from Function visit.
+ * expand/rust-cfg-strip.cc (CfgStrip::maybe_strip_self_param): Remove
+ function.
+ (CfgStrip::maybe_strip_trait_method_decl): Remove self parameter visit.
+ (CfgStrip::maybe_strip_function_params): Handle new function
+ parameters.
+ (CfgStrip::visit): Handle VariadicParam, SelfParam and FunctionParam.
+ * expand/rust-expand-visitor.cc (ExpandVisitor::expand_self_param):
+ Remove function.
+ (ExpandVisitor::expand_trait_method_decl): Do not visit self parameter.
+ (ExpandVisitor::visit): Add visit for VariadicParam, FunctionParam and
+ SelfParam.
+ (ExpandVisitor::expand_function_params): Visit parameters instead.
+ * expand/rust-expand-visitor.h: Update function prototypes.
+ * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Update visit
+ with new parameters.
+ (ResolveTraitItems::visit): Likewise.
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit):
+ Update visit functions with the new visitor functions for VariadicParam
+ SelfParam and FunctionParam.
+ * resolve/rust-early-name-resolver.h: Update function prototypes.
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Update visitor
+ according to the new function parameter structures.
+ * ast/rust-ast-visitor.h: Update prototypes and add visitor virtual
+ functions for SelfParam, FunctionParam and VariadicParam.
+ * ast/rust-ast.cc (Function::Function): Move constructor in
+ implementation instead of header.
+ (Function::operator=): Likewise.
+ (Function::as_string): Update function with pointer dereference.
+ (VariadicParam::as_string): Likewise.
+ (TraitFunctionDecl::as_string): Likewise.
+ (TraitMethodDecl::as_string): Likewise.
+ (FunctionParam::accept_vis): Add function for visitor.
+ (SelfParam::accept_vis): Likewise.
+ (VariadicParam::accept_vis): Likewise.
+ (TraitItemFunc::TraitItemFunc): Move constructor to implementation
+ file.
+ (TraitItemFunc::operator=): Likewise.
+ (TraitItemMethod::TraitItemMethod): Likewise.
+ (TraitItemMethod::operator=): Likewise.
+ * ast/rust-item.h (class Function): Remove self optional member.
+ (class TraitMethodDecl): Likewise.
+ (class TraitFunctionDecl): Likewise.
+ (class Param): Add abstract parameter class.
+ (class SelfParam): Inherit from Param and remove parameter common
+ members.
+ (class FunctionParam): Likewise.
+ (class VariadicParam): Likewise.
+ (struct Visibility): Move structure declaration.
+ (class VisItem): Likewise.
+ * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add
+ a self parameter check during AST validation.
+ * checks/errors/rust-ast-validation.h: Add function prototype.
+ * expand/rust-derive-clone.cc (DeriveClone::clone_fn): Update function
+ constructor.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_self): Rework
+ function for the new parameters.
+ (ASTLoweringBase::visit): Add visit functions for VariadicParam,
+ FunctionParam and SelfParam.
+ * hir/rust-ast-lower-base.h: Update function prototypes.
+ * parse/rust-parse-impl.h (Parser::parse_function): Update function
+ according to new function representation.
+ (Parser::parse_function_param): Return vector of abstract param instead
+ of FunctionParam.
+ (Parser::parse_method): Update according to new representation.
+ (Parser::parse_trait_item): Likewise.
+ (Parser::parse_self_param): Error out with
+ self pointers and prevent the lexer from eating regular function
+ parameters. Update return type.
+ * parse/rust-parse.h: Update function return types.
+ * ast/rust-ast-collector.h: Add VariadicParam visit prototype.
+ * ast/rust-ast.h (struct Visibility): Move struct declaration.
+ (class VisItem): Likewise.
+ * ast/rust-expr.h: Update included files.
+ * checks/errors/rust-feature-gate.h: Add visitor functions for
+ SelfParam, FunctionParam and VariadicParam.
+ * expand/rust-cfg-strip.h: Update function prototypes.
+ * expand/rust-derive.h: Likewise.
+ * hir/rust-ast-lower-implitem.h: Handle special arguments.
+ * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Likewise.
+ * metadata/rust-export-metadata.cc (ExportContext::emit_function):
+ Likewise.
+ * resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Add visitor
+ functions.
+ * resolve/rust-ast-resolve-base.h: Update prototypes.
+ * resolve/rust-ast-resolve-stmt.h: Handle new parameter kind.
+ * resolve/rust-default-resolver.cc (DefaultResolver::visit): Likewise.
+ * resolve/rust-default-resolver.h: Update prototype.
+ * util/rust-attributes.cc (AttributeChecker::visit): Add visitor
+ functions for SelfParam and VariadicParam.
+ * util/rust-attributes.h: Add visit prototypes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add
+ check for additional named argument as well as variadic argument's
+ position.
+ * checks/errors/rust-ast-validation.h: Add visit function prototype for
+ external functions.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-visitor.cc (ContextualASTVisitor::visit): Push the new
+ trait context when visiting a trait.
+ * ast/rust-ast-visitor.h: Add visit function prototype and TRAIT
+ context.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Change
+ reported error location to the lifetime location.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Check if there is
+ a label before visit.
+ * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Emit an
+ error when a label has a forbidden name.
+ * checks/errors/rust-ast-validation.h: Add function prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-expr.h (class BreakExpr): Change Lifetime to LoopLabel.
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Lower lifetime
+ inside the label instead.
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Resolve the
+ inner lifetime.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lex/rust-lex.cc (Lexer::parse_raw_identifier): Use const value.
+ * parse/rust-parse-impl.h (Parser::parse_simple_path_segment):
+ Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lex/rust-lex.cc (RS_TOKEN): Remove local map.
+ (RS_TOKEN_KEYWORD): Likewise.
+ (Lexer::classify_keyword): Change call to utils.
+ * util/rust-keyword-values.cc (get_keywords): Add init function.
+ (RS_TOKEN_KEYWORD): Call to X macro.
+ * util/rust-keyword-values.h: Change from set to a map.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * checks/errors/rust-ast-validation.cc (RS_TOKEN): Remove locale set.
+ (RS_TOKEN_KEYWORD): Likewise.
+ (ASTValidation::visit): Change keyword set call to the one from utils.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Add rust-keyword-values.cc to the list.
+ * util/rust-keyword-values.cc: New file.
+ * util/rust-keyword-values.h: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-attribute-values.h (RUST_ATTRIBUTES_VALUE_H): Remove old
+ header guard.
+ (RUST_ATTRIBUTE_VALUES_H): Add new one.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * checks/errors/rust-ast-validation.cc (RS_TOKEN): Add keyword set.
+ (RS_TOKEN_KEYWORD): Likewise.
+ (ASTValidation::visit): Add validation on lifetime visit.
+ * checks/errors/rust-ast-validation.h: Add function prototype.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-item.h
+ (class Method): Remove.
+ (Function::self_param): New.
+ (Function::has_self_param): New.
+ (Function::Function): Initialize self_param.
+ (Function::operator=): Likewise.
+ (Function::get_self_param): New.
+ * ast/rust-ast.cc
+ (Method::as_string): Remove.
+ (Method::accept_vis): Remove.
+ * ast/rust-ast-collector.cc
+ (TokenCollector::visit):
+ Remove AST::Method visitor, handle self_param in AST::Function visitor.
+ * ast/rust-ast-collector.h
+ (TokenCollector::visit): Remove AST::Method visitor.
+ * ast/rust-ast-full-decls.h (class Method): Remove.
+ * ast/rust-ast-visitor.h
+ (ASTVisitor::visit): Remove AST::Method visitor.
+ (DefaultASTVisitor::visit): Likewise.
+ * ast/rust-ast-visitor.cc
+ (DefaultASTVisitor::visit):
+ Remove AST::Method visitor, handle self_param in AST::Function visitor.
+ * checks/errors/rust-feature-gate.cc
+ (FeatureGate::visit): Remove AST::Method visitor.
+ * checks/errors/rust-feature-gate.h
+ (FeatureGate::visit): Likewise..
+ * expand/rust-cfg-strip.cc
+ (CfgStrip::visit):
+ Remove AST::Method visitor, handle self_param in AST::Function visitor.
+ * expand/rust-cfg-strip.h
+ (CfgStrip::visit): Remove AST::Method visitor.
+ * expand/rust-derive-clone.cc
+ (DeriveClone::clone_fn): Return AST::Function instead of AST::Method.
+ * expand/rust-derive.h (DeriveVisitor::visit): Remove AST::Method visitor.
+ * expand/rust-expand-visitor.cc
+ (ExpandVisitor::visit):
+ Remove AST::Method visitor, handle self_param in AST::Function visitor.
+ * expand/rust-expand-visitor.h:
+ (ExpandVisitor::visit): Remove AST::Method visitor.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
+ * hir/rust-ast-lower-base.h (ASTLoweringBase::visit): Likewise.
+ * hir/rust-ast-lower-implitem.h
+ (ASTLowerImplItem::visit):
+ Remove AST::Method visitor, handle self_param in AST::Function visitor.
+ * parse/rust-parse-impl.h: Include optional.h.
+ (Parser::parse_function): Adjust AST::Function construction.
+ (Parser::parse_inherent_impl_function_or_method):
+ Construct AST::Function instead of AST::Method,
+ adjust AST::Function construction.
+ (Parser::parse_trait_impl_function_or_method): Likewise.
+ (Parser::parse_method):
+ Return std::unique_ptr<AST::Function> instead of AST::Method.
+ * parse/rust-parse.h
+ (Parser::parse_method): Likewise.
+ * resolve/rust-ast-resolve-base.cc
+ (ResolverBase::visit): Remove AST::Method visitor.
+ * resolve/rust-ast-resolve-base.h
+ (ResolverBase::visit): Likewise.
+ * resolve/rust-ast-resolve-implitem.h
+ (ResolveToplevelImplItem::visit): Likewise.
+ * resolve/rust-ast-resolve-item.cc
+ (ResolveItem::visit): Remove AST::Method visitor,
+ handle self_param in AST::Function visitor.
+ * resolve/rust-ast-resolve-item.h
+ (ResolveItem::visit): Remove AST::Method visitor.
+ * resolve/rust-default-resolver.cc
+ (DefaultResolver::visit): Remove AST::Method visitor.
+ * resolve/rust-default-resolver.h
+ (DefaultResolver::visit): Likewise.
+ * resolve/rust-early-name-resolver.cc
+ (EarlyNameResolver::visit): Remove AST::Method visitor,
+ handle self_param in AST::Function visitor.
+ * resolve/rust-early-name-resolver.h
+ (EarlyNameResolver::visit): Remove AST::Method visitor.
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Likewise.
+ * resolve/rust-toplevel-name-resolver-2.0.h
+ (TopLevel::visit): Likewise.
+ * util/rust-attributes.cc
+ (AttributeChecker::visit): Likewise.
+ * util/rust-attributes.h
+ (AttributeChecker::visit): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_named_function_param): Add
+ new parsing ability.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.cc (ExternalFunctionItem::as_string): Adapt as_string
+ function to the new ast representation.
+ (NamedFunctionParam::as_string): Likewise.
+ * ast/rust-item.h: Add a function to test whether a FunctionParam has
+ a name pattern.
+ * expand/rust-cfg-strip.cc (CfgStrip::visit): Adapt cfg strip visitor
+ for the new variadic arguments.
+ * hir/rust-ast-lower-extern.h: Adapt lowering to the new variadic
+ function representation.
+ * metadata/rust-export-metadata.cc (ExportContext::emit_function):
+ Change call to constructor.
+ * parse/rust-parse-impl.h (Parser::parse_named_function_param): Change
+ NamedFunctionParam parsing to accomodate new variadic representation.
+ (Parser::parse_external_item): Change external item parsing to use the
+ new NamedFunctionParam variadics.
+ * parse/rust-parse.h: Add new parsing function prototypes.
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Rework token
+ collection to take into account variadic parameters.
+ * ast/rust-ast-visitor.cc: Likewise.
+ * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Change function
+ bound to avoid getting the type of a variadic parameter.
+ * resolve/rust-ast-resolve-item.cc (ResolveExternItem::visit):
+ Likewise.
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit):
+ Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-item.h (class NamedFunctionParam): Add variadic boolean and
+ another constructor.
+ * hir/rust-ast-lower-extern.h: Avoid last parameter when variadic.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-item.h: Add a getter to check if a given function is
+ variadic.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_function_param): Parse
+ variadic functions.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-item.h (class FunctionParam): Add some informations to
+ function parameters in order to be able to store variadic argument as
+ a function parameter.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Adapt
+ the call to the new visit functions.
+ (ASTValidation::check): Launch the parent class visitor root function.
+ * checks/errors/rust-ast-validation.h (class ASTValidation): Inherit
+ from the contextual visitor.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-visitor.cc (ContextualASTVisitor::visit): Add multiple
+ context saving calls.
+ * ast/rust-ast-visitor.h (class DefaultASTVisitor): Make visit
+ functions virtual.
+ (class ContextualASTVisitor): Add a stack like container for the
+ current context chain.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Add the new visitor object file.
+ * ast/rust-ast-visitor.h (class DefaultASTVisitor): Create the default
+ visitor class.
+ * ast/rust-ast.h: Add a new reference getter for visitor pattern.
+ * ast/rust-ast-visitor.cc: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Add some missing mutable reference getters.
+ * ast/rust-expr.h: Likewise.
+ * ast/rust-item.h: Likewise.
+ * ast/rust-path.h: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Check for presence
+ of a type and use the default value instead of the type.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * checks/errors/rust-ast-validation.cc (ASTValidation::check): Launch
+ check over the whole given crate.
+ (ASTValidation::visit): Implement visitor for some members of the ast.
+ * checks/errors/rust-ast-validation.h: Update some prototype according
+ to implemented visitor functions. Also add a context tracker.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust-session-manager.cc (Session::compile_crate): Add call to ast
+ validation.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lang.opt: Add the new compile options and update the enum values.
+ * rust-session-manager.h (struct CompileOptions): Add the new steps to
+ the enumeration.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Add the new object file the list.
+ * checks/errors/rust-ast-validation.cc: New file.
+ * checks/errors/rust-ast-validation.h: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-cfg-strip.cc (CfgStrip::visit): Add expr value check.
+ * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise.
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit):
+ Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Move implementation from here...
+ * ast/rust-ast.cc (SingleASTNode::SingleASTNode): ...to here.
+ (SingleASTNode::operator=): ...and here...
+ (SingleASTNode::accept_vis): ...and here...
+ (SingleASTNode::is_error): ...and here...
+ (SingleASTNode::as_string): ...also here.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Add override specifier.
+ * ast/rust-item.h: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-macro-invoc-lexer.cc (MacroInvocLexer::split_current_token):
+ Add implementation for multiple token split.
+ * expand/rust-macro-invoc-lexer.h: Add function prototype.
+ * expand/rust-proc-macro-invoc-lexer.cc (ProcMacroInvocLexer::split_current_token):
+ Add implementation for 2+ token split for procedural macros.
+ * expand/rust-proc-macro-invoc-lexer.h: Add function prototype.
+ * lex/rust-lex.cc (Lexer::split_current_token): Add function to split a
+ token in multiple other tokens.
+ * lex/rust-lex.h: Add function prototype for split_current_token.
+ * parse/rust-parse-impl.h (Parser::left_denotation): Handle float tuple
+ index identified as a float literal.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * hir/rust-hir-dump.cc (Dump::visit): Remove obsolete member.
+ * hir/tree/rust-hir-expr.h (class BorrowExpr): Remove obsolete member.
+ * hir/tree/rust-hir.cc (BorrowExpr::as_string): Remove obsolete member.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Fix typo.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-expr.cc
+ (patterns_mergeable): Remove.
+ (struct PatternMerge): Remove.
+ (sort_tuple_patterns): Remove.
+ (simplify_tuple_match): Remove.
+ (CompileExpr::visit): Modify compilation of MatchExpr.
+ * backend/rust-compile-pattern.cc
+ (CompilePatternCaseLabelExpr::visit): Replace with...
+ (CompilePatternCheckExpr::visit): ...this.
+ * backend/rust-compile-pattern.h
+ (class CompilePatternCaseLabelExpr): Replace with...
+ (class CompilePatternCheckExpr): ...this.
+ * backend/rust-compile-type.cc
+ (TyTyResolveCompile::get_implicit_enumeral_node_type):
+ Make enumeral type equivalent to isize.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-base.cc (get_attributes): Add documentation for
+ indices 3 and 4.
+ (get_trait_name): Add documentation for index 1.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Add gcc/rust/backend/rust-compile-proc-macro.cc to the
+ list of file to compile.
+ * backend/rust-compile.cc (attribute_array): Move to
+ rust-compile-proc-macro.cc
+ (derive_proc_macro): Likewise.
+ (bang_proc_macro): Likewise.
+ (attribute_proc_macro): Likewise.
+ (proc_macro_payload): Likewise.
+ (proc_macro): Likewise.
+ (proc_macro_buffer): Likewise.
+ (entrypoint): Likewise.
+ (proc_macro_array): Likewise.
+ (CompileCrate::add_proc_macro_symbols): Likewise.
+ * backend/rust-compile-proc-macro.cc: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile.cc (proc_macro_buffer): Update type builder with
+ array length information.
+ (proc_macro_array): Update type initializer with array length
+ information.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile.cc (build_attribute_array): Renamed from...
+ (attribute_array): ...to attribute array.
+ (build_derive_proc_macro): Likewise from...
+ (derive_proc_macro): ... to derive_proc_macro.
+ (build_bang_proc_macro): Likewise from...
+ (bang_proc_macro): ...to bang_proc_macro.
+ (build_attribute_proc_macro): Likewise from...
+ (attribute_proc_macro): ... to attribute_proc_macro.
+ (build_proc_macro_payload): Likewise from...
+ (proc_macro_payload): to proc_macro_payload.
+ (build_proc_macro): Likewise from...
+ (proc_macro): ...to proc_macro.
+ (build_proc_macro_buffer): Likewise from...
+ (proc_macro_buffer): ... to proc_macro_buffer.
+ (build_entrypoint): Likewise from...
+ (entrypoint): ...to entrypoint.
+ (init_derive_proc_macro): Renamed to it's shorter counterpart.
+ (init_attribute_proc_macro): Likewise.
+ (init_bang_proc_macro): Likewise.
+ (init_proc_macro): Likewise.
+ (initialize_proc_macro_array): Likewise.
+ (proc_macro_array): Likewise.
+ (CompileCrate::add_proc_macro_symbols): Update function calls.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-base.h: Make static function address_expression
+ public.
+ * backend/rust-compile.cc (CompileCrate::add_proc_macro_symbols): Add
+ new global variable in export function.
+ (build_bang_proc_macro): Add a function to build the bang proc macro
+ structure type.
+ (build_proc_macro): Add a function to build the proc macro structure
+ type.
+ (build_proc_macro_payload): Add a function to build the proc macro
+ union used in proc macro structures.
+ (init_derive_proc_macro): Add a function to initialize custom derive
+ proc macros.
+ (init_attribute_proc_macro): Add a function to initialize attribute
+ proc macros.
+ (init_bang_proc_macro): Add a function to initialize bang proc macros.
+ (init_proc_macro): Add a function to initialize proc macro structures.
+ (initialize_proc_macro_array): Add a function to initialize the proc
+ macro buffer array.
+ (CompileCrate::add_proc_macro_symbols): Add call to the new functions
+ to correctly initialize proc macros as well as their entrypoint.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-proc-macro.cc (CustomDeriveProcMacro::CustomDeriveProcMacro):
+ Remove constant string declaration.
+ (load_macros_array): Add call to the new generation function.
+ (generate_proc_macro_decls_symbol): Add a new function to generate the
+ entrypoint symbol name from the stable crate id.
+ (PROC_MACRO_DECLS_FMT_ARGS):
+ New macro to keep formats arguments in sync between each call.
+ * expand/rust-proc-macro.h (generate_proc_macro_decls_symbol): Add
+ function prototype.
+ * rust-system.h: Include <iomanip>.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile.cc (build_attribute_array): Add a function to
+ build the attribute array type.
+ (build_derive_proc_macro): Add a function to build the derive proc
+ macro type.
+ (build_bang_proc_macro): Add a function to build the bang proc macro
+ type.
+ (build_attribute_proc_macro): Add a function to build the attribute
+ proc macro type.
+ (build_proc_macro): Add a function to build the proc macro tagged union
+ type.
+ (build_proc_macro_buffer): Add a function to build the proc macro
+ buffer type.
+ (build_entrypoint): Add a function to build the proc macro entrypoint
+ type.
+ * backend/rust-compile.h: Add function prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-context.h: Add getters.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::setup_fndecl):
+ Make the function non static in order to be able to access the
+ compile context. Also add the whole proc macro infomrmation
+ collection.
+ (get_attributes): Add a function to retrieve the different
+ attributes from a derive procedural macro definition attribute.
+ (get_trait_name): Add a function to retrieve the trait name from
+ a derive procedural macro definition attribute.
+ * backend/rust-compile-base.h: Add function prototypes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::setup_abi_options):
+ Reformat uncorrectly formatted comments.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-context.h (struct CustomDeriveInfo): Add
+ new derive procedural macro metadata information holder for
+ mappings.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Add const getter.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-base.cc (handle_proc_macro_common): Add
+ new attribute "gccrs_proc_macro" to all procedural macro
+ functions.
+ (get_abi): Add a function to retrieve the correct ABI depending
+ on wether the function is a proc macro or not.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::setup_fndecl):
+ Add proc macro handlers dispatch.
+ (handle_proc_macro_common): Add a function for common behavior
+ between all kinds of proc macros.
+ * backend/rust-compile-base.h: Add function prototypes.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::setup_loop): Move.
+ (ExprStmtBuilder::get_label_ctx): Move.
+ (ExprStmtBuilder::get_unnamed_loop_ctx): Moved.
+ (ExprStmtBuilder::visit): BIR improvements.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.h: Refactor.
+ * checks/errors/borrowck/rust-bir-builder-internal.h (class LifetimeResolver):
+ Refactor.
+ (struct BuilderContext): Move.Refactor.
+ (optional_from_ptr): Map on null ptr.
+ * checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h (class LazyBooleanExprBuilder):
+ Refactor.
+ * checks/errors/borrowck/rust-bir-builder-pattern.h: Refactor.
+ * checks/errors/borrowck/rust-bir-builder-struct.h (class StructBuilder): Refactor.
+ * checks/errors/borrowck/rust-bir-builder.h: Refactor.
+ * checks/errors/borrowck/rust-bir-dump.cc (Dump::go): Refactor.
+ (Dump::visit): Refactor.
+ (Dump::visit_place): Refactor.
+ (Dump::visit_move_place): Refactor.
+ (Dump::visit_lifetime): Refactor.
+ * checks/errors/borrowck/rust-bir-dump.h: Refactor.
+ * checks/errors/borrowck/rust-bir-place.h: Refactor.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * checks/errors/borrowck/dev-notes.md: New file.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * checks/errors/borrowck/bir-design-notes.md: New file.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit): Use goto.
+ * checks/errors/borrowck/rust-bir-builder-internal.h: Explicit goto.
+ * checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h: Explicit goto.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit): Continue.
+ (ExprStmtBuilder::setup_loop): Continue.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * checks/errors/borrowck/rust-bir-dump.cc (simplify_cfg): Detech infinite loops.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit): Push ctx.
+ (ExprStmtBuilder::setup_loop): Common loop infractructure setup.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.h: Loop ctx.
+ * checks/errors/borrowck/rust-bir-builder-internal.h (struct BuilderContext): Loop ctx.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * checks/errors/borrowck/rust-bir-dump.cc (Dump::go): Improve jumps dump.
+ (Dump::visit): Improve jumps dump.
+ * checks/errors/borrowck/rust-bir-dump.h (class Dump): Improve jumps dump.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * checks/errors/borrowck/rust-bir-dump.cc (simplify_cfg): Simplify cfg logic.
+ (Dump::go): Run simplify cfg.
+ * checks/errors/borrowck/rust-bir-dump.h: Option to simplify cfg.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * checks/errors/borrowck/rust-bir-dump.cc (Dump::go): Use new print.
+ (print_comma_separated): Comma separation print.
+ (Dump::visit): Use new print.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * Make-lang.in: Build BIR dump.
+ * checks/errors/borrowck/rust-borrow-checker.cc (mkdir_wrapped): Cross-platform mkdir.
+ (dump_function_bir): Save dump to file.
+ (BorrowChecker::go): Run dump during borrowck.
+ * checks/errors/borrowck/rust-bir-dump.cc: New file.
+ * checks/errors/borrowck/rust-bir-dump.h: New file.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * Make-lang.in: Compile BIR expr visitor.
+ * checks/errors/borrowck/rust-borrow-checker.cc (BorrowChecker::go): Use BIR builder.
+ * rust-session-manager.cc (Session::compile_crate): Run borrow checker.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc: New file.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.h: New file.
+ * checks/errors/borrowck/rust-bir-builder-internal.h: New file.
+ * checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h: New file.
+ * checks/errors/borrowck/rust-bir-builder-pattern.h: New file.
+ * checks/errors/borrowck/rust-bir-builder-struct.h: New file.
+ * checks/errors/borrowck/rust-bir-builder.h: New file.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * checks/errors/borrowck/rust-borrow-checker.cc: Include to compile new code.
+ * checks/errors/borrowck/rust-bir-place.h: New file.
+ * checks/errors/borrowck/rust-bir-visitor.h: New file.
+ * checks/errors/borrowck/rust-bir.h: New file.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * lang.opt: CLI flag.
+ * rust-session-manager.cc (Session::compile_crate): Guard execution.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * checks/errors/borrowck/rust-borrow-checker.cc (BorrowChecker::BorrowChecker): Opt dump.
+ (BorrowChecker::go): Opt dump.
+ * checks/errors/borrowck/rust-borrow-checker.h (class BorrowChecker): Opt dump.
+ * lang.opt: Add compile until borrowcheck.
+ * rust-session-manager.cc (Session::enable_dump): Add BIR.
+ (Session::compile_crate): Handle new options.
+ * rust-session-manager.h (struct CompileOptions): Add BIR.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * Make-lang.in: Build borrowck.
+ * checks/errors/borrowck/rust-borrow-checker.cc: New file.
+ * checks/errors/borrowck/rust-borrow-checker.h: New file.
+ * checks/errors/borrowck/rust-function-collector.h: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-pattern.h: Add override modifier to overriding methods.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-item.h: Add a new constructor for const with no value
+ expression.
+ * parse/rust-parse-impl.h (Parser::parse_const_item): Allow const with
+ no expression value.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * hir/tree/rust-hir-path.h: Avoid copy in getter.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Rename method.
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Rename method.
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit): Rename method.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Rename method.
+ * hir/rust-hir-dump.cc (Dump::visit): Rename method.
+ * hir/tree/rust-hir-expr.h: Rename method.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Rename method.
+ * typecheck/rust-tyty.h: Rename method.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * backend/rust-compile-base.cc: Rename method.
+ * backend/rust-compile-expr.cc (sort_tuple_patterns): Rename method.
+ * backend/rust-compile-pattern.cc (CompilePatternCaseLabelExpr::visit): Rename method.
+ (CompilePatternBindings::visit): Rename method.
+ (CompilePatternLet::visit): Rename method.
+ * backend/rust-compile-stmt.cc (CompileStmt::visit): Rename method.
+ * backend/rust-compile-var-decl.h: Rename method.
+ * hir/rust-ast-lower-pattern.cc (ASTLoweringPattern::translate): Rename method.
+ * hir/rust-hir-dump.cc (Dump::visit): Rename method.
+ * hir/tree/rust-hir-path.h: Rename method.
+ * hir/tree/rust-hir-pattern.h: Rename method.
+ * hir/tree/rust-hir.h: Rename method.
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::Resolve): Rename method.
+ (TypeCheckPattern::visit): Rename method.
+ (ClosureParamInfer::visit): Rename method.
+ * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Rename method.
+ * util/rust-hir-map.cc (Mappings::insert_hir_pattern): Rename method.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * hir/tree/rust-hir-expr.h: Add getter for name.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * hir/rust-ast-lower-pattern.cc (ASTLoweringPattern::visit): Implement for tuple pat.
+ * resolve/rust-ast-resolve-pattern.cc (PatternDeclaration::visit): Implement for tupple pat.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * hir/tree/rust-hir-path.h: Avoid copy in getter.
+ * hir/tree/rust-hir-pattern.h: Avoid copy in getter.
+ * hir/tree/rust-hir.h: Avoid copy in getter.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-ast-resolve-implitem.h
+ (ResolveToplevelImplItem::go): Take AssociatedItem as parameter.
+ (ResolveTopLevelTraitItems::go): Likewise.
+ * resolve/rust-ast-resolve-item.cc
+ (ResolveTraitItems::go): Likewise.
+ (ResolveItem::resolve_impl_item): Likewise.
+ (ResolveImplItems::go): Likewise.
+ * resolve/rust-ast-resolve-item.h
+ (ResolveTraitItems::go): Likewise.
+ (ResolveItem::resolve_impl_item): Likewise.
+ (ResolveImplItems::go): Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/rust-ast-lower-implitem.h
+ (ASTLoweringImplItem::translate): Take AssociatedItem as parameter.
+ (ASTLoweringTraitItem::translate): Likewise.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Bail on labelled block.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Add loop ctx.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Resolve using loop logic.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * hir/rust-ast-lower.cc (ASTLoweringBlock::visit): Call loop lowering and add it to constr.
+ * hir/tree/rust-hir-expr.h (class LoopLabel): Move before BlockExpr and add to BlockExpr.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * ast/rust-ast-builder.cc (AstBuilder::block): Add label arg to constructor call.
+ * ast/rust-expr.h (class LoopLabel): Move before BlockExpr.
+ (class BlockExpr): Add LoopLabel member.
+ * expand/rust-derive-clone.cc (DeriveClone::clone_fn): Add label arg to constructor call.
+ * parse/rust-parse-impl.h (Parser::parse_block_expr): Add label parameter.
+ (Parser::parse_labelled_loop_expr): Add label arg to constructor call.
+ * parse/rust-parse.h: Add label arg to constructor call.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast.h
+ (class AssociatedItem):
+ New, based on TraitItem, InherentImplItem, and TraitImplItem classes.
+ (class TraitItem): Inherit from AssociatedItem.
+ (class InherentImplItem): Likewise.
+ (class TraitImplItem): Likewise.
+ * ast/rust-item.h
+ (class Method): Update cloning functions.
+ (class Function): Likewise.
+ (class TypeAlias): Likewise.
+ (class ConstantItem): Likewise.
+ (class TraitItemFunc): Likewise.
+ (class TraitItemMethod): Likewise.
+ (class TraitItemConst): Likewise.
+ (class TraitItemType): Likewise.
+ * ast/rust-macro.h
+ (class MacroInvocation): Likewise.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * backend/rust-mangle.cc (v0_identifier): Fix broken encoding.
+ (v0_scope_path): Modify paramter.
+ (v0_path): Fix namespace for modules.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_closure_expr_pratt): Fix
+ closure parsing function to handle consecutive parameter lists.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-macro.h: Add PATH fragment to follow set restrictions.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::is_macro_rules_def): Add a function
+ that checks tokens given by the lexer represents an accurate macro
+ definition. This will reduce code duplication.
+ (Parser::parse_item): Replace condition with call to new checking
+ function.
+ (Parser::parse_stmt): Likewise.
+ * parse/rust-parse.h: Add function prototype for is_macro_rules_def.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_expr): Fix range from expr.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_item): Relax constraints
+ around default identifier at item scope to accept "default" macros.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_path_expr_segment): Accept
+ left shift tokens in order to let generic parsing function split the
+ token.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast.h
+ (Pattern::get_pattern_node_id): Rename to...
+ (Pattern::get_node_id): ...here.
+ * ast/rust-macro.h
+ (MacroInvocation::get_pattern_node_id): Rename to...
+ (MacroInvocation::get_node_id): ...here.
+ * ast/rust-path.h
+ (PathInExpression::get_pattern_node_id): Remove.
+ (QualifiedPathInExpression::get_pattern_node_id): Remove.
+ * ast/rust-pattern.h
+ (LiteralPattern::get_pattern_node_id): Remove.
+ (IdentifierPattern::get_pattern_node_id): Remove.
+ (WildcardPattern::get_pattern_node_id): Remove.
+ (RestPattern::get_pattern_node_id): Rename to...
+ (RestPattern::get_node_id): ...here.
+ (RangePattern::get_pattern_node_id): Remove.
+ (ReferencePattern::get_pattern_node_id): Remove.
+ (StructPattern::get_pattern_node_id): Remove.
+ (TupleStructPattern::get_pattern_node_id): Remove.
+ (TuplePattern::get_pattern_node_id): Remove.
+ (GroupedPattern::get_pattern_node_id): Remove.
+ (SlicePattern::get_pattern_node_id): Remove.
+ (AltPattern::get_pattern_node_id): Remove.
+ * resolve/rust-early-name-resolver.cc
+ (EarlyNameResolver::visit):
+ Use get_node_id instead of get_pattern_node_id.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_expr): Add comma delimiter.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_visibility): Relax constraints
+ over public visibility return condition in order to accept pub unit
+ types.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * typecheck/rust-tyty.cc (BaseType::is_unit): Refactor.
+ (BaseType::satisfies_bound): Refactor.
+ (BaseType::get_root): Refactor.
+ (BaseType::destructure): Refactor.
+ (BaseType::monomorphized_clone): Refactor.
+ (BaseType::is_concrete): Refactor.
+ (InferType::InferType): Refactor.
+ (InferType::clone): Refactor.
+ (InferType::apply_primitive_type_hint): Refactor.
+ (StructFieldType::is_equal): Refactor.
+ (ADTType::is_equal): Refactor.
+ (handle_substitions): Refactor.
+ (ADTType::handle_substitions): Refactor.
+ (TupleType::TupleType): Refactor.
+ (TupleType::is_equal): Refactor.
+ (TupleType::handle_substitions): Refactor.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * typecheck/rust-tyty.cc (InferType::InferType): Use static constant for kind information.
+ (ErrorType::ErrorType): Use static constant for kind information.
+ (TupleType::TupleType): Use static constant for kind information.
+ (BoolType::BoolType): Use static constant for kind information.
+ (IntType::IntType): Use static constant for kind information.
+ (UintType::UintType): Use static constant for kind information.
+ (FloatType::FloatType): Use static constant for kind information.
+ (USizeType::USizeType): Use static constant for kind information.
+ (ISizeType::ISizeType): Use static constant for kind information.
+ (CharType::CharType): Use static constant for kind information.
+ (ReferenceType::ReferenceType): Use static constant for kind information.
+ (PointerType::PointerType): Use static constant for kind information.
+ (ParamType::ParamType): Use static constant for kind information.
+ (StrType::StrType): Use static constant for kind information.
+ (NeverType::NeverType): Use static constant for kind information.
+ (PlaceholderType::PlaceholderType): Use static constant for kind information.
+ * typecheck/rust-tyty.h: Add static kind information to all TyTy classes.
+ Create safe cast and check methods.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_type_param_bound): Add missing
+ case for lifetime switch.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lex/rust-token.cc (Token::as_string): Update function to output scope
+ resolution tokens correctly.
+ * parse/rust-parse-impl.h (Parser::parse_generic_param): Change call to
+ as_string.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * backend/rust-compile-context.h: Modify declaration.
+ * backend/rust-mangle.cc (struct V0Path): New struct.
+ (v0_path): New function.
+ (legacy_mangle_name): Take Context as argument.
+ (v0_numeric_prefix): Fix type strings.
+ (v0_complex_type_prefix): New function.
+ (v0_add_integer_62): Deleted
+ (v0_integer_62): New function.
+ (v0_add_opt_integer_62): Deleted.
+ (v0_opt_integer_62): New function.
+ (v0_add_disambiguator): Deleted.
+ (v0_disambiguator): New function.
+ (v0_type_prefix): Support more types.
+ (v0_generic_args): New function.
+ (v0_add_identifier): Deleted.
+ (v0_identifier): New function.
+ (v0_type_path): New function.
+ (v0_function_path): New function.
+ (v0_scope_path): New function.
+ (v0_crate_path): New function.
+ (v0_inherent_or_trait_impl_path): New function.
+ (v0_mangle_item): Use v0_path.
+ (Mangler::mangle_item): Take Context as argument.
+ * backend/rust-mangle.h (class Context): Add forward declaration.
+ * hir/tree/rust-hir-item.h: Fix include.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/tree/rust-hir-pattern.h
+ (TupleStructItems::clone_tuple_struct_items_impl): Rename to...
+ (TupleStructItems::clone_tuple_items_impl): ...here.
+ (TupleStructItemsNoRange::clone_tuple_struct_items_impl): Rename to...
+ (TupleStructItemsNoRange::clone_tuple_items_impl): ...here.
+ (TupleStructItemsRange::clone_tuple_struct_items_impl): Rename to...
+ (TupleStructItemsRange::clone_tuple_items_impl): ...here.
+ (TuplePatternItems::clone_tuple_pattern_items_impl): Rename to...
+ (TuplePatternItems::clone_tuple_items_impl): ...here.
+ (TuplePatternItemsMultiple::clone_tuple_pattern_items_impl): Rename to...
+ (TuplePatternItemsMultiple::clone_tuple_items_impl): ...here.
+ (TuplePatternItemsRanged::clone_tuple_pattern_items_impl): Rename to...
+ (TuplePatternItemsRanged::clone_tuple_items_impl): ...here.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/tree/rust-hir-pattern.h
+ (TuplePatternItems::get_pattern_type): Rename to...
+ (TuplePatternItems::get_item_type): ...here.
+ (TuplePatternItemsMultiple::get_pattern_type): Rename to...
+ (TuplePatternItemsMultiple::get_item_type): ...here.
+ (TuplePatternItemsRanged::get_pattern_type): Rename to...
+ (TuplePatternItemsRanged::get_item_type): ...here.
+ * backend/rust-compile-expr.cc: Adjust calls to renamed methods.
+ * backend/rust-compile-pattern.cc: Likewise.
+ * typecheck/rust-hir-type-check-pattern.cc: Likewise.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Merge 2 if clauses.
+ * backend/rust-compile-extern.h: Fix typo in comment.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * parse/rust-parse-impl.h: Add missing token consumption
+
+2024-01-16 Mohammed Rizan Farooqui <rizanfarooqui@gmail.com>
+
+ * expand/rust-macro-builtins.cc (MacroBuiltin::include_str_handler): Comment removed
+ (MacroBuiltin::env_handler): Comment removed
+ (MacroBuiltin::cfg_handler): Comment removed
+ (MacroBuiltin::line_handler): Comment removed
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * backend/rust-compile.cc (HIRCompileBase::coercion_site1): Fix wrong cast
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust-session-manager.cc (Session::expansion): Add early break on
+ error.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * util/rust-canonical-path.h: Add new segment kind for inherent impl.
+ * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Use it.
+ * resolve/rust-ast-resolve-toplevel.h: Use it.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-expr.h: Fix spelling of "doesn't".
+ * backend/rust-compile-expr.cc: Fix spelling of "accessors".
+ * backend/rust-compile-implitem.h: Fix spelling of "normal".
+ * backend/rust-constexpr.cc: Fix spelling of "actual".
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/rust-hir-dump.cc (Dump::debug): New.
+ (debug): New.
+ * hir/rust-hir-dump.h (debug): New.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * Make-lang.in: fixup formatting
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): remove old check
+ * rust-session-manager.cc (Session::compile_crate): call new lint
+ * resolve/rust-ast-verify-assignee.h: Removed.
+ * checks/errors/rust-readonly-check.cc: New file.
+ * checks/errors/rust-readonly-check.h: New file.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit):
+ Added ErrorCode & more fixit hints.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-block.h: remove HIR::ForLoopExpr
+ * backend/rust-compile-expr.h: likewise
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): likewise
+ * checks/errors/privacy/rust-privacy-reporter.h: likewise
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit): likewise
+ * checks/errors/rust-const-checker.h: likewise
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): likewise
+ * checks/errors/rust-unsafe-checker.h: likewise
+ * checks/lints/rust-lint-marklive.h: likewise
+ * hir/rust-ast-lower.cc (ASTLoweringExprWithBlock::visit): likewise
+ * hir/rust-hir-dump.cc (Dump::visit): likewise
+ * hir/rust-hir-dump.h: likewise
+ * hir/tree/rust-hir-expr.h (class ForLoopExpr): likewise
+ * hir/tree/rust-hir-full-decls.h (class ForLoopExpr): likewise
+ * hir/tree/rust-hir-visitor.h: likewise
+ * hir/tree/rust-hir.cc (ForLoopExpr::as_string): likewise
+ (ForLoopExpr::accept_vis): likewise
+ * typecheck/rust-hir-type-check-expr.h: likewise
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Fix typo in varIadic.
+ * backend/rust-compile-type.cc (TyTyResolveCompile::visit): Likewise.
+ * rust-backend.h (function_type_varadic): Rename into ...
+ (function_type_variadic): ... this.
+ * rust-gcc.cc (function_type_varadic): Rename into ...
+ (function_type_variadic): ... this.
+ * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Likewise.
+ * typecheck/rust-tyty.h (is_varadic): Renamed into ...
+ (is_variadic): ... this.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::compile_function):
+ Fix typo in substitutions.
+ (HIRCompileBase::resolve_method_address): Likewise.
+ * backend/rust-compile-extern.h (CompileExternItem::visit):
+ Likewise.
+ * backend/rust-compile-implitem.cc (CompileTraitItem::visit):
+ Likewise.
+ * backend/rust-compile-intrinsic.cc (maybe_override_ctx):
+ Likewise.
+ * backend/rust-compile-item.cc (CompileItem::visit): Likewise.
+ * backend/rust-compile-resolve-path.cc
+ (HIRCompileBase::query_compile): Likewise.
+ * typecheck/rust-coercion.cc (TypeCoercionRules::do_coercion):
+ Likewise.
+ * typecheck/rust-hir-type-check-item.cc
+ (TypeCheckItem::ResolveImplBlockSelfWithInference): Likewise.
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit):
+ Likewise.
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit):
+ Likewise.
+ * typecheck/rust-tyty.cc (BaseType::has_subsititions_defined):
+ Renamed into ...
+ (BaseType::has_substitutions_defined): ... this.
+ (ADTType::is_equal): Fix typo in substitutions.
+ (handle_substitions): Likewise.
+ (FnType::is_equal): Likewise.
+ (FnType::handle_substitions): Likewise.
+ * typecheck/rust-tyty.h (has_subsititions_defined): Renamed into
+ ...
+ (has_substitutions_defined): ... this.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-intrinsic.cc
+ (get_identifier): Add declaration.
+ (assume_handler): New.
+ (generic_intrinsics): Add assume_handler entry.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-gcc.cc
+ (Backend::wchar_type): Store static wchar tree.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h
+ (complex_type): Remove.
+ (complex_constant_expression): Remove.
+ (real_part_expression): Remove.
+ (imag_part_expression): Remove.
+ (complex_expression): Remove.
+ * rust-gcc.cc
+ (complex_type): Remove.
+ (complex_constant_expression): Remove.
+ (real_part_expression): Remove.
+ (imag_part_expression): Remove.
+ (complex_expression): Remove.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-gcc.cc
+ (namespace Backend):
+ Use namespace definition instead of qualified names.
+
+2024-01-16 liushuyu <liushuyu011@gmail.com>
+
+ * backend/rust-compile-intrinsic.cc: add `copy`
+ intrinsics and make `copy_nonoverlapping` handler more generic
+
+2024-01-16 liushuyu <liushuyu011@gmail.com>
+
+ * backend/rust-builtins.cc: add `expect` builtin definition.
+ * backend/rust-compile-intrinsic.cc: add `likely` and `unlikely`
+ intrinsics handler.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust_error_codes.def: Moved to...
+ * rust-error-codes.def: ...here...
+ * rust-diagnostics.h: ...and update references.
+
+2024-01-16 Guillaume Gomez <guillaume1.gomez@gmail.com>
+
+ * backend/rust-compile-intrinsic.cc: Simplify `make_unsigned_long_tree`
+ * rust-backend.h: Remove `integer_constant_expression`
+ * rust-gcc.cc: Remove `integer_constant_expression`
+
+2024-01-16 Dave Evans <dave@dmetwo.org>
+
+ * backend/rust-compile-pattern.cc (CompilePatternCaseLabelExpr::visit):
+ Add AltPattern visitor function
+ * backend/rust-compile-pattern.h:
+ Update CompilePatternCaseLabelExpr::visit(AltPattern&).
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
+ Update AltPattern visitor
+
+2024-01-16 Guillaume Gomez <guillaume1.gomez@gmail.com>
+
+ * backend/rust-compile-intrinsic.cc: Remove unused argument
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ Added new error message, rich location and error code.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h
+ (class Backend): Convert to ...
+ (namespace Backend): ... namespace.
+ * rust-gcc.cc
+ (Backend::Backend): Rename to ...
+ (Backend::init): ... here.
+ (rust_get_backend): Remove.
+ * rust-session-manager.cc
+ (rust_get_backend): Remove.
+ (Session::init): Use Backend::init instead of rust_get_backend.
+ (Session::compile_crate):
+ Initialize Context without pointer to Backend.
+ * rust-session-manager.h
+ (Session::backend): Remove.
+ * backend/rust-compile-context.cc
+ (Context::Context): Remove pointer to Backend.
+ * backend/rust-compile-context.h
+ (class Context): Remove pointer to Backend, update function calls.
+ * backend/rust-compile-base.cc: Update function calls.
+ * backend/rust-compile-block.cc: Likewise.
+ * backend/rust-compile-expr.cc: Likewise.
+ * backend/rust-compile-extern.h: Likewise.
+ * backend/rust-compile-fnparam.cc: Likewise.
+ * backend/rust-compile-intrinsic.cc: Likewise.
+ * backend/rust-compile-item.cc: Likewise.
+ * backend/rust-compile-pattern.cc: Likewise.
+ * backend/rust-compile-resolve-path.cc: Likewise.
+ * backend/rust-compile-type.cc: Likewise.
+ * backend/rust-compile-var-decl.h: Likewise.
+ * backend/rust-compile.cc: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.cc (Attribute::check_cfg_predicate): Change raw
+ string to constexpr call.
+ (Attribute::separate_cfg_attrs): Likewise.
+ * backend/rust-compile-base.cc (should_mangle_item): Likewise.
+ (HIRCompileBase::setup_fndecl): Likewise.
+ (HIRCompileBase::handle_cold_attribute_on_fndecl): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc (find_proc_macro_attribute):
+ Likewise.
+ * checks/errors/rust-unsafe-checker.cc (check_target_attr):
+ Likewise.
+ * expand/rust-cfg-strip.cc (fails_cfg): Likewise.
+ (fails_cfg_with_expand): Likewise.
+ (expand_cfg_attrs): Likewise.
+ * expand/rust-macro-builtins.cc: Likewise.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::handle_outer_attributes): Likewise.
+ (ASTLoweringBase::lower_macro_definition): Likewise.
+ * hir/rust-hir-dump.cc (Dump::visit): Likewise.
+ * parse/rust-parse-impl.h (Parser::parse_doc_comment): Likewise.
+ * parse/rust-parse.cc (extract_module_path): Likewise.
+ * resolve/rust-early-name-resolver.cc (is_macro_use_module):
+ Likewise.
+ (EarlyNameResolver::visit): Likewise.
+ * resolve/rust-toplevel-name-resolver-2.0.cc (is_macro_export):
+ Likwise.
+ * rust-session-manager.cc (Session::injection): Likewise.
+ * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::parse_repr_options): Likewise.
+ * util/rust-attributes.cc (is_proc_macro_type): Likewise.
+ (AttributeChecker::check_attribute): Likewise.
+ (AttributeChecker::visit): Likewise.
+ * util/rust-hir-map.cc (Mappings::insert_macro_def): Likewise.
+ * util/rust-attribute-values.h: New file.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h
+ (Backend::Backend): New.
+ (Backend::~Backend): Remove.
+ (class Gcc_backend): Remove.
+ * rust-gcc.cc
+ (Gcc_backend::Gcc_backend): Rename to ...
+ (Backend::Backend): ... here.
+ (rust_get_backend): Construct Backend instead of Gcc_backend.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-proc-macro.cc (tokenstream_from_string): Change
+ linemap null pointer to the current linemap.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit):
+ Add proc macro definition insertion.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-hir-map.cc (Mappings::insert_derive_proc_macro_def):
+ Change the function body to fetch the node id from the macro
+ parameter.
+ (Mappings::insert_bang_proc_macro_def): Likewise.
+ (Mappings::insert_attribute_proc_macro_def): Likewise.
+ * util/rust-hir-map.h: Update the function's prototype by
+ removing the node id from the list of arguments.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc (Early::visit_attributes):
+ Add proc macro handle retrieval for attribute and derive proc macros.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-hir-map.cc (Mappings::lookup_derive_proc_macro_def):
+ Update function to accomodate new signature.
+ (Mappings::lookup_bang_proc_macro_def): Likewise.
+ (Mappings::lookup_attribute_proc_macro_def): Likewise.
+ * util/rust-hir-map.h: Update function signatures.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-macro-expand.h (struct MacroExpander): Update
+ lookup function prototypes.
+ * util/rust-hir-map.cc (Mappings::lookup_derive_proc_macro_invocation):
+ Update lookup function according to new signature.
+ (Mappings::lookup_bang_proc_macro_invocation): Likewise.
+ (Mappings::lookup_attribute_proc_macro_invocation): Likewise.
+ * util/rust-hir-map.h: Update function prototypes.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h
+ (Backend::write_export_data): Remove.
+ * rust-gcc.cc
+ (Backend::write_export_data): Remove.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h
+ (Backend::real_part_expression): Make non-virtual.
+ (Backend::imag_part_expression): Likewise.
+ (Backend::complex_expression): Likewise.
+ (Backend::convert_expression): Likewise.
+ (Backend::struct_field_expression): Likewise.
+ (Backend::compound_expression): Likewise.
+ (Backend::conditional_expression): Likewise.
+ (Backend::negation_expression): Likewise.
+ (Backend::arithmetic_or_logical_expression): Likewise.
+ (Backend::arithmetic_or_logical_expression_checked): Likewise.
+ (Backend::comparison_expression): Likewise.
+ (Backend::lazy_boolean_expression): Likewise.
+ (Backend::constructor_expression): Likewise.
+ (Backend::array_constructor_expression): Likewise.
+ (Backend::array_initializer): Likewise.
+ (Backend::array_index_expression): Likewise.
+ (Backend::call_expression): Likewise.
+ (Gcc_backend::real_part_expression): Remove.
+ (Gcc_backend::imag_part_expression): Remove.
+ (Gcc_backend::complex_expression): Remove.
+ (Gcc_backend::convert_expression): Remove.
+ (Gcc_backend::struct_field_expression): Remove.
+ (Gcc_backend::compound_expression): Remove.
+ (Gcc_backend::conditional_expression): Remove.
+ (Gcc_backend::negation_expression): Remove.
+ (Gcc_backend::arithmetic_or_logical_expression): Remove.
+ (Gcc_backend::arithmetic_or_logical_expression_checked): Remove.
+ (Gcc_backend::comparison_expression): Remove.
+ (Gcc_backend::lazy_boolean_expression): Remove.
+ (Gcc_backend::constructor_expression): Remove.
+ (Gcc_backend::array_constructor_expression): Remove.
+ (Gcc_backend::array_initializer): Remove.
+ (Gcc_backend::array_index_expression): Remove.
+ (Gcc_backend::call_expression): Remove.
+ * rust-gcc.cc
+ (Gcc_backend::real_part_expression): Rename to ...
+ (Backend::real_part_expression): ... here.
+ (Gcc_backend::imag_part_expression): Rename to ...
+ (Backend::imag_part_expression): ... here.
+ (Gcc_backend::complex_expression): Rename to ...
+ (Backend::complex_expression): ... here.
+ (Gcc_backend::convert_expression): Rename to ...
+ (Backend::convert_expression): ... here.
+ (Gcc_backend::struct_field_expression): Rename to ...
+ (Backend::struct_field_expression): ... here.
+ (Gcc_backend::compound_expression): Rename to ...
+ (Backend::compound_expression): ... here.
+ (Gcc_backend::conditional_expression): Rename to ...
+ (Backend::conditional_expression): ... here.
+ (Gcc_backend::negation_expression): Rename to ...
+ (Backend::negation_expression): ... here.
+ (Gcc_backend::arithmetic_or_logical_expression): Rename to ...
+ (Backend::arithmetic_or_logical_expression): ... here.
+ (Gcc_backend::arithmetic_or_logical_expression_checked): Rename to ...
+ (Backend::arithmetic_or_logical_expression_checked): ... here.
+ (Gcc_backend::comparison_expression): Rename to ...
+ (Backend::comparison_expression): ... here.
+ (Gcc_backend::lazy_boolean_expression): Rename to ...
+ (Backend::lazy_boolean_expression): ... here.
+ (Gcc_backend::constructor_expression): Rename to ...
+ (Backend::constructor_expression): ... here.
+ (Gcc_backend::array_constructor_expression): Rename to ...
+ (Backend::array_constructor_expression): ... here.
+ (Gcc_backend::array_initializer): Rename to ...
+ (Backend::array_initializer): ... here.
+ (Gcc_backend::array_index_expression): Rename to ...
+ (Backend::array_index_expression): ... here.
+ (Gcc_backend::call_expression): Rename to ...
+ (Backend::call_expression): ... here.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust-session-manager.cc (Session::load_extern_crate): Change
+ variable name, add temporaries and comments.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-proc-macro.h: Change get_trait_name to get_name in
+ order to be coherent with the others proc macro type name
+ convention.
+ * resolve/rust-toplevel-name-resolver-2.0.cc (insert_macros):
+ Add a templated funtion that inserts a proc macro into the
+ context and emit an error on failure.
+ (TopLevel::visit): Change from manual insertion to a function
+ call.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit):
+ Change to assertion.
+ * util/rust-hir-map.cc (Mappings::lookup_derive_proc_macros):
+ Add empty line.
+ (Mappings::lookup_bang_proc_macros): Likewise.
+ (Mappings::lookup_attribute_proc_macros): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * metadata/rust-extern-crate.cc (ExternCrate::ExternCrate):
+ Update definition to allow Extern crate with no content (pure
+ proc macros).
+ (ExternCrate::ok): Panic on no content.
+ (ExternCrate::load): Likewise.
+ * metadata/rust-extern-crate.h: Update prototypes.
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::go):
+ Remove macro resolution.
+ (TopLevel::visit): Likewise.
+ * resolve/rust-toplevel-name-resolver-2.0.h: Add visit prototype
+ for extern crate.
+ * rust-session-manager.cc (Session::load_extern_crate): Adapt
+ content depending on the loaded crate's content.
+ * util/rust-hir-map.cc (Mappings::lookup_derive_proc_macros):
+ Change return type to optional because it is way more
+ convenient.
+ (Mappings::lookup_bang_proc_macros): Likewise.
+ (Mappings::lookup_attribute_proc_macros): Likewise.
+ * util/rust-hir-map.h: Update function prototypes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * metadata/rust-imports.cc (Import::try_package_in_directory):
+ Remove error when some macro are found even if no import data is
+ available.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h (class BangProcMacro): Move class from here to
+ rust-proc-macro.h. Also remove related functions.
+ (class AttributeProcMacro): Likewise.
+ (class CustomDeriveProcMacro): Likewise.
+ (struct Crate): Remove proc macro vector members.
+ * expand/rust-macro-expand.h (struct MacroExpander): Change the
+ type to the newly created classes.
+ * expand/rust-proc-macro.cc (BangProcMacro::BangProcMacro): Add
+ constructor implementation.
+ (AttributeProcMacro::AttributeProcMacro): Likewise.
+ (CustomDeriveProcMacro::CustomDeriveProcMacro): Likewise.
+ * expand/rust-proc-macro.h (class BangProcMacro): Move class to
+ here.
+ (class AttributeProcMacro): Likewise.
+ (class CustomDeriveProcMacro): Likewise.
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::go):
+ Change top level visitor to check mappings instead
+ * rust-session-manager.cc (Session::load_extern_crate):
+ Add back macro collection to mappings.
+ * util/rust-hir-map.cc (Mappings::insert_derive_proc_macros):
+ Update getter signature with new types.
+ (Mappings::insert_bang_proc_macros): Likewise.
+ (Mappings::insert_attribute_proc_macros): Likewise.
+ (Mappings::lookup_derive_proc_macros): Likewise.
+ (Mappings::lookup_bang_proc_macros): Likewise.
+ (Mappings::lookup_attribute_proc_macros): Likewise.
+ (Mappings::insert_derive_proc_macro_def): Likewise.
+ (Mappings::insert_bang_proc_macro_def): Likewise.
+ (Mappings::insert_attribute_proc_macro_def): Likewise.
+ (Mappings::lookup_derive_proc_macro_def): Likewise.
+ (Mappings::lookup_bang_proc_macro_def): Likewise.
+ (Mappings::lookup_attribute_proc_macro_def): Likewise.
+ (Mappings::insert_derive_proc_macro_invocation): Likewise.
+ (Mappings::lookup_derive_proc_macro_invocation): Likewise.
+ (Mappings::insert_bang_proc_macro_invocation): Likewise.
+ (Mappings::lookup_bang_proc_macro_invocation): Likewise.
+ (Mappings::insert_attribute_proc_macro_invocation): Likewise.
+ (Mappings::lookup_attribute_proc_macro_invocation): Likewise.
+ * util/rust-hir-map.h: Update function prototypes as well as map
+ types.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::go):
+ Visit crate's newly stored proc macros.
+ * rust-session-manager.cc (Session::load_extern_crate):
+ Store proc macros in the parsed crate instead of a local
+ variable to achieve mappings.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc (Early::visit_attributes):
+ Change argument to reference.
+ * resolve/rust-early-name-resolver-2.0.h: Update function
+ prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Add getters.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h (struct Crate): Add proc macro members.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h (class BangProcMacro): Add new proc macro
+ abstraction.
+ (class AttributeProcMacro): Likewise.
+ (class CustomDeriveProcMacro): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc (Early::visit_attributes):
+ Add function to handle attributes.
+ (Early::visit): Override visitor functions.
+ * resolve/rust-early-name-resolver-2.0.h: Add prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.cc (Attribute::get_traits_to_derive): Convert
+ tokenstream to path list.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.cc (Attribute::is_derive): Remove tokenstream
+ condition.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.cc (Attribute::get_traits_to_derive): Change
+ return type to a vector of references.
+ * ast/rust-ast.h: Update constructor.
+ * expand/rust-expand-visitor.cc (ExpandVisitor::expand_inner_stmts):
+ Update function call.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.cc (Attribute::get_traits_to_derive): Add
+ function as member function.
+ * ast/rust-ast.h: Add prototype.
+ * expand/rust-expand-visitor.cc (get_traits_to_derive): Remove
+ function.
+ (ExpandVisitor::expand_inner_stmts): Update function call.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.cc (Attribute::is_derive): Add member function.
+ * ast/rust-ast.h: Likewise.
+ * expand/rust-expand-visitor.cc (is_derive): Remove old
+ function.
+ (ExpandVisitor::expand_inner_stmts): Update function call.
+ (ExpandVisitor::visit_inner_using_attrs): Likewise.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): use a temp for the value
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h
+ (Backend::block): Make non-virtual.
+ (Backend::block_add_statements): Likewise.
+ (Gcc_backend::block): Remove.
+ (Gcc_backend::block_add_statements): Remove.
+ * rust-gcc.cc
+ (Gcc_backend::block): Rename to ...
+ (Backend::block): ... here.
+ (Gcc_backend::block_add_statements): Rename to ...
+ (Backend::block_add_statements): ... here.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-macro-expand.h: Change include directive with the
+ new name.
+ * expand/rust-proc-macro.h (RUST_PROC_MACRO_H): Likewise.
+ * util/rust-hir-map.h: Likewise.
+ * util/rust-token-converter.h: Likewise.
+ * util/rust-token-converter.cc: Remove useless include
+ directive.
+ * Make-lang.in: Rename library.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h
+ (Backend::init_statement): Make non-virtual.
+ (Backend::assignment_statement): Likewise.
+ (Backend::return_statement): Likewise.
+ (Backend::if_statement): Likewise.
+ (Backend::loop_expression): Likewise.
+ (Backend::exit_expression): Likewise.
+ (Backend::compound_statement): Likewise.
+ (Backend::statement_list): Likewise.
+ (Backend::exception_handler_statement): Likewise.
+ (Gcc_backend::init_statement): Remove.
+ (Gcc_backend::assignment_statement): Remove.
+ (Gcc_backend::return_statement): Remove.
+ (Gcc_backend::if_statement): Remove.
+ (Gcc_backend::compound_statement): Remove.
+ (Gcc_backend::statement_list): Remove.
+ (Gcc_backend::exception_handler_statement): Remove.
+ (Gcc_backend::loop_expression): Remove.
+ (Gcc_backend::exit_expression): Remove.
+ * rust-gcc.cc
+ (Gcc_backend::init_statement): Rename to ...
+ (Backend::init_statement): ... here.
+ (Gcc_backend::assignment_statement): Rename to ...
+ (Backend::assignment_statement): ... here.
+ (Gcc_backend::return_statement): Rename to ...
+ (Backend::return_statement): ... here.
+ (Gcc_backend::exception_handler_statement): Rename to ...
+ (Backend::exception_handler_statement): ... here.
+ (Gcc_backend::if_statement): Rename to ...
+ (Backend::if_statement): ... here.
+ (Gcc_backend::loop_expression): Rename to ...
+ (Backend::loop_expression): ... here.
+ (Gcc_backend::exit_expression): Rename to ...
+ (Backend::exit_expression): ... here.
+ (Gcc_backend::compound_statement): Rename to ...
+ (Backend::compound_statement): ... here.
+ (Gcc_backend::statement_list): Rename to ...
+ (Backend::statement_list): ... here.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h
+ (Backend::function): Make non-virtual.
+ (Backend::function_defer_statement): Likewise.
+ (Backend::function_set_parameters): Likewise.
+ (Backend::write_global_definitions): Likewise.
+ (Backend::write_export_data): Likewise.
+ (Gcc_backend::function): Remove.
+ (Gcc_backend::function_defer_statement): Remove.
+ (Gcc_backend::function_set_parameters): Remove.
+ (Gcc_backend::write_global_definitions): Remove.
+ (Gcc_backend::write_export_data): Remove.
+ * rust-gcc.cc
+ (Gcc_backend::function): Rename to ...
+ (Backend::function): ... here.
+ (Gcc_backend::function_defer_statement):
+ Fix a qualified lookup of Backend::label and rename to ...
+ (Backend::function_defer_statement): ... here.
+ (Gcc_backend::function_set_parameters) Rename to ...
+ (Backend::function_set_parameters): ... here.
+ (Gcc_backend::write_global_definitions): Rename to ...
+ (Backend::write_global_definitions): ... here.
+ (Gcc_backend::write_export_data): Rename to ...
+ (Backend::write_export_data): ... here.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-inherent-impl-overlap.h:
+ Added rich location and errorcode.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ likewise.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
+ Added error code.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h
+ (Backend::zero_expression): Make non-virtual.
+ (Backend::var_expression): Likewise.
+ (Backend::integer_constant_expression): Likewise.
+ (Backend::float_constant_expression): Likewise.
+ (Backend::complex_constant_expression): Likewise.
+ (Backend::string_constant_expression): Likewise.
+ (Backend::char_constant_literal): Likewise.
+ (Backend::wchar_constant_literal): Likewise.
+ (Backend::boolean_constant_expression): Likewise.
+ (Gcc_backend::zero_expression): Remove.
+ (Gcc_backend::var_expression): Remove.
+ (Gcc_backend::integer_constant_expression): Remove.
+ (Gcc_backend::float_constant_expression): Remove.
+ (Gcc_backend::complex_constant_expression): Remove.
+ (Gcc_backend::string_constant_expression): Remove.
+ (Gcc_backend::wchar_constant_expression): Remove.
+ (Gcc_backend::char_constant_expression): Remove.
+ (Gcc_backend::boolean_constant_expression): Remove.
+ * rust-gcc.cc
+ (Gcc_backend::zero_expression): Rename to ...
+ (Backend::zero_expression): ... here.
+ (Gcc_backend::var_expression): Rename to ...
+ (Backend::var_expression): ... here.
+ (Gcc_backend::integer_constant_expression): Rename to ...
+ (Backend::integer_constant_expression): ... here.
+ (Gcc_backend::float_constant_expression): Rename to ...
+ (Backend::float_constant_expression): ... here.
+ (Gcc_backend::complex_constant_expression): Rename to ...
+ (Backend::complex_constant_expression): ... here.
+ (Gcc_backend::string_constant_expression): Rename to ...
+ (Backend::string_constant_expression): ... here.
+ (Gcc_backend::wchar_constant_expression): Rename to ...
+ (Backend::wchar_constant_expression): ... here.
+ (Gcc_backend::char_constant_expression): Rename to ...
+ (Backend::char_constant_expression): ... here.
+ (Gcc_backend::boolean_constant_expression): Rename to ...
+ (Backend::boolean_constant_expression): ... here.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h
+ (Backend::global_variable): Make non-virtual.
+ (Backend::global_variable_set_init): Likewise.
+ (Backend::local_variable): Likewise.
+ (Backend::parameter_variable): Likewise.
+ (Backend::static_chain_variable): Likewise.
+ (Backend::temporary_variable): Likewise.
+ (Gcc_backend::global_variable): Remove.
+ (Gcc_backend::global_variable_set_init): Remove.
+ (Gcc_backend::local_variable): Remove.
+ (Gcc_backend::parameter_variable): Remove.
+ (Gcc_backend::static_chain_variable): Remove.
+ (Gcc_backend::temporary_variable): Remove.
+ (Gcc_backend::non_zero_size_type): Move to ...
+ (Backend::non_zero_size_type): ... here.
+ (Gcc_backend::convert_tree): Move to ...
+ (Backend::convert_tree): ... here.
+ * rust-gcc.cc
+ (Gcc_backend::non_zero_size_type): Rename to ...
+ (Backend::non_zero_size_type): ... here.
+ (Gcc_backend::convert_tree): Rename to ...
+ (Backend::convert_tree): ... here.
+ (Gcc_backend::global_variable): Rename to ...
+ (Backend::global_variable): ... here.
+ (Gcc_backend::global_variable_set_init): Rename to ...
+ (Backend::global_variable_set_init): ... here.
+ (Gcc_backend::local_variable): Rename to ...
+ (Backend::local_variable): ... here.
+ (Gcc_backend::parameter_variable): Rename to ...
+ (Backend::parameter_variable): ... here.
+ (Gcc_backend::static_chain_variable): Rename to ...
+ (Backend::static_chain_variable): ... here.
+ (Gcc_backend::temporary_variable): Rename to ...
+ (Backend::temporary_variable): ... here.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * checks/errors/privacy/rust-privacy-reporter.cc
+ (PrivacyReporter::check_for_privacy_violation):
+ Added errorcode & richlocation.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h
+ (Backend::debug): Make non-virtual.
+ (Backend::get_identifier_node): Likewise.
+ (Gcc_backend::debug): Remove.
+ (Gcc_backend::get_identifier_node): Remove.
+ * rust-gcc.cc
+ (Gcc_backend::debug): Rename to ...
+ (Backend::debug): ... here.
+ (Gcc_backend::get_identifier_node): Rename to ...
+ (Backend::get_identifier_node): ... here.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc
+ (TypeCheckExpr::visit): Expect if conditions to have type bool.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h
+ (Backend::label): Make non-virtual.
+ (Backend::label_definition_statement): Likewise.
+ (Backend::goto_statement): Likewise.
+ (Backend::label_address): Likewise.
+ (Gcc_backend::label): Remove.
+ (Gcc_backend::label_definition_statement): Remove.
+ (Gcc_backend::goto_statement): Remove.
+ (Gcc_backend::label_address): Remove.
+ * rust-gcc.cc
+ (Gcc_backend::label): Rename to ...
+ (Backend::label): ... here.
+ (Gcc_backend::label_definition_statement): Rename to ...
+ (Backend::label_definition_statement): ... here.
+ (Gcc_backend::goto_statement): Rename to ...
+ (Backend::goto_statement): ... here.
+ (Gcc_backend::label_address): Rename to ...
+ (Backend::label_address): ... here.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-constexpr.cc
+ (struct constexpr_fundef): Rename to ...
+ (struct rust_constexpr_fundef): ... here.
+ (struct constexpr_call): Rename to ...
+ (struct rust_constexpr_call): ... here.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * lex/rust-input-source.h: Move constants from here...
+ * util/rust-codepoint.h (struct Codepoint): ... to here
+ * util/rust-attributes.cc (check_no_mangle_function): New function.
+ (AttributeChecker::visit): Use it.
+ * util/rust-unicode.cc (is_ascii_only): New function.
+ * util/rust-unicode.h (is_ascii_only): Likewise.
+ * backend/rust-mangle.cc (legacy_mangle_name): Use it.
+ * util/rust-punycode.cc (extract_basic_string): Likewise.
+ * lex/rust-lex.cc (Lexer::parse_byte_char): Likewise.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * hir/rust-ast-lower-pattern.cc (ASTLoweringPattern::visit):
+ Added richlocation & error code.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc
+ (TypeCheckExpr::resolve_fn_trait_call): Add TODO comment.
+ * typecheck/rust-tyty-bounds.cc
+ (TypeBoundPredicate::TypeBoundPredicate):
+ Add assertions, new error constructor.
+ (TypeBoundPredicate::error): Use new error constructor.
+ * typecheck/rust-tyty.h
+ (struct TypeBoundPredicate::mark_is_error): New.
+ (TypeBoundPredicate::TypeBoundPredicate):
+ Add new error constructor.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h:
+ (Backend::wchar_type): Make non-virtual.
+ (Backend::get_pointer_size): Likewise.
+ (Backend::raw_str_type): Likewise.
+ (Backend::integer_type): Likewise.
+ (Backend::float_type): Likewise.
+ (Backend::complex_type): Likewise.
+ (Backend::pointer_type): Likewise.
+ (Backend::reference_type): Likewise.
+ (Backend::immutable_type): Likewise.
+ (Backend::function_type): Likewise.
+ (Backend::function_type_varadic): Likewise.
+ (Backend::function_ptr_type): Likewise.
+ (Backend::struct_type): Likewise.
+ (Backend::union_type): Likewise.
+ (Backend::array_type): Likewise.
+ (Backend::named_type): Likewise.
+ (Backend::type_size): Likewise.
+ (Backend::type_alignment): Likewise.
+ (Backend::type_field_alignment): Likewise.
+ (Backend::type_field_offset): Likewise.
+ (Gcc_backend::wchar_type): Remove.
+ (Gcc_backend::get_pointer_size): Remove.
+ (Gcc_backend::raw_str_type): Remove.
+ (Gcc_backend::integer_type): Remove.
+ (Gcc_backend::float_type): Remove.
+ (Gcc_backend::complex_type): Remove.
+ (Gcc_backend::pointer_type): Remove.
+ (Gcc_backend::reference_type): Remove.
+ (Gcc_backend::immutable_type): Remove.
+ (Gcc_backend::function_type): Remove.
+ (Gcc_backend::function_type_varadic): Remove.
+ (Gcc_backend::function_ptr_type): Remove.
+ (Gcc_backend::struct_type): Remove.
+ (Gcc_backend::union_type): Remove.
+ (Gcc_backend::array_type): Remove.
+ (Gcc_backend::named_type): Remove.
+ (Gcc_backend::type_size): Remove.
+ (Gcc_backend::type_alignment): Remove.
+ (Gcc_backend::type_field_alignment): Remove.
+ (Gcc_backend::type_field_offset): Remove.
+ (Gcc_backend::fill_in_fields): Move to ...
+ (Backend::fill_in_fields): ... here.
+ (Gcc_backend::fill_in_array): Move to ...
+ (Backend::fill_in_array): ... here.
+ * rust-gcc.cc
+ (Gcc_backend::wchar_type): Rename to ...
+ (Backend::wchar_type): ... here.
+ (Gcc_backend::get_pointer_size): Rename to ...
+ (Backend::get_pointer_size): ... here.
+ (Gcc_backend::raw_str_type): Rename to ...
+ (Backend::raw_str_type): ... here.
+ (Gcc_backend::integer_type): Rename to ...
+ (Backend::integer_type): ... here.
+ (Gcc_backend::float_type): Rename to ...
+ (Backend::float_type): ... here.
+ (Gcc_backend::complex_type): Rename to ...
+ (Backend::complex_type): ... here.
+ (Gcc_backend::pointer_type): Rename to ...
+ (Backend::pointer_type): ... here.
+ (Gcc_backend::reference_type): Rename to ...
+ (Backend::reference_type): ... here.
+ (Gcc_backend::immutable_type): Rename to ...
+ (Backend::immutable_type): ... here.
+ (Gcc_backend::function_type): Rename to ...
+ (Backend::function_type): ... here.
+ (Gcc_backend::function_type_varadic): Rename to ...
+ (Backend::function_type_varadic): ... here.
+ (Gcc_backend::function_ptr_type): Rename to ...
+ (Backend::function_ptr_type): ... here.
+ (Gcc_backend::struct_type): Rename to ...
+ (Backend::struct_type): ... here.
+ (Gcc_backend::union_type): Rename to ...
+ (Backend::union_type): ... here.
+ (Gcc_backend::fill_in_fields): Rename to ...
+ (Backend::fill_in_fields): ... here.
+ (Gcc_backend::array_type): Rename to ...
+ (Backend::array_type): ... here.
+ (Gcc_backend::fill_in_array): Rename to ...
+ (Backend::fill_in_array): ... here.
+ (Gcc_backend::named_type): Rename to ...
+ (Backend::named_type): ... here.
+ (Gcc_backend::type_size): Rename to ...
+ (Backend::type_size): ... here.
+ (Gcc_backend::type_alignment): Rename to ...
+ (Backend::type_alignment): ... here.
+ (Gcc_backend::type_field_alignment): Rename to ...
+ (Backend::type_field_alignment): ... here.
+ (Gcc_backend::type_field_offset): Rename to ...
+ (Backend::type_field_offset): ... here.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-intrinsic.cc (move_val_init_handler): mark as side-effects
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-intrinsic.cc (uninit_handler): Update fndecl attributes
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-intrinsic.cc (op_with_overflow_inner): fix use before init
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-intrinsic.cc (enter_intrinsic_block): take the locals vector
+ (uninit_handler): make a temp variable and use the address of it
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc (Early::visit):
+ Collect error instead of lambda.
+ * resolve/rust-early-name-resolver-2.0.h (std::function<void):
+ Remove type alias.
+ * rust-diagnostics.h: Change collection type.
+ * rust-session-manager.cc (Session::expansion): Change
+ collection container.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc (Early::visit):
+ Collect error instead of emitting it. Also add invocation
+ registration.
+ * resolve/rust-early-name-resolver-2.0.h (std::function<void):
+ Add type definition for collection.
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit):
+ Register macro rule definition in mappings.
+ * rust-session-manager.cc (Session::expansion): Add macro
+ resolve error collection.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * config-lang.in:
+ Add "backend/rust-tree.h" and "backend/rust-tree.h" to gtfiles.
+ * backend/rust-tree.cc: Include new header generated by gengtype.
+ * backend/rust-tree.h
+ (struct language_function): Add TODO.
+ * rust-lang.cc:
+ Include "rust-tree.h".
+ (struct lang_type): Remove duplicate definition.
+ (struct lang_decl): Likewise.
+ (struct lang_identifier): Likewise.
+ (struct language_function): Likewise.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
+ Added error code and rich location.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-tree.h
+ (struct rust_cp_class_binding): Fork from gcc/cp/name_lookup.h.
+ (struct rust_cp_binding_level): Likewise.
+ (struct named_label_entry): Remove declaration...
+ (struct rust_named_label_entry): ... and fork definition from gcc/cp/decl.cc.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust-diagnostics.cc (rust_be_error_at): Added overload function.
+ (rust_error_at): non-const `rich_location *` function.
+ * rust-diagnostics.h (rust_error_at): Implementation of overloaded
+ function.
+ (rust_be_error_at): likewise.
+ * rust_error_codes.def: Added GNU license.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-tyty.cc (BaseType::satisfies_bound):
+ Added errorcode and user-friendly error message.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-tree.cc
+ (resort_data): Fork from c++ frontend.
+ (resort_member_name_cmp): Likewise.
+ (resort_type_member_vec): Likewise.
+ * backend/rust-tree.h
+ (resort_type_member_vec): Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-tree.cc
+ (struct conv_type_hasher): Rename to ...
+ (struct rust_conv_type_hasher): ... here.
+ (struct cplus_array_hasher): Rename to ...
+ (struct rust_cplus_array_hasher): ... here.
+ (struct source_location_table_entry_hash): Rename to ...
+ (struct rust_source_location_table_entry_hash): ... here.
+ * backend/rust-tree.h
+ (struct named_decl_hash): Rename to ...
+ (struct rust_named_decl_hash): ... here.
+ (struct cxx_saved_binding): Rename to ...
+ (struct rust_cxx_saved_binding): ... here.
+ (struct named_label_hash): Rename to ...
+ (struct rust_named_label_hash): ... here.
+ (struct tree_pair_s): Rename to ...
+ (struct rust_tree_pair_s): ... here.
+ (struct tree_pair_p): Rename to ...
+ (struct rust_tree_pair_p): ... here.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-tree.cc
+ (Rust::gt_pch_nx): Move external function declaration ...
+ (gt_pch_nx): ... out of Rust namespace.
+ * backend/rust-tree.h
+ (OVL_FIRST): Qualify function name.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-type.cc (TyTyResolveCompile::visit): do a final lookup
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_generic_params):
+ Added more user friendly message.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-builtins.cc
+ (MacroBuiltin::include_str_handler): Use vector::data.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-type.cc:
+ Added last variant name, errorcode & rich location. for enum candidates.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-tree.h
+ (struct stmt_tree_s): Remove.
+ (typedef stmt_tree): Remove.
+ (c_language_function::x_stmt_tree): Remove.
+ (saved_scope::x_stmt_tree): Remove.
+ (lang_decl_fn::pending_inline_p): Remove.
+ (lang_decl_fn::spare): Adjust size.
+ (lang_decl_fn::pending_inline_info): Remove.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-constexpr.cc:
+ Include gt-rust-rust-constexpr.h.
+ (struct constexpr_call_hasher): Rename to ...
+ (struct rust_constexpr_call_hasher): ... here.
+ (struct constexpr_fundef_hasher): Rename to ...
+ (struct rust_constexpr_fundef_hasher): ... here.
+ * config-lang.in: Add rust-constexpr.cc to gtfiles.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * backend/rust-mangle.cc (v0_add_identifier): Added punycode encoding
+ (v0_mangle_item): Likewise.
+ * lex/rust-lex.cc (assert_source_content): Change type
+ (test_buffer_input_source): Change type
+ (test_file_input_source): Change type
+ * resolve/rust-ast-resolve-toplevel.h: fix typo
+ * rust-session-manager.cc (Session::load_extern_crate): fix typo
+ * util/rust-canonical-path.h: fix typo
+ * util/rust-hir-map.cc (NodeMapping::get_error): fix typo
+ (Mappings::Mappings): fix typo
+ * util/rust-mapping-common.h (UNKNOWN_CREATENUM): fix typo
+ (UNKNOWN_CRATENUM): Change 0 to UINT32_MAX
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait):
+ Updated errorcode & more userfriendly message.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit):
+ Added more helpful error message.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-path-probe.h:
+ Fixes issue & added rich location message.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ Added rich location and error code.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lex/rust-lex.cc (Lexer::parse_decimal_int_or_float): Only
+ accept digits after a dot instead of accepting any float
+ member.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * ast/rust-pattern.h: No need of assertion, we are handling it.
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit):
+ Added check which emits error instead of using assertion.
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
+ Added rich location and error code.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::handle_inline_attribute_on_fndecl):
+ Added rich_location & error code.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_trait):
+ added errorcode & updated error message.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_outer_attribute):
+ Added errorcode & updated error function.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust-diagnostics.cc (va_constructor):
+ Added constructor for all possible cases.
+ (Error::Error): Updated error struct
+ for all possible cases.
+ * rust-diagnostics.h (struct Error):
+ Updated error struct to support error
+ code & rich location support.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::handle_inline_attribute_on_fndecl):
+ Added rich_location & error code.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust-diagnostics.cc: Switch from new[] to xcalloc
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * util/make-rust-unicode.py: Add type annotation
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-intrinsic.cc (check_for_cached_intrinsic):
+ simplify this cached intrinsic check
+ * backend/rust-mangle.cc (legacy_mangle_item): use new interface
+ * typecheck/rust-tyty.h: new managle helper
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::resolve_method_address):
+ use the single candidate
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/rust-hir-dump.cc (Dump::visit): Remove useless if/else
+ already handled by visit_field.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * util/rust-punycode.cc: Add CHECKING_P guard.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * backend/rust-mangle.cc (legacy_mangle_name): Use Unicode escape
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): remove hack
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-proc-macro-invoc-lexer.cc
+ (ProcMacroInvocLexer::skip_token): Remove.
+ * expand/rust-proc-macro-invoc-lexer.h:
+ Include "rust-macro-invoc-lexer.h".
+ (class ProcMacroInvocLexer):
+ Extend MacroInvocLexerBase.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * lex/rust-codepoint.h: Moved to...
+ * util/rust-codepoint.h: ...here.
+ * lex/rust-input-source.h: Add missing license
+ * util/rust-unicode.cc: Add missing license
+ * util/rust-punycode.cc (extract_basic_string): Remove constant
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-macro-expand.h: Keep optional references for last_def
+ and last_invoc.
+ * expand/rust-macro-expand.cc (MacroExpander::expand_invoc): Store
+ optional references.
+ * rust-session-manager.cc (Session::expansion): Use tl::optional's APIs
+ for better checking.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/rust-hir-dump.h (do_ifexpr): New.
+ * hir/rust-hir-dump.cc (Dump::do_ifexpr): New.
+ (Dump::visit): Use do_ifexpr and visit_field
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-casts.cc (TypeCastRules::emit_cast_error):
+ Refactored ErrorCodes & error messages.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * backend/rust-compile-base.cc:
+ Added ErrorCode.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_qualifiers):
+ called error function.
+ (ASTLoweringBase::lower_extern_block): likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-collector.cc: Adjust formatting.
+ * checks/errors/rust-feature-gate.cc: Add trailing newline.
+ * rust-diagnostics.h: Remove old comment.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-gcc.cc
+ (Gcc_backend::struct_type): Remove references to "this".
+ (Gcc_backend::union_type): Likewise.
+ (Gcc_backend::array_type): Likewise.
+ (Gcc_backend::wchar_constant_expression): Likewise.
+ (Gcc_backend::convert_expression): Likewise.
+ (Gcc_backend::constructor_expression): Likewise.
+ (Gcc_backend::array_initializer): Likewise.
+ (Gcc_backend::assignment_statement): Likewise.
+ (Gcc_backend::global_variable): Likewise.
+ (Gcc_backend::temporary_variable): Likewise.
+ (Gcc_backend::function_defer_statement): Likewise.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * Make-lang.in: Add rust-punycode.o.
+ * rust-lang.cc (run_rust_tests): Add selftest.
+ * util/rust-punycode.cc: New file.
+ * util/rust-punycode.h: New file.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * backend/rust-compile.cc (HIRCompileBase::verify_array_capacities):
+ Added ErrorCode.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check.cc (TypeResolution::Resolve):
+ added errorcode.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h
+ (Backend::error_variable): Remove.
+ (Gcc_backend::error_variable): Move to ...
+ * rust-gcc.cc
+ (Bvariable::error_variable): ... here ...
+ * rust-gcc.h
+ (Bvariable::error_variable): ... and declare here.
+ (Gcc_backend::global_variable): Update error_variable call.
+ (Gcc_backend::local_variable): Likewise.
+ (Gcc_backend::parameter_variable): Likewise.
+ (Gcc_backend::static_chain_variable): Likewise.
+ (Gcc_backend::temporary_variable): Likewise.
+ * backend/rust-compile-extern.h
+ (CompileExternItem::visit): Likewise.
+ * backend/rust-compile-fnparam.cc
+ (CompileFnParam::CompileFnParam): Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-type.cc
+ (TyTyResolveCompile::visit): Inline Backend::bool_type call.
+ * rust-backend.h
+ (Backend::bool_type): Remove.
+ (Backend::char_type): Remove.
+ (Gcc_backend::bool_type): Remove.
+ (Gcc_backend::char_type): Remove.
+ * rust-gcc.cc
+ (Gcc_backend::char_constant_expression): Inline Backend::char_type call.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * lex/rust-lex.cc (assert_source_content): Fix namespace specifier
+ (test_buffer_input_source): Likewise.
+ (test_file_input_source): Likewise.
+ * lex/rust-lex.h: Move InputSource ...
+ * lex/rust-input-source.h: ... to here. (New file)
+ * lex/rust-token.cc (nfc_normalize_token_string): New function
+ * lex/rust-token.h (nfc_normalize_token_string): New function
+ * rust-lang.cc (run_rust_tests): Modify order of selftests.
+ * rust-session-manager.cc (validate_crate_name): Modify interface of Utf8String.
+ * util/rust-unicode.cc (lookup_cc): Modify codepoint_t typedef.
+ (lookup_recomp): Likewise.
+ (recursive_decomp_cano): Likewise.
+ (decomp_cano): Likewise.
+ (sort_cano): Likewise.
+ (compose_hangul): Likewise.
+ (assert_normalize): Likewise.
+ (Utf8String::nfc_normalize): New function.
+ * util/rust-unicode.h: Modify interface of Utf8String.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go):
+ Added ErrorCode.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-common.h (enum_to_str): Remove extra semicolon after
+ the function.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit):
+ Use of mutable reference in constant functions.
+ * checks/errors/rust-feature-gate.cc (FeatureGate::gate):
+ ErrorCode for intrinsics are subject to change.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * checks/errors/rust-const-checker.cc (ConstChecker::check_function_call):
+ Added errorcode.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-tyty-subst.cc (SubstitutionRef::get_mappings_from_generic_args):
+ Added errorcode.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Declare
+ macros in the current rib if they are macros 2.0.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-macro.h: Add new method to `MacroRulesDefinition` to allow
+ getting the `MacroKind` contained.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust-session-manager.cc
+ (Session::expansion): Use new `Early` name resolution 2.0 pass
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Add new object file.
+ * resolve/rust-early-name-resolver-2.0.cc: New file.
+ * resolve/rust-early-name-resolver-2.0.h: New file.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-default-resolver.cc
+ (DefaultResolver::visit): Visit CallExpr and MethodCallExpr properly.
+ * resolve/rust-default-resolver.h: Switch "node" to plural in documentation.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::insert_or_error_out): Fix format string.
+ (is_macro_export): New method.
+ (TopLevel::visit): Handle macro definitions.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-name-resolution-context.cc
+ (Resolver::insert): Do not call into `rust_unreachable` when resolving
+ macros anymore.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-forever-stack.h
+ (insert_at_root): New method.
+ (resolve_path): New method.
+ (reverse_iter): Iterate on `Node`s instead of `Rib`s
+ * resolve/rust-forever-stack.hxx: Add path resolution.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-rib.h: Add shadowing parameter. Make kind field public.
+ * resolve/rust-rib.cc (Rib::insert): Likewise.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit):
+ refactored message and called error function.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * checks/errors/rust-feature-gate.cc (FeatureGate::check):
+ errorcode support for unknown feature.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-unify.cc (UnifyRules::emit_type_mismatch):
+ refactored & called error function.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * expand/rust-macro-builtins.cc
+ (load_file_bytes): Return a tl::optional.
+ (MacroBuiltin::include_byte_handler): Adjust and check file was
+ correctly opened.
+ (MacroBuiltin::include_str_handler): Likewise.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.h
+ (class TopLevel): Inherit from DefaultResolver
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::TopLevel): Remove unecessary methods
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Add new object file.
+ * resolve/rust-default-resolver.cc: New file.
+ * resolve/rust-default-resolver.h: New file.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * util/rust-unicode.cc (decomp_cano): Decompose Hangul.
+ (sort_cano): Fix bounds check.
+ (recomp): use `compose_hangul`.
+ (compose_hangul): Compose Hangul.
+ (rust_utf8_normalize_test): Add tests.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-forever-stack.hxx: assert() -> rust_assert()
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Add new object file.
+ * resolve/rust-toplevel-name-resolver-2.0.cc: New file.
+ * resolve/rust-toplevel-name-resolver-2.0.h: New file.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Add new object file.
+ * resolve/rust-name-resolution-context.cc: New file.
+ * resolve/rust-name-resolution-context.h: New file.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ called error function.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-invoc-lexer.cc
+ (MacroInvocLexer::skip_token): Remove.
+ * expand/rust-macro-invoc-lexer.h
+ (class MacroInvocLexer): Extend MacroInvocLexerBase.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * ast/rust-ast-fragment.cc (Fragment::create_empty): New.
+ * ast/rust-ast-fragment.h (MacroTranscriberFunc): New.
+ * ast/rust-macro.h (MacroRulesDefinition): Use MacroTranscriberFunc.
+ * expand/rust-macro-builtins.cc
+ (MacroBuiltin::builtin_transcribers): likewise.
+ (MacroBuiltin::assert_handler): Return optional.
+ (MacroBuiltin::file_handler): Likewise.
+ (MacroBuiltin::column_handler): Likewise.
+ (MacroBuiltin::include_bytes_handler): Likewise.
+ (MacroBuiltin::include_str_handler): Likewise.
+ (MacroBuiltin::compile_error_handler): Likewise.
+ (MacroBuiltin::concat_handler): Likewise.
+ (MacroBuiltin::env_handler): Likewise.
+ (MacroBuiltin::cfg_handler): Likewise.
+ (MacroBuiltin::include_handler): Likewise.
+ (MacroBuiltin::line_handler): Likewise.
+ (MacroBuiltin::stringify_handler): Likewise.
+ (MacroBuiltin::sorry): Likewise.
+ * expand/rust-macro-builtins.h (builtin_transcribers): Use
+ MacroTranscriberFunc.
+ (assert_handler): Return optional.
+ (file_handler): Likewise.
+ (column_handler): Likewise.
+ (include_bytes_handler): Likewise.
+ (include_str_handler): Likewise.
+ (compile_error_handler): Likewise.
+ (concat_handler): Likewise.
+ (env_handler): Likewise.
+ (cfg_handler): Likewise.
+ (include_handler): Likewise.
+ (line_handler): Likewise.
+ (stringify_handler): Likewise.
+ (sorry): Likewise.
+ * expand/rust-macro-expand.cc (MacroExpander::expand_invoc):
+ Adjust to transcribers returning optional.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc (TraitItemReference::resolve_item):
+ always resolve the type even when its an a mandatory trait item
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path):
+ Add check for enum candidates otherwise you get undefined behaviour
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * lex/rust-codepoint.h: Add comment
+ * lex/rust-lex.h: New method to get decoded characters
+ * rust-session-manager.cc (validate_crate_name): Modify unicode check
+ (rust_crate_name_validation_test): Add testcases
+ * util/rust-unicode.h (RUST_UNICODE_H): New class Utf8String.
+ (class Utf8String): New class.
+ * util/rust-unicode.cc (binary_search_sorted_array): Add comment.
+ (recursive_decomp_cano): Add comment.
+ (recomp): Remove dead code.
+ (dump_string): Removed.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * util/rust-unicode.cc: Add CHECKING_P guard.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ We need to check if a function context exists
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * expand/rust-proc-macro.cc (literal_from_string): update Lexer constructor
+ (tokenstream_from_string): likewise
+ * lex/rust-lex.cc (Lexer::Lexer): likewise
+ * lex/rust-lex.h: pass through Linemap
+ * parse/rust-cfg-parser.cc (parse_cfg_option): likewise
+ * rust-session-manager.cc (Session::load_extern_crate): likewise
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait):
+ dont apply Sized on self
+ * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::get_marker_predicate): new
+ * typecheck/rust-hir-type-check-base.h: add prototype
+ * typecheck/rust-hir-type-check-type.cc (TypeResolveGenericParam::Resolve): apply Sized
+ (TypeResolveGenericParam::visit): likewise
+ * typecheck/rust-hir-type-check-type.h: update prototypes
+ * typecheck/rust-typecheck-context.cc: remove bad assertions
+ * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::assemble_sized_builtin): cleanup
+ (TypeCheckBase::get_predicate_from_bound): apply sized rules properly
+ * util/rust-hir-map.cc (Mappings::lookup_trait_item_lang_item): helpers
+ (Mappings::get_lang_item): likewise
+ * util/rust-hir-map.h: likewise
+ * util/rust-token-converter.cc (from_ident): update lexer ctor
+ (from_punct): likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-path-probe.cc: track regular polarity
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait): likewise
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): likewise
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): likewise
+ * typecheck/rust-tyty-bounds.cc (TypeCheckBase::get_predicate_from_bound): likewise
+ (TypeBoundPredicate::TypeBoundPredicate): update ctor
+ (TypeBoundPredicate::operator=): update copy assignment ctor
+ (TypeBoundPredicate::error): update error node
+ * typecheck/rust-tyty.h: add polarity field to predicate
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): use new BoundPolarity enum
+ * hir/rust-ast-lower-type.cc (ASTLoweringTypeBounds::visit): likewise
+ * hir/rust-hir-dump.cc (BoundPolarityString): new helper
+ (Dump::visit): update hir dump
+ * hir/tree/rust-hir-item.h (class ImplBlock): likewise
+ * hir/tree/rust-hir-type.h (class TraitBound): likewise
+ * hir/tree/rust-hir.cc (TraitBound::as_string): fix as string
+ * util/rust-common.h (enum Polarity): add new anti bound
+ (enum BoundPolarity): likewise
+ * util/rust-hir-map.cc (Mappings::Mappings): update naming
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-backend.h: Include "rust-gcc.h".
+ (class Gcc_backend): Move to ...
+ * rust-gcc.cc (class Gcc_backend): ... here.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-item.cc: add is_error check
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * Make-lang.in: Add rust-unicode.o
+ * rust-lang.cc (run_rust_tests): Add test.
+ * rust-system.h: Include <array>
+ * util/make-rust-unicode.py: Generater of rust-unicode-data.h.
+ * util/rust-unicode-data.h: Auto-generated file.
+ * util/rust-unicode.cc: New file.
+ * util/rust-unicode.h: New file.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust-diagnostics.cc: Rework `make_description` and `make_url` functions.
+ * rust-diagnostics.h: Specify ErrorCode's underlying type,
+ remove error_codes_strings table.
+ * rust_error_codes.def: New file.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-location.h (typedef Location): Remove.
+ * expand/rust-proc-macro.cc
+ (register_callback): Replace Location constructor with UNDEF_LOCATION.
+ * ast/rust-ast-collector.h: Replace Location with location_t.
+ * checks/errors/privacy/rust-privacy-reporter.cc: Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.h: Likewise.
+ * checks/errors/privacy/rust-pub-restricted-visitor.cc: Likewise.
+ * checks/errors/privacy/rust-pub-restricted-visitor.h: Likewise.
+ * checks/errors/rust-feature-gate.cc: Likewise.
+ * checks/errors/rust-feature-gate.h: Likewise.
+ * metadata/rust-imports.h: Likewise.
+ * resolve/rust-ast-resolve-path.h: Likewise.
+ * resolve/rust-name-resolver.h: Likewise.
+ * rust-backend.h: Likewise.
+ * rust-diagnostics.h: Likewise.
+ * rust-gcc.cc: Likewise.
+ * rust-linemap.h: Likewise.
+ * util/rust-attributes.cc: Likewise.
+ * util/rust-hir-map.cc: Likewise.
+ * util/rust-hir-map.h: Likewise.
+ * util/rust-token-converter.cc: Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-autoderef.cc: Replace Location with location_t.
+ * typecheck/rust-coercion.cc: Likewise.
+ * typecheck/rust-coercion.h: Likewise.
+ * typecheck/rust-hir-path-probe.h: Likewise.
+ * typecheck/rust-hir-trait-reference.cc: Likewise.
+ * typecheck/rust-hir-trait-resolve.cc: Likewise.
+ * typecheck/rust-hir-type-check-base.cc: Likewise.
+ * typecheck/rust-hir-type-check-expr.cc: Likewise.
+ * typecheck/rust-hir-type-check-expr.h: Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc: Likewise.
+ * typecheck/rust-hir-type-check-item.cc: Likewise.
+ * typecheck/rust-hir-type-check-path.cc: Likewise.
+ * typecheck/rust-hir-type-check-pattern.cc: Likewise.
+ * typecheck/rust-hir-type-check-stmt.cc: Likewise.
+ * typecheck/rust-hir-type-check-struct.cc: Likewise.
+ * typecheck/rust-hir-type-check-type.cc: Likewise.
+ * typecheck/rust-hir-type-check-type.h: Likewise.
+ * typecheck/rust-type-util.cc: Likewise.
+ * typecheck/rust-type-util.h: Likewise.
+ * typecheck/rust-tyty-bounds.cc: Likewise.
+ * typecheck/rust-tyty-call.cc: Likewise.
+ * typecheck/rust-tyty-call.h: Likewise.
+ * typecheck/rust-tyty-cmp.h: Likewise.
+ * typecheck/rust-tyty-subst.cc: Likewise.
+ * typecheck/rust-tyty-subst.h: Likewise.
+ * typecheck/rust-tyty.cc: Likewise.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ refactored error message & called error function.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-proc-macro.cc (literal_from_string): Add callback
+ function.
+ (load_macros_array): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (handle_suffix): Rework function
+ to make it work with the new literal conversion function.
+ (convert_literal): Add a new function to convert to a proc macro
+ literal from a literal tokenptr. The function will abort if the
+ pointer does not point to a literal.
+ (convert): Add call to convert literal for every literal case.
+ * util/rust-token-converter.h (convert_literal): Add public
+ prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-proc-macro.cc: Remove static modifier and move to
+ an anonymous namespace.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * backend/rust-compile-intrinsic.cc (Intrinsics::compile):
+ Formatted according to enum class.
+ * checks/errors/rust-feature-gate.cc (FeatureGate::gate): likewise.
+ * checks/errors/rust-unsafe-checker.cc (check_unsafe_call): likewise.
+ * hir/rust-ast-lower-base.cc (struct_field_name_exists): likewise.
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): likewise.
+ * resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path):
+ likewise.
+ * resolve/rust-ast-resolve-pattern.cc (PatternDeclaration::go): likewise.
+ (PatternDeclaration::add_new_binding): likewise.
+ * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): likewise.
+ * resolve/rust-ast-verify-assignee.h: likewise.
+ * rust-diagnostics.cc: updated make_desc & url function for enum class.
+ * rust-diagnostics.h (struct ErrorCode): removed struct to switch to enum.
+ (enum class): Switched from errorcode struct to enum class.
+ (XSTR): Macro for converting enum to string.
+ (STR): macro Used by XSTR for converting to string.
+ (ERROR_CODE): macro used by map for check.
+ (TABLE_TO_MAP): macro used by map for check
+ * typecheck/rust-casts.cc (TypeCastRules::emit_cast_error):
+ Formatted according to enum class.
+ * typecheck/rust-hir-path-probe.h: likewise.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): likewise.
+ * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelExternItem::visit):
+ likewise.
+ (TypeCheckImplItemWithTrait::visit): likewise.
+ * typecheck/rust-hir-type-check-item.cc: likewise.
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): likewise.
+ (emit_invalid_field_error): likewise.
+ * typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::resolve): likewise.
+ * typecheck/rust-tyty-call.cc (emit_unexpected_argument_error): likewise.
+ (TypeCheckCallExpr::visit): likewise.
+ * typecheck/rust-tyty-subst.cc (SubstitutionRef::get_mappings_from_generic_args):
+ likewise.
+ * typecheck/rust-tyty.cc (BaseType::bounds_compatible): likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-attributes.cc (check_proc_macro_non_root): Add
+ function to emit this specific error.
+ (AttributeChecker::visit): Modify visitor to propagate to some
+ containers that were not handled correctly.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-base.h: Replace Location with location_t.
+ * metadata/rust-imports.h: Likewise.
+ * resolve/rust-name-resolver.cc: Likewise.
+ * resolve/rust-name-resolver.h: Likewise.
+ * rust-backend.h: Likewise.
+ * rust-gcc.cc: Likewise.
+ * rust-gcc.h: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-proc-macro.cc (available): Remove function.
+ (load_macros_array): There was no need for an indirection here.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-proc-macro.cc (available): Add symbol
+ registration.
+ (load_macros_array): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-proc-macro.cc (load_macros_array): Symbol rename.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * checks/errors/privacy/rust-privacy-reporter.cc (find_proc_macro_attribute):
+ Refactor the function to be safer and more efficient.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * checks/errors/privacy/rust-privacy-reporter.cc (find_proc_macro_attribute):
+ Add a new function to find a potential proc macro type
+ attribute on a given item.
+ (proc_macro_privacy_check): Move all proc macro privacy check in
+ their own function to avoid cluttering the usual privacy check.
+ (PrivacyReporter::go): Add call to newly created proc macro
+ privacy check function.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::go):
+ Add visibility verification.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-attributes.cc (is_proc_macro_type): Add function to
+ identify matching proc macro attribute type.
+ (check_proc_macro_non_function): Add function to check and emit
+ error.
+ (AttributeChecker::visit): Add cal to new check function.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Remove NodeId from identifiers.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelExternItem::visit):
+ Added check for error code support.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-implitem.cc (TypeCheckImplItemWithTrait::visit):
+ called error function.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-base.cc: Replace Location with location_t.
+ * backend/rust-compile-base.h: Likewise.
+ * backend/rust-compile-expr.cc: Likewise.
+ * lex/rust-token.h: Likewise.
+ * metadata/rust-import-archive.cc: Likewise.
+ * metadata/rust-imports.cc: Likewise.
+ * metadata/rust-imports.h: Likewise.
+ * rust-backend.h: Likewise.
+ * rust-diagnostics.cc: Likewise.
+ * rust-diagnostics.h: Likewise.
+ * rust-gcc.cc: Likewise.
+ * rust-linemap.cc: Likewise.
+ * util/rust-token-converter.cc: Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-builder.h: Replace Location with location_t.
+ * ast/rust-ast.h: Likewise.
+ * ast/rust-expr.h: Likewise.
+ * ast/rust-item.h: Likewise.
+ * ast/rust-macro.h: Likewise.
+ * ast/rust-path.h: Likewise.
+ * hir/tree/rust-hir-expr.h: Likewise.
+ * hir/tree/rust-hir-item.h: Likewise.
+ * hir/tree/rust-hir-path.h: Likewise.
+ * hir/tree/rust-hir.h: Likewise.
+ * lex/rust-lex.cc: Likewise.
+ * lex/rust-lex.h: Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-derive-clone.cc: Replace Location with location_t.
+ * expand/rust-derive-clone.h: Likewise.
+ * expand/rust-derive-copy.cc: Likewise.
+ * expand/rust-derive-copy.h: Likewise.
+ * expand/rust-derive.cc: Likewise.
+ * expand/rust-derive.h: Likewise.
+ * expand/rust-macro-builtins.cc: Likewise.
+ * expand/rust-macro-builtins.h: Likewise.
+ * expand/rust-macro-expand.cc: Likewise.
+ * parse/rust-parse-impl.h: Likewise.
+ * parse/rust-parse.cc: Likewise.
+ * parse/rust-parse.h: Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * parse/rust-parse-impl.h
+ (Parser::parse_macro_match): Use token_id_is_keyword.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h (class Identifier): Remove interface
+ inheritance.
+ (class SimplePath): Likewise.
+ * expand/rust-expand-visitor.cc (get_traits_to_derive): Change
+ return type.
+ (derive_item): Update according to get_traits_to_derive return
+ type.
+ (expand_item_attribute): Likewise.
+ (ExpandVisitor::expand_inner_stmts): Likewise.
+ * expand/rust-macro-expand.h (struct MacroExpander): Likewise.
+ * util/rust-hir-map.cc (Mappings::insert_derive_proc_macro_invocation):
+ Change input type to SimplePath.
+ (Mappings::lookup_derive_proc_macro_invocation): Likewise.
+ (Mappings::insert_attribute_proc_macro_invocation): Likewise.
+ (Mappings::lookup_attribute_proc_macro_invocation): Likewise.
+ * util/rust-hir-map.h: Likewise with function prototypes.
+ * util/rust-proc-macro-invocation.h: Removed.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Add new constructor for SimplePath from an
+ identifier.
+ * expand/rust-expand-visitor.cc (get_traits_to_derive): Add
+ conversion.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-macro-expand.cc (MacroExpander::import_proc_macros):
+ Remove function.
+ * expand/rust-macro-expand.h (struct MacroExpander): Remove
+ import_proc_macro function.
+ * util/rust-hir-map.cc (Mappings::insert_derive_proc_macro_def):
+ Add a function to insert a derive proc macro definition.
+ (Mappings::insert_bang_proc_macro): Remove function.
+ (Mappings::insert_bang_proc_macro_def): Add function to insert a
+ bang proc macro definition.
+ (Mappings::insert_attribute_proc_macro_def): Likewise with
+ attribute proc macros.
+ (Mappings::lookup_derive_proc_macro_def): Add a function to
+ lookup a defined derive proc macro definition.
+ (Mappings::lookup_bang_proc_macro): Remove function.
+ (Mappings::lookup_bang_proc_macro_def): Add a function to lookup
+ a bang proc macro definition.
+ (Mappings::lookup_attribute_proc_macro_def): Add a function to
+ lookup an attribute prod macro definition.
+ (Mappings::insert_derive_proc_macro_invocation): Add a function
+ to insert a derive proc macro invocation.
+ (Mappings::lookup_derive_proc_macro_invocation): Add a function
+ to lookup a derive proc macro invocation.
+ (Mappings::insert_bang_proc_macro_invocation): Add a function to
+ insert a bang proc macro invocation.
+ (Mappings::lookup_bang_proc_macro_invocation): Add a function to
+ lookup a bang proc macro invocation.
+ (Mappings::insert_attribute_proc_macro_invocation): Add a
+ function to insert an attribute proc macro invocation.
+ (Mappings::lookup_attribute_proc_macro_invocation): Add a
+ function to lookup an attribute proc macro invocation.
+ * util/rust-hir-map.h: Add different proc macro mappings
+ and change function prototypes.
+ * expand/rust-expand-visitor.cc (get_traits_to_derive): Return a
+ vector of SimplePath instead.
+ (derive_item): Accept SimplePath instead of a string.
+ * ast/rust-ast.h: Add common ProcMacroInvocable interface to
+ Identifiers and SimplePath nodes.
+ * ast/rust-ast.cc: Add const modifier.
+ * ast/rust-macro.h: Change path and identifier getters.
+ * ast/rust-path.h: Change return type to reference.
+ * util/rust-proc-macro-invocation.h: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-attributes.h (RUST_ATTRIBUTES_H): Add missing header
+ guard.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h (class MetaItem): Add MetaItem dispatch values.
+ * ast/rust-expr.h: Add LitExpr and PathLit dispatch.
+ * ast/rust-macro.h: Add remaining dispatch getters.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * metadata/rust-extern-crate.h: Add proc macro getter.
+ * rust-session-manager.cc (Session::load_extern_crate): Collect
+ mappings and create mappings.
+ * util/rust-hir-map.cc: Add insertion and lookup functions for
+ every mapping.
+ * util/rust-hir-map.h: Add function prototypes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * metadata/rust-imports.cc (Import::try_package_in_directory):
+ Add call to load macros before loading metadatas.
+ * expand/rust-proc-macro.cc: Return empty vector instead of
+ panicking on error.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * metadata/rust-import-archive.cc (Stream_concatenate::do_peek):
+ Remove deletion.
+ (Stream_concatenate::do_advance): Likewise.
+ (Import::find_archive_export_data): Replace with a smart
+ pointer.
+ * metadata/rust-imports.cc (add_search_path): Change return type
+ to smart pointer.
+ (Import::open_package): Likewise.
+ (Import::try_package_in_directory): Likewise.
+ (Import::find_export_data): Likewise.
+ (Import::find_object_export_data): Likewise.
+ (Import::Import): Change constructor to accept unique_ptr.
+ * metadata/rust-imports.h: Change constructor prototype.
+ * rust-session-manager.cc (Session::load_extern_crate): Change
+ pointer to smart pointer.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * metadata/rust-extern-crate.cc (ExternCrate::ExternCrate):
+ Change constructor to accept procedural macro vector.
+ * metadata/rust-extern-crate.h: Add vector of procecural macro
+ in extern crate.
+ * rust-session-manager.cc (Session::load_extern_crate): Add
+ argument to new constructor call.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * metadata/rust-imports.cc (add_search_path): Change prototype,
+ now return a pair of Stream and procedural macro vector.
+ (Import::open_package): Likewise.
+ (Import::try_package_in_directory): Likewise.
+ * metadata/rust-imports.h: Likewise.
+ * rust-session-manager.cc (Session::load_extern_crate):
+ Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * metadata/rust-imports.h: Make the function to load a given
+ file public.
+ * rust-session-manager.cc (Session::load_extern_crate): Change
+ path resolution depending on extern crate declaration in cli
+ arguments.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-collector.h
+ (TokenCollector::visit):
+ Replace default argument with UNDEF_LOCATION.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-base.cc: Replace Location with location_t.
+ * backend/rust-compile-base.h: Likewise.
+ * backend/rust-compile-block.cc: Likewise.
+ * backend/rust-compile-expr.cc: Likewise.
+ * backend/rust-compile-expr.h: Likewise.
+ * backend/rust-compile-extern.h: Likewise.
+ * backend/rust-compile-implitem.h: Likewise.
+ * backend/rust-compile-intrinsic.cc: Likewise.
+ * backend/rust-compile-item.h: Likewise.
+ * backend/rust-compile-pattern.h: Likewise.
+ * backend/rust-compile-resolve-path.cc: Likewise.
+ * backend/rust-compile-stmt.cc: Likewise.
+ * backend/rust-compile-type.cc: Likewise.
+ * backend/rust-compile.cc: Likewise.
+ * backend/rust-constexpr.cc: Likewise.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ refactored and call error function.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-attributes.cc (AttributeChecker::visit): Add help
+ message.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-attributes.cc (AttributeChecker::visit): Add
+ attribute input check.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-attributes.cc (AttributeChecker::visit): Add
+ attribute check on functions.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (from_ident): Adapt code to new
+ constructor.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-proc-macro.cc (tokenstream_from_string): Add a
+ function that creates a tokenstream from a given string.
+ (load_macros_array): Add call to registration function.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lang.opt: Add option
+ * rust-session-manager.cc: Add option registration in session
+ target options.
+ * rust-session-manager.h (struct CompileOptions): Add new getter
+ for proc macros instead of a boolean.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-forever-stack.h: New file.
+ * resolve/rust-forever-stack.hxx: New file.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/rust-hir-dump.cc (convert_param_kind_to_str): New.
+ (convert_new_bind_type_to_str): New.
+ (convert_mut_to_str): New.
+ (Dump::go): New.
+ (Dump::put): New.
+ (Dump::begin): New.
+ (Dump::end): New.
+ (Dump::begin_field): New.
+ (Dump::end_field): New.
+ (Dump::put_field): New.
+ (Dump::visit_field): New.
+ (Dump::visit): Refactor.
+ (Dump::visit_collection): New.
+ (Dump::do_traititem): New.
+ (Dump::do_vis_item): New.
+ (Dump::do_functionparam): New.
+ (Dump::do_pathpattern): New.
+ (Dump::do_structexprstruct): New.
+ (Dump::do_expr): New.
+ (Dump::do_pathexpr): New.
+ (Dump::do_typepathsegment): New.
+ (Dump::do_typepathfunction): New.
+ (Dump::do_qualifiedpathtype): New.
+ (Dump::do_operatorexpr): New.
+ (Dump::do_mappings): New.
+ (Dump::do_inner_attrs): New.
+ (Dump::do_outer_attrs): New.
+ (Dump::do_baseloopexpr): New.
+ (Dump::do_ifletexpr): New.
+ (Dump::do_struct): New.
+ (Dump::do_enumitem): New.
+ (Dump::do_traitfunctiondecl): New.
+ (Dump::do_externalitem): New.
+ (Dump::do_namefunctionparam): New.
+ (Dump::do_stmt): New.
+ (Dump::do_type): New.
+ (Dump::do_item): New.
+ (Dump::do_tuplefield): New.
+ (Dump::do_structfield): New.
+ (Dump::do_genericargs): New.
+ (Dump::do_maybenamedparam): New.
+ * hir/rust-hir-dump.h: Refactor.
+ * hir/tree/rust-hir-item.h (enum_to_str): New.
+ * hir/tree/rust-hir-type.h (enum_to_str): New.
+ * hir/tree/rust-hir.cc (enum_to_str): New.
+ * util/rust-common.h (enum_to_str): New.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+ Matthew Jasper <mjjasper1@gmail.com>
+
+ * Make-lang.in: Add `rust-rib.cc` object.
+ * resolve/rust-rib.cc: New file.
+ * resolve/rust-rib.h: New file.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast.h: Replace Location with location_t.
+ * ast/rust-expr.h: Likewise.
+ * ast/rust-item.h: Likewise.
+ * ast/rust-macro.h: Likewise.
+ * ast/rust-path.h: Likewise.
+ * ast/rust-pattern.h: Likewise.
+ * ast/rust-stmt.h: Likewise.
+ * ast/rust-type.h: Likewise.
+ * hir/rust-ast-lower-base.h: Likewise.
+ * hir/tree/rust-hir-expr.h: Likewise.
+ * hir/tree/rust-hir-item.h: Likewise.
+ * hir/tree/rust-hir-path.h: Likewise.
+ * hir/tree/rust-hir-pattern.h: Likewise.
+ * hir/tree/rust-hir-stmt.h: Likewise.
+ * hir/tree/rust-hir-type.h: Likewise.
+ * hir/tree/rust-hir.h: Likewise.
+ * lex/rust-token.h: Likewise.
+ * resolve/rust-ast-resolve-pattern.h: Likewise.
+ * typecheck/rust-hir-trait-reference.h: Likewise.
+ * typecheck/rust-tyty-bounds.h: Likewise.
+ * typecheck/rust-tyty-call.h: Likewise.
+ * typecheck/rust-tyty-subst.h: Likewise.
+ * typecheck/rust-tyty-util.h: Likewise.
+ * typecheck/rust-tyty.h: Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-collector.cc: Replace Location with location_t.
+ * ast/rust-ast.cc: Likewise.
+ * ast/rust-ast.h: Likewise.
+ * ast/rust-expr.h: Likewise.
+ * ast/rust-item.h: Likewise.
+ * ast/rust-macro.h: Likewise.
+ * ast/rust-path.cc: Likewise.
+ * ast/rust-path.h: Likewise.
+ * ast/rust-pattern.h: Likewise.
+ * ast/rust-stmt.h: Likewise.
+ * ast/rust-type.h: Likewise.
+ * backend/rust-compile-base.cc: Likewise.
+ * backend/rust-compile-base.h: Likewise.
+ * backend/rust-compile-block.cc: Likewise.
+ * backend/rust-compile-expr.cc: Likewise.
+ * backend/rust-compile-expr.h: Likewise.
+ * backend/rust-compile-fnparam.cc: Likewise.
+ * backend/rust-compile-fnparam.h: Likewise.
+ * backend/rust-compile-intrinsic.cc: Likewise.
+ * backend/rust-compile-pattern.cc: Likewise.
+ * backend/rust-compile-resolve-path.h: Likewise.
+ * backend/rust-compile.cc: Likewise.
+ * checks/errors/rust-const-checker.cc: Likewise.
+ * checks/errors/rust-const-checker.h: Likewise.
+ * checks/errors/rust-unsafe-checker.cc: Likewise.
+ * checks/errors/rust-unsafe-checker.h: Likewise.
+ * expand/rust-macro-builtins.cc: Likewise.
+ * expand/rust-macro-expand.h: Likewise.
+ * hir/rust-ast-lower-base.h: Likewise.
+ * hir/rust-ast-lower-implitem.h: Likewise.
+ * hir/rust-ast-lower-item.cc: Likewise.
+ * hir/tree/rust-hir-expr.h: Likewise.
+ * hir/tree/rust-hir-item.h: Likewise.
+ * hir/tree/rust-hir-path.h: Likewise.
+ * hir/tree/rust-hir-pattern.h: Likewise.
+ * hir/tree/rust-hir-stmt.h: Likewise.
+ * hir/tree/rust-hir-type.h: Likewise.
+ * hir/tree/rust-hir.cc: Likewise.
+ * hir/tree/rust-hir.h: Likewise.
+ * lex/rust-token.h: Likewise.
+ * metadata/rust-extern-crate.cc: Likewise.
+ * metadata/rust-extern-crate.h: Likewise.
+ * parse/rust-parse-impl.h: Likewise.
+ * parse/rust-parse.h: Likewise.
+ * resolve/rust-ast-resolve-expr.cc: Likewise.
+ * resolve/rust-ast-resolve-implitem.h: Likewise.
+ * resolve/rust-ast-resolve-pattern.h: Likewise.
+ * resolve/rust-ast-resolve-stmt.h: Likewise.
+ * resolve/rust-ast-resolve-toplevel.h: Likewise.
+ * resolve/rust-ast-resolve-type.h: Likewise.
+ * resolve/rust-name-resolver.cc: Likewise.
+ * resolve/rust-name-resolver.h: Likewise.
+ * rust-diagnostics.cc: Likewise.
+ * rust-diagnostics.h: Likewise.
+ * rust-gcc.cc: Likewise.
+ * rust-session-manager.cc: Likewise.
+ * rust-session-manager.h: Likewise.
+ * typecheck/rust-casts.cc: Likewise.
+ * typecheck/rust-casts.h: Likewise.
+ * typecheck/rust-coercion.cc: Likewise.
+ * typecheck/rust-coercion.h: Likewise.
+ * typecheck/rust-hir-path-probe.cc: Likewise.
+ * typecheck/rust-hir-path-probe.h: Likewise.
+ * typecheck/rust-hir-trait-reference.cc: Likewise.
+ * typecheck/rust-hir-trait-reference.h: Likewise.
+ * typecheck/rust-hir-trait-resolve.cc: Likewise.
+ * typecheck/rust-hir-type-check-base.cc: Likewise.
+ * typecheck/rust-hir-type-check-base.h: Likewise.
+ * typecheck/rust-hir-type-check-item.cc: Likewise.
+ * typecheck/rust-hir-type-check-item.h: Likewise.
+ * typecheck/rust-hir-type-check-path.cc: Likewise.
+ * typecheck/rust-hir-type-check-pattern.cc: Likewise.
+ * typecheck/rust-hir-type-check-pattern.h: Likewise.
+ * typecheck/rust-hir-type-check-type.cc: Likewise.
+ * typecheck/rust-hir-type-check-type.h: Likewise.
+ * typecheck/rust-hir-type-check.cc: Likewise.
+ * typecheck/rust-hir-type-check.h: Likewise.
+ * typecheck/rust-substitution-mapper.cc: Likewise.
+ * typecheck/rust-substitution-mapper.h: Likewise.
+ * typecheck/rust-type-util.cc: Likewise.
+ * typecheck/rust-typecheck-context.cc: Likewise.
+ * typecheck/rust-tyty-bounds.cc: Likewise.
+ * typecheck/rust-tyty-call.h: Likewise.
+ * typecheck/rust-tyty-subst.cc: Likewise.
+ * typecheck/rust-tyty-subst.h: Likewise.
+ * typecheck/rust-tyty-util.cc: Likewise.
+ * typecheck/rust-tyty-util.h: Likewise.
+ * typecheck/rust-tyty.cc: Likewise.
+ * typecheck/rust-tyty.h: Likewise.
+ * typecheck/rust-unify.cc: Likewise.
+ * typecheck/rust-unify.h: Likewise.
+ * util/rust-hir-map.cc: Likewise.
+ * util/rust-hir-map.h: Likewise.
+ * util/rust-identifier.h: Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-gcc.cc
+ (Gcc_backend::debug): Move out of class declaration.
+ (Gcc_backend::get_identifier_node): Likewise.
+ (Gcc_backend::wchar_type): Likewise.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit):
+ called error function.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-linemap.h (Linemap::predeclared_location): Remove.
+ * backend/rust-compile-type.cc:
+ Replace Linemap::predeclared_location with BUILTINS_LOCATION.
+ * resolve/rust-name-resolver.cc: Likewise.
+ * typecheck/rust-hir-type-check-type.cc: Likewise.
+ * typecheck/rust-tyty.cc: Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-gcc.h: Add include guard.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust-system.h (rust_unreachable): Change definition to fancy_abort
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Use rust_unreachable
+ instead of gcc_unreachable.
+ (get_delimiters): Likewise.
+ * ast/rust-ast-dump.h: Likewise.
+ * ast/rust-ast-formatting.cc (get_string_in_delims): Likewise.
+ (get_mode_dump_desc): Likewise.
+ * ast/rust-ast.cc (Visibility::as_string): Likewise.
+ (UseTreeGlob::as_string): Likewise.
+ * ast/rust-ast.h: Likewise.
+ * ast/rust-macro.h: Likewise.
+ * ast/rust-path.h: Likewise.
+ * backend/rust-compile-expr.cc (sort_tuple_patterns): Likewise.
+ (CompileExpr::visit): Likewise.
+ (CompileExpr::generate_closure_fntype): Likewise.
+ * backend/rust-compile-intrinsic.cc (op_with_overflow_inner): Likewise.
+ * backend/rust-compile-pattern.cc (CompilePatternBindings::visit): Likewise.
+ (CompilePatternLet::visit): Likewise.
+ * backend/rust-constexpr.cc (base_field_constructor_elt): Likewise.
+ (eval_array_reference): Likewise.
+ (label_matches): Likewise.
+ (eval_store_expression): Likewise.
+ (eval_call_expression): Likewise.
+ (build_data_member_initialization): Likewise.
+ (array_index_cmp): Likewise.
+ (get_array_or_vector_nelts): Likewise.
+ (eval_bit_field_ref): Likewise.
+ (eval_loop_expr): Likewise.
+ (potential_constant_expression_1): Likewise.
+ * backend/rust-mangle.cc (v0_simple_type_prefix): Likewise.
+ (v0_type_prefix): Likewise.
+ (v0_mangle_item): Likewise.
+ (Mangler::mangle_item): Likewise.
+ * backend/rust-tree.cc (convert_to_void): Likewise.
+ (type_memfn_quals): Likewise.
+ (rs_tree_equal): Likewise.
+ (fold_offsetof): Likewise.
+ (fold_builtin_source_location): Likewise.
+ (lvalue_error): Likewise.
+ * backend/rust-tree.h (struct named_decl_hash): Likewise.
+ (struct named_label_hash): Likewise.
+ * checks/errors/privacy/rust-visibility-resolver.cc
+ (VisibilityResolver::resolve_visibility): Likewise.
+ (VisibilityResolver::visit): Likewise.
+ * checks/errors/rust-const-checker.cc (ConstChecker::ctx_to_str): Likewise.
+ * checks/errors/rust-feature.cc (Feature::create): Likewise.
+ * expand/rust-expand-visitor.cc (get_traits_to_derive): Likewise.
+ (derive_item): Likewise.
+ (expand_item_attribute): Likewise.
+ (expand_stmt_attribute): Likewise.
+ * expand/rust-macro-expand.cc (MacroExpander::match_matcher): Likewise.
+ (MacroExpander::match_repetition): Likewise.
+ (transcribe_context): Likewise.
+ (MacroExpander::import_proc_macros): Likewise.
+ (MacroExpander::parse_proc_macro_output): Likewise.
+ * expand/rust-macro-expand.h: Likewise.
+ * expand/rust-macro-invoc-lexer.h: Likewise.
+ * expand/rust-macro-substitute-ctx.cc (SubstituteCtx::substitute_token): Likewise.
+ * expand/rust-proc-macro-invoc-lexer.h: Likewise.
+ * expand/rust-proc-macro.cc (load_macros): Likewise.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_generic_args): Likewise.
+ (ASTLoweringBase::lower_literal): Likewise.
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Likewise.
+ * hir/rust-ast-lower-pattern.cc (ASTLoweringPattern::visit): Likewise.
+ * hir/rust-ast-lower-type.cc (ASTLoweringType::visit): Likewise.
+ * hir/rust-hir-dump.cc (Dump::visit): Likewise.
+ * hir/tree/rust-hir.cc (get_string_in_delims): Likewise.
+ (Visibility::as_string): Likewise.
+ (UseTreeGlob::as_string): Likewise.
+ (CompoundAssignmentExpr::as_string): Likewise.
+ (ArithmeticOrLogicalExpr::as_string): Likewise.
+ * lex/rust-lex.cc (Lexer::parse_byte_string): Likewise.
+ (Lexer::parse_string): Likewise.
+ * lex/rust-token.cc (RS_TOKEN): Likewise.
+ * parse/rust-parse-impl.h (Parser::parse_simple_path_segment): Likewise.
+ (Parser::parse_path_ident_segment): Likewise.
+ (Parser::parse_attr_input): Likewise.
+ (Parser::parse_inherent_impl_item): Likewise.
+ (Parser::parse_trait_impl_item): Likewise.
+ (Parser::parse_type_path_segment): Likewise.
+ (Parser::parse_reference_type): Likewise.
+ (get_lbp_for_comparison_expr): Likewise.
+ * parse/rust-parse.cc (peculiar_fragment_match_compatible): Likewise.
+ * resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path): Likewise.
+ * resolve/rust-ast-resolve-pattern.cc (PatternDeclaration::visit): Likewise.
+ * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Likewise.
+ (ResolveTypeToCanonicalPath::visit): Likewise.
+ (ResolveGenericArgs::resolve_disambiguated_generic): Likewise.
+ * rust-gcc.cc (operator_to_tree_code): Likewise.
+ (fetch_overflow_builtins): Likewise.
+ (Gcc_backend::non_zero_size_type): Likewise.
+ (Gcc_backend::convert_tree): Likewise.
+ * rust-lang.cc (grs_langhook_type_for_mode): Likewise.
+ (grs_langhook_global_bindings_p): Likewise.
+ (grs_langhook_pushdecl): Likewise.
+ (grs_langhook_getdecls): Likewise.
+ (convert): Likewise.
+ * typecheck/rust-autoderef.h: Likewise.
+ * typecheck/rust-hir-path-probe.cc: Likewise.
+ * typecheck/rust-hir-trait-reference.cc (TraitItemReference::get_tyty): Likewise.
+ * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::resolve_literal): Likewise.
+ * typecheck/rust-hir-type-check-expr.cc: Likewise.
+ * typecheck/rust-hir-type-check-expr.h: Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc (TypeCheckImplItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Likewise.
+ * typecheck/rust-hir-type-check-stmt.h: Likewise.
+ * typecheck/rust-hir-type-check.cc (TraitItemReference::get_type_from_fn): Likewise.
+ * typecheck/rust-substitution-mapper.h: Likewise.
+ * typecheck/rust-typecheck-context.cc (TypeCheckContextItem::get_context_type): Likewise.
+ * typecheck/rust-tyty-call.h: Likewise.
+ * typecheck/rust-tyty.cc (TypeKindFormat::to_string): Likewise.
+ (BaseType::monomorphized_clone): Likewise.
+ (VariantDef::variant_type_string): Likewise.
+ (ClosureType::handle_substitions): Likewise.
+ (IntType::as_string): Likewise.
+ (UintType::as_string): Likewise.
+ (FloatType::as_string): Likewise.
+ * typecheck/rust-unify.cc (UnifyRules::expect_projection): Likewise.
+ * util/rust-token-converter.cc (convert): Likewise.
+ (from_literal): Likewise.
+ (from_group): Likewise.
+ (from_tokentree): Likewise.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * checks/errors/rust-feature-gate.cc (FeatureGate::gate):
+ called error function.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * backend/rust-compile-intrinsic.cc (Intrinsics::compile):
+ called error function.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * checks/errors/rust-unsafe-checker.cc (check_unsafe_call):
+ called error function.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-location.h
+ (typedef RichLocation): Remove.
+ * expand/rust-macro-expand.cc: Replace RichLocation with rich_location.
+ * hir/rust-ast-lower-base.cc: Likewise.
+ * resolve/rust-ast-resolve-implitem.h: Likewise.
+ * resolve/rust-ast-resolve-stmt.h: Likewise.
+ * resolve/rust-ast-resolve-toplevel.h: Likewise.
+ * rust-diagnostics.cc: Likewise.
+ * rust-diagnostics.h: Likewise.
+ * rust-session-manager.cc: Likewise.
+ * typecheck/rust-casts.cc: Likewise.
+ * typecheck/rust-coercion.cc: Likewise.
+ * typecheck/rust-hir-inherent-impl-overlap.h: Likewise.
+ * typecheck/rust-hir-path-probe.h: Likewise.
+ * typecheck/rust-hir-trait-reference.cc: Likewise.
+ * typecheck/rust-hir-type-check-expr.cc: Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc: Likewise.
+ * typecheck/rust-hir-type-check-item.cc: Likewise.
+ * typecheck/rust-hir-type-check-pattern.cc: Likewise.
+ * typecheck/rust-tyty-cmp.h: Likewise.
+ * typecheck/rust-tyty-subst.cc: Likewise.
+ * typecheck/rust-tyty.cc: Likewise.
+ * typecheck/rust-unify.cc: Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * lex/rust-lex.cc
+ (Lexer::start_line): Use linemap_line_start.
+ * rust-linemap.cc
+ (Linemap::start_line): Remove.
+ * rust-linemap.h
+ (Linemap::start_line): Remove.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-linemap.cc
+ (RichLocation::RichLocation): Remove.
+ (RichLocation::~RichLocation): Remove.
+ (RichLocation::add_range): Remove.
+ (RichLocation::add_fixit_insert_before): Remove.
+ (RichLocation::add_fixit_insert_after): Remove.
+ * rust-location.h
+ (class RichLocation): Remove.
+ * rust-diagnostics.cc
+ (rust_be_error_at): Remove RichLocation::get invocation.
+ * expand/rust-macro-expand.cc: Fix RichLocation constructor.
+ * hir/rust-ast-lower-base.cc: Likewise.
+ * resolve/rust-ast-resolve-implitem.h: Likewise.
+ * resolve/rust-ast-resolve-stmt.h: Likewise.
+ * resolve/rust-ast-resolve-toplevel.h: Likewise.
+ * rust-session-manager.cc: Likewise.
+ * typecheck/rust-casts.cc: Likewise.
+ * typecheck/rust-coercion.cc: Likewise.
+ * typecheck/rust-hir-inherent-impl-overlap.h: Likewise.
+ * typecheck/rust-hir-path-probe.h: Likewise.
+ * typecheck/rust-hir-trait-reference.cc: Likewise.
+ * typecheck/rust-hir-type-check-expr.cc: Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc: Likewise.
+ * typecheck/rust-hir-type-check-item.cc: Likewise.
+ * typecheck/rust-hir-type-check-pattern.cc: Likewise.
+ * typecheck/rust-tyty-cmp.h: Likewise.
+ * typecheck/rust-tyty-subst.cc: Likewise.
+ * typecheck/rust-tyty.cc: Likewise.
+ * typecheck/rust-unify.cc: Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * lex/rust-lex.cc
+ (Lexer::get_current_location): Use linemap_position_for_column.
+ * rust-session-manager.cc
+ (Session::handle_crate_name): Likewise.
+ * rust-linemap.cc
+ (Linemap::get_location): Remove.
+ * rust-linemap.h
+ (Linemap::get_location): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lex/rust-token.cc (escape_special_chars): Add a function that
+ escape a given string.
+ (Token::as_string): Add call to escape function for string/char
+ representations.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/tree/rust-hir-type.h (MaybeNamedParam::get_type): Remove
+ rust_assert.
+ (BareFunctionType::get_return_type): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-intrinsic.cc (offset_handler): Remove
+ braces.
+ (sizeof_handler): Likewise.
+ (transmute_handler): Likewise.
+ (rotate_handler): Likewise.
+ (wrapping_op_handler_inner): Likewise.
+ (op_with_overflow_inner): Likewise.
+ (atomic_load_handler_inner): Likewise.
+ (unchecked_op_inner): Likewise.
+ (uninit_handler): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Add virtual destructor.
+ * expand/rust-macro-expand.h: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * hir/tree/rust-hir-full-decls.h (struct Crate): Change to
+ class.
+ (class Crate): Likewise.
+ (struct StructField): Likewise.
+ (class StructField): Likewise.
+ (struct TupleField): Likewise.
+ (class TupleField): Likewise.
+ (struct TraitFunctionDecl): Likewise.
+ (class TraitFunctionDecl): Likewise.
+ * rust-session-manager.h (struct Crate): Likewise.
+ (class Crate): Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-expr.h
+ (MetaItemPathLit::get_locus): Remove copy construction.
+ * backend/rust-constexpr.cc
+ (eval_constant_expression): Likewise.
+ (is_valid_constexpr_fn): Likewise.
+ * util/rust-token-converter.cc
+ (convert): Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * lex/rust-lex.cc
+ (Lexer::dump_and_skip): Use location_to_string.
+ * rust-linemap.cc
+ (Linemap::to_string): Move to...
+ (Linemap::location_to_string): ... here.
+ * rust-linemap.h
+ (Linemap::to_string): Remove.
+ (Linemap::location_to_string): Remove definition.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/tree/rust-hir-expr.h (TypeCastExpr::get_casted_expr): Remove
+ assert in accessor.
+ (TypeCastExpr::get_type_to_convert_to): Likewise.
+ (CompoundAssignmentExpr::get_left_expr): Likewise.
+ (CompoundAssignmentExpr::get_right_expr): Likewise.
+ (GroupedExpr::get_expr_in_parens): Likewise.
+ (TupleIndexExpr::get_tuple_expr): Likewise.
+ (FieldAccessExpr::get_receiver_expr): Likewise.
+ (ClosureParam::get_pattern): Likewise.
+ (ClosureParam::get_type): Likewise.
+ (ExprType::get_return_type): Likewise.
+ (IfLetExpr::get_scrutinee_expr): Likewise.
+ (MatchArm::get_guard_expr): Likewise.
+ (MatchExpr::get_scrutinee_expr): Likewise.
+ * hir/tree/rust-hir-item.h (TypeParam::get_type): Likewise.
+ (SelfParam::get_type): Likewise.
+ (Function::get_return_type): Likewise.
+ (TypeAlias::get_type_aliased): Likewise.
+ (StructField::get_field_type): Likewise.
+ (TraitFunctionDecl::get_block_expr): Likewise.
+ (ImplBlock::get_trait_ref): Likewise.
+ * hir/tree/rust-hir-path.h (ConstGenericArg::get_expression): New.
+ (TypePathFunction::get_return_type): Remove assert in accessor.
+ (QualifiedPathType::get_trait): Likewise.
+ * hir/tree/rust-hir-pattern.h (PatternType::get_lower_bound): Likewise.
+ (PatternType::get_upper_bound): Likewise.
+ (ReferencePattern::get_referenced_pattern): Likewise.
+ * hir/tree/rust-hir.h (ConstGenericParam::get_default_expression): Likewise.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * hir/rust-ast-lower-base.cc (struct_field_name_exists):
+ called error function.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-diagnostics.cc
+ (rust_be_error_at): Add function accepting location_t and ErrorCode.
+ (rust_error_at): Likewise.
+ * rust-diagnostics.h
+ (rust_error_at): Likewise.
+ (rust_be_error_at): Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-linemap.cc
+ (class Gcc_linemap): Remove.
+ (Gcc_linemap::start_file): Move to...
+ (Linemap::start_file): ... here.
+ (Gcc_linemap::to_string): Move to...
+ (Linemap::to_string): ... here.
+ (Gcc_linemap::stop): Move to...
+ (Linemap::stop): ... here.
+ (Gcc_linemap::start_line): Move to...
+ (Linemap::start_line): ... here.
+ (Gcc_linemap::get_location): Move to...
+ (Linemap::get_location): ... here.
+ (rust_get_linemap): Use Linemap.
+ * rust-linemap.h
+ (Linemap::in_file_): New field from Gcc_linemap.
+ (Linemap::Linemap): Initialize in_file_.
+ (Linemap::~Linemap): Make non-virtual.
+ (Linemap::start_file): Likewise.
+ (Linemap::start_line): Likewise.
+ (Linemap::get_location): Likewise.
+ (Linemap::stop): Likewise.
+ (Linemap::to_string): Likewise.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Remove rust-optional-test.cc's object file
+ * ast/rust-macro.h: Remove use of Rust::Optional
+ * backend/rust-compile-base.cc
+ (HIRCompileBase::resolve_method_address): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc
+ (PrivacyReporter::check_for_privacy_violation): Likewise.
+ (PrivacyReporter::visit): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.h: Likewise.
+ * checks/errors/rust-feature-gate.cc (FeatureGate::check): Likewise.
+ * checks/errors/rust-feature.cc (Feature::create): Likewise.
+ (Feature::as_name): Likewise.
+ * checks/errors/rust-feature.h: Likewise.
+ * expand/rust-macro-builtins.cc: Likewise.
+ * lex/rust-lex.cc (Lexer::Lexer): Likewise.
+ (Lexer::skip_token): Likewise.
+ (Lexer::dump_and_skip): Likewise.
+ * lex/rust-lex.h: Likewise.
+ * resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path): Likewise.
+ * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Likewise.
+ * rust-lang.cc (run_rust_tests): Likewise.
+ * rust-session-manager.cc (Session::compile_crate): Likewise.
+ (TargetOptions::dump_target_options): Likewise.
+ * rust-session-manager.h (struct TargetOptions): Likewise.
+ * util/rust-hir-map.cc (Mappings::lookup_module_children): Likewise.
+ (Mappings::lookup_module_chidren_items): Likewise.
+ (Mappings::lookup_module_child): Likewise.
+ (Mappings::lookup_parent_module): Likewise.
+ * util/rust-hir-map.h (RUST_HIR_MAP_H): Likewise.
+ * util/rust-optional-test.cc: Removed.
+ * util/rust-optional.h: Removed.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-linemap.h (Linemap::unknown_location): Remove.
+ * ast/rust-ast.cc:
+ Replace Linemap::unknown_location with UNKNOWN_LOCATION.
+ * ast/rust-path.cc: Likewise.
+ * hir/tree/rust-hir.cc: Likewise.
+ * metadata/rust-imports.cc: Likewise.
+ * parse/rust-parse-impl.h: Likewise.
+ * parse/rust-parse.h: Likewise.
+ * rust-backend.h: Likewise.
+ * rust-diagnostics.cc: Likewise.
+ * rust-session-manager.cc: Likewise.
+ * typecheck/rust-tyty.cc: Likewise.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * resolve/rust-ast-verify-assignee.h: called error function.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-tyty-call.cc (emit_unexpected_argument_error):
+ Refactored invalid number of argument into one function.
+ (TypeCheckCallExpr::visit): called refactored function.
+ (TypeCheckMethodCallExpr::check): likewise.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/expected.h: Adapt class to GCC requirements.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/expected.h: New file.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/optional.h: Adapt for GCC.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/optional.h: New file.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-location.h (UNDEF_LOCATION): New.
+ * ast/rust-ast-collector.cc: Replace Location () with UNDEF_LOCATION.
+ * ast/rust-ast-fragment.cc: Likewise.
+ * ast/rust-ast.h: Likewise.
+ * ast/rust-expr.h: Likewise.
+ * ast/rust-item.h: Likewise.
+ * ast/rust-macro.h: Likewise.
+ * ast/rust-path.h: Likewise.
+ * ast/rust-type.h: Likewise.
+ * backend/rust-compile-expr.cc: Likewise.
+ * backend/rust-compile-extern.h: Likewise.
+ * backend/rust-compile-implitem.h: Likewise.
+ * backend/rust-compile-intrinsic.cc: Likewise.
+ * backend/rust-compile-item.h: Likewise.
+ * backend/rust-compile.cc: Likewise.
+ * backend/rust-constexpr.cc: Likewise.
+ * expand/rust-expand-visitor.cc: Likewise.
+ * expand/rust-macro-expand.cc: Likewise.
+ * expand/rust-macro-expand.h: Likewise.
+ * expand/rust-macro-invoc-lexer.cc: Likewise.
+ * expand/rust-proc-macro-invoc-lexer.cc: Likewise.
+ * expand/rust-proc-macro.cc: Likewise.
+ * hir/tree/rust-hir-expr.h: Likewise.
+ * hir/tree/rust-hir-item.h: Likewise.
+ * hir/tree/rust-hir-path.h: Likewise.
+ * hir/tree/rust-hir-type.h: Likewise.
+ * hir/tree/rust-hir.h: Likewise.
+ * lex/rust-lex.cc: Likewise.
+ * metadata/rust-export-metadata.cc: Likewise.
+ * parse/rust-parse-impl.h: Likewise.
+ * resolve/rust-ast-resolve-item.cc: Likewise.
+ * resolve/rust-ast-resolve.cc: Likewise.
+ * rust-diagnostics.h: Likewise.
+ * rust-session-manager.cc: Likewise.
+ * typecheck/rust-autoderef.cc: Likewise.
+ * typecheck/rust-coercion.cc: Likewise.
+ * typecheck/rust-hir-dot-operator.cc: Likewise.
+ * typecheck/rust-hir-path-probe.cc: Likewise.
+ * typecheck/rust-hir-trait-reference.cc: Likewise.
+ * typecheck/rust-hir-trait-reference.h: Likewise.
+ * typecheck/rust-hir-type-check-expr.cc: Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc: Likewise.
+ * typecheck/rust-hir-type-check-type.cc: Likewise.
+ * typecheck/rust-hir-type-check.cc: Likewise.
+ * typecheck/rust-tyty-bounds.cc: Likewise.
+ * typecheck/rust-tyty-subst.cc: Likewise.
+ * typecheck/rust-tyty.cc: Likewise.
+ * util/rust-hir-map.cc: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Fix abit
+ output format.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Fix
+ external item trailing semicolon and outer attributes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Output
+ outer attributes on external functions.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Fix method
+ qualifier output.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Add where
+ clause.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Add outer
+ attributes to collector output.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Add
+ variadics in collector output.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Add
+ generics.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Fix generic
+ output.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Reformat
+ trait impl block.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Output
+ generic in inherent impl.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-dump.cc (Dump::require_spacing): Change dollar
+ spacing rule.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Change
+ formatting.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Fix trait
+ impl block output.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Fix binding
+ args.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Output
+ function qualifiers after visibility.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Fix self
+ param output.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-dump.cc (Dump::require_spacing): Add a rule to
+ remove spaces around dots and after references.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Fix several
+ token collection rules.
+ * ast/rust-ast-dump.cc (Dump::require_spacing): Add spacing rule
+ for comma.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-invoc-lexer.h
+ (class MacroInvocLexerBase): New.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-builtins.cc
+ (source_relative_path): Use LOCATION_FILE.
+ (MacroBuiltin::file_handler): Likewise.
+ (MacroBuiltin::column_handler): Use LOCATION_COLUMN.
+ (MacroBuiltin::line_handler): Use LOCATION_LINE.
+ * rust-linemap.cc
+ (Gcc_linemap::location_file): Remove.
+ (Gcc_linemap::location_line): Remove.
+ (Gcc_linemap::location_column): Remove.
+ * rust-linemap.h
+ (Linemap::location_file): Remove.
+ (Linemap::location_line): Remove.
+ (Linemap::location_column): Remove.
+ (Linemap::location_to_file): Remove.
+ (Linemap::location_to_line): Remove.
+ (Linemap::location_to_column): Remove.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit):
+ called error function and changed error message
+ similiar to rustc.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-linemap.cc
+ (Gcc_linemap::get_unknown_location): Remove.
+ (Gcc_linemap::get_predeclared_location): Remove.
+ (Gcc_linemap::is_predeclared): Remove.
+ (Gcc_linemap::is_unknown): Remove.
+ * rust-linemap.h
+ (Linemap::get_predeclared_location): Remove.
+ (Linemap::get_unknown_location): Remove.
+ (Linemap::is_predeclared): Remove.
+ (Linemap::is_unknown): Remove.
+ (Linemap::predeclared_location): Use BUILTINS_LOCATION.
+ (Linemap::unknown_location): Use UNKNOWN_LOCATION.
+ (Linemap::is_predeclared_location): Remove.
+ (Linemap::is_unknown_location): Remove.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-implitem.cc (TypeCheckImplItemWithTrait::visit):
+ called error function
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::resolve):
+ called error function.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * lex/rust-lex.cc (Lexer::input_source_is_valid_utf8): New method of `Lexer`.
+ * lex/rust-lex.h: Likewise.
+ * rust-session-manager.cc (Session::compile_crate): Add error.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-expand.cc
+ (transcribe_expression): Skip trailing semicolon.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-item.cc: called error function.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * ast/rust-ast.h: Modify constructors of `Rust::Identifier`
+ * ast/rust-pattern.h: Likewise.
+ * hir/tree/rust-hir-item.h: Likewise.
+ * parse/rust-parse-impl.h (Parser::parse_macro_rules_def): Likewise.
+ (Parser::parse_decl_macro_def): Likewise.
+ (Parser::parse_macro_match_fragment): Likewise.
+ (Parser::parse_module): Likewise.
+ (Parser::parse_use_tree): Likewise.
+ (Parser::parse_function): Likewise.
+ (Parser::parse_type_param): Likewise.
+ (Parser::parse_type_alias): Likewise.
+ (Parser::parse_struct): Likewise.
+ (Parser::parse_struct_field): Likewise.
+ (Parser::parse_enum): Likewise.
+ (Parser::parse_enum_item): Likewise.
+ (Parser::parse_union): Likewise.
+ (Parser::parse_static_item): Likewise.
+ (Parser::parse_trait): Likewise.
+ (Parser::parse_trait_item): Likewise.
+ (Parser::parse_trait_type): Likewise.
+ (Parser::parse_trait_const): Likewise.
+ (Parser::parse_external_item): Likewise.
+ (Parser::parse_generic_args_binding): Likewise.
+ (Parser::parse_method): Likewise.
+ (Parser::parse_maybe_named_param): Likewise.
+ (Parser::parse_identifier_pattern): Likewise.
+ (Parser::parse_struct_expr_field): Likewise.
+ (ResolveItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc (TypeCheckImplItem::visit):Add comments
+ * resolve/rust-ast-resolve-item.cc (ResolveTraitItems::visit): Likewise.
+ * checks/lints/rust-lint-scan-deadcode.h: Fix error location
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-base.cc
+ (HIRCompileBase::address_expression): Remove gcc_location method call.
+ (HIRCompileBase::indirect_expression): Likewise.
+ (HIRCompileBase::compile_constant_item): Likewise.
+ (HIRCompileBase::named_constant_expression): Likewise.
+ * backend/rust-compile-expr.cc
+ (CompileExpr::visit): Remove gcc_location method call, use UNKNOWN_LOCATION to initialize.
+ (CompileExpr::get_fn_addr_from_dyn): Remove gcc_location method call.
+ (CompileExpr::type_cast_expression): Likewise.
+ * backend/rust-compile-intrinsic.cc
+ (transmute_handler): Replace "Location ().gcc_location ()" with UNKNOWN_LOCATION.
+ (copy_nonoverlapping_handler): Likewise.
+ (prefetch_data_handler): Likewise.
+ (atomic_store_handler_inner): Likewise.
+ (atomic_load_handler_inner): Likewise.
+ * resolve/rust-ast-resolve-expr.cc
+ (ResolveExpr::visit): Remove gcc_location method call.
+ * rust-diagnostics.cc
+ (rust_be_error_at): Likewise.
+ (rust_be_warning_at): Likewise.
+ (rust_be_fatal_error): Likewise.
+ (rust_be_inform): Likewise.
+ * rust-diagnostics.h
+ (rust_sorry_at): Likewise.
+ * rust-gcc.cc
+ (Bvariable::get_tree): Likewise.
+ (Gcc_backend::fill_in_fields): Likewise.
+ (Gcc_backend::named_type): Likewise.
+ (Gcc_backend::real_part_expression): Likewise.
+ (Gcc_backend::imag_part_expression): Likewise.
+ (Gcc_backend::complex_expression): Likewise.
+ (Gcc_backend::convert_expression): Likewise.
+ (Gcc_backend::struct_field_expression): Likewise.
+ (Gcc_backend::compound_expression): Likewise.
+ (Gcc_backend::conditional_expression): Likewise.
+ (Gcc_backend::negation_expression): Likewise.
+ (Gcc_backend::arithmetic_or_logical_expression): Likewise.
+ (Gcc_backend::arithmetic_or_logical_expression_checked): Likewise.
+ (Gcc_backend::comparison_expression): Likewise.
+ (Gcc_backend::lazy_boolean_expression): Likewise.
+ (Gcc_backend::constructor_expression): Likewise.
+ (Gcc_backend::array_constructor_expression): Likewise.
+ (Gcc_backend::array_initializer): Likewise.
+ (Gcc_backend::array_index_expression): Likewise.
+ (Gcc_backend::call_expression): Likewise.
+ (Gcc_backend::assignment_statement): Likewise.
+ (Gcc_backend::return_statement): Likewise.
+ (Gcc_backend::exception_handler_statement): Likewise.
+ (Gcc_backend::if_statement): Likewise.
+ (Gcc_backend::loop_expression): Likewise.
+ (Gcc_backend::exit_expression): Likewise.
+ (Gcc_backend::block): Likewise.
+ (Gcc_backend::convert_tree): Likewise.
+ (Gcc_backend::global_variable): Likewise.
+ (Gcc_backend::local_variable): Likewise.
+ (Gcc_backend::parameter_variable): Likewise.
+ (Gcc_backend::static_chain_variable): Likewise.
+ (Gcc_backend::temporary_variable): Likewise.
+ (Gcc_backend::label): Likewise.
+ (Gcc_backend::goto_statement): Likewise.
+ (Gcc_backend::label_address): Likewise.
+ (Gcc_backend::function): Likewise.
+ * rust-linemap.cc
+ (Gcc_linemap::to_string): Likewise.
+ (Gcc_linemap::location_file): Likewise.
+ (Gcc_linemap::location_line): Likewise.
+ (Gcc_linemap::location_column): Likewise.
+ (Gcc_linemap::is_predeclared): Likewise.
+ (Gcc_linemap::is_unknown): Likewise.
+ (RichLocation::RichLocation): Likewise.
+ (RichLocation::add_range): Likewise.
+ (RichLocation::add_fixit_insert_before): Likewise.
+ (RichLocation::add_fixit_insert_after): Likewise.
+ * rust-location.h
+ (class Location): Replace with typedef.
+ (operator<): Remove.
+ (operator==): Remove.
+ (operator+): Remove.
+ (operator-): Remove.
+ * typecheck/rust-hir-trait-resolve.cc
+ (AssociatedImplTrait::setup_associated_types): Initialize Location with UNKNOWN_LOCATION.
+ * typecheck/rust-hir-type-check-stmt.cc
+ (TypeCheckStmt::visit): Likewise.
+ * util/rust-token-converter.cc
+ (convert): Remove gcc_location method call.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/tree/rust-hir-expr.h (BorrowExpr::is_double_borrow): New.
+ (ArrayElemsCopied::get_elem_to_copy)
+ (ArrayElemsCopied::get_num_copies_expr): Return unique_ptr.
+ (CallExpr::get_fnexpr): Likewise.
+ (ReturnExpr::get_expr): Likewise.
+ (StructExprStructFields::get_struct_base): New.
+ (MethodCallExpr::has_params): New.
+ (ClosureExpr::has_params): New.
+ (BlockExpr::get_inner_attrs): New.
+ (WhileLoopExpr::get_patterns): New.
+ (ForLoopExpr::get_pattern): New.
+ (IfLetExpr::get_if_block): Return ref to unique_ptr.
+ (IfLetExprConseqElse::get_else_block): Likewise.
+ (MatchExpr::get_inner_attrs): New.
+ * hir/tree/rust-hir-item.h (Module::get_module_name): New.
+ (ExternCrate::get_referenced_crate)
+ (ExternCrate::get_as_clause_name): New.
+ (UseTreeGlob::get_glob_type, UseTreeGlob::get_path): New.
+ (UseTreeList::get_path_type, UseTreeList::get_path)
+ (UseTreeList::get_trees): New.
+ (TraitItemKind::get_expr): Remove assert. unique_ptr can
+ be "empty". Must be checked in caller.
+ * hir/tree/rust-hir-pattern.h (IdentifierPattern::get_is_ref)
+ (IdentifierPattern::get_to_bind): New.
+ (RangePatternBoundType::get_has_minus): New.
+ (RangePattern::get_has_ellipsis_syntax): New.
+ (StructPatternField::get_outer_attrs): New.
+ (StructPatternFieldTuplePat::get_index)
+ (StructPatternFieldTuplePat::get_tuple_pattern): New.
+ (StructPatternFieldIdent::get_has_ref): New.
+ * hir/tree/rust-hir-stmt.h (LetStmt::get_outer_attrs): New.
+ (LetStmt::get_type)
+ (LetStmt::get_init_expr, LetStmt::get_pattern): Return unique_ptr.
+ (ExprStmt::get_expr): Likewise.
+ * hir/tree/rust-hir-type.h (TraitBound::get_for_lifetimes): New.
+ (TraitBound::get_in_params): New.
+ (TraitBound::get_opening_question_mark): New.
+ (ImplTraitType::get_type_param_bounds): New.
+ (TraitObjectType::get_has_dyn): New.
+ (TraitBound::get_type_in_parens): New.
+ (ImplTraitTypeOneBound::get_trait_bound): New.
+ (BareFunctionType::get_for_lifetimes)
+ (BareFunctionType::get_is_variadic)
+ (BareFunctionType::get_function_qualifiers): New.
+ * hir/tree/rust-hir.h (class Expr): Virtual inherit from FullVisitable.
+ (class Pattern): Likewise.
+ (ConstGenericParam::get_name): New.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Adjust call.
+ (TypeCheckExpr::resolve_fn_trait_call): Likewise.
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Adjust call.
+ (CompileExpr::array_copied_expr): Likewise.
+ (CompileExpr::generate_possible_fn_trait_call): Likewise.
+ * backend/rust-compile-stmt.cc (CompileStmt::visit): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Likewise.
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise.
+ * hir/rust-hir-dump.cc (Dump::visit): Likewise.
+ * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Likewise.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-path-probe.h: called error function
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-tyty-subst.cc (SubstitutionRef::get_mappings_from_generic_args):
+ called error function
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/tree/rust-hir-expr.h (class ArrayElems): Inherit from FullVisitable.
+ (class StructExprField): Likewise.
+ * hir/tree/rust-hir-item.h (class WhereClauseItem): Likewise.
+ (class UseTree): Likewise.
+ (UseTreeRebind::get_path, UseTreeRebind::get_identifier)
+ (UseTreeRebind::get_bind_type): New.
+ (UseDeclaration::get_use_tree): New.
+ (struct TraitFunctionDecl): Change struct to ...
+ (class TraitFunctionDecl): ... class.
+ (TraitFunctionDecl::get_where_clause): New.
+ (StructField::get_outer_attrs): New.
+ (struct TupleField): Change struct to ...
+ (class TupleField): ... class.
+ (TupleField::get_visibility, TupleField::get_outer_attrs): New.
+ * hir/tree/rust-hir-pattern.h (class TupleStructItems): Inherit
+ from FullVisitable.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * lex/rust-lex.cc (Lexer::build_token): Replace function call.
+ (Lexer::parse_string): Likewise.
+ (Lexer::parse_identifier_or_keyword): Likewise.
+ (Lexer::parse_raw_string): Likewise.
+ (Lexer::parse_char_or_lifetime): Likewise.
+ (Lexer::get_input_codepoint_length): Deleted.
+ (Lexer::peek_codepoint_input): Deleted.
+ (Lexer::skip_codepoint_input): Deleted.
+ * lex/rust-lex.h: Remove some methods and fields
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty-bounds.cc (TypeCheckBase::get_predicate_from_bound): track output
+ * util/rust-hir-map.cc (Mappings::lookup_trait_item_lang_item): new helper
+ * util/rust-hir-map.h: add prototype for helper
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::generate_possible_fn_trait_call): use fnexpr
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::resolve_fn_trait_call): likewise
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): called rust_error_at
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/tree/rust-hir.h (struct Crate): Rename struct into ...
+ (class Crate): ... class, and add get_items.
+ * backend/rust-compile.cc (CompileCrate::go): Adapt to visibility change of items.
+ * checks/errors/privacy/rust-privacy-check.cc (Resolver::resolve): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::go): Likewise.
+ * checks/errors/privacy/rust-pub-restricted-visitor.cc (PubRestrictedVisitor::go): Likewise.
+ * checks/errors/privacy/rust-visibility-resolver.cc (VisibilityResolver::go): Likewise.
+ * checks/errors/rust-const-checker.cc (ConstChecker::go): Likewise.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::go): Likewise.
+ * checks/lints/rust-lint-marklive.cc (FindEntryPoint::find): Likewise.
+ * checks/lints/rust-lint-scan-deadcode.h (ScanDeadCode::Scan): Likewise.
+ * metadata/rust-export-metadata.cc (PublicInterface::gather_export_data): Likewise.
+ * typecheck/rust-hir-type-check.cc (TypeResolution::Resolve): Likewise.
+ * hir/rust-hir-dump.cc (CompileCrate::go): Likewise.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/tree/rust-hir-expr.h (AwaitExpr::get_awaited_expr): New.
+ (AsyncBlockExpr::get_has_move, AsyncBlockExpr::get_block_expr): New.
+ * hir/tree/rust-hir-item.h (Enum::get_where_clause): New.
+ (Trait::get_where_clause, Trait::is_unsafe): New.
+ (ExternalItem::get_visibility): New.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/tree/rust-hir.h (class FullVisitable): New.
+ (class Stmt): Adjust with new class.
+ (class Expr): Likewise.
+ (class Pattern): Likewise.
+ (class Type): Likewise.
+ (class TypeParamBound): Likewise.
+ (class GenericParam): Likewise.
+ (class TraitItem): Likewise.
+ (class ImplItem): Likewise.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/tree/rust-hir.h (class WithInnerAttrs): New.
+ (class Item): Adjust to new WithInnerAttrs class.
+ (struct Crate): Likewise.
+ * hir/rust-hir-dump.cc (Dump::go): Likewise.
+ (Dump::visit): Likewise.
+ * hir/tree/rust-hir-expr.h (class GroupedExpr): Likewise.
+ (class ArrayExpr): Likewise.
+ (class TupleExpr): Likewise.
+ (class StructExprStruct): Likewise.
+ (class BlockExpr): Likewise.
+ (class MatchExpr): Likewise.
+ * hir/tree/rust-hir-item.h (TypeParam::get_outer_attribute): New.
+ (class Module): Adjust to new WithInnerAttrs class.
+ (struct StructField): change struct to...
+ (class StructField): ... a class.
+ (class ImplBlock): Adjust to new WithInnerAttrs class.
+ (class ExternBlock): Likewise.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/tree/rust-hir-type.h (ArrayType::get_element_type): Returns
+ unique_ptr.
+ * hir/tree/rust-hir-expr.h (ArithmeticOrLogicalExpr::get_lhs)
+ (ArithmeticOrLogicalExpr::get_rhs): Likewise.
+ (ComparisonExpr::get_lhs, ComparisonExpr::get_rhs): Likewise.
+ (LazyBooleanExpr::get_lhs, LazyBooleanExpr::get_rhs): Likewise.
+ (AssignmentExpr::get_lhs, AssignmentExpr::get_rhs): Likewise.
+ (ArrayExpr::get_internal_elements): Likewise.
+ (ArrayIndexExpr::get_index_expr, ArrayIndexExpr::get_array_expr):
+ Likewise.
+ (StructExprFieldWithVal::get_value): Likewise.
+ (IfExpr::get_if_condition, IfExpr::get_if_block): Likewise.
+ (ExprWithBlock::get_else_block): Likewise.
+ * hir/tree/rust-hir-item.h (FunctionParam::get_param_name)
+ (FunctionParam::get_type): Likewise.
+ (ConstantItem::get_type, ConstantItem::get_expr): Likewise.
+ (StaticItem::get_expr, StaticItem::get_type): Likewise.
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit):
+ Adjust for previous change.
+ * backend/rust-compile-block.cc (CompileConditionalBlocks::visit):
+ Likewise.
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise.
+ * backend/rust-compile-item.cc (CompileItem::visit): Likewise.
+ * backend/rust-compile-struct-field-expr.cc
+ (CompileStructExprField::visit): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc
+ (PrivacyReporter::visit): Likewise.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc
+ (TypeCheckImplItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit):
+ Likewise.
+ * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit):
+ Likewise.
+ * typecheck/rust-hir-type-check-struct.cc
+ (TypeCheckStructExpr::visit): Likewise.
+ * typecheck/rust-hir-type-check.cc
+ (TraitItemReference::get_type_from_fn): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-pattern.h: Change constructor to accept new parameter
+ instead of defaulting on string type.
+ * parse/rust-parse-impl.h (Parser::parse_literal_or_range_pattern):
+ Propagate type hint.
+ (Parser::parse_pattern_no_alt): Likewise.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * lex/rust-lex.cc (Lexer::parse_byte_char):add check for range of codepoint
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc (emit_invalid_field_error): Refactored Field
+ Error Function
+ (TypeCheckPattern::visit): called emit_invalid_field_error function
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-expand.cc
+ (MacroExpander::match_matcher): Remove append_fragment inside repetitions.
+ (MacroExpander::match_n_matches): Use sub_stack push/pop to handle repetitions.
+ (MatchedFragmentContainer::add_fragment): Add MatchedFragmentContainer accepting version.
+ * expand/rust-macro-expand.h
+ (MatchedFragmentContainer::add_fragment): Likewise.
+ (MatchedFragmentContainerRepetition::add_fragment): Likewise.
+ (SubstititionScope::append_fragment): Likewise.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-casts.cc (TypeCastRules::check): apply new argument
+ * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): track if this is a cast site
+ (TypeCoercionRules::TryCoerce): update ctor
+ (TypeCoercionRules::TypeCoercionRules): cleanup error handling
+ (TypeCoercionRules::do_coercion): likewise
+ (TypeCoercionRules::coerce_unsafe_ptr): only infer in try mode
+ (TypeCoercionRules::coerce_borrowed_pointer): cleanup
+ * typecheck/rust-coercion.h: update header
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-reference.h: update prototype
+ * typecheck/rust-hir-trait-resolve.cc: add generic args as an out param
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): use the generics
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Add comment
+ after tail expressions.
+ * ast/rust-ast-dump.cc (Dump::require_spacing): Check for
+ missing previous token.
+ * ast/rust-ast-dump.h: Output formatting characters.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::collect): Collect
+ CollectItems once done.
+ (TokenCollector::newline): Add newline formatting
+ implementation.
+ (TokenCollector::indentation): Add indentation implementation.
+ (TokenCollector::increment_indentation): Add indentation
+ increment.
+ (TokenCollector::comment): Add new comment formatting option.
+ * ast/rust-ast-collector.h: Update prototypes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::collect_tokens):
+ Filter tokens.
+ (TokenCollector::visit_items_joined_by_separator): Change store
+ call.
+ (TokenCollector::visit_as_line): Likewise.
+ (TokenCollector::visit_items_as_block): Likewise.
+ (TokenCollector::trailing_comma): Likewise.
+ (TokenCollector::visit): Likewise.
+ (TokenCollector::visit_closure_common): Likewise.
+ (TokenCollector::visit_function_common): Likewise.
+ * ast/rust-ast-collector.h (class CollectItem): Add class to
+ differentiate between formatting and raw data (tokens).
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::TokenCollector):
+ Remove constructor, changing it to an implicit default
+ constructor.
+ * ast/rust-ast-collector.h: Change from container reference to
+ direct container.
+ * ast/rust-ast-dump.h: Change call to constructor.
+ * expand/rust-macro-expand.h (struct MacroExpander): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-dump.cc (Dump::require_spacing): Add a function
+ to determine wether a space shall output.
+ * ast/rust-ast-dump.h: Add function prototype as well as
+ condition.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Add a visit
+ function for visitable abstract class so we can call a dump on
+ any visitable item.
+ * ast/rust-ast-collector.h: Add new visit function prototype.
+ * ast/rust-ast-dump.cc (Dump::go): Add call to process function.
+ (Dump::visit): Remove functions.
+ (Dump::visit_items_joined_by_separator): Likewise.
+ (Dump::visit_as_line): Likewise.
+ (Dump::visit_items_as_lines): Likewise.
+ (Dump::visit_items_as_block): Likewise.
+ (Dump::visit_function_common): Likewise.
+ (get_delimiters): Likewise.
+ (Dump::debug): Update with call to tokencollector.
+ * ast/rust-ast-dump.h (RUST_AST_DUMP_H): Move include
+ directives.
+ (class Dump): Remove multiple prototypes and add generic process
+ function.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Add
+ semicolon in extern blocks.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust-session-manager.cc (Session::enable_dump): Remove
+ tokenstream dump.
+ (Session::compile_crate): Likewise.
+ (Session::dump_tokenstream): Likewise.
+ * rust-session-manager.h (struct CompileOptions): Likewise.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * lex/rust-lex.cc (Lexer::build_token):add check for all kinds of whitespaces
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Add default constructors.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Change with
+ call to getter.
+ * ast/rust-ast.cc (Module::as_string): Likewise.
+ (StaticItem::as_string): Likewise.
+ (TupleStruct::as_string): Likewise.
+ (Method::as_string): Likewise.
+ (StructStruct::as_string): Likewise.
+ (UseTreeRebind::as_string): Likewise.
+ (Enum::as_string): Likewise.
+ (Trait::as_string): Likewise.
+ (Union::as_string): Likewise.
+ (Function::as_string): Likewise.
+ (TypeAlias::as_string): Likewise.
+ (MacroRulesDefinition::as_string): Likewise.
+ (FieldAccessExpr::as_string): Likewise.
+ (MacroMatchFragment::as_string): Likewise.
+ (TypeParam::as_string): Likewise.
+ (StructExprFieldIdentifierValue::as_string): Likewise.
+ (EnumItem::as_string): Likewise.
+ (StructField::as_string): Likewise.
+ (ExternalTypeItem::as_string): Likewise.
+ (ExternalStaticItem::as_string): Likewise.
+ (ExternalFunctionItem::as_string): Likewise.
+ (TraitFunctionDecl::as_string): Likewise.
+ (TraitMethodDecl::as_string): Likewise.
+ (TraitItemConst::as_string): Likewise.
+ (TraitItemType::as_string): Likewise.
+ (MaybeNamedParam::as_string): Likewise.
+ (MetaListPaths::as_string): Likewise.
+ (MetaListNameValueStr::as_string): Likewise.
+ (Module::process_file_path): Likewise.
+ (MetaListNameValueStr::check_cfg_predicate): Likewise.
+ (MetaListPaths::check_cfg_predicate): Likewise.
+ (MetaWord::check_cfg_predicate): Likewise.
+ (MetaNameValueStr::check_cfg_predicate): Likewise.
+ (MetaNameValueStr::to_attribute): Likewise.
+ (MetaWord::to_attribute): Likewise.
+ (MetaListPaths::to_attribute): Likewise.
+ (MetaListNameValueStr::to_attribute): Likewise.
+ (operator<<): Change Identifier class <<
+ operator overload for standard output stream.
+ * ast/rust-ast.h (class Identifier): Change typedef to proper
+ class definition.
+ (operator<<): Add prototype for operator overload.
+ (class Token): Change getter identifier.
+ (class MetaListNameValueStr): Likewise.
+ (class PathExpr): Likewise.
+ * ast/rust-expr.h: Likewise.
+ * ast/rust-item.h: Likewise.
+ * ast/rust-macro.h: Likewise.
+ * ast/rust-path.cc (GenericArg::disambiguate_to_type): Likewise.
+ (GenericArgsBinding::as_string): Likewise.
+ (ConstGenericParam::as_string): Likewise.
+ * ast/rust-path.h: Likewise.
+ * ast/rust-pattern.cc (IdentifierPattern::as_string): Likewise.
+ (StructPatternFieldIdentPat::as_string): Likewise.
+ (StructPatternFieldIdent::as_string): Likewise.
+ * ast/rust-type.h: Likewise.
+ * backend/rust-compile-base.cc: Likewise.
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise.
+ * backend/rust-compile-extern.h: Likewise.
+ * backend/rust-compile-fnparam.cc (CompileFnParam::visit):
+ Likewise.
+ * backend/rust-compile-implitem.cc (CompileTraitItem::visit):
+ Likewise.
+ * backend/rust-compile-item.cc (CompileItem::visit): Likewise.
+ * backend/rust-compile-pattern.cc (CompilePatternBindings::visit): Likewise.
+ * backend/rust-compile-struct-field-expr.cc (CompileStructExprField::visit):
+ Likewise.
+ * backend/rust-compile-var-decl.h: Likewise.
+ * backend/rust-compile.cc: Likewise.
+ * checks/errors/rust-unsafe-checker.cc (check_extern_call):
+ Likewise.
+ * checks/lints/rust-lint-marklive.cc (MarkLive::visit):
+ Likewise.
+ * checks/lints/rust-lint-scan-deadcode.h: Likewise.
+ * expand/rust-derive-clone.cc (DeriveClone::clone_fn): Likewise.
+ (DeriveClone::visit_tuple): Likewise.
+ (DeriveClone::visit_struct): Likewise.
+ (DeriveClone::visit_union): Likewise.
+ * expand/rust-derive-copy.cc (DeriveCopy::visit_struct):
+ Likewise.
+ (DeriveCopy::visit_tuple): Likewise.
+ (DeriveCopy::visit_enum): Likewise.
+ (DeriveCopy::visit_union): Likewise.
+ * expand/rust-macro-expand.cc (MacroExpander::match_matcher):
+ Likewise.
+ (MacroExpander::match_n_matches): Likewise.
+ (MacroExpander::match_repetition): Likewise.
+ (MacroExpander::match_repetition_skipped_metavars): Likewise.
+ * hir/rust-ast-lower-base.cc (struct_field_name_exists):
+ Likewise.
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Likewise.
+ * hir/rust-ast-lower-type.cc (ASTLowerGenericParam::visit):
+ Likewise.
+ * hir/rust-hir-dump.cc (Dump::visit): Likewise.
+ * hir/tree/rust-hir-expr.h: Likewise.
+ * hir/tree/rust-hir-item.h: Likewise.
+ * hir/tree/rust-hir-path.h: Likewise.
+ * hir/tree/rust-hir-type.h: Likewise.
+ * hir/tree/rust-hir.cc (Module::as_string): Likewise.
+ (StaticItem::as_string): Likewise.
+ (TupleStruct::as_string): Likewise.
+ (ConstantItem::as_string): Likewise.
+ (StructStruct::as_string): Likewise.
+ (UseTreeRebind::as_string): Likewise.
+ (Enum::as_string): Likewise.
+ (Trait::as_string): Likewise.
+ (Union::as_string): Likewise.
+ (Function::as_string): Likewise.
+ (TypeAlias::as_string): Likewise.
+ (FieldAccessExpr::as_string): Likewise.
+ (TypeParam::as_string): Likewise.
+ (GenericArgsBinding::as_string): Likewise.
+ (StructPatternFieldIdent::as_string): Likewise.
+ (StructPatternFieldIdentPat::as_string): Likewise.
+ (IdentifierPattern::as_string): Likewise.
+ (StructExprFieldIdentifierValue::as_string): Likewise.
+ (EnumItem::as_string): Likewise.
+ (StructField::as_string): Likewise.
+ (ExternalStaticItem::as_string): Likewise.
+ (ExternalFunctionItem::as_string): Likewise.
+ (NamedFunctionParam::as_string): Likewise.
+ (TraitFunctionDecl::as_string): Likewise.
+ (TraitItemConst::as_string): Likewise.
+ (TraitItemType::as_string): Likewise.
+ (MaybeNamedParam::as_string): Likewise.
+ * hir/tree/rust-hir.h: Likewise.
+ * parse/rust-parse-impl.h (Parser::parse_macro_match_fragment):
+ Likewise.
+ (Parser::parse_module): Likewise.
+ (Parser::parse_use_tree): Likewise.
+ (Parser::parse_maybe_named_param): Likewise.
+ * resolve/rust-ast-resolve-implitem.h: Likewise.
+ * resolve/rust-ast-resolve-item.cc (ResolveTraitItems::visit):
+ Likewise.
+ (ResolveItem::visit): Likewise.
+ (flatten_rebind): Likewise.
+ (ResolveExternItem::visit): Likewise.
+ (rust_flatten_rebind): Likewise.
+ (rust_flatten_rebind_nested): Likewise.
+ * resolve/rust-ast-resolve-pattern.cc (PatternDeclaration::go):
+ Likewise.
+ (PatternDeclaration::visit): Likewise.
+ (PatternDeclaration::add_new_binding): Likewise.
+ * resolve/rust-ast-resolve-stmt.h: Likewise.
+ * resolve/rust-ast-resolve-toplevel.h: Likewise.
+ * resolve/rust-ast-resolve-type.h: Likewise.
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Likewise.
+ * typecheck/rust-autoderef.cc: Likewise.
+ * typecheck/rust-hir-dot-operator.cc (MethodResolver::select):
+ Likewise.
+ * typecheck/rust-hir-path-probe.cc (PathProbeType::visit):
+ Likewise.
+ * typecheck/rust-hir-trait-reference.cc (TraitReference::get_name): Likewise.
+ * typecheck/rust-hir-trait-resolve.cc (ResolveTraitItemToRef::visit): Likewise.
+ (TraitResolver::resolve_trait): Likewise.
+ (TraitItemReference::resolve_item): Likewise.
+ (AssociatedImplTrait::setup_raw_associated_types): Likewise.
+ * typecheck/rust-hir-type-check-enumitem.cc (TypeCheckEnumItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelExternItem::visit): Likewise.
+ (TypeCheckImplItem::visit): Likewise.
+ (TypeCheckImplItemWithTrait::visit): Likewise.
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit):
+ Likewise.
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Likewise.
+ * typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::visit): Likewise.
+ * typecheck/rust-hir-type-check-type.cc (TypeResolveGenericParam::visit): Likewise.
+ * typecheck/rust-hir-type-check.cc (TraitItemReference::get_type_from_fn): Likewise.
+ * typecheck/rust-tyty-subst.cc (SubstitutionRef::get_mappings_from_generic_args): Likewise.
+ * util/rust-attributes.cc (check_doc_attribute): Likewise.
+ * util/rust-hir-map.cc (Mappings::insert_macro_def): Likewise.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * lex/rust-lex.cc (is_float_digit):Change types of param to `uint32_t`
+ (is_x_digit):Likewise
+ (is_octal_digit):Likewise
+ (is_bin_digit):Likewise
+ (check_valid_float_dot_end):Likewise
+ (is_whitespace):Likewise
+ (is_non_decimal_int_literal_separator):Likewise
+ (is_identifier_start):Likewise
+ (is_identifier_continue):Likewise
+ (Lexer::skip_broken_string_input):Likewise
+ (Lexer::build_token):Remove handling BOM
+ (Lexer::parse_in_type_suffix):Modify use of `current_char`
+ (Lexer::parse_in_decimal):Likewise
+ (Lexer::parse_escape):Likewise
+ (Lexer::parse_utf8_escape):Likewise
+ (Lexer::parse_partial_string_continue):Likewise
+ (Lexer::parse_partial_hex_escape):Likewise
+ (Lexer::parse_partial_unicode_escape):Likewise
+ (Lexer::parse_byte_char):Likewise
+ (Lexer::parse_byte_string):Likewise
+ (Lexer::parse_raw_byte_string):Likewise
+ (Lexer::parse_raw_identifier):Likewise
+ (Lexer::parse_non_decimal_int_literal):Likewise
+ (Lexer::parse_decimal_int_or_float):Likewise
+ (Lexer::peek_input):Change return type to `Codepoint`
+ (Lexer::get_input_codepoint_length):Change to return 1
+ (Lexer::peek_codepoint_input):Change to be wrapper of `peek_input`
+ (Lexer::skip_codepoint_input):Change to be wrapper of `skip_input`
+ (Lexer::test_get_input_codepoint_n_length):Deleted
+ (Lexer::split_current_token):Deleted
+ (Lexer::test_peek_codepoint_input):Deleted
+ (Lexer::start_line):Move backwards
+ (assert_source_content):New helper function for selftest
+ (test_buffer_input_source):New helper function for selftest
+ (test_file_input_source):Likewise
+ (rust_input_source_test):New test
+ * lex/rust-lex.h (rust_input_source_test):New test
+ * rust-lang.cc (run_rust_tests):Add selftest
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-expand.cc
+ (MacroExpander::match_repetition_skipped_metavars): New.
+ (MacroExpander::match_repetition): Use new method.
+ * expand/rust-macro-expand.h
+ (MacroExpander::match_repetition_skipped_metavars): New.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): called rust_error_at
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): called rust_error_at
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-expand.cc
+ (MacroExpander::match_token): Match token instead of token id.
+ * parse/rust-parse-impl.h
+ (Parser::skip_token): Add token-skipping variant.
+ (Parser::expect_token): Likewise.
+ * parse/rust-parse.h
+ (Parser::skip_token): Likewise.
+ (Parser::expect_token): Likewise.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * lang.opt: Add -frust-name-resolution-2.0 option
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-autoderef.cc (AutoderefCycle::cycle): add check for pointers
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-autoderef.cc: use new selection filter
+ * typecheck/rust-hir-dot-operator.cc (MethodResolver::Select): new slection Filter
+ * typecheck/rust-hir-dot-operator.h: New select prototype
+ * typecheck/rust-hir-type-check-expr.cc: call select
+ * typecheck/rust-type-util.cc (try_coercion): new helper
+ * typecheck/rust-type-util.h (try_coercion): helper prototype
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): passed "E0277"
+ * typecheck/rust-tyty.cc (BaseType::bounds_compatible): passed "E0277"
+
+2024-01-16 Matthew Jasper <mjjasper1@gmail.com>
+
+ * expand/rust-expand-visitor.cc (ExpandVisitor::visit):
+ Expand expressions in more contexts.
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit):
+ Visit enum variants.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.cc (BlockExpr::normalize_tail_expr): Refactor
+ code and warn about dangling reference.
+ * expand/rust-expand-visitor.cc (expand_stmt_attribute):
+ Document function and change argument names to make those
+ clearer.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.cc (ExpandVisitor::expand_inner_stmts):
+ Remove second argument.
+ (ExpandVisitor::visit): Remove argument from function call.
+ * expand/rust-expand-visitor.h: Update function prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Change
+ call to expand_inner_stmts.
+ (expand_tail_expr): Change argument name and try to expand the
+ last statement as a tail expression once all statements have
+ been expanded.
+ * expand/rust-expand-visitor.h: Change prototype to accept
+ parent class.
+ * ast/rust-expr.h: Add try_convert_last_stmt function prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-expr.h: Add a function to take tail expr as well
+ as a function to set a tail expression.
+ * expand/rust-expand-visitor.cc (expand_tail_expr): Add tail
+ expression expansion function.
+ (ExpandVisitor::visit): Add call to tail expr expansion in for
+ BlockExpr.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+ Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.cc : Change type from pointer to
+ reference and expand statements from statements.
+ * ast/rust-macro.h: Return macro kind.
+ * ast/rust-ast.h: Add Statement kind.
+ * ast/rust-item.h: Change module.
+ * ast/rust-stmt.h: Return kind.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-expand.cc
+ (MacroExpander::expand_decl_macro):
+ Use pointers/smart pointers to refer to MatchedFragmentContainer instances.
+ (MacroExpander::transcribe_rule): Likewise.
+ (MatchedFragmentContainer::get_single_fragment): New implementation.
+ (MatchedFragmentContainer::get_fragments): Likewise.
+ (MatchedFragmentContainer::add_fragment): Likewise.
+ (MatchedFragmentContainer::zero): Likewise.
+ (MatchedFragmentContainer::metavar): Likewise.
+ * expand/rust-macro-expand.h
+ (class MatchedFragmentContainer): Make abstract.
+ (class MatchedFragmentContainerMetaVar): New.
+ (class MatchedFragmentContainerRepetition): New.
+ (class SubstitutionScope):
+ Use pointers/smart pointers to refer to MatchedFragmentContainer instances.
+ (MacroExpander::transcribe_rule): Likewise.
+ * expand/rust-macro-substitute-ctx.cc
+ (SubstituteCtx::substitute_metavar): Likewise.
+ (SubstituteCtx::check_repetition_amount): Likewise.
+ (SubstituteCtx::substitute_repetition): Likewise.
+ * expand/rust-macro-substitute-ctx.h
+ (class SubstituteCtx): Likewise.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path): called rust_error_at
+ * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): called rust_error_at
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::ResolveImplBlockSelfWithInference):
+ arguments mappings as an out parameter and apply them to the bounds
+ * typecheck/rust-hir-type-check-item.h: update the prototype
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments):
+ apply the arguments to the segment type
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments):
+ simplify lookup of the respective predicate
+ * typecheck/rust-tyty-subst.cc (SubstitutionArg::SubstitutionArg): track original parameter
+ (SubstitutionArg::operator=): update copy ctor
+ (SubstitutionArg::get_param_ty): use original param
+ (SubstitutionArg::as_string): update as_string
+ * typecheck/rust-tyty-subst.h: add new private field
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::ResolveImplBlockSelfWithInference):
+ New helper utility to infer non concrete types and handle the case where its not a
+ binding generic type (which inherits SubstitutionRef)
+ * typecheck/rust-hir-type-check-item.h: new helper prototype
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): use this helper
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc: use lookup_predicate (DefID)
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): fix formatting
+
+2024-01-16 Matthew Jasper <mjjasper1@gmail.com>
+
+ * ast/rust-ast.h (MacroInvocation::add_semicolon): New method.
+ (Expr::to_stmt): Remove method.
+ * ast/rust-macro.h (MacroInvocation::add_semicolon): Add override.
+ (MacroInvocation::to_stmt): Remove override.
+ * ast/rust-stmt.h: Remove use of Expr::to_stmt.
+ (ExprStmt::add_semicolon): Add override.
+ * expand/rust-macro-expand.h (struct MacroExpander):
+ Add EXPR/STMT and remove BLOCK from ContextType.
+ * expand/rust-expand-visitor.cc (ExpandVisitor::maybe_expand_expr): Use EXPR context.
+ (ExpandVisitor::expand_inner_stmts): Use STMT context.
+ (ExpandVisitor::visitor): Remove use of BLOCK context.
+ * expand/rust-macro-expand.cc (parse_many): Pass enum by value.
+ (transcribe_on_delimiter): Remove function.
+ (transcribe_context): Use EXPR/STMT contexts.
+ (MacroExpander::parse_proc_macro_output): Use EXPR/STMT contexts.
+ (transcribe_many_stmts): Parse statements with semicolons.
+ * parse/rust-parse-impl.h (Parser::parse_stmt):
+ Delegate macro parsing to parse_expr_stmt, check for ! after macro_rules.
+ (Parser::parse_let_stmt): Work around lack of NT tokens.
+ (Parser::parse_expr_stmt): Handle statements at end of macro expansions.
+ (Parser::parse_expr_stmt): Parse macro statements/expression statements
+ starting with a macro.
+ (Parser::parse_match_expr): Don't modify flag unnecessarily.
+ (Parser::parse_stmt_or_expr):
+ Parse macro statements/expression statements starting with a macro.
+ (Parser::parse_path_based_stmt_or_expr): Remove method.
+ (Parser::parse_macro_invocation_maybe_semi): Remove method.
+ (Parser::parse_expr): Move code into left_denotations.
+ (Parser::left_denotations): New method.
+ (Parser::null_denotation): Split out methods for cases with and without paths.
+ (Parser::null_denotation_path): New method.
+ (Parser::null_denotation_not_path): New method.
+ (Parser::parse_macro_invocation_partial): Don't check for semicolon here.
+ * parse/rust-parse.h: Update declarations.
+ (struct ParseRestrictions): Additional flag.
+
+2024-01-16 Matthew Jasper <mjjasper1@gmail.com>
+
+ * ast/rust-ast.cc (BlockExpr::strip_tail_expr):
+ Don't normalize tail expression in this method.
+ (BlockExpr::normalize_tail_expr): New method that only does the normalization.
+ * ast/rust-expr.h: Declare new method.
+ * hir/rust-ast-lower-block.h: Normalize tail expressions on blocks before lowering.
+
+2024-01-16 Matthew Jasper <mjjasper1@gmail.com>
+
+ * ast/rust-ast-dump.cc (Dump::visit): Print macro invocations.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * lex/rust-lex.cc (is_whitespace):add all lacked codepoints valid as whitespaces
+ (is_identifier_start):new function to check XID_Start and underscore
+ (is_identifier_continue):new function to check XID_Continue
+ (Lexer::build_token):tokenize Unicode identifiers
+ (Lexer::parse_partial_string_continue):add comments
+ (Lexer::parse_partial_unicode_escape):add comments
+ (Lexer::parse_raw_identifier):change to use `is_identifier_scontinue`
+ (Lexer::parse_identifier_or_keyword):change to use `is_identifier_continue`
+ (Lexer::parse_char_or_lifetime):change to use `is_identifier_start/continue`
+ (Lexer::skip_codepoint_input):do not attempt to skip input when bumping EOF
+ * lex/rust-lex.h:add `current_char32` field
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * lex/rust-lex.cc
+ (Lexer::classify_keyword): Check if iterator is valid before dereferencing.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-expand.cc
+ (MacroExpander::match_repetition): Remove redundant rust_error_at call.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-unify.cc (UnifyRules::go): dont check bounds on placeholders
+
+2024-01-16 tieway59 <tieway59@foxmail.com>
+
+ * typecheck/rust-tycheck-dump.h: Delete this file
+ * rust-session-manager.cc: Remove `Session::dump_type_resolution`
+ and `TYPE_RESOLUTION_DUMP`
+ * rust-session-manager.h: Likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::resolve_method_address):
+ match the fntype to the candidate
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive.h: Store AstBuilder and location.
+ * expand/rust-derive.cc (DeriveVisitor::DeriveVisitor): Update constructor.
+ * expand/rust-derive-clone.h: Remove members now stored in `DeriveVisitor`.
+ * expand/rust-derive-copy.h: Likewise.
+ * expand/rust-derive-clone.cc (DeriveClone::DeriveClone): Update constructor.
+ * expand/rust-derive-copy.cc (DeriveCopy::DeriveCopy): Likewise.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-item.cc (CompileItem::visit): ensure assoicated types are setup
+ * typecheck/rust-hir-trait-reference.h: new interface for concrete impl block
+ * typecheck/rust-hir-trait-resolve.cc (AssociatedImplTrait::setup_raw_associated_types):
+ ensure we setup assoicated types for this impl block
+
+2024-01-16 Dave Evans <dave@dmetwo.org>
+
+ * backend/rust-compile-expr.cc (check_match_scrutinee): Add REF type to rust_assert.
+ (CompileExpr::visit): Add REF type for scrutinee_kind in MatchExpr visitor.
+
+2024-01-16 TieWay59 <tieway59@foxmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc: Remove obsolete error diagnostic
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-implitem.cc (TypeCheckImplItemWithTrait::visit):
+ use new interface
+ * typecheck/rust-type-util.cc (types_compatable): implementation of new interface
+ * typecheck/rust-type-util.h (types_compatable): prototype
+ * typecheck/rust-unify.cc (UnifyRules::expect_placeholder):
+ It is allow for unification against placeholders
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.cc (derive_item): Add const
+ attribute to the trait name argument.
+ * expand/rust-macro-expand.h (struct MacroExpander): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.cc (get_traits_to_derive): Change
+ assertion to allow empty derive directives.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.cc (expand_attribute): Add function
+ to expand a given attribute on a given item.
+ * expand/rust-macro-expand.h (struct MacroExpander): Change
+ return type to ast fragment.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.cc (get_traits_to_derive): Change
+ the function to get traits in a given attribute instead of an
+ attribute vector.
+ (ExpandVisitor::expand_struct_fields): Remove call in visitor.
+ (ExpandVisitor::expand_function_params): Likewise.
+ (ExpandVisitor::expand_closure_params): Likewise.
+ (ExpandVisitor::visit): Likewise.
+ (ExpandVisitor::expand_outer_attribute): Remove function.
+ (ExpandVisitor::visit_outer_attrs): Remove function.
+ * expand/rust-expand-visitor.h: Remove function prototypes.
+ (ExpandVisitor::visit_outer_attrs): Remove function.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.h: Remove fragment collection fro
+ procedural macros.
+ * expand/rust-macro-expand.h (struct MacroExpander): Remove
+ procedural macro fragment from expander.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-fragment.cc (Fragment::Fragment): Remove
+ overwrite member in constructor.
+ (Fragment::operator=): Removal of overwrite member in copy.
+ (Fragment::should_overwrite): Remove overwrite getter.
+ * ast/rust-ast-fragment.h: Remove overwrite boolean member.
+ * expand/rust-expand-visitor.cc (derive_item): Add a function to
+ derive items using the expander for now.
+ (builtin_derive_item): Rename from derive_item to
+ builtin_derive_item.
+ (ExpandVisitor::visit): Remove visit to derive attributes.
+ (ExpandVisitor::expand_derive): Remove derive attribute visitor.
+ (ExpandVisitor::visit_attrs_with_derive): Likewise.
+ * expand/rust-expand-visitor.h: Update insertion of other kind
+ of proc macros. We no longer have an overwrite attribute in the
+ fragment.
+ * expand/rust-macro-expand.cc (MacroExpander::parse_procmacro_output):
+ Return the fragment instead of inserting it.
+ * expand/rust-macro-expand.h (struct MacroExpander): Return
+ fragment.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.h: Update enum name to match
+ definition.
+ * expand/rust-expand-visitor.cc (ExpandVisitor::expand_derive):
+ Add call to expander.
+ (ExpandVisitor::expand_outer_attribute):
+ Change call to macro expander.
+ (ExpandVisitor::expand_inner_attribute): Likewise.
+ * expand/rust-expand-visitor.h: Remove const attribute to match
+ visitor declaration. Attach result to the AST. Add condition for
+ item erasure.
+ * expand/rust-proc-macro.h: Add token collector and expansion
+ call. Add lexers and parsers for each proc macro type and uses
+ them to parse macro output.
+ * expand/rust-macro-expand.h (struct MacroExpander): Add
+ functions.
+ * expand/rust-proc-macro.cc (ProcMacroExpander::import_proc_macros):
+ Moved from here...
+ * expand/rust-macro-expand.cc (MacroExpander::import_proc_macros):
+ ... to here. Unify procedural macro parsing under one function.
+ Add a flag to determine whether it originate from a derive
+ macro.
+ (MacroExpander::parse_procmacro_output):
+ Parse macro output to statements. Store an error on parsing
+ failure.
+ * Make-lang.in: Add const_TokenPtr specific lexer.
+ * expand/rust-proc-macro-invoc-lexer.cc: New file.
+ * expand/rust-proc-macro-invoc-lexer.h: New file.
+ * rust-session-manager.cc (Session::expansion): Remove
+ ProcMacroExpander declaration.
+ * ast/rust-ast-fragment.cc (Fragment::Fragment): Add overwrite
+ flag.
+ (Fragment::should_overwrite): Add a getter to determine whether
+ the fragment shall overwrite it's parent or be appended after.
+ * ast/rust-ast-fragment.h: Add flag to declaration.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-hir-map.cc (Mappings::insert_bang_proc_macro):
+ Add a function to insert a new bang proc macro.
+ (Mappings::lookup_bang_proc_macro): Add a function to lookup a
+ bang procedural macro.
+ (Mappings::insert_derive_proc_macro): Add a function to insert a
+ derive procedural macro.
+ (Mappings::lookup_derive_proc_macro): Add a function to lookup a
+ derive procedural macro.
+ (Mappings::insert_attribute_proc_macro): Add a function to
+ insert an attribute procedural macro.
+ (Mappings::lookup_attribute_proc_macro): Add a function to
+ lookup an attribute procedural macro.
+ * util/rust-hir-map.h: Add function prototypes.
+ * expand/rust-expand-visitor.cc (ExpandVisitor::expand_outer_attribute):
+ Implement expansion of outer attributes.
+ (ExpandVisitor::expand_inner_attribute):
+ Add call for inner attribute expansion.
+ * expand/rust-expand-visitor.h:
+ Add new procedural macro expander attribute.
+ * expand/rust-proc-macro.cc (load_macros_array): Add a function
+ to load the proc macro array from a given shared object.
+ (load_macros): Add a function to retrieve procedural macro
+ vector from a given shared object.
+ (ProcMacroExpander::import_proc_macros): Add a function to load
+ procedural macros from a given extern crate name.
+ * expand/rust-proc-macro.h (RUST_PROC_MACRO_H): Add new
+ proc-macro file.
+ (class ProcMacroExpander): Add new ProcMacroExpander class.
+ * rust-session-manager.cc (Session::expansion): Create new macro
+ expander and feed it to the expand visitor.
+ * util/rust-attributes.cc: Add macro_export builtin attribute.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Fix
+ attribute collection.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.h: Make trivial visitors public.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Add rust-proc-macro object to list.
+ * expand/rust-proc-macro.cc: New file.
+ * expand/rust-proc-macro.h: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-attributes.cc: Add attribute to the table.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Move
+ implementation from here...
+ * ast/rust-ast-collector.h: ... to here.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * Make-lang.in: Add "rust-dir-owner.o".
+ * ast/rust-ast.cc: Include "rust-dir-owner.h".
+ (Module::process_file_path):
+ Handle non-mod-rs external file modules properly.
+ * parse/rust-parse-impl.h: Include "rust-dir-owner.h".
+ (Parser::parse_module):
+ Handle non-mod-rs external file modules properly.
+ * util/rust-dir-owner.cc: New file.
+ * util/rust-dir-owner.h: New file.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-builtins.cc: Fix comments.
+ (MacroBuiltin::proc_macro_builtin): Add error message.
+ * expand/rust-macro-builtins.h: Fix comments.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc: when the bound is concrete keep the mapping
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit): add missing call
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): make this the same as paths
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * util/rust-optional.h
+ (class Optional): Add volatile field to union.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-substitute-ctx.cc
+ (SubstituteCtx::substitute_metavar): Substitute crate metavar.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * parse/rust-parse-impl.h
+ (Parser::null_denotation): Allow struct expression referencing.
+
+2024-01-16 Charalampos Mitrodimas <charmitro@gmail.com>
+
+ * ast/rust-ast-dump.cc (Dump::visit):
+ print literals based on their type.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-macro-builtins.cc (MacroBuiltin::dummy): New function.
+ * expand/rust-macro-builtins.h: Declare it.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc (AstBuilder::struct_expr_struct): New function.
+ (AstBuilder::let): Likewise.
+ (AstBuilder::struct_expr): Likewise.
+ (AstBuilder::struct_expr_field): Likewise.
+ (AstBuilder::field_access): Likewise.
+ (AstBuilder::wildcard): Likewise.
+ * ast/rust-ast-builder.h: Likewise.
+ * expand/rust-derive-clone.cc (DeriveClone::visit_union): Implement
+ properly.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Add new files.
+ * expand/rust-derive.cc (DeriveVisitor::derive): Call into DeriveCopy.
+ * expand/rust-derive-copy.cc: New file.
+ * expand/rust-derive-copy.h: New file.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc (DeriveClone::visit_struct): Implement proper
+ cloning for structs with fields.
+ * ast/rust-ast-builder.cc (AstBuilder::struct_expr): New function.
+ (AstBuilder::struct_expr_field): Likewise.
+ (AstBuilder::field_access): Likewise.
+ (AstBuilder::let): Likewise.
+ * ast/rust-ast-builder.h: Declare new functions.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (convert): Use a variable instead
+ of multiple nested calls.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lex/rust-lex.h: Make build_token method public.
+ * lex/rust-token.h: Add a setter for a token location.
+ * util/rust-token-converter.cc (convert): Add the function to
+ convert from a Span to a Location.
+ (from_ident): Convert Ident span to a Location.
+ (from_literal): Convert Literal span to a Location.
+ (from_punct): Convert Punct span to a Location.
+ (from_group): Convert Group span to a Location.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (convert): Add implementation.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (convert): Update call to
+ constructors with location information.
+ (handle_suffix): Convert token locus to a Span and use it in the
+ literal.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-expand.cc
+ (MacroExpander::try_match_rule): Don't match delimiters for root matcher.
+ (MacroExpander::match_matcher): Add option to match delimiters.
+ * expand/rust-macro-expand.h
+ (MacroExpander::match_matcher): Likewise.
+ * parse/rust-parse-impl.h
+ (Parser::skip_token): Add zero argument method.
+ * parse/rust-parse.h:
+ (Parser::skip_token): Likewise.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * Make-lang.in: remove files
+ * backend/rust-compile-block.h: fix headers
+ * backend/rust-compile-expr.h: likewise
+ * backend/rust-compile-fnparam.h: likewise
+ * backend/rust-compile-item.h: likewise
+ * backend/rust-compile-pattern.h: likewise
+ * backend/rust-compile-resolve-path.h: likewise
+ * backend/rust-compile-stmt.h: likewise
+ * typecheck/rust-autoderef.cc: likewise
+ * typecheck/rust-hir-path-probe.cc: likewise
+ * typecheck/rust-hir-path-probe.h: likewise
+ * typecheck/rust-hir-trait-reference.h: likewise
+ * typecheck/rust-hir-trait-resolve.cc: use a for loop instead
+ * typecheck/rust-hir-trait-resolve.h: fix headers
+ * typecheck/rust-hir-type-check-expr.h: likewise
+ * typecheck/rust-hir-type-check-implitem.h: likewise
+ * typecheck/rust-hir-type-check-item.h: likewise
+ * typecheck/rust-hir-type-check-path.cc: likewise
+ * typecheck/rust-hir-type-check-pattern.h: likewise
+ * typecheck/rust-hir-type-check-stmt.h: likewise
+ * typecheck/rust-hir-type-check-type.h: likewise
+ * typecheck/rust-hir-type-check-util.cc: Removed.
+ * typecheck/rust-hir-type-check-util.h: Removed.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Add new object files to Makefile.
+ * expand/rust-expand-visitor.cc (is_derive): Move function.
+ (is_builtin): Likewise.
+ (get_traits_to_derive): New function.
+ (derive_item): Likewise.
+ (ExpandVisitor::visit): Visit item/statements containers.
+ (ExpandVisitor::visit_outer_attrs): Take a reference on the attribute
+ instead of a copy.
+ (ExpandVisitor::is_derive): Deleted function.
+ (ExpandVisitor::is_builtin): Likewise.
+ * expand/rust-expand-visitor.h (RUST_EXPAND_VISITOR_H): Add missing #ifdef
+ guards.
+ (is_derive): Declare function.
+ (is_builtin): Likewise.
+ * expand/rust-macro-builtins.cc (builtin_macro_from_string): Use new
+ MacroBuiltin::builtins map.
+ (make_macro_path_str): Likewise.
+ * expand/rust-macro-builtins.h (enum class): Add builtin derive macros.
+ * expand/rust-derive-clone.cc: New file.
+ * expand/rust-derive-clone.h: New file.
+ * expand/rust-derive.cc: New file.
+ * expand/rust-derive.h: New file.
+ * util/rust-hir-map.cc (Mappings::insert_macro_def): Fix logic for
+ setting builtin macro transcribers.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc: New file.
+ * ast/rust-ast-builder.h: New file.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-macro-invoc-lexer.cc: Add missing copyright header.
+ * expand/rust-macro-substitute-ctx.cc: Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-session-manager.h:
+ Include "rust-optional.h".
+ (struct TargetOptions):
+ Store values in config key/value pairs as Optional<std::string> rather than std::string.
+ * rust-session-manager.cc
+ (TargetOptions::dump_target_options):
+ Handle Optional<std::string> values.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-casts.cc (TypeCastRules::check): do coercion
+ (TypeCastRules::emit_cast_error): clang-format
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-stmt.cc (ResolveStmt::visit): add name resolution
+ * resolve/rust-ast-resolve-stmt.h: likewise
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): insert resolved node
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-pattern.cc: remove unused
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): fix missing pop
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): remove unused
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::translate): hir lowering
+ (ASTLoweringStmt::visit): likewise
+ * hir/rust-ast-lower-stmt.h: likewise
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-substitute-ctx.cc
+ (SubstituteCtx::substitute_metavar): Allow substitution failure.
+ (SubstituteCtx::substitute_token):
+ Handle substitution failure, include dollar sign in count of tokens to substitute.
+ (SubstituteCtx::substitute_tokens):
+ Include dollar sign in count of tokens to substitute.
+ * expand/rust-macro-substitute-ctx.h
+ (SubstituteCtx::substitute_metavar):
+ Adjust signature and document new substitution failure handling.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-substitute-ctx.cc
+ (SubstituteCtx::check_repetition_amount):
+ Ignore single fragments while checking repetition amount.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): stop if error
+ * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::assemble_sized_builtin): fix sized options
+ * typecheck/rust-tyty.cc (BaseType::satisfies_bound): its ok if its an ?T
+ (BaseType::bounds_compatible): likewise
+ * typecheck/rust-tyty.h: update prototype
+ * typecheck/rust-unify.cc (UnifyRules::go): check both sides bounds
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (HIRCompileBase::resolve_deref_adjustment):
+ reuse op overload code
+ * typecheck/rust-autoderef.cc (Adjuster::try_deref_type): update
+ (Adjuster::try_raw_deref_type): likewise
+ * typecheck/rust-autoderef.h: likewise
+ * typecheck/rust-hir-dot-operator.cc (MethodResolver::select):
+ improve debug loging
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::resolve_method_address): refactor
+ * backend/rust-compile-base.h: likewise
+ * backend/rust-compile-expr.cc (CompileExpr::visit): likewise
+ * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): likewise
+
+2024-01-16 David Malcolm <dmalcolm@redhat.com>
+
+ * typecheck/rust-hir-trait-reference.cc (TraitItemReference::is_optional): Remove
+ stray semicolon.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::go): Cleanup
+ order of calls when accumulating #[macro_use] macros.
+ (EarlyNameResolver::visit): Likewise.
+
+2024-01-16 Matthew Jasper <mjjasper1@gmail.com>
+
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::accumulate_escaped_macros):
+ Remove unnecessary visit.
+
+2024-01-16 Matthew Jasper <mjjasper1@gmail.com>
+
+ * ast/rust-ast.cc (Attribute::check_cfg_predicate):
+ Only check first item as a predicate.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * util/rust-optional.h
+ (operator==): New for Optional<T> == Optional<U>.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * parse/rust-parse-impl.h
+ (Parser::parse_attr_input): Parse AttrInputMacro.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Propagate
+ coretype hint.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * util/rust-optional.h
+ (class Optional<T>): Improve inner state.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-substitute-ctx.cc
+ (SubstituteCtx::check_repetition_amount): Handle keywords.
+ (SubstituteCtx::substitute_token): Likewise.
+ * lex/rust-token.cc
+ (Token::get_str): Likewise.
+ * parse/rust-parse-impl.h
+ (Parser::parse_macro_match_fragment): Likewise.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast.h: Add `outer_attrs` to Item.
+ * ast/rust-expr.h: Make use of new inheritance methods.
+ * ast/rust-item.h: Likewise.
+ * ast/rust-macro.h: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (dispatch_float_literals): Remove
+ function.
+ (handle_suffix): Rename old dispatch and add one LitKind
+ argument.
+ (dispatch_integer_literals): Remove function.
+ (convert): Change call from dispatch to suffix handler.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lex/rust-token.h: Implement hash for token id enumeration.
+ * util/rust-token-converter.cc (dispatch_float_literals): Update
+ to new internals.
+ (dispatch_integer_literals): Likewise.
+ (convert): Likewise.
+ (string_literal): Remove function.
+ (byte_string_literal): Likewise.
+ (unsigned_literal): Likewise.
+ (signed_literal): Likewise.
+ (from_literal): Update with new internals.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-dump.cc
+ (Dump::visit): Add AttrInputMacro visitor.
+ * ast/rust-ast-dump.h:
+ (Dump::visit): Likewise.
+ * ast/rust-ast-full-decls.h
+ (class AttrInputMacro): New.
+ * ast/rust-ast-collector.cc
+ (TokenCollector::visit):
+ Add and call out to AttrInputMacro visitor.
+ * ast/rust-ast-collector.h:
+ (TokenCollector::visit): Add AttrInputMacro visitor.
+ * ast/rust-ast-visitor.h:
+ (ASTVisitor::visit): Likewise.
+ * ast/rust-ast.cc
+ (AttrInputMacro::accept_vis): New.
+ (AttrInputMacro::as_string): New.
+ (AttrInputMacro::AttrInputMacro): New.
+ (AttrInputMacro::operator=): New.
+ * ast/rust-ast.h:
+ (AttrInput::AttrInputType::MACRO): New.
+ * ast/rust-expr.h
+ (class AttrInputMacro): New.
+ * checks/errors/rust-feature-gate.h:
+ (FeatureGate::visit): Add AttrInputMacro visitor.
+ * expand/rust-cfg-strip.cc
+ (CfgStrip::visit): Likewise.
+ * expand/rust-cfg-strip.h:
+ (CfgStrip::visit): Likewise.
+ * expand/rust-expand-visitor.cc
+ (ExpandVisitor::visit): Likewise.
+ * expand/rust-expand-visitor.h:
+ (ExpandVisitor::visit): Likewise.
+ * hir/rust-ast-lower-base.cc
+ (ASTLoweringBase::visit): Likewise.
+ * hir/rust-ast-lower-base.h:
+ (ASTLoweringBase::visit): Likewise.
+ * resolve/rust-ast-resolve-base.cc
+ (ResolverBase::visit): Likewise.
+ * resolve/rust-ast-resolve-base.h:
+ (ResolverBase::visit): Likewise.
+ * resolve/rust-early-name-resolver.cc
+ (EarlyNameResolver::visit): Likewise.
+ * resolve/rust-early-name-resolver.h:
+ (EarlyNameResolver::visit): Likewise.
+ * util/rust-attributes.cc
+ (AttributeChecker::visit): Likewise.
+ (check_doc_attribute): Handle AttrInputType::MACRO.
+ * util/rust-attributes.h:
+ (AttributeChecker::visit): Add AttrInputMacro visitor.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-macro.h
+ (MacroInvocation::clone_macro_invocation_impl): Make public.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * util/rust-optional.h
+ (struct std::hash<Optional<T>>): New.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * util/rust-optional.h
+ (class Optional<T&>): Use pointers internally.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-dump.cc (Dump::visit): Implement dump for
+ `TupleIndexExpr`.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * lex/rust-token.cc
+ (token_id_keyword_string): Return std::string reference.
+ * lex/rust-token.h
+ (token_id_keyword_string): Return std::string reference.
+
+2024-01-16 Matthew Jasper <mjjasper1@gmail.com>
+
+ * ast/rust-ast.h (Expr::as_expr_without_block): Remove.
+ (Expr::set_outer_attrs): Make public in base class.
+ * expand/rust-macro-expand.cc:
+ Add fixme comment for pre-existing bug.
+ * hir/tree/rust-hir.h: Remove Expr::as_expr_without_block.
+ * parse/rust-parse-impl.h (Parser::parse_lifetime): Use lifetime_from_token.
+ (Parser::lifetime_from_token): New method.
+ (Parser::null_denotation): Handle labelled loop expressions and for loop expressions.
+ (Parser::parse_loop_label): Make initial token a parameter.
+ (Parser::parse_labelled_loop_expr): Likewise.
+ (Parser::parse_for_loop_expr): Allow FOR token to already be skipped.
+ (Parser::parse_expr): Handle expr_can_be_stmt.
+ (Parser::parse_expr_with_block): Remove.
+ (Parser::parse_expr_stmt_with_block): Remove.
+ (Parser::parse_expr_stmt_without_block): Remove.
+ (Parser::parse_expr_without_block): Remove.
+ (Parser::parse_stmt_or_expr_with_block): Remove.
+ (Parser::parse_expr_stmt): Use parse_expr directly.
+ (Parser::parse_match_expr): Likewise.
+ (Parser::parse_stmt): Use parse_expr_stmt in more cases.
+ (Parser::parse_stmt_or_expr):
+ Rename from parse_stmt_or_expr_without_block, use parse_expr directly.
+ (Parser::parse_block_expr): Update error message.
+ * parse/rust-parse.h: Update declarations.
+
+2024-01-16 Matthew Jasper <mjjasper1@gmail.com>
+
+ * ast/rust-ast-full-decls.h (class ExprStmtWithoutBlock): Remove.
+ (class ExprStmtWithBlock): Remove.
+ * ast/rust-stmt.h (class ExprStmtWithoutBlock): Remove.
+ (class ExprStmtWithBlock): Remove.
+ (class ExprStmt):
+ Make non-abstract, add common functionality from removed base classes.
+ * ast/rust-ast.h: Move to_stmt to base class.
+ * ast/rust-ast.cc (ExprStmtWithBlock::as_string): Remove.
+ * ast/rust-macro.h: Use new signature for to_stmt.
+ (ExprStmt::as_string): New method.
+ (ExprStmtWithoutBlock::as_string): Remove.
+ (BlockExpr::strip_tail_expr): Update for removed classes.
+ (ExprStmtWithoutBlock::accept_vis): Remove.
+ (ExprStmtWithBlock::accept_vis): Remove.
+ (ExprStmt::accept_vis): New method.
+ * ast/rust-ast-dump.cc (Dump::visit): Update for removed classes.
+ * ast/rust-ast-dump.h: Likewise.
+ * ast/rust-ast-collector.h: Likewise.
+ * ast/rust-ast-collector.cc (TokenStream::visit): Likewise.
+ * ast/rust-ast-visitor.h: Likewise.
+ * checks/errors/rust-feature-gate.h: Likewise.
+ * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise.
+ * expand/rust-expand-visitor.h: Likewise.
+ * expand/rust-cfg-strip.cc (CfgStrip::visit): Likewise.
+ * expand/rust-cfg-strip.h: Likewise.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
+ * hir/rust-ast-lower-base.h: Likewise.
+ * hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): Likewise.
+ * hir/rust-ast-lower-stmt.h: Likewise.
+ * util/rust-attributes.cc (AttributeChecker::visit): Likewise.
+ * util/rust-attributes.h: Likewise.
+ * resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Likewise.
+ * resolve/rust-ast-resolve-base.h: Likewise.
+ * resolve/rust-ast-resolve-stmt.h: Likewise.
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit):
+ Likewise.
+ * resolve/rust-early-name-resolver.h: Likewise.
+ * parse/rust-parse-impl.h (Parser::parse_match_expr): Likewise.
+ (Parser::parse_stmt_or_expr_without_block): Likewise.
+ * parse/rust-parse.h: Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * lex/rust-token.cc
+ (token_id_is_keyword): New.
+ (token_id_keyword_string): New.
+ * lex/rust-token.h
+ (token_id_is_keyword): New.
+ (token_id_keyword_string): New.
+ * expand/rust-macro-expand.cc
+ (MacroExpander::match_fragment): Match keywords for ident fragment.
+ * parse/rust-parse-impl.h
+ (Parser::parse_identifier_or_keyword_token): Add.
+ * parse/rust-parse.h
+ (Parser::parse_identifier_or_keyword_token): Add.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (dispatch_float_literals): Invert
+ suffix condition.
+ (dispatch_integer_literals): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (convert): Fix style.
+ (from_ident): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (dispatch_float_literals): Make
+ input immutable.
+ (dispatch_integer_literals): Likewise.
+ (convert): Likewise.
+ * util/rust-token-converter.h (convert): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (from_tokenstream): Add
+ conversion of Ident structures.
+ (from_ident): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (from_literal): Add function
+ implementation.
+ (string_literal): String literal specific handler.
+ (byte_string_literal): Byte string specific handler.
+ (unsigned_literal): Unsigned literal specific handler.
+ (signed_literal): Signed literal specific handler.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (from_punct): Add conversion
+ implementation.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (dispatch_float_literals): Accept
+ const_TokenPtr instead of TokenPtr.
+ (dispatch_integer_literals): Likewise.
+ (convert): Accept vector of const_TokenPtr instead of a vector
+ of TokenPtr.
+ * util/rust-token-converter.h (convert): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (from_tokenstream): Add vector
+ for joined punct accumulation.
+ (from_ident): Accept const pointer vector.
+ (from_literal): Likewise.
+ (from_punct): Likewise.
+ (from_group): Likewise.
+ (from_tokentree): Likewise.
+ (convert): Likewise.
+ * util/rust-token-converter.h (convert): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (from_tokenstream): Add call to
+ from_tokentree.
+ (from_tokentree): Add implementation, from the from_tokenstream
+ function.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (from_punct): Add group
+ conversion.
+ (from_group): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (to_tokenstream): Change function
+ name from to_tokenstream to convert.
+ (convert): Likewise.
+ (from_tokenstream): Add tokenstream handler.
+ (from_ident): Add empty function.
+ (from_literal): Likewise.
+ (from_punct): Likewise.
+ (from_group): Likewise.
+ * util/rust-token-converter.h (to_tokenstream): Change function
+ name from to_tokenstream to convert.
+ (convert): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-token-converter.cc (dispatch_float_literals): Remove
+ suffixed temporary variable.
+ (dispatch_integer_literals): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Add new rust-token-converter file.
+ * ast/rust-ast-collector.cc (pop_group): Function moved from
+ TokenCollector.
+ (dispatch_float_literals): Likewise.
+ (dispatch_integer_literals): Likewise.
+ (TokenCollector::collect): Removed function.
+ * ast/rust-ast-collector.h: Removed function prototype.
+ * util/rust-token-converter.cc: New file.
+ * util/rust-token-converter.h: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.h (RUST_AST_TOKENSTREAM_H): Rename
+ headerguard from RUST_AST_TOKENSTREAM_H ...
+ (RUST_AST_COLLECTOR_H): ... to RUST_AST_COLLECTOR_H.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Change file name.
+ * ast/rust-ast-tokenstream.cc: Moved to...
+ * ast/rust-ast-collector.cc: ...here.
+ * ast/rust-ast-tokenstream.h: Moved to...
+ * ast/rust-ast-collector.h: ...here.
+ * rust-session-manager.cc: Change header name.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::TokenStream): Rename
+ TokenStream to TokenCollector.
+ (TokenCollector::TokenCollector): Likewise.
+ (TokenStream::collect_tokens): Likewise.
+ (TokenCollector::collect_tokens): Likewise.
+ (TokenStream::collect): Likewise.
+ (TokenCollector::collect): Likewise.
+ (TokenStream::visit): Likewise.
+ (TokenCollector::visit): Likewise.
+ (TokenStream::visit_items_joined_by_separator): Likewise.
+ (TokenCollector::visit_items_joined_by_separator): Likewise.
+ (TokenStream::visit_as_line): Likewise.
+ (TokenCollector::visit_as_line): Likewise.
+ (TokenStream::visit_items_as_lines): Likewise.
+ (TokenCollector::visit_items_as_lines): Likewise.
+ (TokenStream::visit_items_as_block): Likewise.
+ (TokenCollector::visit_items_as_block): Likewise.
+ (TokenStream::trailing_comma): Likewise.
+ (TokenCollector::trailing_comma): Likewise.
+ (TokenStream::newline): Likewise.
+ (TokenCollector::newline): Likewise.
+ (TokenStream::indentation): Likewise.
+ (TokenCollector::indentation): Likewise.
+ (TokenStream::increment_indentation): Likewise.
+ (TokenCollector::increment_indentation): Likewise.
+ (TokenStream::decrement_indentation): Likewise.
+ (TokenCollector::decrement_indentation): Likewise.
+ (TokenStream::visit_closure_common): Likewise.
+ (TokenCollector::visit_closure_common): Likewise.
+ (TokenStream::visit_loop_common): Likewise.
+ (TokenCollector::visit_loop_common): Likewise.
+ (TokenStream::visit_function_common): Likewise.
+ (TokenCollector::visit_function_common): Likewise.
+ * ast/rust-ast-tokenstream.h (class TokenStream): Likewise.
+ (class TokenCollector): Likewise.
+ * rust-session-manager.cc (Session::dump_tokenstream): Rename
+ token vector for clearer intent.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (dispatch_float_literals): Add
+ dispatch function for floating point literals.
+ (TokenStream::collect): Add call to dispatcher.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (dispatch_integer_literals):
+ Add a static function to dispatch depending on the core type.
+ (TokenStream::collect): Add call to dispatch function.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::collect): Add
+ conversion for byte string and string.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::collect): Add Ident
+ conversion.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::collect): Add joint
+ punct token conversion.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::collect): Add
+ conversion for single punctuation tokens.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (pop_group): Add a function to
+ easily collect a group from a given stack at the end of it.
+ (TokenStream::collect): Collect tokens as a rust compatible
+ Tokenstream type.
+ * ast/rust-ast-tokenstream.h (RUST_AST_TOKENSTREAM_H): Move
+ includes to stay constrained by guards.
+
+2024-01-16 M V V S Manoj Kumar <mvvsmanojkumar@gmail.com>
+
+ * ast/rust-ast-full-decls.h (enum class): Added declaration.
+ (struct AnonConst): Added declaration.
+ (struct InlineAsmRegOrRegClass): Added declaration.
+ (struct InlineAsmOperand): Added declaration.
+ (struct InlineAsmPlaceHolder): Added declaration.
+ (struct InlineAsmTemplatePiece): Added declaration.
+ (struct TupleClobber): Added declaration.
+ (struct TupleTemplateStr): Added declaration.
+ * ast/rust-expr.h (class InlineAsm): Defined all it's data members outside.
+ (enum class InlineAsmOptions): Converted this to a enum class so we could use it in the HIR.
+ (struct AnonConst): Defined it independent of the AST::InlineAsm node.
+ (struct InlineAsmRegOrRegClass): Defined it independent of the AST::InlineAsm node.
+ (struct InlineAsmOperand): Defined it independent of the AST::InlineAsm node.
+ (struct InlineAsmPlaceHolder): Defined it independent of the AST::InlineAsm node.
+ (struct InlineAsmTemplatePiece): Defined it independent of the AST::InlineAsm node.
+ (struct TupleClobber): Defined it independent of the AST::InlineAsm node.
+ (struct TupleTemplateStr): Defined it independent of the AST::InlineAsm node.
+ * hir/tree/rust-hir-expr.h (class InlineAsmReg): Added defination.
+ (class InlineAsmRegClass): Added defination.
+ (struct InlineAsmRegOrRegClass): Added defination.
+ (class InlineAsm): Added defination.
+ * hir/tree/rust-hir-full-decls.h (class InlineAsmReg): Added declaration.
+ (class InlineAsmRegClass): Added declaration.
+ (struct InlineAsmRegOrRegClass): Added declaration.
+ (class InlineAsm): Added declaration.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc: track return type in fncontext
+ * backend/rust-compile-context.h (struct fncontext): likewise
+ * backend/rust-compile-expr.cc (CompileExpr::visit): apply coercion site
+ (CompileExpr::generate_closure_function): update push_context
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::compile_function_body):
+ add missing coercion_site codegen
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): refactr
+ (CompileExpr::get_fn_addr_from_dyn): likewise
+ (CompileExpr::get_receiver_from_dyn): likewise
+ (CompileExpr::type_cast_expression): likewise
+ * backend/rust-compile-type.cc (TyTyResolveCompile::visit): likewise
+ (TyTyResolveCompile::create_dyn_obj_record): likewise
+ (TyTyResolveCompile::create_slice_type_record): likewise
+ (TyTyResolveCompile::create_str_type_record): likewise
+ * backend/rust-compile-type.h: likewise
+ * backend/rust-compile.cc (HIRCompileBase::coercion_site1): likewise
+ (HIRCompileBase::coerce_to_dyn_object): refactor
+ * backend/rust-tree.h (SLICE_FLAG): removed
+ (SLICE_TYPE_P): removed
+ (RS_DST_FLAG): new flag
+ (RS_DST_FLAG_P): new predicate
+ * typecheck/rust-tyty.cc (ReferenceType::is_dyn_object): new helper
+ (ReferenceType::is_dyn_obj_type): likewise
+ (PointerType::is_dyn_object): likewise
+ (PointerType::is_dyn_obj_type): likewise
+ * typecheck/rust-tyty.h (class DynamicObjectType): moved up
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-type.cc (TyTyResolveCompile::visit): add filter
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::compile_function_body): use unit_expression
+ (HIRCompileBase::unit_expression): new helper
+ * backend/rust-compile-base.h: update prototype
+ * backend/rust-compile-block.cc (CompileBlock::visit): use unit_expression
+ * backend/rust-compile-expr.cc (CompileExpr::visit): likewise
+ (CompileExpr::generate_closure_function): likewise
+ * backend/rust-compile-implitem.cc (CompileTraitItem::visit): cleanup
+ * backend/rust-compile-item.cc (CompileItem::visit): likewise
+ * backend/rust-compile-pattern.cc (CompilePatternLet::visit): likewise
+ * backend/rust-compile-resolve-path.cc (ResolvePathRef::resolve): likewise
+ * backend/rust-compile-type.cc (TyTyResolveCompile::get_unit_type): new helper
+ (TyTyResolveCompile::visit): use new unit_type helper
+ * backend/rust-compile-type.h: likewise
+ * rust-backend.h: simplify the return_expression
+ * rust-gcc.cc (Gcc_backend::function_type): likewise
+ (Gcc_backend::return_statement): likewise
+ * backend/rust-constexpr.cc (eval_constant_expression): remove bad assertion
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * checks/lints/rust-lint-unused-var.cc (UnusedVariables::Lint): use the decl not the expr
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * parse/rust-parse-impl.h
+ (Parser::parse_trait_impl_function_or_method):
+ Parse function/method qualifiers after "default".
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc: add missing compile_locals call
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast.h (class AttrInputMetaItemContainer): Run clang-format.
+ (class DelimTokenTree): Likewise.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-early-name-resolver.cc (is_macro_use_module): New function.
+ (EarlyNameResolver::accumulate_escaped_macros): New function.
+ (EarlyNameResolver::go): Use `accumulate_escaped_macros`.
+ (EarlyNameResolver::visit): Likewise.
+ * resolve/rust-early-name-resolver.h: Declare `accumulate_escaped_macros`.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast.h: Add take_items() and set_items() method to Crate.
+ * ast/rust-item.h: Add take_items() and set_items() method to Module.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast.h (enum Kind): Add MODULE variant.
+ * ast/rust-item.h: Return Kind::MODULE in AST::Module::get_kind().
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-macro.cc (builtin_macro_from_string): Move function.
+ * ast/rust-macro.h (enum class): Move enum.
+ (builtin_macro_from_string): Move function.
+ * expand/rust-macro-builtins.cc (builtin_macro_from_string): New function.
+ (make_macro_path_str): Use new bi-map.
+ (parse_single_string_literal): Use new `BuiltinMacro` enum.
+ (MacroBuiltin::include_bytes_handler): Likewise.
+ (MacroBuiltin::include_str_handler): Likewise.
+ (MacroBuiltin::compile_error_handler): Likewise.
+ (MacroBuiltin::concat_handler): Likewise.
+ (MacroBuiltin::env_handler): Likewise.
+ (MacroBuiltin::include_handler): Likewise.
+ (MacroBuiltin::sorry): New function.
+ * expand/rust-macro-builtins.h (enum class): Move enum here.
+ (builtin_macro_from_string): New function declaration.
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Use
+ new function.
+ * util/rust-hir-map.cc (Mappings::insert_macro_def): Remove old
+ builtin macro map.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-macro-builtins.cc: Include bidirectional map.
+ * util/bi-map.h: New file.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast.cc
+ (BlockExpr::strip_tail_expr):
+ Try to take new tail expression from statements list.
+ * ast/rust-expr.h
+ (BlockExpr::strip_tail_expr):
+ Replace definition with only declaration.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast.h
+ (Stmt::is_expr): New.
+ * ast/rust-stmt.h
+ (ExprStmt::is_expr): New.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-substitute-ctx.cc
+ (SubstituteCtx::substitute_repetition): Fix out-of-bounds.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Link against the static libproc_macro.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lang.opt: Add frust-extern option.
+ * rust-session-manager.cc (Session::handle_extern_option): Add
+ frust-extern option handler.
+ * rust-session-manager.h (struct Session): Add an unordered map
+ to store library name and locations.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * parse/rust-parse-impl.h
+ (Parser::parse_generic_params):
+ Handle parameter parsing error.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc: update for op overload
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit): use the predicate
+ (TypeCheckExpr::resolve_segments): cleanup
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-reference.cc (AssociatedImplTrait::AssociatedImplTrait):
+ bind the predicate
+ (AssociatedImplTrait::get_trait): remove
+ (AssociatedImplTrait::get_predicate): new getter
+ * typecheck/rust-hir-trait-reference.h: bind predicate
+ * typecheck/rust-hir-type-check-item.cc: update ctor
+ * typecheck/rust-type-util.cc (lookup_associated_impl_block): new function
+ * typecheck/rust-type-util.h (class BaseType): remove unused forward decl
+ (lookup_associated_impl_block): new helper
+ * typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::is_equal): new
+ * typecheck/rust-tyty-subst.cc (SubstitutionRef::lookup_associated_impl): use new helper
+ (SubstitutionRef::monomorphize): update usage/error handling
+ * typecheck/rust-tyty-subst.h: remove old prototype
+ * typecheck/rust-tyty.h: add is_equal decl
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc
+ (TypeCheckPattern::visit): Type check StructPatternFieldIdentPat.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/rust-ast-lower-pattern.cc
+ (ASTLoweringPattern::visit): Lower StructPatternFieldIdentPat.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::resolve_fn_trait_call):
+ return the assoicated predicate
+ * typecheck/rust-hir-type-check-expr.h: update prototype
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-ast-lower-implitem.h: add missing where clause lowering
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/tree/rust-hir-item.h: add get_locus() const
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/tree/rust-hir-pattern.h
+ (StructPatternFieldIdentPat::get_identifier): New.
+ (StructPatternFieldIdentPat::get_pattern): New.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * ast/rust-ast-dump.cc (Dump::visit): print parentheses around
+ unique expression operand.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust-session-manager.cc
+ (Session::enable_dump): Fix error messages.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-unify.cc (UnifyRules::emit_abi_mismatch): new error method
+ (UnifyRules::expect_fndef): add ABI check
+ * typecheck/rust-unify.h: prototype for new error method
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * util/rust-abi.cc (get_abi_from_string): add ABI mapping
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/tree/rust-hir-pattern.h: add missing get_mutability
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ use new ClosureParamInfer on untyped parameters
+ * typecheck/rust-hir-type-check-pattern.cc (ClosureParamInfer::Resolve): interface
+ (ClosureParamInfer::ClosureParamInfer): constructor
+ (ClosureParamInfer::visit): visitors for each pattern
+ * typecheck/rust-hir-type-check-pattern.h (class ClosureParamInfer): new visitor
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-pattern.h: cleanup
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
+ return so we dont hit undefined behaviour
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-implitem.h: remove includes
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-item.cc (CompileItem::visit): remove bad checks
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * lang.opt: add lang option flag
+ * rust-lang.cc (grs_langhook_init_options_struct): enable by default
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::operator=):
+ we are done if other is in an error state
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): verify it is a method
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait): use new interface
+ * typecheck/rust-hir-type-check-base.h: update prototype to include Self
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): lifewise
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::resolve_impl_block_substitutions):
+ likewise
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit): likewise
+ (TypeCheckExpr::resolve_segments): likewise
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): likewise
+ (TypeResolveGenericParam::visit): likewise
+ (ResolveWhereClauseItem::visit): likewise
+ * typecheck/rust-tyty-bounds.cc (TypeCheckBase::get_predicate_from_bound): likewise
+ (TypeBoundPredicate::apply_generic_arguments): likewise
+ (TypeBoundsMappings::lookup_predicate): likewise
+ * typecheck/rust-tyty-bounds.h: likewise
+ * typecheck/rust-tyty.h:likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check.h: New error state and missing copy implementations
+ * typecheck/rust-typecheck-context.cc (TypeCheckContextItem::TypeCheckContextItem):
+ missing copy ctor
+ (TypeCheckContextItem::operator=): missing copy implementation
+ (TypeCheckContextItem::get_error): new static function
+ (TypeCheckContextItem::is_error): new method
+ (TypeCheckContextItem::get_context_type): handle error state
+ (TypeCheckContextItem::get_defid): handle error state
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check.h: new helper
+ * typecheck/rust-typecheck-context.cc (TypeCheckContext::have_function_context):
+ implementation
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check.h: Add prototype
+ * typecheck/rust-typecheck-context.cc (TypeCheckContextItem::get_defid): implementation
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc: refactor
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-autoderef.cc: don't take a reference
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): likewise
+ * typecheck/rust-hir-type-check.h: remove reference
+ * typecheck/rust-typecheck-context.cc (TypeCheckContext::pop_return_type): likewise
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-ast-resolve-pattern.cc
+ (PatternDeclaration::visit): Handle StructPatternFieldIdentPat.
+
+2024-01-16 TieWay59 <tieway59@foxmail.com>
+
+ PR translation/108890
+ * lang.opt: Fix translation mistakes 2023 in
+ GCC/Rust [PR108890]
+ (line 67): change the inconsistent tab to spaces
+ (line 75): wrap bare placeholder `integer`
+ (line 79): remove redundant text of `Choose which`
+ (line 96): remove redundant text of `Choose which`
+ (line 112): remove redundant `Flag to`
+ (line 124): correct the exclusive term `When to stop`
+ (line 124): correct typo of `copimlation`
+
+2024-01-16 M V V S Manoj Kumar <mvvsmanojkumar@gmail.com>
+
+ * parse/rust-parse-impl.h (Parser::debug_dump_ast_output): Removed this funtion.
+ * rust-session-manager.cc (Session::enable_dump): Removed else if (arg == "parse").
+ (Session::compile_crate): Removed calls of dump_ast and dump_ast_expanded.
+ (Session::dump_ast): Removed this function.
+ (Session::dump_ast_expanded): Removed this function.
+ * rust-session-manager.h (struct CompileOptions): Removed the PARSER_AST_DUMP option.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_reference_pattern): Do not
+ call into `parse_pattern` anymore.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/rust-ast-lower-pattern.cc
+ (ASTLoweringPattern::translate): Add is_let_top_level parameter.
+ (ASTLoweringPattern::visit): Handle is_let_top_level.
+ * hir/rust-ast-lower-pattern.h
+ (class ASTLoweringPattern): Add is_let_top_level.
+ * hir/rust-ast-lower-stmt.cc
+ (ASTLoweringStmt::visit): Set is_let_top_level.
+
+2024-01-16 Zheyuan Chen <sephirotheca17@gmail.com>
+
+ * ast/rust-ast-dump.cc: fix bad formatting for associated type.
+
+2024-01-16 Sergey Bugaev <bugaevc@gmail.com>
+
+ * hir/rust-ast-lower-expr.h, hir/rust-ast-lower-expr.cc:
+ Lower AST::ErrorPropagationExpr to HIR::ErrorPropagationExpr
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Fix scope
+ resolution token output.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Keep
+ associated type.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit_function_common):
+ Fix function body output.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_outer_attribute): Fix
+ attribute status.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lex/rust-token.cc (Token::as_string): Fix lifetime string
+ representation.
+
+2024-01-16 Sergey Bugaev <bugaevc@gmail.com>
+
+ * resolve/rust-ast-resolve-expr.cc: Add "break rust" Easter egg
+
+2024-01-16 Sergey Bugaev <bugaevc@gmail.com>
+
+ * resolve/rust-ast-resolve-expr.h,
+ resolve/rust-ast-resolve-expr.cc: Add ResolveExpr::funny_error
+
+2024-01-16 Sergey Bugaev <bugaevc@gmail.com>
+
+ * ast/rust-ast.h: Add AST::Kind::IDENTIFIER
+
+2024-01-16 Sergey Bugaev <bugaevc@gmail.com>
+
+ * ast/rust-ast.h (Kind): Convert into a C++ enum class
+ * expand/rust-macro-builtins.cc: Adapt to the change
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc
+ (TypeCheckExpr::visit): Add implementation for IfLetExprConseqElse.
+ * typecheck/rust-hir-type-check-expr.h:
+ (TypeCheckExpr::visit): Remove stub implementation for IfLetExprConseqElse.
+ * hir/rust-ast-lower-expr.cc
+ (ASTLoweringExpr::visit): Lower IfLetExpr{,ConseqElse}.
+ * hir/rust-ast-lower-expr.h:
+ (ASTLoweringExpr::visit): Likewise.
+ * hir/rust-ast-lower-block.h
+ (ASTLoweringIfLetBlock::visit): Lower IfLetExprConseqElse.
+ (ASTLoweringExprWithBlock::visit): Likewise.
+ * hir/rust-ast-lower.cc
+ (ASTLoweringIfLetBlock::visit): Lower IfLetExprConseqElse.
+ * hir/tree/rust-hir-expr.h
+ (IfLetExprConseqElse::IfLetExprConseqElse): Make constructor more general.
+ (IfLetExprConseqElse::vis_else_block): Add.
+ (IfLetExprConseqElse::get_else_block): Add.
+ * resolve/rust-ast-resolve-expr.cc
+ (ResolveExpr::visit): Add IfLetExprConseqElse visitor.
+ * resolve/rust-ast-resolve-expr.h
+ (ResolveExpr::visit): Add IfLetExprConseqElse visitor.
+
+2024-01-16 Sebastian Kirmayer <gnu@kirmayer.eu>
+
+ * parse/rust-parse-impl.h
+ (Parser<ManagedTokenSource>::parse_macro_match_repetition):
+ reject separator in `?` repetition
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-expr.h
+ (class IfLetExprConseqElse): Make else_block ExprWithBlock.
+ (class IfLetExprConseqIf): Remove.
+ (class IfLetExprConseqIfLet): Remove.
+ * ast/rust-ast-full-decls.h
+ (class IfLetExprConseqIf): Remove.
+ (class IfLetExprConseqIfLet): Remove.
+ * ast/rust-ast.cc
+ (IfLetExprConseqElse::as_string): Adjust output.
+ (IfLetExprConseqIf::as_string): Remove.
+ (IfLetExprConseqIfLet::as_string): Remove.
+ (IfLetExprConseqIf::accept_vis): Remove.
+ (IfLetExprConseqIfLet::accept_vis): Remove.
+ * ast/rust-ast-visitor.h
+ (ASTVisitor::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ * ast/rust-ast-dump.cc
+ (Dump::visit): Likewise.
+ * ast/rust-ast-dump.h:
+ (Dump::visit): Likewise.
+ * ast/rust-ast-tokenstream.cc
+ (TokenStream::visit): Likewise.
+ * ast/rust-ast-tokenstream.h
+ (TokenStream::visit): Likewise.
+ * util/rust-attributes.cc
+ (AttributeChecker::visit): Likewise.
+ * util/rust-attributes.h:
+ (AttributeChecker::visit): Likewise.
+ * resolve/rust-early-name-resolver.cc
+ (EarlyNameResolver::visit): Likewise.
+ * resolve/rust-early-name-resolver.h
+ (EarlyNameResolver::visit): Likewise.
+ * resolve/rust-ast-resolve-base.h
+ (ResolverBase::visit): Likewise.
+ * resolve/rust-ast-resolve-base.cc
+ (ResolverBase::visit): Likewise.
+ * checks/errors/rust-feature-gate.h
+ (FeatureGate::visit): Likewise.
+ * expand/rust-cfg-strip.cc
+ (CfgStrip::visit): Likewise.
+ * expand/rust-cfg-strip.h:
+ (CfgStrip::visit): Likewise.
+ * expand/rust-expand-visitor.cc
+ (ExpandVisitor::visit): Likewise.
+ * expand/rust-expand-visitor.h
+ (ExpandVisitor::visit): Likewise.
+ * hir/rust-ast-lower-base.cc
+ (ASTLoweringBase::visit): Likewise.
+ * hir/rust-ast-lower-base.h:
+ (ASTLoweringBase::visit): Likewise.
+ * parse/rust-parse-impl.h
+ (Parser::parse_if_let_expr): Replace IfLetExprConseqIf{,Let} with IfLetExprConseqElse.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Add struct
+ name and curly braces to output tokenstream.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * parse/rust-parse-impl.h
+ (Parser::parse_macro_match): Handle underscore.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/tree/rust-hir-full-decls.h
+ (class ExprStmtWithoutBlock): Remove.
+ (class ExprStmtWithBlock): Remove.
+ * hir/tree/rust-hir-stmt.h
+ (class ExprStmt):
+ Add remaining ExprStmtWith{,out}Block functionality.
+ (class ExprStmtWithoutBlock): Remove.
+ (class ExprStmtWithBlock): Remove.
+ * hir/rust-ast-lower-stmt.cc
+ (ASTLoweringStmt::visit):
+ Lower to HIR::ExprStmt instead of deriving class.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-stmt.cc
+ (CompileStmt::visit): Unify ExprStmtWith{,out}Block visitors.
+ * backend/rust-compile-stmt.h
+ (CompileStmt::visit): Likewise.
+ * backend/rust-compile-item.h
+ (CompileItem::visit): Likewise.
+ * hir/rust-hir-dump.cc
+ (Dump::visit): Likewise.
+ * hir/rust-hir-dump.h
+ (Dump::visit): Likewise.
+ * hir/tree/rust-hir-stmt.h
+ (ExprStmt::accept_vis): Add.
+ (ExprStmtWithoutBlock::accept_vis): Remove.
+ (ExprStmtWithBlock::accept_vis): Remove.
+ * hir/tree/rust-hir.cc
+ (ExprStmt::accept_vis): Add.
+ (ExprStmtWithoutBlock::accept_vis): Remove.
+ (ExprStmtWithBlock::accept_vis): Remove.
+ * hir/tree/rust-hir-visitor.h
+ (HIRFullVisitor::visit): Likewise.
+ (HIRFullVisitorBase::visit): Likewise.
+ (HIRStmtVisitor::visit): Likewise.
+ * checks/errors/rust-const-checker.cc
+ (ConstChecker::visit): Likewise.
+ * checks/errors/rust-const-checker.h
+ (ConstChecker::visit): Likewise.
+ * checks/errors/rust-unsafe-checker.cc
+ (UnsafeChecker::visit): Likewise.
+ * checks/errors/rust-unsafe-checker.h
+ (UnsafeChecker::visit): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc
+ (PrivacyReporter::visit): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.h
+ (PrivacyReporter::visit): Likewise.
+ * checks/lints/rust-lint-marklive.h
+ (MarkLive::visit): Likewise.
+ * typecheck/rust-hir-type-check-stmt.cc
+ (TypeCheckStmt::visit): Likewise.
+ * typecheck/rust-hir-type-check-stmt.h
+ (TypeCheckStmt::visit): Likewise.
+ * typecheck/rust-tycheck-dump.h
+ (TypeResolverDump::visit): Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/tree/rust-hir-stmt.h
+ (ExprStmt::expr): Add field.
+ (ExprStmt::get_expr): Add method.
+ (ExprStmt::ExprStmt): Add copy/move constructors, modify existing constructor.
+ (ExprStmt::operator=): Add assignment operator.
+ (ExprStmtWithoutBlock::expr): Remove field.
+ (ExprStmtWithoutBlock::get_expr): Remove method.
+ (ExprStmtWithoutBlock::ExprStmt):
+ Remove copy/move constructors, modify existing constructor.
+ (ExprStmtWithoutBlock::operator=): Remove assignment operator.
+ (ExprStmtWithBlock::expr): Remove field.
+ (ExprStmtWithBlock::get_expr): Remove method.
+ (ExprStmtWithBlock::ExprStmt): Remove copy/move constructors, modify existing constructor.
+ (ExprStmtWithBlock::operator=): Remove assignment operator.
+ (ExprStmt::as_string): Add method.
+ (ExprStmtWithBlock::as_string): Remove method.
+ (ExprStmtWithoutBlock::as_string): Remove method.
+ * hir/tree/rust-hir.cc
+ (ExprStmt::as_string): Add method.
+ (ExprStmtWithBlock::as_string): Remove method.
+ (ExprStmtWithoutBlock::as_string): Remove method.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-expr.h
+ (class IfExprConseqElse): Make else_block ExprWithBlock.
+ (class IfExprConseqIf): Remove.
+ (class IfExprConseqIfLet): Remove.
+ * ast/rust-ast-full-decls.h
+ (class IfExprConseqIf): Remove.
+ (class IfExprConseqIfLet): Remove.
+ * ast/rust-ast.cc
+ (IfExprConseqElse::as_string): Adjust output.
+ (IfExprConseqIf::as_string): Remove.
+ (IfExprConseqIfLet::as_string): Remove.
+ (IfExprConseqIf::accept_vis): Remove.
+ (IfExprConseqIfLet::accept_vis): Remove.
+ * ast/rust-ast-visitor.h
+ (ASTVisitor::visit): Remove IfExprConseqIf{,Let} visitors.
+ * ast/rust-ast-tokenstream.cc
+ (TokenStream::visit): Likewise.
+ * ast/rust-ast-tokenstream.h
+ (TokenStream::visit): Likewise.
+ * ast/rust-ast-dump.cc
+ (Dump::visit): Likewise.
+ * ast/rust-ast-dump.h
+ (Dump::visit): Likewise.
+ * checks/errors/rust-feature-gate.h
+ (FeatureGate::visit): Likewise.
+ * util/rust-attributes.cc
+ (AttributeChecker::visit): Likewise.
+ * util/rust-attributes.h
+ (AttributeChecker::visit): Likewise.
+ * resolve/rust-early-name-resolver.cc
+ (EarlyNameResolver::visit): Likewise.
+ * resolve/rust-early-name-resolver.h
+ (EarlyNameResolver::visit): Likewise.
+ * resolve/rust-ast-resolve-base.h
+ (ResolverBase::visit): Likewise.
+ * resolve/rust-ast-resolve-base.cc
+ (ResolverBase::visit): Likewise.
+ * resolve/rust-ast-resolve-expr.h
+ (ResolveExpr::visit): Remove IfExprConseqIf visitor.
+ * resolve/rust-ast-resolve-expr.cc
+ (ResolveExpr::visit): Likewise.
+ * expand/rust-cfg-strip.cc
+ (CfgStrip::visit): Remove IfExprConseqIf{,Let} visitors.
+ * expand/rust-cfg-strip.h
+ (CfgStrip::visit): Likewise.
+ * expand/rust-expand-visitor.cc
+ (ExpandVisitor::visit): Likewise.
+ * expand/rust-expand-visitor.h
+ (ExpandVisitor::visit): Likewise.
+ * hir/rust-ast-lower-base.cc
+ (ASTLoweringBase::visit): Likewise.
+ * hir/rust-ast-lower-base.h
+ (ASTLoweringBase::visit): Likewise.
+ * hir/rust-ast-lower-block.h
+ (ASTLoweringIfBlock::visit): Remove IfExprConseqIf visitor.
+ (ASTLoweringExprWithBlock::visit): Likewise.
+ * hir/rust-ast-lower.cc
+ (ASTLoweringIfBlock::visit):
+ Remove IfExprConseqIf visitor, adjust IfExprConseqElse lowering.
+ * hir/rust-ast-lower-expr.h
+ (ASTLoweringExpr::visit): Remove IfExprConseqIf visitor.
+ * hir/rust-ast-lower-expr.cc
+ (ASTLoweringExpr::visit): Likewise.
+ * parse/rust-parse-impl.h
+ (Parser::parse_if_expr): Replace IfExprConseqIf{,Let} with IfExprConseqElse.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Fix inner
+ attribute tokenstream output.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * ast/rust-ast-dump.cc (Dump::debug): New.
+ * ast/rust-ast-dump.h (Dump::debug): Untemplate it.
+ (debug): New.
+ * ast/rust-ast.h (class Visitable): New.
+ (class TokenTree): Inherit from Visitable.
+ (class MacroMatch): Likewise.
+ (class AttrInput): Likewise.
+ (class MetaItemInner): Likewise.
+ (class Pattern): Likewise.
+ (classTypeParamBound): Likewise.
+ (class GenericParam): Likewise.
+ (class TraitItem): Likewise.
+ (classInherentImplItem): Likewise.
+ (class TraitImplItem): Likewise.
+ (class ExternalItem): Likewise.
+ (class SingleASTNode): Likewise.
+
+2024-01-16 Thomas Schwinge <thomas@codesourcery.com>
+
+ * rust-lang.cc (grs_langhook_type_for_mode): Placate clang-format.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Add boolean for differenciation.
+ * parse/rust-parse-impl.h (Parser::parse_doc_comment): Change
+ function interface to make code cleaner. It should return a body
+ instead of the whole attribute.
+ (Parser::parse_inner_attribute): Specify the inner status of the
+ node.
+ (Parser::parse_attribute_body): Change function interface to
+ make the code cleaner much like parse_doc_comment.
+ (Parser::parse_outer_attribute): Specify outer status of the
+ node.
+ * parse/rust-parse.h: Update functions prototypes.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile):
+ reuse resolve_method_address to monomorphize the call if required
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments):
+ allow matching against unimplemented trait item bounds
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-path-probe.cc: dont subst with a dynamic object
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::resolve_method_address): moved here
+ * backend/rust-compile-base.h: refactored prototype
+ * backend/rust-compile-expr.cc (CompileExpr::resolve_method_address): refactor
+ * backend/rust-compile-expr.h: likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): remove unused
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): call destructure
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::resolve_method_address):
+ call path probe impl trait
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Add call
+ to attribute expansion function.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.cc (ExpandVisitor::visit_outer_attrs):
+ Change condition order.
+ (ExpandVisitor::visit_inner_using_attrs): Likewise.
+ (ExpandVisitor::visit_attrs_with_derive): Likewise.
+ (ExpandVisitor::is_builtin): Add builtin identification
+ function.
+ * expand/rust-expand-visitor.h: Add function prototype.
+ * util/rust-attributes.cc: Add missing rustc_builtin_macro
+ attribute.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.cc (ExpandVisitor::expand_struct_fields):
+ Add call to expand structu fields.
+ (ExpandVisitor::expand_function_params): Add call to expand
+ function parameters.
+ (ExpandVisitor::expand_closure_params): Add call to expand
+ closure parameters.
+ (ExpandVisitor::visit): Add calls for item outer attribute
+ expansions.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.cc (ExpandVisitor::expand_outer_attribute):
+ Stub for a single attribute expansion.
+ (ExpandVisitor::visit_outer_attrs): Visit the attributes to
+ expand on a given item.
+ * expand/rust-expand-visitor.h: Add function prototypes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Add getter to Expr class.
+ * ast/rust-expr.h: Add override attribute to existing getters.
+ Also implement it for RangeExpr, attempting to retrieve outer
+ attributes on those types will crash the compiler.
+ * ast/rust-macro.h: Add override attribute to existing getters.
+ * ast/rust-path.h: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Add call
+ to inner attribute stub.
+ (ExpandVisitor::expand_inner_attribute): Expand one single
+ attribute.
+ (ExpandVisitor::visit_inner_using_attrs): Expand a given item
+ using a vector of attributes.
+ (ExpandVisitor::visit_inner_attrs): Visit inner attributes of a
+ given item.
+ * expand/rust-expand-visitor.h: Add function prototypes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Add call
+ to derive expander.
+ (ExpandVisitor::expand_derive): Expand a single derive.
+ (ExpandVisitor::visit_attrs_with_derive): Visit an item with
+ derive attributes.
+ (ExpandVisitor::is_derive): Identify a derive attribute.
+ * expand/rust-expand-visitor.h: Add function prototypes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Fix ICE.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Remove
+ default separator.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Visit inner
+ attributes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Change token
+ type.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Fix existing
+ and implement remaining attribute visitors.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Add visitor
+ to the union's outer attributes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Add call to
+ inner attribute visitor.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Fix ICE.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Make comma
+ mandatory.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Remove
+ additional semicolon output.
+ * ast/rust-ast-tokenstream.h: Change block visitor prototype
+ with a default value for trailing tokens.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Add two new files to the list of sources.
+ * ast/rust-ast-full.h: Add new ast formatting header.
+ * ast/rust-ast.cc (enum indent_mode): Move formatting function
+ to it's own file.
+ (indent_spaces): Likewise.
+ (get_string_in_delims): Likewise.
+ (enum AttrMode): Likewise.
+ (get_mode_dump_desc): Likewise.
+ (append_attributes): Likewise.
+ (unquote_string): Likewise.
+ (GroupedExpr::as_string): Move pattern implementation to it's
+ own file.
+ (RangePattern::as_string): Likewise.
+ (RangePatternBoundLiteral::as_string): Likewise.
+ (SlicePattern::as_string): Likewise.
+ (AltPattern::as_string): Likewise.
+ (TuplePatternItemsMultiple::as_string): Likewise.
+ (TuplePatternItemsRanged::as_string): Likewise.
+ (TuplePattern::as_string): Likewise.
+ (StructPatternField::as_string): Likewise.
+ (StructPatternFieldIdent::as_string): Likewise.
+ (StructPatternFieldTuplePat::as_string): Likewise.
+ (StructPatternFieldIdentPat::as_string): Likewise.
+ (StructPatternElements::as_string): Likewise.
+ (StructPattern::as_string): Likewise.
+ (LiteralPattern::as_string): Likewise.
+ (ReferencePattern::as_string): Likewise.
+ (IdentifierPattern::as_string): Likewise.
+ (TupleStructItemsNoRange::as_string): Likewise.
+ (TupleStructItemsRange::as_string): Likewise.
+ (TupleStructPattern::as_string): Likewise.
+ (GroupedExpr::accept_vis): Likewise.
+ (LiteralPattern::accept_vis): Likewise.
+ (IdentifierPattern::accept_vis): Likewise.
+ (WildcardPattern::accept_vis): Likewise.
+ (RestPattern::accept_vis): Likewise.
+ (RangePatternBoundLiteral::accept_vis): Likewise.
+ (RangePatternBoundPath::accept_vis): Likewise.
+ (RangePatternBoundQualPath::accept_vis): Likewise.
+ (RangePattern::accept_vis): Likewise.
+ (ReferencePattern::accept_vis): Likewise.
+ (StructPatternFieldTuplePat::accept_vis): Likewise.
+ (StructPatternFieldIdentPat::accept_vis): Likewise.
+ (StructPatternFieldIdent::accept_vis): Likewise.
+ (StructPattern::accept_vis): Likewise.
+ (TupleStructItemsNoRange::accept_vis): Likewise.
+ (TupleStructItemsRange::accept_vis): Likewise.
+ (TupleStructPattern::accept_vis): Likewise.
+ (TuplePatternItemsMultiple::accept_vis): Likewise.
+ (TuplePatternItemsRanged::accept_vis): Likewise.
+ (TuplePattern::accept_vis): Likewise.
+ (GroupedPattern::accept_vis): Likewise.
+ (SlicePattern::accept_vis): Likewise.
+ (AltPattern::accept_vis): Likewise.
+ * ast/rust-ast-formatting.cc: New file.
+ * ast/rust-ast-formatting.h: New file.
+ * ast/rust-pattern.cc: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Add new file for rust-path implementation.
+ * ast/rust-ast.cc (PathInExpression::as_string): Move function
+ to the new file.
+ (PathPattern::as_string): Likewise.
+ (QualifiedPathInExpression::as_string): Likewise.
+ (ConstGenericParam::as_string): Likewise.
+ (QualifiedPathInType::as_string): Likewise.
+ (TypePath::as_string): Likewise.
+ (PathPattern::convert_to_simple_path): Likewise.
+ (TypePath::as_simple_path): Likewise.
+ (PathExprSegment::as_string): Likewise.
+ (GenericArgs::as_string): Likewise.
+ (GenericArgsBinding::as_string): Likewise.
+ (TypePath::to_trait_bound): Likewise.
+ (TypePathSegmentGeneric::as_string): Likewise.
+ (TypePathFunction::as_string): Likewise.
+ (TypePathSegmentFunction::as_string): Likewise.
+ (ConstGenericParam::accept_vis): Likewise.
+ (PathInExpression::accept_vis): Likewise.
+ (TypePathSegment::accept_vis): Likewise.
+ (TypePathSegmentGeneric::accept_vis): Likewise.
+ (TypePathSegmentFunction::accept_vis): Likewise.
+ (TypePath::accept_vis): Likewise.
+ (QualifiedPathInExpression::accept_vis): Likewise.
+ (QualifiedPathInType::accept_vis): Likewise.
+ (GenericArg::disambiguate_to_const): Likewise.
+ (GenericArg::disambiguate_to_type): Likewise.
+ * ast/rust-path.cc: New file.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-item.cc (CompileItem::visit): unwrap the constant expression
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * util/rust-lang-item.h
+ (RustLangItem::ItemType::FN): Add.
+ (RustLangItem::ItemType::FN_MUT): Add.
+ (RustLangItem::Parse): Handle FN and FN_MUT.
+ (RustLangItem::ToString): Handle FN and FN_MUT.
+
+2024-01-16 Emanuele Micheletti <micheletti.emanuele@hotmail.com>
+
+ * typecheck/rust-casts.cc (TypeCastRules::cast_rules):
+ case INTEGRAL handles TypeKind::CHAR
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-item.cc (ResolveTraitItems::visit):
+ add check for reference marker and type's in self params
+ (ResolveItem::visit): likewise
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_root_path):
+ remove bad generics check
+ (TypeCheckExpr::resolve_segments): likewise
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path): likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-item.cc
+ (ResolveTraitItems::visit): add name resolution self param
+ (ResolveItem::visit): likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::TypeBoundPredicate): this is an empty
+ (TypeBoundPredicate::operator=): likewise
+ * typecheck/rust-tyty-subst.cc (SubstitutionArgumentMappings::empty): new interface
+ (SubstitutionArgumentMappings::is_error): this marks it as an error
+ * typecheck/rust-tyty-subst.h: update prototypes
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * checks/errors/privacy/rust-privacy-reporter.cc
+ (PrivacyReporter::check_base_type_privacy): allow error types to be permissive
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit_items_as_lines):
+ Handle trailing chars.
+ (TokenStream::visit_items_as_block): Likewise.
+ (TokenStream::visit): Fix visitor.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lex/rust-token.cc (Token::as_string): Add type hint output.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust-session-manager.cc (Session::enable_dump): Enable new
+ dump.
+ (Session::compile_crate): CLI argument parsing.
+ (Session::dump_tokenstream): Dump the tokenstream as a string in
+ the specified file.
+ * rust-session-manager.h (struct CompileOptions): Add
+ tokenstream dump option.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * lex/rust-token.cc (Token::as_string): Add as_string
+ implementation.
+ * lex/rust-token.h: Add as_string prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::TokenStream): Add
+ constructor.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::collect_tokens): Add
+ getter.
+ (TokenStream::go): Rename function.
+ (TokenStream::visit): Likewise.
+ * ast/rust-ast-tokenstream.h: Add collect prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Change
+ getter name.
+ * ast/rust-ast.cc (SimplePath::as_string): Change attribute
+ name.
+ * ast/rust-ast.h (class SimplePath): Refactor attribute name and
+ change getter name.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit_as_line): Add
+ formatting calls.
+ (TokenStream::visit_items_as_block): Likewise.
+ (TokenStream::newline): Add stub.
+ (TokenStream::indentation): Add stub.
+ (TokenStream::increment_indentation): Add stub.
+ (TokenStream::decrement_indentation): Add stub.
+ (TokenStream::visit): Add formatting calls.
+ (TokenStream::visit_function_common): Likewise.
+ * ast/rust-ast-tokenstream.h: Add stub prototypes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Add visitor.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Add visitor
+ implementation.
+ * ast/rust-ast-tokenstream.h: Add additional function prototype.
+ * ast/rust-item.h: Add some getters.
+ * ast/rust-macro.h: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Add visitor.
+ * ast/rust-item.h: Add missing getters.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Add visitor.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Add
+ visitors.
+ (TokenStream::visit_closure_common): Merge common code for
+ closure visitors.
+ * ast/rust-ast-tokenstream.h: Add function prototype.
+ * ast/rust-expr.h: Add missing move attribute getter.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Add
+ visitors.
+ (TokenStream::visit_loop_common): Merge common loop code.
+ * ast/rust-ast-tokenstream.h: Add function prototypes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Implement
+ visitor.
+ * ast/rust-ast-tokenstream.h: Add function prototype for missing
+ component.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::trailing_comma):
+ Output a trailing comma to the token stream according to the
+ configuration.
+ * ast/rust-ast-tokenstream.h: Add function prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Implement
+ visitors.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-tokenstream.cc (TokenStream::visit): Implement
+ visitors.
+ * ast/rust-ast-tokenstream.h: Add function prototypes.
+ * ast/rust-ast.h: Add missing getters.
+ * ast/rust-expr.h: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Add rust-as-tokenstream to compile list.
+ * ast/rust-item.h: Add missing getter for location.
+ * ast/rust-ast-tokenstream.cc: Add ast visitor implementation.
+ * ast/rust-ast-tokenstream.h: New file.
+ * ast/rust-pattern.h: Add getter.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit):
+ Add implicit unit type as the return type when not specified
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * util/rust-attributes.cc: Add stable to the table of known attributes
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): return early on bad type
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::TypeCheckPattern):
+ remove assertion in favor of check
+ (TypeCheckPattern::visit): likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::generate_closure_function):
+ when its not a block we dont have any ribs to generate locals from
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * parse/rust-parse-impl.h
+ (Parser<ManagedTokenSource>::parse_expr_without_block):
+ Remove direct array expression handling.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-item.h: Fix `Visibility::has_path()` implementation.
+ * checks/errors/privacy/rust-visibility-resolver.cc
+ (VisibilityResolver::resolve_module_path): Check if we are dealing with pub(crate) properly.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path): Set
+ resolved_node_id when visiting root segment of SimplePath.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast.h: Call SimplePath constructor differently in
+ SimplePath::from_str
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-ast-lower-type.h: Move all remaining definitions to source file.
+ * hir/rust-ast-lower-type.cc (ASTLoweringType::translate): Moved to source file.
+ (ASTLoweringType::visit): Likewise.
+ (ASTLowerGenericParam::translate): Likewise.
+ (ASTLowerGenericParam::visit): Likewise.
+ (ASTLoweringTypeBounds::translate): Likewise.
+ (ASTLoweringTypeBounds::visit): Likewise.
+ (ASTLowerWhereClauseItem::translate): Likewise.
+ (ASTLowerWhereClauseItem::visit): Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-pattern.h: Remove commented out code.
+
+2024-01-16 emanuele-em <micheletti.emanuele@hotmail.com>
+
+ * typecheck/rust-casts.cc (TypeCastRules::cast_rules): BOOL removed from switch cases
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Rename rust-asttribute-visitor.o -> rust-cfg-strip.o
+ * expand/rust-attribute-visitor.cc: Moved to...
+ * expand/rust-cfg-strip.cc: ...here.
+ * expand/rust-attribute-visitor.h: Moved to...
+ * expand/rust-cfg-strip.h: ...here.
+ * expand/rust-macro-expand.cc: Fix include of rust-attribute-visitor.h
+ * expand/rust-macro-builtins.cc: Likewise.
+ * rust-session-manager.cc (Session::expansion): Call CfgStrip instead of
+ AttrVisitor.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Add new object file.
+ * expand/rust-attribute-visitor.cc (AttrVisitor::go): Visit all items of a
+ crate.
+ (AttrVisitor::expand_struct_fields): Do not perform macro expansion anymore.
+ (AttrVisitor::expand_function_params): Likewise.
+ (AttrVisitor::expand_generic_args): Likewise.
+ (AttrVisitor::expand_qualified_path_type): Likewise.
+ (AttrVisitor::expand_self_param): Likewise.
+ (AttrVisitor::expand_trait_function_decl): Likewise.
+ (AttrVisitor::expand_trait_method_decl): Likewise.
+ (AttrVisitor::visit): Likewise.
+ (AttrVisitor::maybe_expand_expr): Remove function.
+ (AttrVisitor::maybe_expand_type): Likewise.
+ * expand/rust-attribute-visitor.h: Do not keep MacroExpander inside AttrVisitor
+ anymore.
+ * expand/rust-macro-expand.h (struct MacroExpander): Turn ContextType into an
+ enum class for more type safety.
+ * expand/rust-macro-expand.cc (MacroExpander::expand_crate): Use new ContextType
+ API.
+ * rust-session-manager.cc (Session::expansion): Call into ExpandVisitor.
+ * expand/rust-expand-visitor.cc: New file.
+ * expand/rust-expand-visitor.h: New file.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-macro-expand.cc (MacroExpander::expand_crate): Do not cfg-attr
+ strip in MacroExpander
+ (MacroExpander::fails_cfg): Function moved...
+ (MacroExpander::fails_cfg_with_expand): Function moved...
+ (MacroExpander::expand_cfg_attrs): Function moved...
+ * expand/rust-attribute-visitor.cc (fails_cfg): ...here.
+ (fails_cfg_with_expand): ...here.
+ (expand_cfg_attrs): ...here.
+ (AttrVisitor::expand_struct_fields): Use new functions.
+ (AttrVisitor::expand_tuple_fields): Likewise.
+ (AttrVisitor::expand_function_params): Likewise.
+ (AttrVisitor::visit): Likewise.
+ (AttrVisitor::go): New function.
+ * expand/rust-attribute-visitor.h: Declare AttrVisitor::go.
+ * expand/rust-macro-expand.h (struct MacroExpander): Remove cfg-attr related
+ functions.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_macro_definition):
+ New function.
+ * hir/rust-ast-lower-base.h: Declare `lower_macro_definition`.
+ * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Lower public
+ macro definitions.
+ * hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): Likewise.
+ * hir/rust-ast-lower-stmt.h: Add visitor for `AST::MacroRulesDefinition`.
+ * hir/rust-ast-lower.cc (ASTLowering::go): Formatting.
+ (ASTLoweringBlock::visit): Visit `AST::MacroRulesDefinition`
+ (ASTLoweringIfLetBlock::visit): Formatting.
+ (ASTLoweringExprWithBlock::visit): Formatting.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Add new visitor
+ for AST::MacroRulesDefinition.
+ * hir/rust-ast-lower-item.h: Declare above mentioned visitor.
+ * metadata/rust-export-metadata.cc (ExportContext::emit_macro): New function.
+ * metadata/rust-export-metadata.h: Declare it.
+ (PublicInterface::gather_export_data): Go through each exported macro.
+ * util/rust-hir-map.cc (Mappings::insert_exported_macro): New function.
+ (Mappings::get_exported_macros): New function.
+ * util/rust-hir-map.h: Add new mappings for exported macros.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * backend/rust-compile-item.h: Revert 1c946687239b86a92839d57dfbc928ad7ce35eae.
+ * backend/rust-compile-stmt.h: Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc
+ (PrivacyReporter::visit): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.h: Likewise.
+ * checks/errors/privacy/rust-pub-restricted-visitor.cc
+ (PubRestrictedVisitor::visit): Likewise.
+ * checks/errors/privacy/rust-pub-restricted-visitor.h: Likewise.
+ * checks/errors/privacy/rust-reachability.cc
+ (ReachabilityVisitor::visit): Likewise.
+ * checks/errors/privacy/rust-reachability.h: Likewise.
+ * checks/errors/privacy/rust-visibility-resolver.cc
+ (VisibilityResolver::visit): Likewise.
+ * checks/errors/privacy/rust-visibility-resolver.h: Likewise.
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
+ * checks/errors/rust-const-checker.h: Likewise.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise.
+ * checks/errors/rust-unsafe-checker.h: Likewise.
+ * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Likewise.
+ * hir/rust-ast-lower-item.h: Likewise.
+ * hir/rust-hir-dump.cc (Dump::visit): Likewise.
+ * hir/rust-hir-dump.h: Likewise.
+ * hir/tree/rust-hir-full-decls.h (class ExportedMacro): Likewise.
+ * hir/tree/rust-hir-item.h (class ExportedMacro): Likewise.
+ * hir/tree/rust-hir-visitor.h: Likewise.
+ * hir/tree/rust-hir.cc (ExportedMacro::accept_vis): Likewise.
+ (ExportedMacro::get_locus): Likewise.
+ (ExportedMacro::get_item_kind): Likewise.
+ (ExportedMacro::clone_item_impl): Likewise.
+ * hir/tree/rust-hir.h: Likewise.
+ * metadata/rust-export-metadata.cc: Likewise.
+ * typecheck/rust-hir-type-check-item.h: Likewise.
+ * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Likewise.
+ * typecheck/rust-hir-type-check-stmt.h: Likewise.
+ * typecheck/rust-tycheck-dump.h: Likewise.
+ * util/rust-attributes.cc: Likewise.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): return a TraitObject
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc: don't inject extra inference variables
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-dump.cc (Dump::visit): Remove extraneous semicolon when
+ dumping macro rules.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * metadata/rust-imports.cc (add_search_path): Change `Go` -> `Rust`.
+ (Import::try_package_in_directory): Likewise.
+ (Import::find_export_data): Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/rust-ast-lower-pattern.cc
+ (ASTLoweringPattern::visit): Lower AltPattern.
+ * hir/rust-ast-lower-pattern.h:
+ (ASTLoweringPattern::visit): Add AltPattern visitor.
+
+2024-01-16 Xiao Ma <turingki@yeah.net>
+ Thomas Schwinge <thomas@codesourcery.com>
+
+ * checks/errors/rust-feature-gate.cc: Adjust 'ld'->'u'.
+ * checks/errors/rust-feature.h: Adjust
+ the type of `m_issue`: 'uint64_t' -> 'unsigned'.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * ast/rust-ast.h: add const get_final_segment helper
+ * hir/rust-ast-lower-enumitem.h: dont add an item mapping for enumitems
+ * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): add enum to enum-items mappings
+ * hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): likewise
+ * hir/tree/rust-hir-item.h: add non const helper to get variants
+ * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): resolve the use declaration
+ * resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path): handle self
+ * resolve/rust-ast-resolve-toplevel.h: add enum item mappings to module mappings
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_root_path): ensure variant
+ (TypeCheckExpr::resolve_segments): likewise
+ * typecheck/rust-type-util.cc (query_type): lookup enum's
+ * util/rust-hir-map.cc (Mappings::insert_hir_enumitem): enum item mappings
+ (Mappings::lookup_hir_enumitem): likewise
+ * util/rust-hir-map.h: likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-path.cc (ResolvePath::ResolvePath): return NodeId
+ (ResolvePath::go): update signiture
+ (ResolvePath::resolve_path): return resolved_node_id
+ * resolve/rust-ast-resolve-path.h: update prototypes
+
+2024-01-16 Mahmoud Mohamed <mahadelr19@gmail.com>
+
+ * hir/rust-ast-lower-pattern.cc (ASTLoweringPattern::visit):
+ Add lowering for SlicePattern.
+ * hir/rust-ast-lower-pattern.h: Likewise.
+ * resolve/rust-ast-resolve-pattern.cc (PatternDeclaration::visit):
+ Add name resolution visit for SlicePattern.
+ * resolve/rust-ast-resolve-pattern.h: Likewise.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-ast-lower-implitem.h (RUST_AST_LOWER_IMPLITEM_H): cleanup header usage
+ * hir/rust-ast-lower-item.cc: likewise
+ * hir/rust-ast-lower-item.h (RUST_AST_LOWER_ITEM): likewise
+ * hir/rust-ast-lower-stmt.cc: likewise
+ * hir/rust-ast-lower-stmt.h (RUST_AST_LOWER_STMT): likewise
+ * hir/rust-ast-lower-type.h: likewise
+ * hir/rust-ast-lower.cc: likewise
+ * hir/rust-ast-lower.h: likewise
+ * resolve/rust-ast-resolve-expr.h: likewise
+ * resolve/rust-ast-resolve-item.cc: likewise
+ * resolve/rust-ast-resolve-item.h: likewise
+ * resolve/rust-ast-resolve-stmt.cc: likewise
+ * resolve/rust-ast-resolve-stmt.h: likewise
+ * resolve/rust-ast-resolve-struct-expr-field.h: likewise
+ * resolve/rust-ast-resolve-toplevel.h: likewise
+ * resolve/rust-ast-resolve-type.h: likewise
+ * resolve/rust-ast-resolve.h: likewise
+
+2024-01-16 Mahmoud Mohamed <mahadelr19@gmail.com>
+
+ * resolve/rust-ast-resolve-pattern.h (class ResolvePattern): Removed.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-intrinsic.cc (move_val_init_handler): new intrinsice
+ (uninit_handler): use a builtin memcpy
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-coercion.cc (TypeCoercionRules::select): use the result
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::resolve_literal): fix ctor
+ * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): likewise
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): likewise
+ * typecheck/rust-typecheck-context.cc (TypeCheckContext::push_new_loop_context): likewise
+ * typecheck/rust-tyty-util.cc (TyVar::get_implicit_infer_var): likewise
+ * typecheck/rust-tyty.cc (InferType::InferType): new ctor with type hint
+ (InferType::clone): fix ctor
+ (InferType::apply_primitive_type_hint): new function to apply possible hint
+ * typecheck/rust-tyty.h: update prototypes
+ * typecheck/rust-unify.cc (UnifyRules::expect_inference_variable): apply type hints
+ (UnifyRules::expect_bool): likewise
+ (UnifyRules::expect_char): likewise
+ (UnifyRules::expect_int): likewise
+ (UnifyRules::expect_uint): likewise
+ (UnifyRules::expect_float): likewise
+ (UnifyRules::expect_isize): likewise
+ (UnifyRules::expect_usize): likewise
+
+2024-01-16 Jiakun Fan <120090316@link.cuhk.edu.cn>
+
+ * hir/rust-hir-dump.cc (Dump::go): fix format
+ (Dump::visit): impl `visit (AST::Attribute &)`, dump inner attrs and
+ `visit (Lifetime &)`
+ * hir/rust-hir-dump.h:add `visit (AST::Attribute &)`
+
+2024-01-16 Mahmoud Mohamed <mahadelr19@gmail.com>
+
+ * resolve/rust-ast-resolve-pattern.cc (PatternDeclaration::go):
+ Print out consistency errors.
+ (PatternDeclaration::visit): Implement visit for AltPattern.
+ (PatternDeclaration::add_new_binding): New helper function for
+ adding a binding to identifier.
+ * resolve/rust-ast-resolve-pattern.h (struct BindingInfo):
+ New struct to facilitate checking for inconsistencies between bindings.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-block.h
+ (CompileConditionalBlocks::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ (CompileExprWithBlock::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ * backend/rust-compile-expr.h
+ (CompileExpr::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ * checks/errors/rust-unsafe-checker.cc
+ (UnsafeChecker::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ * checks/errors/rust-unsafe-checker.h
+ (UnsafeChecker::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ * checks/errors/rust-const-checker.cc
+ (ConstChecker::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ * checks/errors/rust-const-checker.h
+ (ConstChecker::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ * checks/errors/privacy/rust-privacy-reporter.cc
+ (PrivacyReporter::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ * checks/errors/privacy/rust-privacy-reporter.h
+ (PrivacyReporter::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ * hir/tree/rust-hir-expr.h
+ (class IfLetExprConseqElse): Make else_block ExprWithBlock.
+ (class IfLetExprConseqIf): Remove.
+ (class IfLetExprConseqIfLet): Remove.
+ * hir/tree/rust-hir-full-decls.h
+ (class IfLetExprConseqIf): Remove.
+ (class IfLetExprConseqIfLet): Remove.
+ * hir/tree/rust-hir.cc
+ (IfLetExprConseqElse::as_string): Adjust output.
+ (IfLetExprConseqIf::as_string): Remove.
+ (IfLetExprConseqIfLet::as_string): Remove.
+ (IfLetExprConseqIf::accept_vis): Remove.
+ (IfLetExprConseqIfLet::accept_vis): Remove.
+ * hir/tree/rust-hir-visitor.h
+ (HIRFullVisitor::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ (HIRFullVisitorBase::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ (HIRExpressionVisitor::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ * hir/rust-hir-dump.cc
+ (Dump::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ * hir/rust-hir-dump.h
+ (Dump::visit): Remove IfLetExprConseqIf{,Let} visitors.
+ * typecheck/rust-hir-type-check-expr.h
+ (TypeCheckExpr::visit): Remove IfLetExprConseqIf{,Let} visitors.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc
+ (TypeCheckExpr::visit): Remove IfExprConseqIf visitor.
+ * typecheck/rust-hir-type-check-expr.h
+ (TypeCheckExpr::visit): Remove IfExprConseqIf{,Let} visitor.
+ * backend/rust-compile-block.cc
+ (CompileConditionalBlocks::visit): Remove IfExprConseqIf visitor.
+ * backend/rust-compile-block.h
+ (CompileConditionalBlocks::visit): Remove IfExprConseqIf{,Let} visitors.
+ (CompileExprWithBlock::visit):
+ Remove IfExprConseqIf{,Let} visitors, implement BlockExpr visitor.
+ * backend/rust-compile-expr.cc
+ (CompileExpr::visit): Remove IfExprConseqIf visitor.
+ * backend/rust-compile-expr.h
+ (CompileExpr::visit): Remove IfExprConseqIf{,Let} visitors.
+ * checks/lints/rust-lint-marklive.h
+ (MarkLive::visit): Remove IfExprConseqIf visitor.
+ * checks/errors/rust-const-checker.cc
+ (ConstChecker::visit): Remove IfExprConseqIf{,Let} visitors.
+ * checks/errors/rust-const-checker.h
+ (ConstChecker::visit): Remove IfExprConseqIf{,Let} visitors.
+ * checks/errors/rust-unsafe-checker.cc
+ (UnsafeChecker::visit): Remove IfExprConseqIf{,Let} visitors.
+ * checks/errors/rust-unsafe-checker.h
+ (UnsafeChecker::visit): Remove IfExprConseqIf{,Let} visitors.
+ * checks/errors/privacy/rust-privacy-reporter.cc
+ (PrivacyReporter::visit): Remove IfExprConseqIf{,Let} visitors.
+ * checks/errors/privacy/rust-privacy-reporter.h
+ (PrivacyReporter::visit): Remove IfExprConseqIf{,Let} visitors.
+ * hir/tree/rust-hir-expr.h
+ (class IfExprConseqElse): Make else_block ExprWithBlock.
+ (class IfExprConseqIf): Remove.
+ (class IfExprConseqIfLet): Remove.
+ * hir/tree/rust-hir-full-decls.h
+ (class IfExprConseqIf): Remove.
+ (class IfExprConseqIfLet): Remove.
+ * hir/tree/rust-hir.cc
+ (IfExprConseqElse::as_string): Adjust output.
+ (IfExprConseqIf::as_string): Remove.
+ (IfExprConseqIfLet::as_string): Remove.
+ (IfExprConseqIf::accept_vis): Remove.
+ (IfExprConseqIfLet::accept_vis): Remove.
+ * hir/tree/rust-hir-visitor.h
+ (HIRFullVisitor::visit): Remove IfExprConseqIf{,Let} visitors.
+ (HIRFullVisitorBase::visit): Remove IfExprConseqIf{,Let} visitors.
+ (HIRExpressionVisitor::visit): Remove IfExprConseqIf{,Let} visitors.
+ * hir/rust-hir-dump.cc
+ (Dump::visit): Remove IfExprConseqIf{,Let} visitors.
+ * hir/rust-hir-dump.h
+ (Dump::visit): Remove IfExprConseqIf{,Let} visitors.
+ * hir/rust-ast-lower.cc
+ (ASTLoweringIfBlock::visit): Replace HIR::IfExprConseqIf with HIR::IfExprConseqElse.
+
+2024-01-16 Mahmoud Mohamed <mahadelr19@gmail.com>
+
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit):
+ Push a Product context instead of an Or context.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-inherent-impl-overlap.h (class ImplItemToName): remove
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::resolve_method_address): remove unused code
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit): remove infer call
+ (TypeCheckExpr::resolve_root_path): only infer when we need to
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): add debug
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile.cc: use unify_and instead
+ * typecheck/rust-tyty-subst.cc (SubstitutionRef::solve_missing_mappings_from_this): remove
+ * typecheck/rust-tyty-subst.h: update header
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-coercion.cc (TypeCoercionRules::select): use new unify_and interface
+ * typecheck/rust-hir-dot-operator.cc (MethodResolver::try_hook): grab bounds behind refs
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc: fix headers
+ * backend/rust-compile-base.h: likewise
+ * backend/rust-compile-expr.cc: likewise
+ * backend/rust-compile-extern.h: likewise
+ * backend/rust-compile-pattern.cc: likewise
+ * backend/rust-compile.cc: likewise
+ * typecheck/rust-autoderef.cc: likewise
+ * typecheck/rust-hir-dot-operator.cc: likewise
+ * typecheck/rust-hir-inherent-impl-overlap.h: likewise
+ * typecheck/rust-hir-path-probe.cc: likewise
+ * typecheck/rust-hir-trait-resolve.cc: likewise
+ * typecheck/rust-hir-type-check-base.cc: likewise
+ * typecheck/rust-hir-type-check-base.h (RUST_HIR_TYPE_CHECK_BASE): likewise
+ * typecheck/rust-hir-type-check-enumitem.cc: likewise
+ * typecheck/rust-hir-type-check-expr.cc: likewise
+ * typecheck/rust-hir-type-check-implitem.cc: likewise
+ * typecheck/rust-hir-type-check-item.cc: likewise
+ * typecheck/rust-hir-type-check-path.cc: likewise
+ * typecheck/rust-hir-type-check-pattern.cc: likewise
+ * typecheck/rust-hir-type-check-stmt.cc: likewise
+ * typecheck/rust-hir-type-check-struct.cc: likewise
+ * typecheck/rust-hir-type-check-type.cc: likewise
+ * typecheck/rust-hir-type-check-type.h: likewise
+ * typecheck/rust-hir-type-check.h (RUST_HIR_TYPE_CHECK): likewise
+ * typecheck/rust-tyty-bounds.cc: likewise
+ * typecheck/rust-tyty-call.cc: likewise
+ * typecheck/rust-tyty-subst.cc: likewise
+ * typecheck/rust-tyty.cc: likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty.cc (BaseType::has_subsititions_defined): new implementation
+ (BaseType::needs_generic_substitutions): likewise
+ (ProjectionType::needs_generic_substitutions): remove
+ (ProjectionType::has_subsititions_defined): remove
+ * typecheck/rust-tyty.h: update header
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit): update to use new interface
+ (TypeCheckExpr::resolve_root_path): likewise
+ (TypeCheckExpr::resolve_segments): likewise
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): likewise
+ (TypeCheckType::resolve_root_path): likewise
+ * typecheck/rust-tyty-subst.cc (SubstitutionRef::get_mappings_from_generic_args): likewise
+ * typecheck/rust-tyty.cc (BaseType::supports_substitutions): likewise
+ (BaseType::can_substitute): remove
+ (BaseType::contains_type_parameters): remove
+ (handle_substitions): cleanup
+ (TupleType::handle_substitions): update
+ (FnType::handle_substitions): update
+ (ProjectionType::supports_substitutions): update
+ * typecheck/rust-tyty.h: update header
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty.h: cleanup ordering of header
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty.cc (BaseType::monomorphized_clone): new impl
+ (InferType::monomorphized_clone): remove
+ (ErrorType::monomorphized_clone): likewise
+ (ADTType::monomorphized_clone): likewise
+ (TupleType::monomorphized_clone): likewise
+ (FnType::monomorphized_clone): likewise
+ (FnPtr::monomorphized_clone): likewise
+ (ClosureType::monomorphized_clone): likewise
+ (ArrayType::clone): likewise
+ (ArrayType::get_var_element_type): likewise
+ (ArrayType::monomorphized_clone): likewise
+ (SliceType::clone): likewise
+ (SliceType::get_var_element_type): likewise
+ (SliceType::monomorphized_clone): likewise
+ (BoolType::monomorphized_clone): likewise
+ (IntType::monomorphized_clone): likewise
+ (UintType::monomorphized_clone): likewise
+ (FloatType::monomorphized_clone): likewise
+ (USizeType::monomorphized_clone): likewise
+ (ISizeType::monomorphized_clone): likewise
+ (CharType::monomorphized_clone): likewise
+ (ReferenceType::clone): likewise
+ (ReferenceType::get_var_element_type): likewise
+ (ReferenceType::monomorphized_clone): likewise
+ (PointerType::clone): likewise
+ (PointerType::get_var_element_type): likewise
+ (PointerType::monomorphized_clone): likewise
+ (ParamType::monomorphized_clone): likewise
+ (StrType::monomorphized_clone): likewise
+ (NeverType::monomorphized_clone): likewise
+ (PlaceholderType::monomorphized_clone): likewise
+ (ProjectionType::monomorphized_clone): likewise
+ (DynamicObjectType::monomorphized_clone): likewise
+ * typecheck/rust-tyty.h: update header
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty.cc (BaseType::is_unit): new implementation
+ (ErrorType::is_unit): remove
+ (TupleType::is_unit): likewise
+ (NeverType::is_unit): likewise
+ (PlaceholderType::is_unit): likewise
+ (ProjectionType::is_unit): likewise
+ * typecheck/rust-tyty.h: update header
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty.cc (BaseType::is_concrete): new implementation
+ (InferType::is_concrete): remove
+ (ErrorType::is_concrete): likewise
+ (StructFieldType::is_concrete): likewise
+ (ADTType::is_concrete): likewise
+ (TupleType::is_concrete): likewise
+ (BoolType::is_concrete): likewise
+ (IntType::is_concrete): likewise
+ (UintType::is_concrete): likewise
+ (FloatType::is_concrete): likewise
+ (USizeType::is_concrete): likewise
+ (ISizeType::is_concrete): likewise
+ (CharType::is_concrete): likewise
+ (ReferenceType::is_concrete): likewise
+ (PointerType::is_concrete): likewise
+ (ParamType::is_concrete): likewise
+ (StrType::is_concrete): likewise
+ (NeverType::is_concrete): likewise
+ (PlaceholderType::is_concrete): likewise
+ (ProjectionType::is_concrete): likewise
+ (DynamicObjectType::is_concrete): likewise
+ * typecheck/rust-tyty.h: update header
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-type.cc (TyTyResolveCompile::TyTyResolveCompile): call destructure
+ (TyTyResolveCompile::compile): use error_mark_node
+ (TyTyResolveCompile::visit): use error_mark_node
+ * backend/rust-compile-type.h: remove recursive ops
+
+2024-01-16 Tage Johansson <frans.tage@gmail.com>
+
+ * parse/rust-parse.cc: fix follow-sets
+
+2024-01-16 Mahmoud Mohamed <mahadelr19@gmail.com>
+
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit) :declare and
+ pass bindings to PatternDeclaration::go.
+ (ResolveExpr::resolve_closure_param): Likewise.
+ * resolve/rust-ast-resolve-expr.h: Likewise.
+ * resolve/rust-ast-resolve-item.cc (ResolveTraitItems::visit): Likewise.
+ (ResolveItem::visit): Likewise.
+ * resolve/rust-ast-resolve-pattern.cc (PatternDeclaration::go): Likewise.
+ (PatternDeclaration::visit): check for previous identifier bindings
+ before inserting the new one.
+ * resolve/rust-ast-resolve-pattern.h (enum PatternBoundCtx): New enum.
+ * resolve/rust-ast-resolve-stmt.h: pass bindings to PatterDeclaration::go.
+
+2024-01-16 Mahmoud Mohamed <mahadelr19@gmail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::generate_closure_function):
+ handle closure parameters pattern bindings using CompilePatternBindings visitor
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * README.md (process): Rename `rust1` to `crab1` in examples.
+ * Make-lang.in: Rename `rust1` to `crab1`.
+ * config-lang.in: Likewise.
+ * lang-specs.h: Likewise.
+ * rustspec.cc (lang_specific_driver): Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/tree/rust-hir-pattern.h
+ (SlicePattern::get_items): Add.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/tree/rust-hir-full-decls.h
+ (struct GenericArgsBinding): Convert to class.
+ (class GenericArgsBinding): Convert from struct.
+ (struct TypePathFunction): See above.
+ (class TypePathFunction): See above.
+ (struct QualifiedPathType): See above.
+ (class QualifiedPathType): See above.
+ * ast/rust-ast-full-decls.h
+ (struct WhereClause): See above.
+ (class WhereClause): See above.
+ (struct SelfParam): See above.
+ (class SelfParam): See above.
+ (struct FunctionQualifiers): See above.
+ (class FunctionQualifiers): See above.
+ (struct FunctionParam): See above.
+ (class FunctionParam): See above.
+ (struct StructField): See above.
+ (class StructField): See above.
+ (struct TupleField): See above.
+ (class TupleField): See above.
+ (struct TraitFunctionDecl): See above.
+ (class TraitFunctionDecl): See above.
+ (struct TraitMethodDecl): See above.
+ (class TraitMethodDecl): See above.
+ (struct NamedFunctionParam): See above.
+ (class NamedFunctionParam): See above.
+ * hir/tree/rust-hir-path.h
+ (struct GenericArgsBinding): See above.
+ (class GenericArgsBinding): See above.
+ (struct TypePathFunction): See above.
+ (class TypePathFunction): See above.
+ (struct QualifiedPathType): See above.
+ (class QualifiedPathType): See above.
+ * ast/rust-item.h
+ (struct WhereClause): See above.
+ (class WhereClause): See above.
+ (struct SelfParam): See above.
+ (class SelfParam): See above.
+ (struct FunctionQualifiers): See above.
+ (class FunctionQualifiers): See above.
+ (struct FunctionParam): See above.
+ (class FunctionParam): See above.
+ (struct StructField): See above.
+ (class StructField): See above.
+ (struct TupleField): See above.
+ (class TupleField): See above.
+ (struct TraitFunctionDecl): See above.
+ (class TraitFunctionDecl): See above.
+ (struct TraitMethodDecl): See above.
+ (class TraitMethodDecl): See above.
+ (struct NamedFunctionParam): See above.
+ (class NamedFunctionParam): See above.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/tree/rust-hir-pattern.h
+ (class AltPattern): Remove duplicate access specifier.
+ (AltPattern::get_alts): Add.
+ * hir/tree/rust-hir.cc
+ (AltPattern::as_string): Add.
+ (AltPattern::accept_vis): Add.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/tree/rust-hir-item.h (class ExportedMacro): Add new ExportedMacro class.
+ * hir/tree/rust-hir.cc (ExportedMacro::accept_vis): New function.
+ (ExportedMacro::get_locus): Likewise.
+ (ExportedMacro::get_item_kind): Likewise.
+ (ExportedMacro::clone_item_impl): Likewise.
+ * hir/tree/rust-hir-full-decls.h (class ExportedMacro): Forward declare class.
+ * backend/rust-compile-item.h: Add visitor for ExportedMacro.
+ * backend/rust-compile-stmt.h: Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.h: Likewise.
+ * checks/errors/privacy/rust-pub-restricted-visitor.cc (PubRestrictedVisitor::visit):
+ Likewise.
+ * checks/errors/privacy/rust-pub-restricted-visitor.h: Likewise.
+ * checks/errors/privacy/rust-reachability.cc (ReachabilityVisitor::visit): Likewise.
+ * checks/errors/privacy/rust-reachability.h: Likewise.
+ * checks/errors/privacy/rust-visibility-resolver.cc (VisibilityResolver::visit): Likewise.
+ * checks/errors/privacy/rust-visibility-resolver.h: Likewise.
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
+ * checks/errors/rust-const-checker.h: Likewise.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise.
+ * checks/errors/rust-unsafe-checker.h: Likewise.
+ * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Likewise.
+ * hir/rust-ast-lower-item.h: Likewise.
+ * hir/rust-hir-dump.cc (Dump::visit): Likewise.
+ * hir/rust-hir-dump.h: Likewise.
+ * hir/tree/rust-hir-visitor.h: Likewise.
+ * metadata/rust-export-metadata.cc: Likewise.
+ * typecheck/rust-hir-type-check-item.h: Likewise.
+ * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Likewise.
+ * typecheck/rust-hir-type-check-stmt.h: Likewise.
+ * typecheck/rust-tycheck-dump.h: Likewise.
+ * hir/tree/rust-hir.h: Add new ItemKind::MacroExport variant.
+ * util/rust-attributes.cc: Add #[macro_export] attribute.
+
+2024-01-16 Mahmoud Mohamed <mahadelr19@gmail.com>
+
+ * backend/rust-compile-fnparam.cc (CompileFnParam::visit):
+ Added visit implementation for ReferencePattern.
+ (CompileFnParam::create_tmp_param_var):
+ Refactored duplicated code into a helper function.
+ * backend/rust-compile-fnparam.h: Added visit implementation for
+ ReferencePattern.
+ * backend/rust-compile-pattern.cc (CompilePatternBindings::visit):
+ Added visit implementation for ReferencePattern and
+ IdentifierPattern.
+ * backend/rust-compile-pattern.h: Added visit implementation for
+ ReferencePattern and IdentifierPattern.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Move
+ unloaded module item loading to...
+ * expand/rust-attribute-visitor.cc (AttrVisitor::visit): ...here.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * hir/rust-hir-dump.cc (Dump::visit): Simplify indentation dump to single line.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * ast/rust-ast-dump.cc (Indent::Indent): Move to separate file.
+ (operator<<): Move to separate file.
+ (Indent::increment): Move to separate file.
+ (Indent::decrement): Move to separate file.
+ * ast/rust-ast-dump.h (class Indent): Move to separate file.
+ * hir/rust-hir-dump.cc (Dump::Dump): Use new indentation object.
+ (Dump::go): Use new indentation object.
+ (Dump::visit): Use new indention object.
+ * hir/rust-hir-dump.h: Use new indentation object.
+ * util/rust-dump.h: New file. Moved Indentation from rust-ast-dump.cc
+
+2024-01-16 Mahmoud Mohamed <mahadelr19@gmail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
+ Add the missing infered type assignment
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ PR rust/108111
+ * ast/rust-ast-full-decls.h (StructPatternElements): Declare as a
+ class.
+ * ast/rust-item.h (EnumItem): Mark several method as being
+ overrides.
+ * ast/rust-pattern.h (StructPattern::get_locus): Add override.
+ * lex/rust-lex.h (BufferInputSource): Use reference_wrapper
+ instead of bare reference.
+ (TokenSource::get): Add method to implement the reference_wrapper
+ interface.
+ * typecheck/rust-tyty.h (TypeBoundPredicate): Add empty dtor.
+ * util/rust-buffered-queue.h (peek): Source token stream is now
+ using a reference_wrapper, use .get()
+
+2024-01-16 vincent <jfan30@u.rochester.edu>
+
+ * typecheck/rust-hir-type-check-pattern.cc
+ (TypeCheckPattern::visit): rewrite part code to helper function
+ (TypeCheckPattern::typecheck_range_pattern_bound): helper function
+ * typecheck/rust-hir-type-check-pattern.h
+ (TypeCheckPattern::typecheck_range_pattern_bound):
+ change the parameter of the function
+
+2024-01-16 goar5670 <mahadelr19@gmail.com>
+
+ * hir/tree/rust-hir-pattern.h (HIR::ReferencePattern):
+ added get_referenced_pattern function.
+ * resolve/rust-ast-resolve-pattern.h
+ (Resolve::PatternDeclaration): add visit function for
+ AST::ReferencePattern
+ * typecheck/rust-hir-type-check-pattern.cc
+ (Resolver::TypeCheckPattern): add visit function for
+ HIR::ReferencePattern
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * util/rust-lang-item.h
+ (RustLangItem::ItemType): New enumerators.
+ (RustLangItem::Parse): Parse new enumerators.
+ (RustLangItem::ToString): Handle new enumerators.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-fnparam.h:
+ (CompileFnParam::visit): Add AltPattern visitor.
+ * backend/rust-compile-pattern.h:
+ (CompilePatternCaseLabelExpr::visit): Add AltPattern visitor.
+ (CompilePatternBindings::visit): Add AltPattern visitor.
+ (CompilePatternLet::visit): Add AltPattern visitor.
+ * backend/rust-compile-resolve-path.h:
+ (ResolvePathRef::visit): Add AltPattern visitor.
+ * backend/rust-compile-var-decl.h:
+ (CompileVarDecl::visit): Add AltPattern visitor.
+ * checks/errors/rust-const-checker.cc
+ (ConstChecker::visit): Add AltPattern visitor.
+ * checks/errors/rust-const-checker.h:
+ (ConstChecker::visit): Add AltPattern visitor.
+ * checks/errors/rust-unsafe-checker.cc
+ (UnsafeChecker::visit): Add AltPattern visitor.
+ * checks/errors/rust-unsafe-checker.h:
+ (UnsafeChecker::visit): Add AltPattern visitor.
+ * hir/rust-hir-dump.cc
+ (Dump::visit): Add AltPattern visitor.
+ * hir/rust-hir-dump.h:
+ (Dump::visit): Add AltPattern visitor.
+ * hir/tree/rust-hir-full-decls.h
+ (class AltPattern): Add forward declaration.
+ * hir/tree/rust-hir-pattern.h
+ (class AltPattern): New class.
+ * hir/tree/rust-hir-visitor.h:
+ (HIRFullVisitor::visit): Add AltPattern visitor.
+ (HIRFullVisitorBase::visit): Add AltPattern visitor.
+ (HIRPatternVisitor::visit): Add AltPattern visitor.
+ * hir/tree/rust-hir.h:
+ (Pattern::PatternType::ALT): New enumerator.
+ * typecheck/rust-hir-type-check-pattern.cc
+ (TypeCheckPattern::visit): Add AltPattern visitor.
+ * typecheck/rust-hir-type-check-pattern.h:
+ (TypeCheckPattern::visit): Add AltPattern visitor.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-macro.cc (builtin_macro_from_string): Add identifier
+ identification.
+ * ast/rust-macro.h (enum class): Add Stringify builtin macro
+ type.
+ * expand/rust-macro-builtins.cc (make_macro_path_str): Add path
+ for builtin stringify macro.
+ (MacroBuiltin::stringify_handler): Add handler for builtin
+ stringify macro.
+ * expand/rust-macro-builtins.h: Add stringify handler's
+ prototype.
+ * util/rust-hir-map.cc (Mappings::insert_macro_def): Add
+ stringify handler to builtin hir map.
+
+2024-01-16 Nikos Alexandris <nikos-alexandris@protonmail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
+ Add length checking for tuple patterns.
+ (TypeCheckPattern::emit_pattern_size_error): New function.
+ * typecheck/rust-hir-type-check-pattern.h: New function
+ emit_pattern_size_error.
+
+2024-01-16 goar5670 <mahadelr19@gmail.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_expr):
+ split LEFT_SHIFT before null_denotation.
+
+2024-01-16 Parthib <parthibdutta02@gmail.com>
+
+ * rust-object-export.cc: Modified
+ * hir/rust-ast-lower-type.cc (rust_fatal_error): Removed
+ (rust_assert): Added
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-early-name-resolver.cc
+ (EarlyNameResolver::visit):
+ Check for closure parameter without given type.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-typecheck-context.cc (TypeCheckContext::insert_resolved_predicate): remove
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-type.cc (ResolveRelativeQualTypePath::resolve_qual_seg): fix
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * ast/rust-path.h: add missing copy for node_id
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust-gcc.h: remove unused headers
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * ast/rust-ast.cc (QualifiedPathInType::as_string): add missing to string
+ * ast/rust-path.h: add missing copy+move constructors and assignment overloads
+ * hir/tree/rust-hir-path.h: likewise
+ * hir/tree/rust-hir.cc (QualifiedPathInType::as_string): add missing to string
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty.cc (ParamType::get_name): call destructure
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc: use unify_and infer
+
+2024-01-16 goar5670 <mahadelr19@gmail.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_closure_param):
+ Replace parse_pattern with parse_pattern_no_alt.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_while_let_loop_expr):
+ Prevent hard error on token skip.
+ (Parser::null_denotation): Fix parser for while let expressions.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-builtins.cc (BuiltinsContext::setup): add memset builtin to the map
+ * backend/rust-compile-intrinsic.cc (uninit_handler): implement uninit intrinsic
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_slice_pattern): Add
+ closing square bracket check.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_external_type_item):
+ Fix compilation error due to unnecessary move.
+
+2024-01-16 Abdul Rafey <abdulrafeyq@gmail.com>
+
+ * hir/rust-hir-dump.cc (Dump::go): support inner attrs, crate items and node mappings
+ (Dump::visit): support functions, arith/logical exprs, let stmts and literals
+
+2024-01-16 Nikos Alexandris <nikos-alexandris@protonmail.com>
+
+ * expand/rust-macro-builtins.cc (load_file_bytes): Add location parameter.
+ (MacroBuiltin::include_bytes_handler): Pass location to load_file_bytes.
+ (MacroBuiltin::include_str_handler): Pass location to load_file_bytes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_pattern_no_alt): Handle
+ RestPattern correctly.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-pattern.h (class RestPattern): Add NodeId as well as
+ the clone_impl function.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::null_denotation): Fix if let
+ parsing.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-intrinsic.cc (op_with_overflow_inner): wraps op_with_overflow
+ (std::function<tree): likewise
+ (op_with_overflow): generate the intrinsic based on the tree_code op
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Add rust-ast-lower-stmt.o
+ * hir/rust-ast-lower-stmt.h: Move definitions to...
+ * hir/rust-ast-lower-stmt.cc: ...here.
+
+2024-01-16 mxlol233 <mxlol233@outlook.com>
+
+ * checks/errors/rust-feature-gate.cc: Add definition
+ for `extern_types`.
+ * checks/errors/rust-feature-gate.h: Likewise.
+ * checks/errors/rust-feature.cc: Likewise.
+ * checks/errors/rust-feature.h: Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-pattern.h
+ (StructPatternElements::operator=): Clear vector before inserting.
+ (TupleStructItemsNoRange::operator=): Clear vector before inserting.
+ (TupleStructItemsRange::operator=): Clear vectors before inserting.
+ (TuplePatternItemsMultiple::operator=): Clear vector before inserting.
+ (TuplePatternItemsRanged::operator=): Clear vectors before inserting.
+ (SlicePattern::operator=): Clear vector before inserting.
+ (AltPattern::operator=): Clear vector before inserting.
+ * hir/tree/rust-hir-pattern.h
+ (StructPatternElements::operator=): Clear vector before inserting.
+ (TupleStructItemsNoRange::operator=): Clear vector before inserting.
+ (TupleStructItemsRange::operator=): Clear vectors before inserting.
+ (TuplePatternItemsMultiple::operator=): Clear vector before inserting.
+ (TuplePatternItemsRanged::operator=): Clear vectors before inserting.
+ (SlicePattern::operator=): Clear vector before inserting.
+
+2024-01-16 bl7awy <mahadelr19@gmail.com>
+
+ * typecheck/rust-casts.cc (TypeCastRules::cast_rules): Perform destructure on `from` type.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-pattern.h
+ (struct StructPatternElements): Change to class.
+ (class StructPatternElements): Change from struct.
+ * hir/tree/rust-hir-pattern.h
+ (struct StructPatternElements): Change to class.
+ (class StructPatternElements): Change from struct.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc
+ (TypeCheckPattern::visit): Improve error messages.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/tree/rust-hir-pattern.h
+ (class TupleStructItemsNoRange): Fix formatting.
+ (class TupleStructItemsRange): Fix formatting.
+ (class TuplePatternItemsMultiple): Fix formatting.
+ (class TuplePatternItemsRanged): Fix formatting.
+ (class SlicePattern): Fix formatting.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-dump.cc (Dump::visit): Add visitor.
+ * ast/rust-ast-dump.h: Add visitor prototype.
+ * ast/rust-ast-full-decls.h (class RestPattern): Add forward
+ declaration for class RestPattern.
+ * ast/rust-ast-visitor.h: Add visitor prototype.
+ * ast/rust-ast.cc (RestPattern::accept_vis): Add function to
+ accept a foreign visitor.
+ * ast/rust-pattern.h (class RestPattern): Add class RestPattern.
+ * checks/errors/rust-feature-gate.h: Add visitor prototype.
+ * expand/rust-attribute-visitor.cc (AttrVisitor::visit): Add
+ visitor implementation.
+ * expand/rust-attribute-visitor.h: Add visitor prototype.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Add
+ visitor implementation.
+ * hir/rust-ast-lower-base.h: Add visitor prototype.
+ * resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Add
+ visitor implementation.
+ * resolve/rust-ast-resolve-base.h: Add visitor prototype.
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit):
+ Add visitor implementation.
+ * resolve/rust-early-name-resolver.h: Add visitor prototype.
+ * util/rust-attributes.cc (AttributeChecker::visit): Add visitor
+ implementation.
+ * util/rust-attributes.h: Add visitor prototype.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty-cmp.h: remove
+ * typecheck/rust-tyty.cc (set_cmp_autoderef_mode): likewise
+ (reset_cmp_autoderef_mode): likewise
+ * typecheck/rust-tyty.h (set_cmp_autoderef_mode): likewise
+ (reset_cmp_autoderef_mode): likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag
+ (TypeCoercionRules::TypeCoercionRules): set new try flag
+ (TypeCoercionRules::do_coercion): default to a final unify_and in the else case
+ (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef
+ (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability
+ * typecheck/rust-coercion.h: update header
+ * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface
+ (MethodResolver::append_adjustments): ensure we maintain adjustment mappings
+ * typecheck/rust-hir-dot-operator.h: add new method append_adjustments
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-unify.cc (UnifyRules::go): fix inference check
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.h: unconsify
+ * backend/rust-compile.cc (HIRCompileBase::coercion_site): likewise
+ (HIRCompileBase::coercion_site1): likewise
+ * typecheck/rust-autoderef.cc (Adjuster::try_deref_type): likewise
+ (Adjuster::try_raw_deref_type): likewise
+ (Adjuster::try_unsize_type): likewise
+ (AutoderefCycle::cycle): likewise
+ (AutoderefCycle::try_autoderefed): likewise
+ * typecheck/rust-autoderef.h: likewise
+ * typecheck/rust-coercion.cc (TypeCoercionRules::select): likewise
+ * typecheck/rust-coercion.h: likewise
+ * typecheck/rust-hir-dot-operator.cc (MethodResolver::Probe): likewise
+ (MethodResolver::select): likewise
+ * typecheck/rust-hir-dot-operator.h: likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-unify.cc (UnifyRules::go): respect the emit_errors flag
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-casts.cc (TypeCastRules::check): update to new interface
+ * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): likewise
+ (TypeCoercionRules::TryCoerce): likewise
+ (TypeCoercionRules::TypeCoercionRules): likewise
+ * typecheck/rust-coercion.h: likewise
+ * typecheck/rust-type-util.cc (coercion_site): likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-unify.cc (UnifyRules::go): allow lhs infer vars
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::resolve_method_address): update to new inteface
+ * typecheck/rust-coercion.cc (TypeCoercionRules::coerce_unsafe_ptr): likewise
+ (TypeCoercionRules::coerce_borrowed_pointer): likewise
+ * typecheck/rust-hir-type-check.h: likewise
+ * typecheck/rust-type-util.cc (unify_site_and): new interface to allow for infer and commit
+ * typecheck/rust-type-util.h (unify_site_and): likewise
+ * typecheck/rust-typecheck-context.cc (TypeCheckContext::clear_type): new interface
+ * typecheck/rust-unify.cc (UnifyRules::UnifyRules): update
+ (UnifyRules::Resolve): new optional flags for commit and infer
+ (UnifyRules::go): likewise
+ (UnifyRules::expect_adt): refactor to use new interface
+ (UnifyRules::expect_reference): likewise
+ (UnifyRules::expect_pointer): likewise
+ (UnifyRules::expect_array): likewise
+ (UnifyRules::expect_slice): likewise
+ (UnifyRules::expect_fndef): likewise
+ (UnifyRules::expect_fnptr): likewise
+ (UnifyRules::expect_tuple): likewise
+ (UnifyRules::expect_closure): likewise
+ * typecheck/rust-unify.h: refactor interface
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-unify.cc (UnifyRules::Resolve): refactor
+ (UnifyRules::commit): refactor
+ * typecheck/rust-unify.h: likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty.cc (ADTType::is_concrete): need to consider if is a num_variant
+ * typecheck/rust-tyty.h: refactor to cc file
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_external_type_item):
+ Add function to parser an external type item.
+ (Parser::parse_external_item):
+ Add identification and parsing for external type items.
+ * parse/rust-parse.h:
+ Add parser_external_type_item prototype.
+
+2024-01-16 omkar-mohanty <franzohouser@gmail.com>
+
+ * expand/rust-macro-builtins.cc
+ (MacroBuiltin::include_str_handler): eager expansion
+ (make_macro_path_str): macto to string
+ (parse_single_string_literal): check for eager invocation
+ (MacroBuiltin::assert_handler): eager expansion
+ (MacroBuiltin::include_bytes_handler): eager expansion
+ (MacroBuiltin::include_str_handler): eager expansion
+ (MacroBuiltin::compile_error_handler): eager expansion
+ (MacroBuiltin::include_handler): eager expansion
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-item.h (class Method): Add `is_default` field.
+ (class Function): Likewise.
+ * parse/rust-parse-impl.h (Parser::parse_item): Add nice error when
+ parsing `default` outside of an `impl` block
+ (Parser::parse_trait_impl_item): Allow parsing functions
+ or methods when seeing `default`.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::cast_site):
+ Remove cast_site.
+ * typecheck/rust-hir-type-check-base.h: Remove cast_site
+ prototype.
+ * typecheck/rust-type-util.cc (cast_site): Add cast_site.
+ * typecheck/rust-type-util.h (cast_site): Add cast_site
+ prototype.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-item.h: Add non-const `get_visibility` to ExternalTypeItem.
+ * ast/rust-ast-dump.cc (Dump::visit): Add implementation for ExternalTypeItem.
+ * expand/rust-attribute-visitor.cc (AttrVisitor::visit): Likewise.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-item.h (class ExternalTypeItem): New class.
+ * ast/rust-ast.cc (ExternalTypeItem::as_string): New function.
+ (ExternalTypeItem::accept_vis): Likewise.
+ * ast/rust-ast-full-decls.h (class ExternalTypeItem): Declare class.
+ * ast/rust-ast-dump.cc (Dump::visit): Add base visitor for ExternalTypeItem.
+ * ast/rust-ast-dump.h: Likewise.
+ * ast/rust-ast-visitor.h: Likewise.
+ * checks/errors/rust-feature-gate.h: Likewise.
+ * expand/rust-attribute-visitor.cc (AttrVisitor::visit): Likewise.
+ * expand/rust-attribute-visitor.h: Likewise.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
+ * hir/rust-ast-lower-base.h: Likewise.
+ * resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Likewise.
+ * resolve/rust-ast-resolve-base.h: Likewise.
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Likewise.
+ * resolve/rust-early-name-resolver.h: Likewise.
+ * util/rust-attributes.cc (AttributeChecker::visit): Likewise.
+ * util/rust-attributes.h: Likewise.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-macro-invoc-lexer.cc (MacroInvocLexer::split_current_token):
+ Add proper implementation.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-item.h (class Trait): Add `has_auto` field.
+ * checks/errors/rust-feature.cc: Add handling for `feature(optin_builtin_traits)`
+ * checks/errors/rust-feature.h: Likewise.
+ * lex/rust-lex.cc: Fix keyword classification using hashmap.
+ * lex/rust-token.h: Add `auto` keyword token.
+ * parse/rust-parse-impl.h (Parser::parse_vis_item): Parse auto traits
+ on `auto` keyword.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * typecheck/rust-hir-trait-resolve.cc (TraitItemReference::resolve_item):
+ Remove TypeCheckBase namespace qualifier.
+ * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::coercion_site):
+ Remove coercion_site function.
+ * typecheck/rust-hir-type-check-base.h: Remove coercion_site
+ prototype.
+ * typecheck/rust-type-util.cc (coercion_site): Add coercion_site
+ function.
+ * typecheck/rust-type-util.h (coercion_site): Add coercion_site
+ prototype.
+ * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit):
+ Remove TypeCheckBase namespace qualifier.
+ (TypeCheckMethodCallExpr::check): Remove TypeCheckBase namespace
+ qualifier.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * typecheck/rust-autoderef.cc: Remove TypeCheckBase qualifier.
+ * typecheck/rust-hir-trait-resolve.cc: Remove TypeCheckBase
+ qualifier.
+ * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::unify_site):
+ Remove unify_site.
+ * typecheck/rust-hir-type-check-base.h: Remove unify_site
+ header.
+ * typecheck/rust-hir-type-check.cc (TypeResolution::Resolve):
+ Remove TypeCheckBase qualifier.
+ * typecheck/rust-type-util.cc (unify_site): Add unify_site
+ function.
+ * typecheck/rust-type-util.h (unify_site): Add unify_site
+ prototype.
+ * typecheck/rust-tyty-call.cc (TypeCheckMethodCallExpr::check):
+ Remove TypeCheckBase qualifier.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_type): Allow LEFT_SHIFT to
+ start a type and then split it in `parse_qualified_path_type`
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_path_generic_args): Split leading
+ `LEFT_SHIFT` token into two `LEFT_ANGLE` tokens when parsing generic arguments.
+ (Parser::parse_type_path_segment): Allow `LEFT_ANGLE` as starting token for
+ parsing generic arguments.
+
+2024-01-16 mxlol233 <mxlol233@outlook.com>
+
+ * checks/errors/rust-feature-gate.cc: Add implementations
+ for `rustc_attri`.
+ * checks/errors/rust-feature-gate.h: Likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * parse/rust-parse-impl.h
+ (Parser::parse_pattern): Add.
+ (Parser::parse_pattern_no_alt): Rename.
+ * parse/rust-parse.h:
+ (Parser::parse_pattern): Add.
+ (Parser::parse_pattern_no_alt): Rename.
+
2024-01-04 David Malcolm <dmalcolm@redhat.com>
* lang.opt.urls: New file, autogenerated by
diff --git a/gcc/sched-deps.cc b/gcc/sched-deps.cc
index 010eefe..0615007 100644
--- a/gcc/sched-deps.cc
+++ b/gcc/sched-deps.cc
@@ -4779,24 +4779,59 @@ parse_add_or_inc (struct mem_inc_info *mii, rtx_insn *insn, bool before_mem)
/* Once a suitable mem reference has been found and the corresponding data
in MII has been filled in, this function is called to find a suitable
add or inc insn involving the register we found in the memory
- reference. */
+ reference.
+ If successful, this function will create additional dependencies between
+ - mii->inc_insn's producers and mii->mem_insn as a consumer (if backwards)
+ - mii->inc_insn's consumers and mii->mem_insn as a producer (if !backwards).
+*/
static bool
find_inc (struct mem_inc_info *mii, bool backwards)
{
sd_iterator_def sd_it;
dep_t dep;
+ sd_list_types_def mem_deps = backwards ? SD_LIST_HARD_BACK : SD_LIST_FORW;
+ int n_mem_deps = sd_lists_size (mii->mem_insn, mem_deps);
- sd_it = sd_iterator_start (mii->mem_insn,
- backwards ? SD_LIST_HARD_BACK : SD_LIST_FORW);
+ sd_it = sd_iterator_start (mii->mem_insn, mem_deps);
while (sd_iterator_cond (&sd_it, &dep))
{
dep_node_t node = DEP_LINK_NODE (*sd_it.linkp);
rtx_insn *pro = DEP_PRO (dep);
rtx_insn *con = DEP_CON (dep);
- rtx_insn *inc_cand = backwards ? pro : con;
+ rtx_insn *inc_cand;
+ int n_inc_deps;
+
if (DEP_NONREG (dep) || DEP_MULTIPLE (dep))
goto next;
+
+ if (backwards)
+ {
+ inc_cand = pro;
+ n_inc_deps = sd_lists_size (inc_cand, SD_LIST_BACK);
+ }
+ else
+ {
+ inc_cand = con;
+ n_inc_deps = sd_lists_size (inc_cand, SD_LIST_FORW);
+ }
+
+ /* In the FOR_EACH_DEP loop below we will create additional n_inc_deps
+ for mem_insn. This by itself is not a problem, since each mem_insn
+ will have only a few inc_insns associated with it. However, if
+ we consider that a single inc_insn may have a lot of mem_insns, AND,
+ on top of that, a few other inc_insns associated with it --
+ those _other inc_insns_ will get (n_mem_deps * number of MEM insns)
+ dependencies created for them. This may cause an exponential
+ growth of memory usage and scheduling time.
+ See PR96388 for details.
+ We [heuristically] use n_inc_deps as a proxy for the number of MEM
+ insns, and drop opportunities for breaking modifiable_mem dependencies
+ when dependency lists grow beyond reasonable size. */
+ if (n_mem_deps * n_inc_deps
+ >= param_max_pending_list_length * param_max_pending_list_length)
+ goto next;
+
if (parse_add_or_inc (mii, inc_cand, backwards))
{
struct dep_replacement *desc;
@@ -4838,6 +4873,11 @@ find_inc (struct mem_inc_info *mii, bool backwards)
desc->insn = mii->mem_insn;
move_dep_link (DEP_NODE_BACK (node), INSN_HARD_BACK_DEPS (con),
INSN_SPEC_BACK_DEPS (con));
+
+ /* Make sure that n_inc_deps above is consistent with dependencies
+ we create. */
+ gcc_assert (mii->inc_insn == inc_cand);
+
if (backwards)
{
FOR_EACH_DEP (mii->inc_insn, SD_LIST_BACK, sd_it, dep)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ef27cf1..352222c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,1784 @@
+2024-01-17 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/112588
+ * g++.dg/modules/merge-16.h: New test.
+ * g++.dg/modules/merge-16_a.C: New test.
+ * g++.dg/modules/merge-16_b.C: New test.
+
+2024-01-17 Andrew Pinski <quic_apinski@quicinc.com>
+
+ PR target/113221
+ * gcc.c-torture/compile/pr113221-1.c: New test.
+
+2024-01-17 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/113242
+ PR c++/99493
+ * g++.dg/cpp2a/nontype-class61.C: New test.
+ * g++.dg/cpp2a/nontype-class62.C: New test.
+
+2024-01-17 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * gcc.dg/torture/inline-mem-cpy-1.c: Pass -DRUN_FRACTION=11
+ when testing in a simulator.
+ * gcc.dg/memcmp-1.c [RUN_FRACTION]: Add machinery to run only
+ for each RUN_FRACTION:th iteration.
+ (main): Call initialize_skip_iteration_count.
+ (test_driver_memcmp): Check SKIP_ITERATION for each iteration.
+
+2024-01-17 Jan Hubicka <jh@suse.cz>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/110852
+ * gcc.dg/predict-18.c: Update template to expect combined value predictor.
+ * gcc.dg/predict-23.c: New test.
+ * gcc.dg/tree-ssa/predict-1.c: New test.
+ * gcc.dg/tree-ssa/predict-2.c: New test.
+ * gcc.dg/tree-ssa/predict-3.c: New test.
+
+2024-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/113421
+ * gcc.dg/torture/bitint-50.c: New test.
+
+2024-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/113410
+ * gcc.dg/bitint-72.c: New test.
+
+2024-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/113408
+ * gcc.dg/bitint-71.c: New test.
+
+2024-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/113406
+ * gcc.dg/bitint-70.c: New test.
+
+2024-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/110251
+ * gcc.c-torture/compile/pr110251.c: New test.
+
+2024-01-17 Pan Li <pan2.li@intel.com>
+
+ * gcc.target/riscv/rvv/autovec/vls/shift-1.c: Fix asm check
+ count.
+ * gcc.target/riscv/rvv/autovec/vls/shift-2.c: Ditto.
+ * gcc.target/riscv/rvv/autovec/vls/shift-3.c: Ditto.
+
+2024-01-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/113371
+ * gcc.dg/vect/pr113371.c: New testcase.
+
+2024-01-17 YunQiang Su <syq@gcc.gnu.org>
+
+ * gcc.target/mips/mips.exp (mips_option_groups):
+ Add -mxgot/-mno-xgot options.
+ * gcc.target/mips/xgot-n32-avoid-gp.c: New test.
+ * gcc.target/mips/xgot-n32-need-gp.c: New test.
+
+2024-01-16 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/113292
+ * g++.dg/modules/pr113292_a.H: New test.
+ * g++.dg/modules/pr113292_b.C: New test.
+ * g++.dg/modules/pr113292_c.C: New test.
+
+2024-01-16 Marek Polacek <polacek@redhat.com>
+
+ PR c++/113340
+ * g++.dg/cpp23/explicit-obj-diagnostics9.C: New test.
+
+2024-01-16 John David Anglin <danglin@gcc.gnu.org>
+
+ * gcc.dg/pr111409.c: Add hppa*-*-hpux* to targets which do
+ not support split DWARF.
+
+2024-01-16 waffl3x <waffl3x@protonmail.com>
+
+ PR c++/113307
+ * g++.dg/cpp23/explicit-obj-diagnostics3.C: Add test for
+ rejection of packs.
+
+2024-01-16 John David Anglin <danglin@gcc.gnu.org>
+
+ * gcc.dg/array-quals-1.c: Add .data.rel.ro.local to read only
+ sections.
+
+2024-01-16 John David Anglin <danglin@gcc.gnu.org>
+
+ * gcc.dg/atomic/stdatomic-flag.c: Remove xfail.
+ * gcc.dg/atomic/stdatomic-flag-2.c: Likewise.
+
+2024-01-16 John David Anglin <danglin@gcc.gnu.org>
+
+ PR tree-optimization/110794
+ * g++.dg/pr99966.C: xfail scan-tree-dump-not throw on hppa*64*-*-*.
+
+2024-01-16 John David Anglin <danglin@gcc.gnu.org>
+
+ * gcc.dg/c23-tag-alias-2.c: Require target lto.
+ * gcc.dg/c23-tag-alias-3.c: Likewise.
+ * gcc.dg/gnu23-tag-alias-3.c: Likewise.
+ * gcc.dg/scantest-lto.c: Likewise.
+
+2024-01-16 John David Anglin <danglin@gcc.gnu.org>
+
+ * gcc.dg/cmp-mem-const-3.c: Skip on lp64 hppa*-*-*.
+ * gcc.dg/cmp-mem-const-4.c: Likewise.
+ * gcc.dg/cmp-mem-const-5.c: Likewise.
+ * gcc.dg/cmp-mem-const-6.c: Likewise.
+
+2024-01-16 John David Anglin <danglin@gcc.gnu.org>
+
+ PR tree-optimization/91624
+ * gcc.dg/tree-ssa/sra-17.c: xfail all scan-tree-dump-times
+ checks on hppa*64*-*-*.
+ * gcc.dg/tree-ssa/sra-18.c: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/tuple_float_index.rs: New test.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * rust/compile/v0-mangle2.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/invalid_variadics.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/invalid_label_name.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/lifetime_name_validation.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/pattern_variadic.rs: New test.
+ * rust/execute/torture/named_variadic.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/extern_c_named_variadic.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/parse_variadic_function.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/issue-2709.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/not_a_float_literal_tuple_index.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/issue-2665.rs: New test.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * rust/compile/tupple_struct_pattern_tuple.rs: New test.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * rust/compile/v0-mangle1.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/closure_in_closure.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/macro-issue2653.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/macro57.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/macro_rules_macro_rules.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/while_break_expr.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/range_from_expr_for_loop.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/parse_item_default_macro.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/parse_generic_path_expr.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/match_break.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/parse_pub_unit_type.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/parse_global_path_generic.rs: New test.
+
+2024-01-16 Jakub Dupak <dev@jakubdupak.com>
+
+ * rust/compile/issue-2645.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/wrong_lhs_assignment.rs: update error message
+ * rust/compile/issue-2391.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/variadic.rs: Added new checks.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/assume.rs: New test.
+
+2024-01-16 Dave Evans <dave@dmetwo.org>
+
+ * rust/compile/issue-2431.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/privacy6.rs: Uncomment commented out functions.
+ * rust/compile/privacy9.rs: Fix unused variables.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/privacy9.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/cfg2.rs: Updated according to new message.
+ * rust/compile/issue-2139.rs: likewise.
+ * rust/compile/issue-2190-1.rs: likewise.
+ * rust/compile/method1.rs: likewise.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/execute/torture/iter1.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/generics7.rs: Added Errorcode hint.
+ * rust/compile/generics8.rs: Updated dejagnu comment.
+ * rust/compile/issue-925.rs: Added Errorcode hint.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/issue-2029.rs:
+ Updated for dejagnu testcase.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/privacy1.rs: Added errorcode.
+ * rust/compile/privacy3.rs: likewise.
+ * rust/compile/privacy4.rs: likewise.
+ * rust/compile/privacy5.rs: likewise.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/type-if.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/let_alt.rs: Updated comment.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/iterators1.rs: this should be casting to the $ty
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/execute/torture/issue-2583.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/nested_macro_definition.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/match4.rs:
+ Updated new error commment.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/issue-1725-2.rs:
+ Updated dejagnu message.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/iterators1.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/generics13.rs:
+ for dejagnu,
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/issue-2479.rs: Updated comment.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/issue-1589.rs: Updated comment for dejagnu.
+ * rust/compile/trait-cycle.rs: New relevant test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/generics10.rs: for dejagnu.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/generics6.rs: Updated dejagnu comment.
+ * rust/compile/generics7.rs: likewise.
+ * rust/compile/issue-925.rs: likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/issue-2514.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/match5.rs:
+ Updated comment for dejagnu.
+ * rust/compile/pattern-struct.rs: New test for ICE.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/inline_2.rs: Added new message.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/auto_trait_invalid.rs:
+ Updated comment.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/bad_inner_doc.rs:
+ Updated comment to pass testcase.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/inline_2.rs: Added new case.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/bad_as_bool_char.rs:
+ Updated comment to pass test case.
+ * rust/compile/cast1.rs: likewise.
+ * rust/compile/cast4.rs: likewise.
+ * rust/compile/cast5.rs: likewise.
+ * rust/compile/all-cast.rs: New test for all error codes.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/attr_deprecated_2.rs:
+ Updated comment to pass the testcase.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/abi-options1.rs: updated comment for testcase.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/arrays2.rs: changed comment to pass
+ testcase.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * rust/compile/unicode_norm1.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/name_resolution10.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/name_resolution6.rs: New test.
+ * rust/compile/name_resolution7.rs: New test.
+ * rust/compile/name_resolution8.rs: New test.
+ * rust/compile/name_resolution9.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/undeclared_label.rs: New test for E0426.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/feature.rs: Added new unknown feature.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/arrays1.rs: changed comment to pass testcase.
+ * rust/compile/bad_type1.rs: likewise.
+ * rust/compile/bad_type2.rs: likewise.
+ * rust/compile/const_generics_6.rs: likewise.
+ * rust/compile/deadcode_err1.rs: likewise.
+ * rust/compile/deadcode_err2.rs: likewise.
+ * rust/compile/func1.rs: likewise.
+ * rust/compile/func3.rs: likewise.
+ * rust/compile/func4.rs: likewise.
+ * rust/compile/func5.rs: likewise.
+ * rust/compile/generics1.rs: likewise.
+ * rust/compile/generics2.rs: likewise.
+ * rust/compile/generics3.rs: likewise.
+ * rust/compile/implicit_returns_err1.rs: likewise.
+ * rust/compile/implicit_returns_err2.rs: likewise.
+ * rust/compile/implicit_returns_err3.rs: likewise.
+ * rust/compile/implicit_returns_err4.rs: likewise.
+ * rust/compile/issue-1152.rs: likewise.
+ * rust/compile/issue-2477.rs: likewise.
+ * rust/compile/reference1.rs: likewise.
+ * rust/compile/stmt_with_block_err1.rs: likewise.
+ * rust/compile/traits1.rs: likewise.
+ * rust/compile/traits2.rs: likewise.
+ * rust/compile/tuple_mismatch.rs: likewise.
+ * rust/compile/tuple_struct3.rs: likewise.
+ * rust/compile/mismatched-types.rs: New test from rustc.
+
+2024-01-16 Marc Poulhiès <dkm@kataplop.net>
+
+ * rust/compile/empty_file: New file.
+ * rust/compile/issue-2421_str.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2479.rs: New test.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * rust/compile/bad-crate-name.rs: Moved to...
+ * rust/compile/bad-crate-name1.rs: ...here.
+ * rust/compile/bad-crate-name2.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2477.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/bounds1.rs: Apply sized trait
+ * rust/compile/canonical_paths1.rs: likewise
+ * rust/compile/cast_generics.rs: likewise
+ * rust/compile/closure_no_type_anno.rs: likewise
+ * rust/compile/complex_qualified_path_in_expr.rs: likewise
+ * rust/compile/const-issue1440.rs: likewise
+ * rust/compile/const_generics_1.rs: likewise
+ * rust/compile/const_generics_8.rs: likewise
+ * rust/compile/derive_macro1.rs: likewise
+ * rust/compile/derive_macro3.rs: likewise
+ * rust/compile/derive_macro4.rs: likewise
+ * rust/compile/derive_macro6.rs: likewise
+ * rust/compile/expected_type_args2.rs: likewise
+ * rust/compile/expected_type_args3.rs: likewise
+ * rust/compile/generics1.rs: likewise
+ * rust/compile/generics11.rs: likewise
+ * rust/compile/generics12.rs: likewise
+ * rust/compile/generics2.rs: likewise
+ * rust/compile/generics3.rs: likewise
+ * rust/compile/generics4.rs: likewise
+ * rust/compile/generics6.rs: likewise
+ * rust/compile/generics7.rs: likewise
+ * rust/compile/generics8.rs: likewise
+ * rust/compile/if_let_expr.rs: likewise
+ * rust/compile/issue-1005.rs: likewise
+ * rust/compile/issue-1019.rs: likewise
+ * rust/compile/issue-1031.rs: likewise
+ * rust/compile/issue-1034.rs: likewise
+ * rust/compile/issue-1128.rs: likewise
+ * rust/compile/issue-1129-2.rs: likewise
+ * rust/compile/issue-1130.rs: likewise
+ * rust/compile/issue-1131.rs: likewise
+ * rust/compile/issue-1165.rs: likewise
+ * rust/compile/issue-1173.rs: likewise
+ * rust/compile/issue-1235.rs: likewise
+ * rust/compile/issue-1237.rs: likewise
+ * rust/compile/issue-1289.rs: likewise
+ * rust/compile/issue-1383.rs: likewise
+ * rust/compile/issue-1447.rs: likewise
+ * rust/compile/issue-1589.rs: likewise
+ * rust/compile/issue-1725-1.rs: likewise
+ * rust/compile/issue-1725-2.rs: likewise
+ * rust/compile/issue-1773.rs: likewise
+ * rust/compile/issue-1786.rs: likewise
+ * rust/compile/issue-1893.rs: likewise
+ * rust/compile/issue-1901.rs: likewise
+ * rust/compile/issue-1930.rs: likewise
+ * rust/compile/issue-1981.rs: likewise
+ * rust/compile/issue-2019-1.rs: likewise
+ * rust/compile/issue-2019-2.rs: likewise
+ * rust/compile/issue-2019-3.rs: likewise
+ * rust/compile/issue-2036.rs: likewise
+ * rust/compile/issue-2037.rs: likewise
+ * rust/compile/issue-2070.rs: likewise
+ * rust/compile/issue-2105.rs: likewise
+ * rust/compile/issue-2106.rs: likewise
+ * rust/compile/issue-2135.rs: likewise
+ * rust/compile/issue-2136-1.rs: likewise
+ * rust/compile/issue-2136-2.rs: likewise
+ * rust/compile/issue-2139.rs: likewise
+ * rust/compile/issue-2142.rs: likewise
+ * rust/compile/issue-2165.rs: likewise
+ * rust/compile/issue-2166.rs: likewise
+ * rust/compile/issue-2190-1.rs: likewise
+ * rust/compile/issue-2190-2.rs: likewise
+ * rust/compile/issue-2195.rs: likewise
+ * rust/compile/issue-2238.rs: likewise
+ * rust/compile/issue-2304.rs: likewise
+ * rust/compile/issue-850.rs: likewise
+ * rust/compile/issue-855.rs: likewise
+ * rust/compile/issue-925.rs: likewise
+ * rust/compile/macro-issue1400.rs: likewise
+ * rust/compile/macro20.rs: likewise
+ * rust/compile/macro23.rs: likewise
+ * rust/compile/macro40.rs: likewise
+ * rust/compile/macro54.rs: likewise
+ * rust/compile/name_resolution2.rs: likewise
+ * rust/compile/name_resolution4.rs: likewise
+ * rust/compile/nested_generic.rs: likewise
+ * rust/compile/parse_associated_type_as_generic_arg.rs: likewise
+ * rust/compile/parse_associated_type_as_generic_arg2.rs: likewise
+ * rust/compile/parse_associated_type_as_generic_arg3.rs: likewise
+ * rust/compile/parse_complex_generic_application.rs: likewise
+ * rust/compile/parse_complex_generic_application2.rs: likewise
+ * rust/compile/path_as_generic_arg.rs: likewise
+ * rust/compile/privacy4.rs: likewise
+ * rust/compile/privacy6.rs: likewise
+ * rust/compile/sizeof-stray-infer-var-bug.rs: likewise
+ * rust/compile/stmt_with_block_dot.rs: likewise
+ * rust/compile/torture/associated_types1.rs: likewise
+ * rust/compile/torture/forward_decl_5.rs: likewise
+ * rust/compile/torture/generics1.rs: likewise
+ * rust/compile/torture/generics10.rs: likewise
+ * rust/compile/torture/generics11.rs: likewise
+ * rust/compile/torture/generics12.rs: likewise
+ * rust/compile/torture/generics13.rs: likewise
+ * rust/compile/torture/generics14.rs: likewise
+ * rust/compile/torture/generics15.rs: likewise
+ * rust/compile/torture/generics16.rs: likewise
+ * rust/compile/torture/generics17.rs: likewise
+ * rust/compile/torture/generics18.rs: likewise
+ * rust/compile/torture/generics19.rs: likewise
+ * rust/compile/torture/generics2.rs: likewise
+ * rust/compile/torture/generics20.rs: likewise
+ * rust/compile/torture/generics21.rs: likewise
+ * rust/compile/torture/generics22.rs: likewise
+ * rust/compile/torture/generics23.rs: likewise
+ * rust/compile/torture/generics24.rs: likewise
+ * rust/compile/torture/generics25.rs: likewise
+ * rust/compile/torture/generics26.rs: likewise
+ * rust/compile/torture/generics27.rs: likewise
+ * rust/compile/torture/generics28.rs: likewise
+ * rust/compile/torture/generics29.rs: likewise
+ * rust/compile/torture/generics3.rs: likewise
+ * rust/compile/torture/generics30.rs: likewise
+ * rust/compile/torture/generics31.rs: likewise
+ * rust/compile/torture/generics32.rs: likewise
+ * rust/compile/torture/generics4.rs: likewise
+ * rust/compile/torture/generics5.rs: likewise
+ * rust/compile/torture/generics6.rs: likewise
+ * rust/compile/torture/generics7.rs: likewise
+ * rust/compile/torture/generics8.rs: likewise
+ * rust/compile/torture/generics9.rs: likewise
+ * rust/compile/torture/intrinsics-2.rs: likewise
+ * rust/compile/torture/intrinsics-6.rs: likewise
+ * rust/compile/torture/intrinsics-7.rs: likewise
+ * rust/compile/torture/intrinsics-8.rs: likewise
+ * rust/compile/torture/issue-1024.rs: likewise
+ * rust/compile/torture/issue-1075.rs: likewise
+ * rust/compile/torture/issue-1432.rs: likewise
+ * rust/compile/torture/issue-1555.rs: likewise
+ * rust/compile/torture/issue-368.rs: likewise
+ * rust/compile/torture/issue-808.rs: likewise
+ * rust/compile/torture/issue-862.rs: likewise
+ * rust/compile/torture/issue-893-2.rs: likewise
+ * rust/compile/torture/issue-893.rs: likewise
+ * rust/compile/torture/must_use2.rs: likewise
+ * rust/compile/torture/nested_fn2.rs: likewise
+ * rust/compile/torture/phantom_data.rs: likewise
+ * rust/compile/torture/range-lang-item1.rs: likewise
+ * rust/compile/torture/traits1.rs: likewise
+ * rust/compile/torture/traits11.rs: likewise
+ * rust/compile/torture/traits12.rs: likewise
+ * rust/compile/torture/traits13.rs: likewise
+ * rust/compile/torture/traits14.rs: likewise
+ * rust/compile/torture/traits15.rs: likewise
+ * rust/compile/torture/traits16.rs: likewise
+ * rust/compile/torture/traits17.rs: likewise
+ * rust/compile/torture/traits18.rs: likewise
+ * rust/compile/torture/traits19.rs: likewise
+ * rust/compile/torture/traits2.rs: likewise
+ * rust/compile/torture/traits3.rs: likewise
+ * rust/compile/torture/traits4.rs: likewise
+ * rust/compile/torture/traits5.rs: likewise
+ * rust/compile/torture/traits6.rs: likewise
+ * rust/compile/torture/traits7.rs: likewise
+ * rust/compile/torture/traits8.rs: likewise
+ * rust/compile/torture/traits9.rs: likewise
+ * rust/compile/torture/transmute-size-check-1.rs: likewise
+ * rust/compile/torture/transmute1.rs: likewise
+ * rust/compile/torture/uninit-intrinsic-1.rs: likewise
+ * rust/compile/torture/utf8_identifiers.rs: likewise
+ * rust/compile/traits1.rs: likewise
+ * rust/compile/traits10.rs: likewise
+ * rust/compile/traits11.rs: likewise
+ * rust/compile/traits12.rs: likewise
+ * rust/compile/traits2.rs: likewise
+ * rust/compile/traits3.rs: likewise
+ * rust/compile/traits4.rs: likewise
+ * rust/compile/traits5.rs: likewise
+ * rust/compile/traits6.rs: likewise
+ * rust/compile/traits7.rs: likewise
+ * rust/compile/traits8.rs: likewise
+ * rust/compile/traits9.rs: likewise
+ * rust/compile/type-bindings1.rs: likewise
+ * rust/compile/unconstrained_type_param.rs: likewise
+ * rust/compile/unsafe10.rs: likewise
+ * rust/execute/torture/closure1.rs: likewise
+ * rust/execute/torture/closure2.rs: likewise
+ * rust/execute/torture/closure3.rs: likewise
+ * rust/execute/torture/closure4.rs: likewise
+ * rust/execute/torture/coercion1.rs: likewise
+ * rust/execute/torture/coercion2.rs: likewise
+ * rust/execute/torture/coercion3.rs: likewise
+ * rust/execute/torture/copy_nonoverlapping1.rs: likewise
+ * rust/execute/torture/derive_macro1.rs: likewise
+ * rust/execute/torture/derive_macro3.rs: likewise
+ * rust/execute/torture/derive_macro4.rs: likewise
+ * rust/execute/torture/index1.rs: likewise
+ * rust/execute/torture/issue-1120.rs: likewise
+ * rust/execute/torture/issue-1133.rs: likewise
+ * rust/execute/torture/issue-1198.rs: likewise
+ * rust/execute/torture/issue-1232.rs: likewise
+ * rust/execute/torture/issue-1249.rs: likewise
+ * rust/execute/torture/issue-1436.rs: likewise
+ * rust/execute/torture/issue-1496.rs: likewise
+ * rust/execute/torture/issue-1720-2.rs: likewise
+ * rust/execute/torture/issue-1720.rs: likewise
+ * rust/execute/torture/issue-2052.rs: likewise
+ * rust/execute/torture/issue-2179.rs: likewise
+ * rust/execute/torture/issue-2180.rs: likewise
+ * rust/execute/torture/issue-2236.rs: likewise
+ * rust/execute/torture/issue-647.rs: likewise
+ * rust/execute/torture/issue-845.rs: likewise
+ * rust/execute/torture/issue-851.rs: likewise
+ * rust/execute/torture/issue-858.rs: likewise
+ * rust/execute/torture/macros23.rs: likewise
+ * rust/execute/torture/macros28.rs: likewise
+ * rust/execute/torture/method2.rs: likewise
+ * rust/execute/torture/method3.rs: likewise
+ * rust/execute/torture/method4.rs: likewise
+ * rust/execute/torture/operator_overload_1.rs: likewise
+ * rust/execute/torture/operator_overload_10.rs: likewise
+ * rust/execute/torture/operator_overload_11.rs: likewise
+ * rust/execute/torture/operator_overload_12.rs: likewise
+ * rust/execute/torture/operator_overload_2.rs: likewise
+ * rust/execute/torture/operator_overload_3.rs: likewise
+ * rust/execute/torture/operator_overload_4.rs: likewise
+ * rust/execute/torture/operator_overload_5.rs: likewise
+ * rust/execute/torture/operator_overload_6.rs: likewise
+ * rust/execute/torture/operator_overload_7.rs: likewise
+ * rust/execute/torture/operator_overload_8.rs: likewise
+ * rust/execute/torture/operator_overload_9.rs: likewise
+ * rust/execute/torture/prefetch_data.rs: likewise
+ * rust/execute/torture/ref-pattern2.rs: likewise
+ * rust/execute/torture/slice-magic.rs: likewise
+ * rust/execute/torture/slice-magic2.rs: likewise
+ * rust/execute/torture/slice1.rs: likewise
+ * rust/execute/torture/str-layout1.rs: likewise
+ * rust/execute/torture/trait1.rs: likewise
+ * rust/execute/torture/trait10.rs: likewise
+ * rust/execute/torture/trait11.rs: likewise
+ * rust/execute/torture/trait12.rs: likewise
+ * rust/execute/torture/trait13.rs: likewise
+ * rust/execute/torture/trait2.rs: likewise
+ * rust/execute/torture/trait3.rs: likewise
+ * rust/execute/torture/trait4.rs: likewise
+ * rust/execute/torture/trait5.rs: likewise
+ * rust/execute/torture/trait6.rs: likewise
+ * rust/execute/torture/trait7.rs: likewise
+ * rust/execute/torture/trait8.rs: likewise
+ * rust/execute/torture/trait9.rs: likewise
+ * rust/execute/torture/transmute1.rs: likewise
+ * rust/execute/torture/wrapping_op1.rs: likewise
+ * rust/execute/torture/wrapping_op2.rs: likewise
+ * rust/link/generic_function_0.rs: likewise
+ * rust/link/generic_function_1.rs: likewise
+ * rust/compile/issue-2375.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/non_member_const.rs: add missing error message
+ * rust/compile/issue-2478.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/break2.rs: Modified file to pass test case.
+ * rust/compile/break_with_value_inside_loop.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/proc_macro_attribute_non_root_function.rs: New test.
+ * rust/compile/proc_macro_attribute_non_root_method.rs: New test.
+ * rust/compile/proc_macro_attribute_non_root_module.rs: New test.
+ * rust/compile/proc_macro_derive_non_root_function.rs: New test.
+ * rust/compile/proc_macro_derive_non_root_method.rs: New test.
+ * rust/compile/proc_macro_derive_non_root_module.rs: New test.
+ * rust/compile/proc_macro_non_root_function.rs: New test.
+ * rust/compile/proc_macro_non_root_method.rs: New test.
+ * rust/compile/proc_macro_non_root_module.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/proc_macro_pub_function.rs: New test.
+ * rust/compile/proc_macro_pub_module.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/proc_macro_attribute_crate_type.rs: Replace
+ dg-excess-errors with dg-error and fix the line so the test
+ can pass.
+ * rust/compile/proc_macro_crate_type.rs: Likewise.
+ * rust/compile/proc_macro_derive_crate_type.rs: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/proc_macro_attribute_private.rs: New test.
+ * rust/compile/proc_macro_derive_private.rs: New test.
+ * rust/compile/proc_macro_private.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/proc_macro_derive_non_function.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/proc_macro_attribute_non_function.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/proc_macro_non_function.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/abi-vardaic.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/non_member_const.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/break1.rs: Modified to pass test case.
+ * rust/compile/continue1.rs: likewise.
+ * rust/compile/break_continue_outside_loop.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/proc_macro_derive_malformed.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/proc_macro_attribute_crate_type.rs: New test.
+ * rust/compile/proc_macro_crate_type.rs: New test.
+ * rust/compile/proc_macro_derive_crate_type.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/found_struct.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/changed_intrinsics.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/torture/intrinsics-3.rs: Updated comment to pass the test case.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/bad_pub_enumitems.rs: changed comment to pass test cases.
+ * rust/compile/dup_fields.rs: likewise.
+ * rust/execute/same_field_name.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/wrong_lhs_assignment.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/func2.rs: updated comment to pass new test cases.
+ * rust/compile/tuple_struct2.rs: likewise.
+ * rust/compile/wrong_no_of_parameters.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+ GuillaumeGomez <guillaume1.gomez@gmail.com>
+
+ * rust/compile/name_resolution1.rs: New test.
+ * rust/compile/name_resolution2.rs: New test.
+ * rust/compile/name_resolution3.rs: New test.
+ * rust/compile/name_resolution4.rs: New test.
+ * rust/compile/name_resolution5.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/link/trait_import_0.rs: Mark test as xfail.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/break-rust2.rs: Updated comment to pass testcase.
+ * rust/compile/const_generics_3.rs: likewise.
+ * rust/compile/const_generics_4.rs: likewise.
+ * rust/compile/not_find_value_in_scope.rs: New test.
+
+2024-01-16 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * rust/compile/missing_constructor_fields.rs: New test.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * rust/compile/broken_utf8.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/macro-issue2273.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2105.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/rust_abi.rs: New test.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * rust/compile/bytecharstring.rs:add test for it
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/macro56.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-1981.rs: Fix badly copied libcore code test
+ * rust/compile/issue-2330.rs: New test.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * rust/compile/torture/raw_identifiers.rs: New test.
+ * rust/compile/torture/utf8_identifiers.rs: New test.
+
+2024-01-16 Raiki Tamura <tamaron1203@gmail.com>
+
+ * rust/compile/torture/utf8_whitespaces.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/macro-issue2268.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/macro-issue2264.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2304.rs: New test.
+
+2024-01-16 Matthew Jasper <mjjasper1@gmail.com>
+
+ * rust/compile/macro54.rs: New test.
+ * rust/compile/macro55.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-1893.rs: fully compile the test case
+
+2024-01-16 Matthew Jasper <mjjasper1@gmail.com>
+
+ * rust/compile/braced_macro_arm.rs: New test.
+ * rust/compile/braced_macro_statements1.rs: New test.
+ * rust/compile/braced_macro_statements2.rs: New test.
+ * rust/compile/braced_macro_statements3.rs: New test.
+ * rust/compile/issue-2225.rs: Update test.
+ * rust/compile/macro53.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/macro6.rs: Remove check for direct error.
+ * rust/compile/macro7.rs: Likewise.
+ * rust/compile/macro-issue2229.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2036.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2019-2.rs: New test.
+ * rust/compile/issue-2019-3.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2019-1.rs: New test.
+
+2024-01-16 Dave Evans <dave@dmetwo.org>
+
+ * rust/compile/issue-1813.rs: New test.
+
+2024-01-16 TieWay59 <tieway59@foxmail.com>
+
+ * rust/compile/break1.rs: remove dg-error "failed to type resolve expression"
+ * rust/compile/break2.rs: Likewise
+ * rust/compile/cfg2.rs: Likewise
+ * rust/compile/continue1.rs: Likewise
+ * rust/compile/generics4.rs: Likewise
+ * rust/compile/generics6.rs: Likewise
+ * rust/compile/generics7.rs: Likewise
+ * rust/compile/issue-2029.rs: Likewise
+ * rust/compile/issue-2139.rs: Likewise
+ * rust/compile/issue-2190-1.rs: Likewise
+ * rust/compile/issue-925.rs: Likewise
+ * rust/compile/method1.rs: Likewise
+ * rust/compile/shadow1.rs: Likewise
+ * rust/compile/type-bindings1.rs: Likewise
+ * rust/compile/unary_negation.rs: Likewise
+ * rust/compile/unary_not.rs: Likewise
+ * rust/compile/unconstrained_type_param.rs: Likewise
+ * rust/compile/usize1.rs: Likewise
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/traits2.rs: update error message
+ * rust/compile/traits3.rs: update error message
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/derive_empty.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/test_mod.rs: Moved to...
+ * rust/compile/issue-1089/test_mod.rs: ...here.
+ * rust/compile/mod_missing_middle.rs: Fix paths.
+ * rust/compile/missing_middle/both_path.rs: Moved to...
+ * rust/compile/mod_missing_middle/missing_middle/both_path.rs: ...here.
+ * rust/compile/missing_middle/explicit.not.rs: Moved to...
+ * rust/compile/mod_missing_middle/missing_middle/explicit.not.rs: ...here.
+ * rust/compile/missing_middle/other.rs: Moved to...
+ * rust/compile/mod_missing_middle/missing_middle/explicit.not/other.rs: ...here.
+ * rust/compile/missing_middle/inner_path.rs: Moved to...
+ * rust/compile/mod_missing_middle/missing_middle/inner_path.rs: ...here.
+ * rust/compile/missing_middle/outer_path.rs: Moved to...
+ * rust/compile/mod_missing_middle/missing_middle/outer_path.rs: ...here.
+ * rust/compile/missing_middle/sub/mod.rs: Moved to...
+ * rust/compile/mod_missing_middle/missing_middle/sub/mod.rs: ...here.
+ * rust/compile/torture/modules/mod.rs: Moved to...
+ * rust/compile/torture/extern_mod1/modules/mod.rs: ...here.
+ * rust/execute/torture/modules/mod.rs: Moved to...
+ * rust/execute/torture/extern_mod4/modules/mod.rs: ...here.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/derive_macro8.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2165.rs: New test.
+ * rust/compile/issue-2166.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/struct-expr-parse.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/derive_macro7.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/derive_macro4.rs: New test.
+ * rust/compile/derive_macro6.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/execute/torture/derive_macro4.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/macro-delim.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/macro43.rs: Fix test with new derive macros.
+ * rust/compile/derive_macro1.rs: New test.
+ * rust/compile/derive_macro3.rs: New test.
+ * rust/execute/torture/derive_macro1.rs: New test.
+ * rust/execute/torture/derive_macro3.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/cfg6.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2195.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2238.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/issue-2225.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/issue-2207.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/execute/torture/issue-2236.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2190-1.rs: New test.
+ * rust/compile/issue-2190-2.rs: New test.
+
+2024-01-16 Matthew Jasper <mjjasper1@gmail.com>
+
+ * rust/compile/nested_macro_use3.rs: New test.
+
+2024-01-16 Matthew Jasper <mjjasper1@gmail.com>
+
+ * rust/compile/cfg-attr.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/doc_macro.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/macro-issue2194.rs: New test.
+
+2024-01-16 Matthew Jasper <mjjasper1@gmail.com>
+
+ * rust/compile/for_expr.rs: New test.
+ * rust/compile/issue-407-2.rs: Update compiler output.
+ * rust/compile/issue-407.rs: Update compiler output.
+ * rust/compile/issue-867.rs: Update compiler output.
+ * rust/compile/issue-2189.rs: New test.
+ * rust/compile/macro_call_statement.rs: New test.
+ * rust/compile/stmt_with_block_dot.rs: New test.
+ * rust/compile/torture/loop8.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/macro-issue2192.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/const-issue1440.rs: Remove LE conditional compilation.
+ * rust/compile/torture/issue-1432.rs: Likewise.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/execute/torture/coercion3.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/execute/torture/issue-2179.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/execute/torture/issue-2180.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2188.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/parse_specialization.rs:
+ Add "default unsafe" coverage.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2178.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/macro_use1.rs: New test.
+ * rust/execute/torture/macro_use1.rs: New test.
+ * rust/compile/nested_macro_use1.rs: New test.
+ * rust/compile/nested_macro_use2.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/issue-1446.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/execute/torture/cfg-tail.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/macro52.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/issue-2125.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2135.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2106.rs: New test.
+ * rust/compile/issue-1524.rs: regression (placeholder generic)
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2142.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2136-1.rs: New test.
+ * rust/compile/issue-2136-2.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2139.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-1893.rs: regression
+ * rust/compile/traits12.rs: rustc uses a custom error message here
+ * rust/compile/unconstrained_type_param.rs: extra error message
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/execute/torture/issue-1852-1.rs: New test.
+ * rust/execute/torture/issue-1852.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/issue-1807.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/let_alt.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-852.rs: New test.
+
+2024-01-16 Sergey Bugaev <bugaevc@gmail.com>
+
+ * lib/prune.exp (prune_ices):
+ Also prune "You have broken GCC Rust. This is a feature."
+ * rust/compile/break-rust1.rs: New test
+ * rust/compile/break-rust2.rs: New test
+ * rust/compile/break-rust3.rs: New test
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/if_let_expr.rs: Increase test coverage.
+
+2024-01-16 Sebastian Kirmayer <gnu@kirmayer.eu>
+
+ * rust/compile/macro-issue2092.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/macro51.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2070.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/execute/torture/issue-2080.rs: New test.
+
+2024-01-16 Emanuele Micheletti <micheletti.emanuele@hotmail.com>
+
+ * rust/compile/cast5.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/const_generics_5.rs: update test case
+ * rust/compile/issue-2043.rs: New test.
+ * rust/compile/issue-2039.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2042.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-925.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/bounds1.rs: Moved to...
+ * rust/compile/bounds1.rs: ...here.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2029.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/execute/torture/issue-2052.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/array4.rs: New test.
+ * rust/execute/torture/arrays.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/privacy8.rs: New test.
+
+2024-01-16 emanuele-em <micheletti.emanuele@hotmail.com>
+
+ * rust/compile/cast4.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/macro49.rs: New test.
+ * rust/compile/macro50.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2037.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-1893.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-850.rs: New test.
+ * rust/compile/issue-855.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-1981.rs: New test.
+
+2024-01-16 Mahmoud Mohamed <mahadelr19@gmail.com>
+
+ * rust/compile/torture/alt_patterns1.rs: New test.
+
+2024-01-16 Mahmoud Mohamed <mahadelr19@gmail.com>
+
+ * rust/compile/multiple_bindings2.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/sizeof-stray-infer-var-bug.rs: New test.
+
+2024-01-16 Tage Johansson <frans.tage@gmail.com>
+
+ * rust/compile/macro47.rs: Test that :vis can be followed by some keywords
+ * rust/compile/macro48.rs: Test that :vis cannot be followed by the keyword priv
+
+2024-01-16 Mahmoud Mohamed <mahadelr19@gmail.com>
+
+ * rust/compile/multiple_bindings1.rs: New test.
+
+2024-01-16 Mahmoud Mohamed <mahadelr19@gmail.com>
+
+ * rust/execute/torture/closure4.rs: New test.
+ * rust/execute/torture/ref-pattern2.rs: New test.
+
+2024-01-16 Mahmoud Mohamed <mahadelr19@gmail.com>
+
+ * rust/compile/ref_pattern_fn_param.rs: Moved to...
+ * rust/compile/ref_pattern_fn_param1.rs: ...here.
+ * rust/compile/ref_pattern_fn_param2.rs: New test.
+ * rust/execute/torture/ref-pattern1.rs: New test.
+
+2024-01-16 goar5670 <mahadelr19@gmail.com>
+
+ * rust/compile/ref_pattern_fn_param.rs: New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/lang-impl.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/stringify.rs: Add a basic test with some text.
+ * rust/execute/torture/builtin_macro_stringify.rs: Verify the
+ text is left as is without any other macro expansion.
+
+2024-01-16 Nikos Alexandris <nikos-alexandris@protonmail.com>
+
+ * rust/compile/tuple_mismatch.rs: New test.
+
+2024-01-16 goar5670 <mahadelr19@gmail.com>
+
+ * rust/compile/complex_qualified_path_in_expr.rs : New test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/closure_no_type_anno.rs: Extend test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-1524.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/parse_associated_type_as_generic_arg3.rs: remove -fsyntax-only
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/parse_associated_type_as_generic_arg.rs: it now works without -fsyntax-only
+ * rust/compile/parse_associated_type_as_generic_arg2.rs: likewise
+
+2024-01-16 goar5670 <mahadelr19@gmail.com>
+
+ * rust/compile/closure_no_type_anno.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/while_let_expr.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/torture/uninit-intrinsic-1.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/zero_sized_slice.rs: New test.
+
+2024-01-16 Nikos Alexandris <nikos-alexandris@protonmail.com>
+
+ * rust/compile/builtin_macro_include_bytes_location_info.rs: New test.
+ * rust/compile/builtin_macro_include_str_location_info.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/slice_rest_pattern.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/if_let_expr.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/torture/intrinsics-8.rs: New test.
+
+2024-01-16 mxlol233 <mxlol233@outlook.com>
+
+ * rust/compile/feature_extern_types.rs:New file.
+
+2024-01-16 bl7awy <mahadelr19@gmail.com>
+
+ * rust/compile/cast_generics.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-1901.rs: New test.
+
+2024-01-16 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-1930.rs: New test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/extern_type_item_missing_semi.rs: New failing
+ test.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/extern_type_item.rs: New test.
+
+2024-01-16 omkar-mohanty <franzohouser@gmail.com>
+
+ * rust/compile/builtin_macro_eager3.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/parse_invalid_specialization.rs: New test.
+ * rust/compile/parse_specialization.rs: New test.
+ * rust/compile/default_not_a_kw.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/expand_macro_qual_path_in_type.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/auto_trait_invalid.rs: New test.
+ * rust/compile/auto_trait_valid.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/parse_associated_type_as_generic_arg3.rs: New test.
+
+2024-01-16 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/parse_associated_type_as_generic_arg.rs: New test.
+ * rust/compile/parse_associated_type_as_generic_arg2.rs: New test.
+ * rust/compile/path_as_generic_arg.rs: New test.
+ * rust/compile/nested_generic.rs: New test.
+
+2024-01-16 mxlol233 <mxlol233@outlook.com>
+
+ * rust/compile/builtin_macro_compile_error.rs: Add
+ crate feature `rustc_attri`.
+ * rust/compile/builtin_macro_concat.rs: Likewise.
+ * rust/compile/builtin_macro_eager1.rs: Likewise.
+ * rust/compile/builtin_macro_eager2.rs: Likewise.
+ * rust/compile/builtin_macro_env.rs: Likewise.
+ * rust/compile/builtin_macro_include_bytes.rs:
+ Likewise.
+ * rust/compile/builtin_macro_include_str.rs:
+ Likewise.
+ * rust/compile/builtin_macro_not_found.rs:
+ Likewise.
+ * rust/compile/builtin_macro_recurse2.rs:
+ Likewise.
+ * rust/compile/feature_rust_attri0.rs:New file.
+ * rust/compile/feature_rust_attri1.rs:New file.
+ * rust/compile/include_empty.rs:Add crate feature
+ `rustc_attri`.
+ * rust/compile/issue-1830_bytes.rs:Likewise.
+ * rust/compile/issue-1830_str.rs:Likewise.
+ * rust/compile/macro42.rs:Likewise.
+ * rust/execute/torture/builtin_macro_cfg.rs:
+ Likewise.
+ * rust/execute/torture/builtin_macro_concat.rs:
+ Likewise.
+ * rust/execute/torture/builtin_macro_env.rs:
+ Likewise.
+ * rust/execute/torture/builtin_macro_include_bytes.rs:
+ Likewise.
+ * rust/execute/torture/builtin_macro_include_str.rs:
+ Likewise.
+ * rust/execute/torture/builtin_macro_line.rs:
+ Likewise.
+ * rust/execute/torture/builtin_macros1.rs:
+ Likewise.
+ * rust/execute/torture/builtin_macros3.rs:
+ Likewise.
+ * rust/execute/torture/macros29.rs:Likewise.
+ * rust/execute/torture/macros30.rs:Likewise.
+ * rust/execute/torture/macros31.rs:Likewise.
+
+2024-01-16 Wilco Dijkstra <wilco.dijkstra@arm.com>
+
+ PR target/112573
+ * gcc.target/aarch64/pr112573.c: Add new test.
+
+2024-01-16 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/pattern-or.rs: New test.
+
+2024-01-16 Daniel Cederman <cederman@gaisler.com>
+
+ * gcc.dg/lto/pr88077_0.c: Change type to match alignment for SPARC
+
+2024-01-16 Daniel Cederman <cederman@gaisler.com>
+
+ * gcc.dg/ifcvt-4.c: Skip for SPARC V8
+
+2024-01-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/113372
+ PR middle-end/90348
+ PR middle-end/110115
+ PR middle-end/111422
+ * gcc.dg/torture/bitint-49.c: New test.
+ * gcc.c-torture/execute/pr90348.c: New test.
+ * gcc.c-torture/execute/pr110115.c: New test.
+ * gcc.c-torture/execute/pr111422.c: New test.
+
+2024-01-16 Feng Xue <fxue@os.amperecomputing.com>
+
+ * gcc.target/aarch64/bb-slp-pr113091.c: New test.
+
+2024-01-16 Juzhe-Zhong <juzhe.zhong@rivai.ai>
+
+ PR target/113404
+ * gcc.target/riscv/rvv/base/big_endian-1.c: New test.
+ * gcc.target/riscv/rvv/base/big_endian-2.c: New test.
+
+2024-01-16 Kewen Lin <linkw@linux.ibm.com>
+
+ PR testsuite/109705
+ * lib/target-supports.exp (check_effective_target_vect_long_mult):
+ Fix powerpc*-*-* checks.
+
+2024-01-16 Yanzhang Wang <yanzhang.wang@intel.com>
+
+ * gcc.target/riscv/rvv/base/abi-call-args-1-run.c: Delete the
+ -Wno-psabi.
+ * gcc.target/riscv/rvv/base/abi-call-args-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-call-args-2-run.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-call-args-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-call-args-3-run.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-call-args-3.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-call-args-4-run.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-call-args-4.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-call-error-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-call-return-run.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-call-return.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-call-variant_cc.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-callee-saved-1-fixed-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-callee-saved-1-fixed-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-callee-saved-1-save-restore.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-callee-saved-1-zcmp.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-callee-saved-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-callee-saved-2-save-restore.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-callee-saved-2-zcmp.c: Ditto.
+ * gcc.target/riscv/rvv/base/abi-callee-saved-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/fixed-point-vxrm-error.c: Ditto.
+ * gcc.target/riscv/rvv/base/fixed-point-vxrm.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-cvt-f.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-cvt-x.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-cvt-xu.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-10.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-11.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-12.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-13.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-14.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-15.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-16.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-17.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-18.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-19.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-20.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-21.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-22.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-23.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-24.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-25.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-26.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-27.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-28.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-29.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-3.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-30.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-31.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-32.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-33.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-34.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-35.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-36.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-37.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-38.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-39.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-4.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-40.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-41.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-42.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-43.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-44.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-45.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-46.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-47.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-48.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-49.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-5.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-50.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-51.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-52.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-53.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-54.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-55.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-56.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-57.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-58.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-59.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-6.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-60.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-61.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-62.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-63.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-64.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-65.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-66.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-67.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-68.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-69.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-7.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-70.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-71.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-72.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-73.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-74.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-75.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-76.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-77.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-8.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-dynamic-frm-9.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-autovec-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-autovec-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-autovec-3.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-autovec-4.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-error.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-insert-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-insert-10.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-insert-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-insert-3.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-insert-4.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-insert-5.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-insert-7.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-insert-8.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-insert-9.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-run-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-run-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-run-3.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-run-4.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm-run-5.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-frm.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-fwmacc.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-macc.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-madd.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-msac.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-msub.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-ncvt-f.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-ncvt-x.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-ncvt-xu.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-nmacc.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-nmadd.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-nmsac.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-nmsub.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-rec7.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-redosum.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-redusum.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-single-div.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-single-mul.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-single-rdiv.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-single-rsub.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-single-sub.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-sqrt.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-wcvt-x.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-wcvt-xu.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-widening-add.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-widening-mul.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-widening-sub.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-wmsac.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-wnmacc.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-wnmsac.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-wredosum.c: Ditto.
+ * gcc.target/riscv/rvv/base/float-point-wredusum.c: Ditto.
+ * gcc.target/riscv/rvv/base/intrisinc-vrgatherei16.c: Ditto.
+ * gcc.target/riscv/rvv/base/no-honor-frm-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/overloaded_rv32_vadd.c: Ditto.
+ * gcc.target/riscv/rvv/base/overloaded_rv32_vfadd.c: Ditto.
+ * gcc.target/riscv/rvv/base/overloaded_rv32_vget_vset.c: Ditto.
+ * gcc.target/riscv/rvv/base/overloaded_rv32_vloxseg2ei16.c: Ditto.
+ * gcc.target/riscv/rvv/base/overloaded_rv32_vmv.c: Ditto.
+ * gcc.target/riscv/rvv/base/overloaded_rv32_vreinterpret.c: Ditto.
+ * gcc.target/riscv/rvv/base/overloaded_rv64_vadd.c: Ditto.
+ * gcc.target/riscv/rvv/base/overloaded_rv64_vfadd.c: Ditto.
+ * gcc.target/riscv/rvv/base/overloaded_rv64_vget_vset.c: Ditto.
+ * gcc.target/riscv/rvv/base/overloaded_rv64_vloxseg2ei16.c: Ditto.
+ * gcc.target/riscv/rvv/base/overloaded_rv64_vmv.c: Ditto.
+ * gcc.target/riscv/rvv/base/overloaded_rv64_vreinterpret.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr110119-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr110119-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr110265-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr110265-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr110265-3.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr110277-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr110277-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr110299-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr110299-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr110299-3.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr110299-4.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr111720-0.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr111720-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr111720-10.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr111720-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr111720-3.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr111720-4.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr111720-5.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr111720-6.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr111720-7.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr111720-8.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr111720-9.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr111935.c: Ditto.
+ * gcc.target/riscv/rvv/base/scalar-move-merged-run-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/simplify-vdiv.c: Ditto.
+ * gcc.target/riscv/rvv/base/simplify-vrsub.c: Ditto.
+ * gcc.target/riscv/rvv/base/tuple-intrinsic.c: Ditto.
+ * gcc.target/riscv/rvv/base/tuple_vundefined.c: Ditto.
+ * gcc.target/riscv/rvv/base/vcreate.c: Ditto.
+ * gcc.target/riscv/rvv/base/vlmul_ext-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/vslide1down-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/vslide1down-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/vslide1down-3.c: Ditto.
+ * gcc.target/riscv/rvv/base/vslide1up-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/vslide1up-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/vslide1up-3.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvbb-intrinsic.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvbb_vandn_vx_constraint.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvbc-intrinsic.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvbc_vx_constraint-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvbc_vx_constraint-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvfhmin-intrinsic.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvkg-intrinsic.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvkned-intrinsic.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvknha-intrinsic.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvknhb-intrinsic.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvksed-intrinsic.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvksh-intrinsic.c: Ditto.
+
+2024-01-16 Yanzhang Wang <yanzhang.wang@intel.com>
+
+ * gcc.target/riscv/rvv/base/binop_vx_constraint-120.c: Delete the -Wno-psabi.
+ * gcc.target/riscv/rvv/base/integer_compare_insn_shortcut.c: Ditto.
+ * gcc.target/riscv/rvv/base/mask_insn_shortcut.c: Ditto.
+ * gcc.target/riscv/rvv/base/misc_vreinterpret_vbool_vint.c: Ditto.
+ * gcc.target/riscv/rvv/base/pr110109-2.c: Ditto.
+ * gcc.target/riscv/rvv/base/scalar_move-9.c: Ditto.
+ * gcc.target/riscv/rvv/base/spill-10.c: Ditto.
+ * gcc.target/riscv/rvv/base/spill-11.c: Ditto.
+ * gcc.target/riscv/rvv/base/spill-9.c: Ditto.
+ * gcc.target/riscv/rvv/base/vlmul_ext-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/zero_base_load_store_optimization.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvfh-intrinsic.c: Ditto.
+ * gcc.target/riscv/rvv/base/zvfh-over-zvfhmin.c: Ditto.
+ * gcc.target/riscv/rvv/vsetvl/vsetvl-1.c: Ditto.
+ * gcc.target/riscv/rvv/base/vector-abi-1.c: Removed.
+ * gcc.target/riscv/rvv/base/vector-abi-2.c: Removed.
+ * gcc.target/riscv/rvv/base/vector-abi-3.c: Removed.
+ * gcc.target/riscv/rvv/base/vector-abi-4.c: Removed.
+ * gcc.target/riscv/rvv/base/vector-abi-5.c: Removed.
+ * gcc.target/riscv/rvv/base/vector-abi-6.c: Removed.
+ * gcc.target/riscv/rvv/base/vector-abi-7.c: Removed.
+ * gcc.target/riscv/rvv/base/vector-abi-8.c: Removed.
+
2024-01-16 David Malcolm <dmalcolm@redhat.com>
PR analyzer/106229
diff --git a/gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics3.C b/gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics3.C
index ec091d6..304cf02 100644
--- a/gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics3.C
+++ b/gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics3.C
@@ -1,7 +1,9 @@
// P0847R7
// { dg-do compile { target c++23 } }
-// rejection and diagnosis of an xobj parameter declared with a default argument
+// rejection and diagnosis of an incorrectly declared xobj parameter
+
+// default argument
struct S {
void f0(this S = {}) {} // { dg-error "an explicit object parameter may not have a default argument" }
@@ -18,3 +20,105 @@ void S::f2(this S = {}) {} // { dg-error "an explicit object parameter may not h
void S::f11(this S s) {}
void S::f12(this S s = {}) {} // { dg-error "an explicit object parameter may not have a default argument" }
+// parameter pack
+
+struct S0 {
+ template<typename Selves>
+ void f(this Selves...) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void g(this Selves... selves) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ void h(this auto...) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+ void j(this auto... selves) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void fd(this Selves...); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void gd(this Selves... selves); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ void hd(this auto...); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+ void jd(this auto... selves); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+};
+
+struct S1 {
+ template<typename Selves>
+ void f(this Selves&...) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void g(this Selves&... selves) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ void h(this auto&...) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+ void j(this auto&... selves) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void fd(this Selves&...); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void gd(this Selves&... selves); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ void hd(this auto&...); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+ void jd(this auto&... selves); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+};
+
+struct S2 {
+ template<typename Selves>
+ void f(this Selves&&...) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void g(this Selves&&... selves) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ void h(this auto&&...) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+ void j(this auto&&... selves) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void fd(this Selves&&...); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void gd(this Selves&&... selves); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ void hd(this auto&&...); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+ void jd(this auto&&... selves); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+};
+
+struct S3 {
+ template<typename Selves>
+ void f(this Selves const&...) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void g(this Selves const&... selves) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ void h(this auto const&...) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+ void j(this auto const&... selves) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void fd(this Selves const&...); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void gd(this Selves const&... selves); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ void hd(this auto const&...); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+ void jd(this auto const&... selves); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+};
+
+struct S4 {
+ template<typename Selves>
+ void f(this Selves const&&...) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void g(this Selves const&&... selves) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ void h(this auto const&&...) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+ void j(this auto const&&... selves) {} // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void fd(this Selves const&&...); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ template<typename Selves>
+ void gd(this Selves const&&... selves); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+
+ void hd(this auto const&&...); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+ void jd(this auto const&&... selves); // { dg-error "an explicit object parameter cannot be a function parameter pack" }
+};
+
diff --git a/gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics9.C b/gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics9.C
new file mode 100644
index 0000000..d420793
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics9.C
@@ -0,0 +1,6 @@
+// PR c++/113340
+// { dg-do compile { target c++23 } }
+
+struct S {
+ ~S(this S &) = default; // { dg-error "destructors may not have parameters" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class61.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class61.C
new file mode 100644
index 0000000..4033cf0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class61.C
@@ -0,0 +1,25 @@
+// PR c++/113242
+// { dg-do compile { target c++20 } }
+
+struct wrapper { int n; };
+
+template<const wrapper& X>
+void f1() {
+ static_assert(X.n == 42);
+}
+
+template<const wrapper* X>
+void f2() {
+ static_assert(X->n == 42);
+}
+
+template<wrapper X>
+void g() {
+ f1<X>();
+ f2<&X>();
+}
+
+int main() {
+ constexpr wrapper X = {42};
+ g<X>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class62.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class62.C
new file mode 100644
index 0000000..f5068fb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class62.C
@@ -0,0 +1,8 @@
+// PR c++/99493
+// { dg-do compile { target c++20 } }
+
+struct owner{int m;};
+struct view{const int*m;constexpr view(const owner&o):m{&o.m}{}};
+template<view V>struct constant{};
+template<owner O>constexpr constant<O>v{};
+constexpr auto a=v<owner{}>;
diff --git a/gcc/testsuite/g++.dg/modules/merge-16.h b/gcc/testsuite/g++.dg/modules/merge-16.h
new file mode 100644
index 0000000..fdb3855
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/merge-16.h
@@ -0,0 +1,10 @@
+// PR c++/112588
+
+void f(int*);
+
+template <typename T>
+struct S {
+ void g(int n) { f(&n); }
+};
+
+template struct S<void>;
diff --git a/gcc/testsuite/g++.dg/modules/merge-16_a.C b/gcc/testsuite/g++.dg/modules/merge-16_a.C
new file mode 100644
index 0000000..c243224
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/merge-16_a.C
@@ -0,0 +1,7 @@
+// PR c++/112588
+// { dg-additional-options "-fmodules-ts" }
+// { dg-module-cmi merge16 }
+
+module;
+#include "merge-16.h"
+export module merge16;
diff --git a/gcc/testsuite/g++.dg/modules/merge-16_b.C b/gcc/testsuite/g++.dg/modules/merge-16_b.C
new file mode 100644
index 0000000..8c7b1f0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/merge-16_b.C
@@ -0,0 +1,5 @@
+// PR c++/112588
+// { dg-additional-options "-fmodules-ts" }
+
+#include "merge-16.h"
+import merge16;
diff --git a/gcc/testsuite/g++.dg/modules/pr113292_a.H b/gcc/testsuite/g++.dg/modules/pr113292_a.H
new file mode 100644
index 0000000..90ece2e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/pr113292_a.H
@@ -0,0 +1,34 @@
+// PR c++/113292
+// { dg-additional-options "-fmodule-header" }
+// { dg-module-cmi {} }
+
+struct test {
+ static const test& get_instance() {
+ return instance;
+ }
+ static thread_local test instance;
+};
+
+
+template <typename T>
+struct test_template {
+ static const test_template& get_instance() {
+ return instance;
+ }
+ static thread_local test_template instance;
+
+ template <typename U>
+ static const test_template& get_template_instance() {
+ return template_instance<U>;
+ }
+
+ template <typename U>
+ static thread_local test_template template_instance;
+};
+
+template <typename T>
+thread_local test_template<T> test_template<T>::instance;
+
+template <typename T>
+template <typename U>
+thread_local test_template<T> test_template<T>::template_instance;
diff --git a/gcc/testsuite/g++.dg/modules/pr113292_b.C b/gcc/testsuite/g++.dg/modules/pr113292_b.C
new file mode 100644
index 0000000..fc582a5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/pr113292_b.C
@@ -0,0 +1,13 @@
+// PR c++/113292
+// { dg-additional-options "-fmodules-ts" }
+
+import "pr113292_a.H";
+
+// provide a definition of 'instance' so things link
+thread_local test test::instance;
+
+void instantiate() {
+ auto& instance = test::get_instance();
+ auto& t_instance = test_template<int>::get_instance();
+ auto& tt_instance = test_template<int>::get_template_instance<double>();
+};
diff --git a/gcc/testsuite/g++.dg/modules/pr113292_c.C b/gcc/testsuite/g++.dg/modules/pr113292_c.C
new file mode 100644
index 0000000..aa3f32a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/pr113292_c.C
@@ -0,0 +1,11 @@
+// PR c++/113292
+// { dg-module-do link }
+// { dg-additional-options "-fmodules-ts" }
+
+import "pr113292_a.H";
+
+int main() {
+ auto& instance = test::get_instance();
+ auto& t_instance = test_template<int>::get_instance();
+ auto& tt_instance = test_template<int>::get_template_instance<double>();
+}
diff --git a/gcc/testsuite/g++.dg/pr99966.C b/gcc/testsuite/g++.dg/pr99966.C
index 4d68982..d111c0a 100644
--- a/gcc/testsuite/g++.dg/pr99966.C
+++ b/gcc/testsuite/g++.dg/pr99966.C
@@ -20,4 +20,4 @@ uint64_t f(std::vector<uint64_t>& data, size_t start, size_t end){
return total;
}
-/* { dg-final { scan-tree-dump-not "throw" "vrp1"} } */
+/* { dg-final { scan-tree-dump-not "throw" "vrp1" { xfail hppa*64*-*-* } } } */
diff --git a/gcc/testsuite/g++.target/loongarch/got-load.C b/gcc/testsuite/g++.target/loongarch/got-load.C
new file mode 100644
index 0000000..20924c73
--- /dev/null
+++ b/gcc/testsuite/g++.target/loongarch/got-load.C
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mabi=lp64d -O2 -mexplicit-relocs -mcmodel=normal -fdump-rtl-expand" } */
+/* { dg-final { scan-rtl-dump-times "mem/u" 2 "expand" } } */
+
+#include <bits/stdc++.h>
+
+using namespace std;
+
+int lr[100005][2];
+
+void
+test(void)
+{
+ int n;
+
+ cin >> n;
+ for (int i = 0; i < n; ++i)
+ cin >> lr[i][0] >> lr[i][1];
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr110251.c b/gcc/testsuite/gcc.c-torture/compile/pr110251.c
new file mode 100644
index 0000000..e253658
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr110251.c
@@ -0,0 +1,27 @@
+/* PR tree-optimization/110251 */
+
+int a, b;
+signed char c;
+
+int
+foo (int e)
+{
+ if (e >= 'a')
+ return e;
+}
+
+int
+bar (unsigned short e)
+{
+ for (; e; a++)
+ e &= e - 1;
+}
+
+void
+baz (void)
+{
+ while (c < 1)
+ ;
+ for (; bar (c - 1); b = foo (c))
+ ;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr113221-1.c b/gcc/testsuite/gcc.c-torture/compile/pr113221-1.c
new file mode 100644
index 0000000..942fa5e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr113221-1.c
@@ -0,0 +1,12 @@
+/* { dg-options "-fno-move-loop-invariants -funroll-all-loops" } */
+/* PR target/113221 */
+/* This used to ICE after the `load/store pair fusion pass` was added
+ due to the predicate aarch64_ldp_reg_operand allowing too much. */
+
+
+void bar();
+void foo(int* b) {
+ for (;;)
+ *b++ = (__SIZE_TYPE__)bar;
+}
+
diff --git a/gcc/testsuite/gcc.dg/array-quals-1.c b/gcc/testsuite/gcc.dg/array-quals-1.c
index b9b55f7..e379f61 100644
--- a/gcc/testsuite/gcc.dg/array-quals-1.c
+++ b/gcc/testsuite/gcc.dg/array-quals-1.c
@@ -30,23 +30,23 @@ cia d1 = { 7, 8 };
static cia e[2] = { { 1, 2 }, { 3, 4 } };
/* { dg-final { scan-assembler-symbol-section {^_?e1$} {^\.(const|rodata|srodata|sdata)|\[RO\]} } } */
cia e1[2] = { { 1, 2 }, { 3, 4 } };
-/* { dg-final { scan-assembler-symbol-section {^_?p$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?p$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */
void *const p = &a;
-/* { dg-final { scan-assembler-symbol-section {^_?q$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?q$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */
void *const q = &b;
-/* { dg-final { scan-assembler-symbol-section {^_?r$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?r$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */
void *const r = &c;
-/* { dg-final { scan-assembler-symbol-section {^_?s$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?s$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */
void *const s = &d;
-/* { dg-final { scan-assembler-symbol-section {^_?t$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?t$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */
void *const t = &e;
-/* { dg-final { scan-assembler-symbol-section {^_?p1$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?p1$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */
void *const p1 = &a1;
-/* { dg-final { scan-assembler-symbol-section {^_?q1$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?q1$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */
void *const q1 = &b1;
-/* { dg-final { scan-assembler-symbol-section {^_?r1$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?r1$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */
void *const r1 = &c1;
-/* { dg-final { scan-assembler-symbol-section {^_?s1$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?s1$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */
void *const s1 = &d1;
-/* { dg-final { scan-assembler-symbol-section {^_?t1$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?t1$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */
void *const t1 = &e1;
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-flag-2.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag-2.c
index aeae6b7..e4e3a6e 100644
--- a/gcc/testsuite/gcc.dg/atomic/stdatomic-flag-2.c
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag-2.c
@@ -1,7 +1,7 @@
/* Test atomic_flag routines for existence and execution. Out-of-line
function calls. */
/* The test needs a lockless atomic implementation. */
-/* { dg-do run { xfail hppa*-*-hpux* } } */
+/* { dg-do run } */
/* { dg-options "-std=c11 -pedantic-errors" } */
#include <stdatomic.h>
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c
index 515d5d8..bd28ba5 100644
--- a/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c
@@ -1,6 +1,6 @@
/* Test atomic_flag routines for existence and execution. */
/* The test needs a lockless atomic implementation. */
-/* { dg-do run { xfail hppa*-*-hpux* } } */
+/* { dg-do run } */
/* { dg-options "-std=c11 -pedantic-errors" } */
#include <stdatomic.h>
diff --git a/gcc/testsuite/gcc.dg/bitint-70.c b/gcc/testsuite/gcc.dg/bitint-70.c
new file mode 100644
index 0000000..3970553
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bitint-70.c
@@ -0,0 +1,14 @@
+/* PR middle-end/113406 */
+/* { dg-do compile { target bitint } } */
+/* { dg-options "-std=c23 -fstrub=internal" } */
+/* { dg-require-effective-target strub } */
+
+#if __BITINT_MAXWIDTH__ >= 146
+_BitInt(146)
+#else
+_BitInt(16)
+#endif
+foo (void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/bitint-71.c b/gcc/testsuite/gcc.dg/bitint-71.c
new file mode 100644
index 0000000..f7ff871
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bitint-71.c
@@ -0,0 +1,18 @@
+/* PR tree-optimization/113408 */
+/* { dg-do compile { target bitint } } */
+/* { dg-options "-std=c23 -O2" } */
+
+#if __BITINT_MAXWIDTH__ >= 713
+struct A { _BitInt(713) b; } g;
+#else
+struct A { _BitInt(49) b; } g;
+#endif
+int f;
+
+void
+foo (void)
+{
+ struct A j = g;
+ if (j.b)
+ f = 0;
+}
diff --git a/gcc/testsuite/gcc.dg/bitint-72.c b/gcc/testsuite/gcc.dg/bitint-72.c
new file mode 100644
index 0000000..a3c44fe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bitint-72.c
@@ -0,0 +1,16 @@
+/* PR middle-end/113410 */
+/* { dg-do compile { target bitint } } */
+/* { dg-options "-std=c23" } */
+
+#if __BITINT_MAXWIDTH__ >= 905
+void bar (_BitInt(905) n, int[n]);
+#else
+void bar (int n, int[n]);
+#endif
+
+void
+foo (int n)
+{
+ int buf[n];
+ bar (n, buf);
+}
diff --git a/gcc/testsuite/gcc.dg/c23-tag-alias-2.c b/gcc/testsuite/gcc.dg/c23-tag-alias-2.c
index 64ff67d..1a4097b 100644
--- a/gcc/testsuite/gcc.dg/c23-tag-alias-2.c
+++ b/gcc/testsuite/gcc.dg/c23-tag-alias-2.c
@@ -1,4 +1,4 @@
-/* { dg-do run }
+/* { dg-do run { target lto } }
* { dg-options "-std=c23 -flto -O2" }
*/
diff --git a/gcc/testsuite/gcc.dg/c23-tag-alias-3.c b/gcc/testsuite/gcc.dg/c23-tag-alias-3.c
index b9fe6f3..76bc4df 100644
--- a/gcc/testsuite/gcc.dg/c23-tag-alias-3.c
+++ b/gcc/testsuite/gcc.dg/c23-tag-alias-3.c
@@ -1,4 +1,4 @@
-/* { dg-do run }
+/* { dg-do run { target lto } }
* { dg-options "-std=c23 -O2" }
*/
diff --git a/gcc/testsuite/gcc.dg/cmp-mem-const-3.c b/gcc/testsuite/gcc.dg/cmp-mem-const-3.c
index c60ecdb..5469f10 100644
--- a/gcc/testsuite/gcc.dg/cmp-mem-const-3.c
+++ b/gcc/testsuite/gcc.dg/cmp-mem-const-3.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { lp64 && { ! sparc*-*-* } } } } */
+/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* } } } } } */
/* Excluding sparc since there we do not end up with a comparison of memory and
a constant which means that the optimization is not applicable. */
/* { dg-options "-O2 -fdump-rtl-combine-details" } */
diff --git a/gcc/testsuite/gcc.dg/cmp-mem-const-4.c b/gcc/testsuite/gcc.dg/cmp-mem-const-4.c
index 7aa403d..9ea094e 100644
--- a/gcc/testsuite/gcc.dg/cmp-mem-const-4.c
+++ b/gcc/testsuite/gcc.dg/cmp-mem-const-4.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { lp64 && { ! sparc*-*-* } } } } */
+/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* } } } } } */
/* Excluding sparc since there we do not end up with a comparison of memory and
a constant which means that the optimization is not applicable. */
/* { dg-options "-O2 -fdump-rtl-combine-details" } */
diff --git a/gcc/testsuite/gcc.dg/cmp-mem-const-5.c b/gcc/testsuite/gcc.dg/cmp-mem-const-5.c
index 4316dcb..5a9096e 100644
--- a/gcc/testsuite/gcc.dg/cmp-mem-const-5.c
+++ b/gcc/testsuite/gcc.dg/cmp-mem-const-5.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { lp64 && { ! sparc*-*-* } } } } */
+/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* } } } } } */
/* Excluding sparc since there a prior optimization already reduced the
constant, i.e., nothing left for us. */
/* { dg-options "-O2 -fdump-rtl-combine-details" } */
diff --git a/gcc/testsuite/gcc.dg/cmp-mem-const-6.c b/gcc/testsuite/gcc.dg/cmp-mem-const-6.c
index d9046af..3811953 100644
--- a/gcc/testsuite/gcc.dg/cmp-mem-const-6.c
+++ b/gcc/testsuite/gcc.dg/cmp-mem-const-6.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { lp64 && { ! sparc*-*-* } } } } */
+/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* } } } } } */
/* Excluding sparc since there a prior optimization already reduced the
constant, i.e., nothing left for us. */
/* { dg-options "-O2 -fdump-rtl-combine-details" } */
diff --git a/gcc/testsuite/gcc.dg/gnu23-tag-alias-3.c b/gcc/testsuite/gcc.dg/gnu23-tag-alias-3.c
index c2fd4e9..9d7e7e1 100644
--- a/gcc/testsuite/gcc.dg/gnu23-tag-alias-3.c
+++ b/gcc/testsuite/gcc.dg/gnu23-tag-alias-3.c
@@ -1,4 +1,4 @@
-/* { dg-do run }
+/* { dg-do run { target lto } }
* { dg-options "-std=gnu23 -flto -O2" }
*/
diff --git a/gcc/testsuite/gcc.dg/memcmp-1.c b/gcc/testsuite/gcc.dg/memcmp-1.c
index ea837ca..13ef5b3 100644
--- a/gcc/testsuite/gcc.dg/memcmp-1.c
+++ b/gcc/testsuite/gcc.dg/memcmp-1.c
@@ -34,6 +34,36 @@ int lib_strncmp(const char *a, const char *b, size_t n)
#define MAX_SZ 600
+/* A means to run only a fraction of the tests, beginning at a random
+ count. */
+#ifdef RUN_FRACTION
+
+#define SKIP_ITERATION skip_iteration ()
+static unsigned int iteration_count;
+
+static _Bool
+skip_iteration (void)
+{
+ _Bool run = ++iteration_count == RUN_FRACTION;
+
+ if (run)
+ iteration_count = 0;
+
+ return !run;
+}
+
+static void
+initialize_skip_iteration_count ()
+{
+ srand (2024);
+ iteration_count = (unsigned int) (rand ()) % RUN_FRACTION;
+}
+
+#else
+#define SKIP_ITERATION 0
+#define initialize_skip_iteration_count()
+#endif
+
#define DEF_RS(ALIGN) \
static void test_memcmp_runtime_size_ ## ALIGN (const char *str1, \
const char *str2, \
@@ -110,6 +140,8 @@ static void test_driver_memcmp (void (test_memcmp)(const char *, const char *, i
int i,j,l;
for(l=0;l<sz;l++) {
for(i=0;i<NRAND/sz;i++) {
+ if (SKIP_ITERATION)
+ continue;
for(j=0;j<l;j++) {
buf1[j] = rand() & 0xff;
buf2[j] = buf1[j];
@@ -128,6 +160,8 @@ static void test_driver_memcmp (void (test_memcmp)(const char *, const char *, i
for(diff_pos = ((test_sz>TZONE)?(test_sz-TZONE):0); diff_pos < test_sz+TZONE; diff_pos++)
for(zero_pos = ((test_sz>TZONE)?(test_sz-TZONE):0); zero_pos < test_sz+TZONE; zero_pos++)
{
+ if (SKIP_ITERATION)
+ continue;
memset(buf1, 'A', 2*test_sz);
memset(buf2, 'A', 2*test_sz);
buf2[diff_pos] = 'B';
@@ -490,6 +524,7 @@ DEF_TEST(49,1)
int
main(int argc, char **argv)
{
+ initialize_skip_iteration_count ();
#ifdef TEST_ALL
RUN_TEST(1,1)
RUN_TEST(1,2)
diff --git a/gcc/testsuite/gcc.dg/pr111409.c b/gcc/testsuite/gcc.dg/pr111409.c
index f033fff..7d51905 100644
--- a/gcc/testsuite/gcc.dg/pr111409.c
+++ b/gcc/testsuite/gcc.dg/pr111409.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-skip-if "split DWARF unsupported" { powerpc*-ibm-aix* *-*-darwin* } } */
+/* { dg-skip-if "split DWARF unsupported" { hppa*-*-hpux* powerpc*-ibm-aix* *-*-darwin* } } */
/* { dg-options "-gsplit-dwarf -g3 -dA" } */
/* { dg-final { scan-assembler-times {\.section\t"?\.debug_macro} 1 } } */
/* { dg-final { scan-assembler-not {\.byte\s+0x7\s*#\s*Import} } } */
diff --git a/gcc/testsuite/gcc.dg/predict-18.c b/gcc/testsuite/gcc.dg/predict-18.c
index 073e742..718eaf3 100644
--- a/gcc/testsuite/gcc.dg/predict-18.c
+++ b/gcc/testsuite/gcc.dg/predict-18.c
@@ -33,9 +33,9 @@ void foo (int a, int b)
global++;
}
-/* { dg-final { scan-tree-dump "__builtin_expect_with_probability heuristics of edge .*->.*: 54.00%" "profile_estimate"} } */
+/* { dg-final { scan-tree-dump "combined value predictions heuristics of edge .*->.*: 54.00%" "profile_estimate"} } */
/* { dg-final { scan-tree-dump "__builtin_expect_with_probability heuristics of edge .*->.*: 77.70%" "profile_estimate"} } */
-/* { dg-final { scan-tree-dump "__builtin_expect_with_probability heuristics of edge .*->.*: 98.96%" "profile_estimate"} } */
-/* { dg-final { scan-tree-dump "__builtin_expect_with_probability heuristics of edge .*->.*: 71.99%" "profile_estimate"} } */
+/* { dg-final { scan-tree-dump "combined value predictions heuristics of edge .*->.*: 98.96%" "profile_estimate"} } */
+/* { dg-final { scan-tree-dump "combined value predictions heuristics of edge .*->.*: 71.99%" "profile_estimate"} } */
/* { dg-final { scan-tree-dump "__builtin_expect_with_probability heuristics of edge .*->.*: 40.00%" "profile_estimate"} } */
/* { dg-final { scan-tree-dump "__builtin_expect_with_probability heuristics of edge .*->.*: 35.01%" "profile_estimate"} } */
diff --git a/gcc/testsuite/gcc.dg/predict-23.c b/gcc/testsuite/gcc.dg/predict-23.c
new file mode 100644
index 0000000..7700bb3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/predict-23.c
@@ -0,0 +1,11 @@
+/* PR tree-optimization/110852 */
+/* { dg-options "-O1 -fno-tree-fre" } */
+
+unsigned i, j;
+
+unsigned
+foo (void)
+{
+ unsigned u = __builtin_expect (i, 0);
+ return 4 - (u < (j || i));
+}
diff --git a/gcc/testsuite/gcc.dg/scantest-lto.c b/gcc/testsuite/gcc.dg/scantest-lto.c
index 5f8abaf..46c21f2 100644
--- a/gcc/testsuite/gcc.dg/scantest-lto.c
+++ b/gcc/testsuite/gcc.dg/scantest-lto.c
@@ -1,3 +1,4 @@
+/* { dg-do compile { target lto } }
/* { dg-options "-O2 -flto" } */
void foo ()
diff --git a/gcc/testsuite/gcc.dg/torture/bitint-50.c b/gcc/testsuite/gcc.dg/torture/bitint-50.c
new file mode 100644
index 0000000..c148a2d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/bitint-50.c
@@ -0,0 +1,31 @@
+/* PR tree-optimization/113421 */
+/* { dg-do run { target bitint } } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
+/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+
+#if __BITINT_MAXWIDTH__ >= 1024
+unsigned _BitInt(1024) a = -5wb;
+
+__attribute__((noipa)) void
+foo (unsigned _BitInt(1024) x)
+{
+ a *= x;
+}
+#else
+int a = 30;
+
+void
+foo (int)
+{
+}
+#endif
+
+int
+main ()
+{
+ foo (-6wb);
+ if (a != 30wb)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/inline-mem-cpy-1.c b/gcc/testsuite/gcc.dg/torture/inline-mem-cpy-1.c
index f495255..f075234 100644
--- a/gcc/testsuite/gcc.dg/torture/inline-mem-cpy-1.c
+++ b/gcc/testsuite/gcc.dg/torture/inline-mem-cpy-1.c
@@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-finline-stringops=memcpy -save-temps -g0 -fno-lto" } */
+/* { dg-additional-options "-DRUN_FRACTION=11" { target simulator } } */
/* { dg-timeout-factor 2 } */
#include "../memcmp-1.c"
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c
index b84f318..a35999a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c
@@ -1,6 +1,8 @@
/* { dg-do run { target vect_cmdline_needed } } */
+/* { dg-do compile { target { loongarch_sx && {! loongarch_sx_hw } } } } */
/* { dg-options "-O2 -fno-tree-loop-distribute-patterns -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */
/* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-mlsx" { target { loongarch*-*-* } } } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c
index 18fe1aa..9f14a54 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c
@@ -1,6 +1,8 @@
/* { dg-do run { target vect_cmdline_needed } } */
+/* { dg-do compile { target { loongarch_sx && {! loongarch_sx_hw } } } } */
/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */
/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-mlsx" { target { loongarch*-*-* } } } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predict-1.c b/gcc/testsuite/gcc.dg/tree-ssa/predict-1.c
new file mode 100644
index 0000000..1824643
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/predict-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+int test2();
+int
+test (int a, int b)
+{
+ if (__builtin_expect_with_probability (a, 0, 0.4)/__builtin_expect_with_probability (b, 5, 0.2))
+ test2();
+}
+/* { dg-final { scan-tree-dump-times "first match heuristics: 60.00" 1 "profile_estimate"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predict-2.c b/gcc/testsuite/gcc.dg/tree-ssa/predict-2.c
new file mode 100644
index 0000000..80c84f1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/predict-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+int test2();
+int
+test (int a, int b)
+{
+ if (__builtin_expect_with_probability (a, 0, 0.8)+__builtin_expect_with_probability (b, 5, 0.9) == 5)
+ test2();
+}
+/* Combining two predictions together can not be done precisely, so check that result is DS theory. */
+/* { dg-final { scan-tree-dump-times "combined value predictions heuristics of edge .->.: 72.00" 1 "profile_estimate"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predict-3.c b/gcc/testsuite/gcc.dg/tree-ssa/predict-3.c
new file mode 100644
index 0000000..9da5886
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/predict-3.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+int test2();
+int
+test (int p, int a, int b, int c)
+{
+ int d;
+ if (p)
+ d = __builtin_expect_with_probability (a, 0, 0.8) * b;
+ else
+ d = __builtin_expect_with_probability (a, 0, 0.8) * c;
+ if (d)
+ test2();
+}
+/* { dg-final { scan-tree-dump-times "first match heuristics: 20.00" 1 "profile_estimate"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-17.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-17.c
index b0d4811..f1c7427 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/sra-17.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-17.c
@@ -17,5 +17,5 @@ main (int argc, char **argv)
abort ();
}
-/* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.?L.?C.?.?.?0;" 1 "esra" } } */
-/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\\[" 4 "esra" } } */
+/* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.?L.?C.?.?.?0;" 1 "esra" { xfail hppa*64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\\[" 4 "esra" { xfail hppa*64*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-18.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-18.c
index 2cdeae6..3077485 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/sra-18.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-18.c
@@ -23,8 +23,8 @@ main (int argc, char **argv)
abort ();
}
-/* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.?L.?C.?.?.?0;" 1 "esra" } } */
-/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */
-/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */
-/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */
-/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */
+/* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.?L.?C.?.?.?0;" 1 "esra" { xfail hppa*64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[0\\\]\\.x" 1 "esra" { xfail hppa*64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[1\\\]\\.x" 1 "esra" { xfail hppa*64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[0\\\]\\.x" 1 "esra" { xfail hppa*64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[1\\\]\\.x" 1 "esra" { xfail hppa*64*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-43.c b/gcc/testsuite/gcc.dg/vect/bb-slp-43.c
index dad2d24..8aedb06 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-43.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-43.c
@@ -14,4 +14,4 @@ f (int *restrict x, short *restrict y)
}
/* { dg-final { scan-tree-dump-not "mixed mask and nonmask" "slp2" } } */
-/* { dg-final { scan-tree-dump-not "vector operands from scalars" "slp2" { target { { vect_int && vect_bool_cmp } && { vect_unpack && vect_hw_misalign } } xfail { vect_variable_length && { ! vect256 } } } } } */
+/* { dg-final { scan-tree-dump-not "vector operands from scalars" "slp2" { target { { vect_int && vect_bool_cmp } && { vect_unpack && vect_hw_misalign } } xfail { vect_variable_length && { { ! vect128 } && { ! vect256 } } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c
index fb71991..d1d7912 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c
@@ -42,7 +42,7 @@ main (int argc, char **argv)
/* Because we disable the cost model, targets with variable-length
vectors can end up vectorizing the store to a[0..7] on its own.
With the cost model we do something sensible. */
-/* { dg-final { scan-tree-dump-times "optimized: basic block" 2 "slp2" { target { ! amdgcn-*-* } xfail vect_variable_length } } } */
+/* { dg-final { scan-tree-dump-times "optimized: basic block" 2 "slp2" { target { ! amdgcn-*-* } xfail { vect_variable_length && { ! vect128 } } } } } */
/* amdgcn can do this in one vector. */
/* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "slp2" { target amdgcn-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-16.c b/gcc/testsuite/gcc.dg/vect/pr112774.c
index 120f40c..2ada33b 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/scev-16.c
+++ b/gcc/testsuite/gcc.dg/vect/pr112774.c
@@ -1,6 +1,7 @@
+/* PR tree-optimization/112774 */
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */
-/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
+/* { dg-additional-options "-O2 -ftree-vectorize" } */
int A[1024 * 2];
diff --git a/gcc/testsuite/gcc.dg/vect/pr113371.c b/gcc/testsuite/gcc.dg/vect/pr113371.c
new file mode 100644
index 0000000..46c4deb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr113371.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-O" } */
+/* { dg-additional-options "-march=silvermont" { target { x86_64-*-* i?86-*-* } } } */
+
+long *BN_uadd_ap;
+
+void
+BN_uadd (int dif, long t1)
+{
+ long *rp;
+ while (dif)
+ {
+ dif--;
+ t1 = *BN_uadd_ap;
+ *rp++ = t1;
+ if (t1)
+ break;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr113431.c b/gcc/testsuite/gcc.dg/vect/pr113431.c
new file mode 100644
index 0000000..04448d9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr113431.c
@@ -0,0 +1,18 @@
+/* { dg-additional-options "-O3 -fdump-tree-slp1-details" } */
+
+#include "tree-vect.h"
+
+int a[2][9];
+int b;
+int main()
+{
+ check_vect ();
+ for (b = 0; b < 2; b++)
+ for (long e = 8; e > 0; e--)
+ a[b][e] = a[0][1] == 0;
+ if (a[1][1] != 0)
+ __builtin_abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "optimized: basic block part vectorized" 2 "slp1" { target vect_int } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_106-pr113374.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_106-pr113374.c
new file mode 100644
index 0000000..e299532
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_106-pr113374.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-add-options vect_early_break } */
+
+typedef __SIZE_TYPE__ size_t;
+struct S { unsigned char *a, *b; };
+
+void
+foo (struct S x)
+{
+ for (size_t i = x.b - x.a; i > 0; --i)
+ {
+ size_t t = x.b - x.a;
+ size_t u = i - 1;
+ if (u >= t)
+ __builtin_abort ();
+ if (x.a[i - 1]--)
+ break;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-stv-1.c b/gcc/testsuite/gcc.target/i386/sse4_1-stv-1.c
index 12db618..6230dbe 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-stv-1.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-stv-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target ia32 } } */
-/* { dg-options "-O2 -msse4.1 -mstv -mno-stackrealign" } */
+/* { dg-options "-O2 -msse4.1 -mstv -mno-stackrealign -fno-tree-vectorize" } */
long long a[1024];
long long b[1024];
diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp
index 9f8d533..e028bc9 100644
--- a/gcc/testsuite/gcc.target/mips/mips.exp
+++ b/gcc/testsuite/gcc.target/mips/mips.exp
@@ -266,6 +266,7 @@ set mips_option_groups {
stack-protector "-fstack-protector"
stdlib "REQUIRES_STDLIB"
unaligned-access "-m(no-|)unaligned-access"
+ xgot "-m(no-|)xgot"
}
for { set option 0 } { $option < 32 } { incr option } {
diff --git a/gcc/testsuite/gcc.target/mips/xgot-n32-avoid-gp.c b/gcc/testsuite/gcc.target/mips/xgot-n32-avoid-gp.c
new file mode 100644
index 0000000..3f52fc5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/xgot-n32-avoid-gp.c
@@ -0,0 +1,11 @@
+/* Check if we skip store and load gp if there is no stub function call. */
+/* { dg-options "-mips64r2 -mxgot -mabi=n32 -fPIC" } */
+
+extern int a;
+int
+foo ()
+{
+ return a;
+}
+/* { dg-final { scan-assembler-not "\tsd\t\\\$28," } } */
+/* { dg-final { scan-assembler-not "\tld\t\\\$28," } } */
diff --git a/gcc/testsuite/gcc.target/mips/xgot-n32-need-gp.c b/gcc/testsuite/gcc.target/mips/xgot-n32-need-gp.c
new file mode 100644
index 0000000..631409c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/xgot-n32-need-gp.c
@@ -0,0 +1,11 @@
+/* We cannot skip store and load gp if there is stub function call. */
+/* { dg-options "-mips64r2 -mxgot -mabi=n32 -fPIC" } */
+
+extern int f();
+int
+foo ()
+{
+ return f();
+}
+/* { dg-final { scan-assembler "\tsd\t\\\$28," } } */
+/* { dg-final { scan-assembler "\tld\t\\\$28," } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-char.p7.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-char.p7.c
index 29a8aa8..42599c2 100644
--- a/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-char.p7.c
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-char.p7.c
@@ -11,7 +11,7 @@
/* one extsb (extend sign-bit) instruction generated for each test against
unsigned types */
-/* { dg-final { scan-assembler-times {\maddi\M} 9 } } */
+/* { dg-final { scan-assembler-times {\maddi\M} 6 } } */
/* { dg-final { scan-assembler-times {\mli\M} 6 } } */
/* { dg-final { scan-assembler-times {\mstxvw4x\M|\mstvx\M|\mstxv\M} 6 } } */
/* -m32 target uses rlwinm in place of rldicl. */
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-1.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-1.c
index e57a0b6..cb5a1db 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-1.c
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-1.c
@@ -53,5 +53,5 @@ DEF_OP_VV (shift, 128, int64_t, >>)
DEF_OP_VV (shift, 256, int64_t, >>)
DEF_OP_VV (shift, 512, int64_t, >>)
-/* { dg-final { scan-assembler-times {vsra\.vv\s+v[0-9]+,\s*v[0-9]+,\s*v[0-9]+} 39 } } */
+/* { dg-final { scan-assembler-times {vsra\.vv\s+v[0-9]+,\s*v[0-9]+,\s*v[0-9]+} 42 } } */
/* { dg-final { scan-assembler-not {csrr} } } */
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-2.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-2.c
index 9d1fa64..e626a52 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-2.c
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-2.c
@@ -53,5 +53,5 @@ DEF_OP_VV (shift, 128, uint64_t, >>)
DEF_OP_VV (shift, 256, uint64_t, >>)
DEF_OP_VV (shift, 512, uint64_t, >>)
-/* { dg-final { scan-assembler-times {vsrl\.vv\s+v[0-9]+,\s*v[0-9]+,\s*v[0-9]+} 39 } } */
+/* { dg-final { scan-assembler-times {vsrl\.vv\s+v[0-9]+,\s*v[0-9]+,\s*v[0-9]+} 42 } } */
/* { dg-final { scan-assembler-not {csrr} } } */
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-3.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-3.c
index 8de1b9c..244bee0 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-3.c
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/shift-3.c
@@ -53,5 +53,5 @@ DEF_OP_VV (shift, 128, int64_t, <<)
DEF_OP_VV (shift, 256, int64_t, <<)
DEF_OP_VV (shift, 512, int64_t, <<)
-/* { dg-final { scan-assembler-times {vsll\.vv\s+v[0-9]+,\s*v[0-9]+,\s*v[0-9]+} 46 } } */
+/* { dg-final { scan-assembler-times {vsll\.vv\s+v[0-9]+,\s*v[0-9]+,\s*v[0-9]+} 47 } } */
/* { dg-final { scan-assembler-not {csrr} } } */
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vlmax_conflict-4.c b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vlmax_conflict-4.c
index 28ffe2c..dedbc94 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vlmax_conflict-4.c
+++ b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vlmax_conflict-4.c
@@ -23,7 +23,6 @@ void f (int32_t * restrict in, int32_t * restrict out, size_t n, size_t cond, si
/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*mf8,\s*t[au],\s*m[au]} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e32,\s*mf2,\s*t[au],\s*m[au]} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
-/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*m8,\s*t[au],\s*m[au]} 3 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
-/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*m8,\s*t[au],\s*m[au]\s+\.L[0-9]:+} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
-/* { dg-final { scan-assembler-times {vsetvli} 5 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
+/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*m8,\s*t[au],\s*m[au]} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
+/* { dg-final { scan-assembler-times {vsetvli} 3 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vlmax_conflict-5.c b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vlmax_conflict-5.c
index cd94fda..26db192 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vlmax_conflict-5.c
+++ b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vlmax_conflict-5.c
@@ -17,15 +17,13 @@ void f (int32_t * restrict in, int32_t * restrict out, size_t n, size_t cond, si
vuint16mf2_t v = *(vuint16mf2_t*)(in + i + 300);
*(vuint16mf2_t*)(out + i + 300) = v;
} else {
- vbool1_t v = *(vbool1_t*)(in + i + 400);
- *(vbool1_t*)(out + i + 400) = v;
+ vint8mf8_t v = *(vint8mf8_t*)(in + i + 400);
+ *(vint8mf8_t*)(out + i + 400) = v;
}
}
}
/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e16,\s*mf2,\s*t[au],\s*m[au]} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
-/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*mf8,\s*t[au],\s*m[au]} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
-/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e32,\s*mf2,\s*t[au],\s*m[au]} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
-/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*m8,\s*t[au],\s*m[au]} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
-/* { dg-final { scan-assembler-times {vsetvli} 4 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
+/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*mf8,\s*t[au],\s*m[au]} 2 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
+/* { dg-final { scan-assembler-times {vsetvli} 3 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
diff --git a/gcc/tree-into-ssa.cc b/gcc/tree-into-ssa.cc
index 152b0396..242b11b2 100644
--- a/gcc/tree-into-ssa.cc
+++ b/gcc/tree-into-ssa.cc
@@ -2499,7 +2499,7 @@ public:
/* opt_pass methods: */
bool gate (function *fun) final override
{
- /* Do nothing for funcions that was produced already in SSA form. */
+ /* Do nothing for functions that were produced already in SSA form. */
return !(fun->curr_properties & PROP_ssa);
}
diff --git a/gcc/tree-ssa-operands.h b/gcc/tree-ssa-operands.h
index 7276bc6..8072932 100644
--- a/gcc/tree-ssa-operands.h
+++ b/gcc/tree-ssa-operands.h
@@ -82,6 +82,9 @@ struct GTY(()) ssa_operands {
#define PHI_ARG_DEF(PHI, I) gimple_phi_arg_def ((PHI), (I))
#define SET_PHI_ARG_DEF(PHI, I, V) \
SET_USE (PHI_ARG_DEF_PTR ((PHI), (I)), (V))
+#define SET_PHI_ARG_DEF_ON_EDGE(PHI, E, V) \
+ SET_USE (gimple_phi_arg_imm_use_ptr_from_edge \
+ ((PHI), (E)), (V))
#define PHI_ARG_DEF_FROM_EDGE(PHI, E) \
gimple_phi_arg_def_from_edge ((PHI), (E))
#define PHI_ARG_DEF_PTR_FROM_EDGE(PHI, E) \
diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
index 5e86da3..f592aeb 100644
--- a/gcc/tree-vect-data-refs.cc
+++ b/gcc/tree-vect-data-refs.cc
@@ -282,6 +282,12 @@ vect_preserves_scalar_order_p (dr_vec_info *dr_info_a, dr_vec_info *dr_info_b)
&& !STMT_VINFO_GROUPED_ACCESS (stmtinfo_b))
return true;
+ /* If there is a loop invariant read involved we might vectorize it in
+ the prologue, breaking scalar oder with respect to the in-loop store. */
+ if ((DR_IS_READ (dr_info_a->dr) && integer_zerop (DR_STEP (dr_info_a->dr)))
+ || (DR_IS_READ (dr_info_b->dr) && integer_zerop (DR_STEP (dr_info_b->dr))))
+ return false;
+
/* STMT_A and STMT_B belong to overlapping groups. All loads are
emitted at the position of the first scalar load.
Stores in a group are emitted at the position of the last scalar store.
@@ -2354,8 +2360,9 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
/* Check if we can possibly peel the loop. */
if (!vect_can_advance_ivs_p (loop_vinfo)
|| !slpeel_can_duplicate_loop_p (loop, LOOP_VINFO_IV_EXIT (loop_vinfo),
- LOOP_VINFO_IV_EXIT (loop_vinfo))
- || loop->inner)
+ loop_preheader_edge (loop))
+ || loop->inner
+ || LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo))
do_peeling = false;
struct _vect_peel_extended_info peel_for_known_alignment;
diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc
index c7e73f6..983ed2e 100644
--- a/gcc/tree-vect-loop-manip.cc
+++ b/gcc/tree-vect-loop-manip.cc
@@ -1578,97 +1578,105 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
flush_pending_stmts (new_exit);
}
+ bool need_virtual_phi = get_virtual_phi (loop->header);
+
+ /* For the main loop exit preserve the LC PHI nodes. For vectorization
+ we need them to continue or finalize reductions. Since we do not
+ copy the loop exit blocks we have to materialize PHIs at the
+ new destination before redirecting edges. */
+ for (auto gsi_from = gsi_start_phis (loop_exit->dest);
+ !gsi_end_p (gsi_from); gsi_next (&gsi_from))
+ {
+ tree res = gimple_phi_result (*gsi_from);
+ create_phi_node (copy_ssa_name (res), new_preheader);
+ }
+ edge e = redirect_edge_and_branch (loop_exit, new_preheader);
+ gcc_assert (e == loop_exit);
+ flush_pending_stmts (loop_exit);
+ set_immediate_dominator (CDI_DOMINATORS, new_preheader, loop_exit->src);
+
bool multiple_exits_p = loop_exits.length () > 1;
basic_block main_loop_exit_block = new_preheader;
basic_block alt_loop_exit_block = NULL;
- /* Create intermediate edge for main exit. But only useful for early
- exits. */
+ /* Create the CFG for multiple exits.
+ | loop_exit | alt1 | altN
+ v v ... v
+ main_loop_exit_block: alt_loop_exit_block:
+ | /
+ v v
+ new_preheader:
+ where in the new preheader we need merge PHIs for
+ the continuation values into the epilogue header.
+ Do not bother with exit PHIs for the early exits but
+ their live virtual operand. We'll fix up things below. */
if (multiple_exits_p)
{
edge loop_e = single_succ_edge (new_preheader);
new_preheader = split_edge (loop_e);
- }
- auto_vec <gimple *> new_phis;
- hash_map <tree, tree> new_phi_args;
- /* First create the empty phi nodes so that when we flush the
- statements they can be filled in. However because there is no order
- between the PHI nodes in the exits and the loop headers we need to
- order them base on the order of the two headers. First record the new
- phi nodes. Then redirect the edges and flush the changes. This writes
- out the new SSA names. */
- for (auto gsi_from = gsi_start_phis (loop_exit->dest);
- !gsi_end_p (gsi_from); gsi_next (&gsi_from))
- {
- gimple *from_phi = gsi_stmt (gsi_from);
- tree new_res = copy_ssa_name (gimple_phi_result (from_phi));
- gphi *res = create_phi_node (new_res, main_loop_exit_block);
- new_phis.safe_push (res);
+ gphi *vphi = NULL;
+ alt_loop_exit_block = new_preheader;
+ for (auto exit : loop_exits)
+ if (exit != loop_exit)
+ {
+ tree vphi_def = NULL_TREE;
+ if (gphi *evphi = get_virtual_phi (exit->dest))
+ vphi_def = gimple_phi_arg_def_from_edge (evphi, exit);
+ edge res = redirect_edge_and_branch (exit, alt_loop_exit_block);
+ gcc_assert (res == exit);
+ redirect_edge_var_map_clear (exit);
+ if (alt_loop_exit_block == new_preheader)
+ alt_loop_exit_block = split_edge (exit);
+ if (!need_virtual_phi)
+ continue;
+ if (vphi_def && !vphi)
+ vphi = create_phi_node (copy_ssa_name (vphi_def),
+ alt_loop_exit_block);
+ if (vphi_def)
+ add_phi_arg (vphi, vphi_def, exit, UNKNOWN_LOCATION);
+ }
+
+ set_immediate_dominator (CDI_DOMINATORS, new_preheader,
+ loop->header);
}
- for (auto exit : loop_exits)
+ /* Adjust the epilog loop PHI entry values to continue iteration.
+ This adds remaining necessary LC PHI nodes to the main exit
+ and creates merge PHIs when we have multiple exits with
+ their appropriate continuation. */
+ if (flow_loops)
{
- basic_block dest = main_loop_exit_block;
- if (exit != loop_exit)
+ edge loop_entry = single_succ_edge (new_preheader);
+ bool peeled_iters = single_pred (loop->latch) != loop_exit->src;
+
+ /* Record the new SSA names in the cache so that we can skip
+ materializing them again when we fill in the rest of the LC SSA
+ variables. */
+ hash_map <tree, tree> new_phi_args;
+ for (auto psi = gsi_start_phis (main_loop_exit_block);
+ !gsi_end_p (psi); gsi_next (&psi))
{
- if (!alt_loop_exit_block)
+ gphi *phi = *psi;
+ tree new_arg = gimple_phi_arg_def_from_edge (phi, loop_exit);
+ if (TREE_CODE (new_arg) != SSA_NAME)
+ continue;
+
+ /* If the loop doesn't have a virtual def then only possibly keep
+ the epilog LC PHI for it and avoid creating new defs. */
+ if (virtual_operand_p (new_arg) && !need_virtual_phi)
{
- edge res = redirect_edge_and_branch (
- exit,
- new_preheader);
- flush_pending_stmts (res);
- alt_loop_exit_block = split_edge (res);
+ auto gsi = gsi_for_stmt (phi);
+ remove_phi_node (&gsi, true);
continue;
}
- dest = alt_loop_exit_block;
- }
- edge e = redirect_edge_and_branch (exit, dest);
- flush_pending_stmts (e);
- }
- bool peeled_iters = single_pred (loop->latch) != loop_exit->src;
- /* Record the new SSA names in the cache so that we can skip materializing
- them again when we fill in the rest of the LCSSA variables. */
- for (auto phi : new_phis)
- {
- tree new_arg = gimple_phi_arg_def (phi, loop_exit->dest_idx);
-
- if (!SSA_VAR_P (new_arg))
- continue;
-
- /* If the PHI MEM node dominates the loop then we shouldn't create
- a new LC-SSSA PHI for it in the intermediate block. */
- /* A MEM phi that consitutes a new DEF for the vUSE chain can either
- be a .VDEF or a PHI that operates on MEM. And said definition
- must not be inside the main loop. Or we must be a parameter.
- In the last two cases we may remove a non-MEM PHI node, but since
- they dominate both loops the removal is unlikely to cause trouble
- as the exits must already be using them. */
- if (virtual_operand_p (new_arg)
- && (SSA_NAME_IS_DEFAULT_DEF (new_arg)
- || !flow_bb_inside_loop_p (loop,
- gimple_bb (SSA_NAME_DEF_STMT (new_arg)))))
- {
- auto gsi = gsi_for_stmt (phi);
- remove_phi_node (&gsi, true);
- continue;
+ /* If we decided not to remove the PHI node we should also not
+ rematerialize it later on. */
+ new_phi_args.put (new_arg, gimple_phi_result (phi));
}
- /* If we decided not to remove the PHI node we should also not
- rematerialize it later on. */
- new_phi_args.put (new_arg, gimple_phi_result (phi));
-
- if (TREE_CODE (new_arg) != SSA_NAME)
- continue;
- }
-
- /* Copy the current loop LC PHI nodes between the original loop exit
- block and the new loop header. This allows us to later split the
- preheader block and still find the right LC nodes. */
- edge loop_entry = single_succ_edge (new_preheader);
- if (flow_loops)
- {
- /* Link through the main exit first. */
+ /* Create the merge PHI nodes in new_preheader and populate the
+ arguments for the main exit. */
for (auto gsi_from = gsi_start_phis (loop->header),
gsi_to = gsi_start_phis (new_loop->header);
!gsi_end_p (gsi_from) && !gsi_end_p (gsi_to);
@@ -1681,7 +1689,7 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
/* Check if we've already created a new phi node during edge
redirection. If we have, only propagate the value
- downwards. */
+ downwards in case there is no merge block. */
if (tree *res = new_phi_args.get (new_arg))
{
if (multiple_exits_p)
@@ -1713,15 +1721,18 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
gphi *lcssa_phi = create_phi_node (new_res, new_preheader);
/* Otherwise, main loop exit should use the final iter value. */
- SET_PHI_ARG_DEF (lcssa_phi, loop_exit->dest_idx, new_arg);
+ if (multiple_exits_p)
+ SET_PHI_ARG_DEF_ON_EDGE (lcssa_phi,
+ single_succ_edge (main_loop_exit_block),
+ new_arg);
+ else
+ SET_PHI_ARG_DEF_ON_EDGE (lcssa_phi, loop_exit, new_arg);
adjust_phi_and_debug_stmts (to_phi, loop_entry, new_res);
}
- set_immediate_dominator (CDI_DOMINATORS, main_loop_exit_block,
- loop_exit->src);
-
- /* Now link the alternative exits. */
+ /* Now fill in the values for the merge PHI in new_preheader
+ for the alternative exits. */
if (multiple_exits_p)
{
for (auto gsi_from = gsi_start_phis (loop->header),
@@ -1732,37 +1743,16 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
gimple *from_phi = gsi_stmt (gsi_from);
gimple *to_phi = gsi_stmt (gsi_to);
- tree alt_arg = gimple_phi_result (from_phi);
- edge main_e = single_succ_edge (alt_loop_exit_block);
-
/* Now update the virtual PHI nodes with the right value. */
- if (peeled_iters
- && virtual_operand_p (alt_arg)
- && flow_bb_inside_loop_p (loop,
- gimple_bb (SSA_NAME_DEF_STMT (alt_arg))))
+ tree alt_arg = gimple_phi_result (from_phi);
+ if (virtual_operand_p (alt_arg))
{
- /* Link the alternative exit one. */
- tree def
- = gimple_phi_arg_def (to_phi, loop_exit->dest_idx);
- gphi *def_phi = as_a <gphi *> (SSA_NAME_DEF_STMT (def));
- SET_PHI_ARG_DEF (def_phi, 0, alt_arg);
-
- /* And now the main merge block. */
- gphi *iter_phi
- = as_a <gphi *> (SSA_NAME_DEF_STMT (alt_arg));
- unsigned latch_idx
- = single_succ_edge (loop->latch)->dest_idx;
- tree exit_val
- = gimple_phi_arg_def (iter_phi, latch_idx);
- alt_arg = copy_ssa_name (def);
- gphi *l_phi = create_phi_node (alt_arg, main_e->src);
- SET_PHI_ARG_DEF (l_phi, 0, exit_val);
+ gphi *vphi = get_virtual_phi (alt_loop_exit_block);
+ alt_arg = gimple_phi_result (vphi);
}
- SET_PHI_ARG_DEF (to_phi, main_e->dest_idx, alt_arg);
+ edge main_e = single_succ_edge (alt_loop_exit_block);
+ SET_PHI_ARG_DEF_ON_EDGE (to_phi, main_e, alt_arg);
}
-
- set_immediate_dominator (CDI_DOMINATORS, new_preheader,
- loop->header);
}
}
@@ -3262,7 +3252,8 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
{
e = loop_preheader_edge (loop);
edge exit_e = LOOP_VINFO_IV_EXIT (loop_vinfo);
- gcc_checking_assert (slpeel_can_duplicate_loop_p (loop, exit_e, e));
+ gcc_checking_assert (slpeel_can_duplicate_loop_p (loop, exit_e, e)
+ && !LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo));
/* Peel prolog and put it on preheader edge of loop. */
edge scalar_e = LOOP_VINFO_SCALAR_IV_EXIT (loop_vinfo);
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index fedecd6..18633fe 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -11837,6 +11837,12 @@ move_early_exit_stmts (loop_vec_info loop_vinfo)
gimple_set_vuse (p, vuse);
update_stmt (p);
}
+
+ /* And update the LC PHIs on exits. */
+ for (edge e : get_loop_exit_edges (LOOP_VINFO_LOOP (loop_vinfo)))
+ if (!dominated_by_p (CDI_DOMINATORS, e->src, dest_bb))
+ if (gphi *phi = get_virtual_phi (e->dest))
+ SET_PHI_ARG_DEF_ON_EDGE (phi, e, vuse);
}
/* Function vect_transform_loop.
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index e9b4da5..425b227 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2024-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/113409
+ * testsuite/libgomp.c/bitint-1.c: New test.
+
2024-01-11 Julian Brown <julian@codesourcery.com>
* libgomp.texi: C/C++ lvalues are supported now for map/to/from.
diff --git a/libgomp/testsuite/libgomp.c/bitint-1.c b/libgomp/testsuite/libgomp.c/bitint-1.c
new file mode 100644
index 0000000..4b55a19
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/bitint-1.c
@@ -0,0 +1,65 @@
+/* PR middle-end/113409 */
+/* { dg-do run { target bitint } } */
+
+extern void abort (void);
+
+#if __BITINT_MAXWIDTH__ >= 1023
+typedef _BitInt(931) B931;
+typedef _BitInt(1023) B1023;
+#else
+typedef _BitInt(31) B931;
+typedef _BitInt(63) B1023;
+#endif
+
+__attribute__((noipa)) B931
+bar (B931 x)
+{
+ return x;
+}
+
+B931
+foo (B931 x)
+{
+ B931 r = 0;
+ B1023 l = 56wb;
+ #pragma omp parallel for reduction(+: r) linear(l : 3wb)
+ for (B931 i = 0; i < x; ++i)
+ {
+ r += bar (i);
+ l += 3wb;
+ }
+ if (l != (B1023) 56wb + x * 3wb)
+ abort ();
+ return r;
+}
+
+B931
+baz (B931 a, B931 b, B931 c, B931 d, B931 e, B931 f)
+{
+ B931 r = 0;
+ #pragma omp parallel for collapse (2wb) reduction(+: r)
+ for (B931 i = a; i < b; i += c)
+ for (B931 j = d; j > e; j += f)
+{
+ r += (j - d) / f;
+__builtin_printf ("%d\n", (int) r);
+}
+ return r;
+}
+
+int
+main ()
+{
+ if (foo (16wb) != (B931) 15wb * 16wb / 2
+ || foo (256wb) != (B931) 255wb * 256wb / 2)
+ abort ();
+#if __BITINT_MAXWIDTH__ >= 1023
+ if (baz (5019676379303764570412381742937286053482001129028025397398691108125646744814606405323608429353439158482254231750681261083217232780938592007150824765654203477280876662295642053702075485153212701225737143207062700602509893062044376997132415613866154761073993220684129908568716699977wb,
+ 5019676379303764570412381742937286053482001129028025397398691108125646744814606405323608429353439158482254231750681261083217232780938592007150824765654203477280876662295642053702075485153212701225737143207062700602509893062044376997132415613866154761074023903103954348393149593648wb,
+ 398472984732984732894723wb,
+ 5145599438319070078334010989312672300490893251953772234670751860213136881221517063143096309285807356778798661066289865489661268190588670564647904159660341525674865064477335008915374460378741763629714814990575971883514175167056160470289039998140910732382754821232566561860399556131wb,
+ 5145599438319070078334010989312672300490893251953772234670751860213136881221517063143096309285807356778798661066289865489661268190588670564647904159660341525674865064477335008915374460378741763629714814990575971883514175167056160470289039995725068563774878643356388697468035164019wb,
+ -89475635874365784365784365347865347856wb) != (B931) 26wb * 27wb / 2wb * 77wb)
+ abort ();
+#endif
+}
diff --git a/libgrust/ChangeLog b/libgrust/ChangeLog
index fa9e210..0697468 100644
--- a/libgrust/ChangeLog
+++ b/libgrust/ChangeLog
@@ -1,3 +1,679 @@
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro_internal/proc_macro.h (enum ProcmacroTag): Add
+ explicit value for proc macro tag enum.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/bridge.rs: Add license text.
+ * libproc_macro/bridge/ffistring.rs: Likewise.
+ * libproc_macro/bridge/group.rs: Likewise.
+ * libproc_macro/bridge/ident.rs: Likewise.
+ * libproc_macro/bridge/literal.rs: Likewise.
+ * libproc_macro/bridge/punct.rs: Likewise.
+ * libproc_macro/bridge/span.rs: Likewise.
+ * libproc_macro/bridge/token_stream.rs: Likewise.
+ * libproc_macro/group.rs: Likewise.
+ * libproc_macro/ident.rs: Likewise.
+ * libproc_macro/lib.rs: Likewise.
+ * libproc_macro/literal.rs: Likewise.
+ * libproc_macro/punct.rs: Likewise.
+ * libproc_macro/span.rs: Likewise.
+ * libproc_macro/token_stream.rs: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro_internal/rust/bridge.rs: Moved to...
+ * libproc_macro/bridge.rs: ...here.
+ * libproc_macro_internal/rust/bridge/ffistring.rs: Moved to...
+ * libproc_macro/bridge/ffistring.rs: ...here.
+ * libproc_macro_internal/rust/bridge/group.rs: Moved to...
+ * libproc_macro/bridge/group.rs: ...here.
+ * libproc_macro_internal/rust/bridge/ident.rs: Moved to...
+ * libproc_macro/bridge/ident.rs: ...here.
+ * libproc_macro_internal/rust/bridge/literal.rs: Moved to...
+ * libproc_macro/bridge/literal.rs: ...here.
+ * libproc_macro_internal/rust/bridge/punct.rs: Moved to...
+ * libproc_macro/bridge/punct.rs: ...here.
+ * libproc_macro_internal/rust/bridge/span.rs: Moved to...
+ * libproc_macro/bridge/span.rs: ...here.
+ * libproc_macro_internal/rust/bridge/token_stream.rs: Moved to...
+ * libproc_macro/bridge/token_stream.rs: ...here.
+ * libproc_macro_internal/rust/group.rs: Moved to...
+ * libproc_macro/group.rs: ...here.
+ * libproc_macro_internal/rust/ident.rs: Moved to...
+ * libproc_macro/ident.rs: ...here.
+ * libproc_macro_internal/rust/lib.rs: Moved to...
+ * libproc_macro/lib.rs: ...here.
+ * libproc_macro_internal/rust/literal.rs: Moved to...
+ * libproc_macro/literal.rs: ...here.
+ * libproc_macro_internal/rust/punct.rs: Moved to...
+ * libproc_macro/punct.rs: ...here.
+ * libproc_macro_internal/rust/span.rs: Moved to...
+ * libproc_macro/span.rs: ...here.
+ * libproc_macro_internal/rust/token_stream.rs: Moved to...
+ * libproc_macro/token_stream.rs: ...here.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Makefile.am: Change library name.
+ * Makefile.in: Likewise.
+ * configure.ac: Likewise.
+ * configure: Regenerate.
+ * libproc_macro/Makefile.am: Moved to...
+ * libproc_macro_internal/Makefile.am: ...here.
+ * libproc_macro/Makefile.in: Moved to...
+ * libproc_macro_internal/Makefile.in: ...here.
+ * libproc_macro/bridge.h: Moved to...
+ * libproc_macro_internal/bridge.h: ...here.
+ * libproc_macro/ffistring.cc: Moved to...
+ * libproc_macro_internal/ffistring.cc: ...here.
+ * libproc_macro/ffistring.h: Moved to...
+ * libproc_macro_internal/ffistring.h: ...here.
+ * libproc_macro/group.cc: Moved to...
+ * libproc_macro_internal/group.cc: ...here.
+ * libproc_macro/group.h: Moved to...
+ * libproc_macro_internal/group.h: ...here.
+ * libproc_macro/ident.cc: Moved to...
+ * libproc_macro_internal/ident.cc: ...here.
+ * libproc_macro/ident.h: Moved to...
+ * libproc_macro_internal/ident.h: ...here.
+ * libproc_macro/literal.cc: Moved to...
+ * libproc_macro_internal/literal.cc: ...here.
+ * libproc_macro/literal.h: Moved to...
+ * libproc_macro_internal/literal.h: ...here.
+ * libproc_macro/proc_macro.cc: Moved to...
+ * libproc_macro_internal/proc_macro.cc: ...here.
+ * libproc_macro/proc_macro.h: Moved to...
+ * libproc_macro_internal/proc_macro.h: ...here.
+ * libproc_macro/punct.cc: Moved to...
+ * libproc_macro_internal/punct.cc: ...here.
+ * libproc_macro/punct.h: Moved to...
+ * libproc_macro_internal/punct.h: ...here.
+ * libproc_macro/registration.h: Moved to...
+ * libproc_macro_internal/registration.h: ...here.
+ * libproc_macro/rust/bridge.rs: Moved to...
+ * libproc_macro_internal/rust/bridge.rs: ...here.
+ * libproc_macro/rust/bridge/ffistring.rs: Moved to...
+ * libproc_macro_internal/rust/bridge/ffistring.rs: ...here.
+ * libproc_macro/rust/bridge/group.rs: Moved to...
+ * libproc_macro_internal/rust/bridge/group.rs: ...here.
+ * libproc_macro/rust/bridge/ident.rs: Moved to...
+ * libproc_macro_internal/rust/bridge/ident.rs: ...here.
+ * libproc_macro/rust/bridge/literal.rs: Moved to...
+ * libproc_macro_internal/rust/bridge/literal.rs: ...here.
+ * libproc_macro/rust/bridge/punct.rs: Moved to...
+ * libproc_macro_internal/rust/bridge/punct.rs: ...here.
+ * libproc_macro/rust/bridge/span.rs: Moved to...
+ * libproc_macro_internal/rust/bridge/span.rs: ...here.
+ * libproc_macro/rust/bridge/token_stream.rs: Moved to...
+ * libproc_macro_internal/rust/bridge/token_stream.rs: ...here.
+ * libproc_macro/rust/group.rs: Moved to...
+ * libproc_macro_internal/rust/group.rs: ...here.
+ * libproc_macro/rust/ident.rs: Moved to...
+ * libproc_macro_internal/rust/ident.rs: ...here.
+ * libproc_macro/rust/lib.rs: Moved to...
+ * libproc_macro_internal/rust/lib.rs: ...here.
+ * libproc_macro/rust/literal.rs: Moved to...
+ * libproc_macro_internal/rust/literal.rs: ...here.
+ * libproc_macro/rust/punct.rs: Moved to...
+ * libproc_macro_internal/rust/punct.rs: ...here.
+ * libproc_macro/rust/span.rs: Moved to...
+ * libproc_macro_internal/rust/span.rs: ...here.
+ * libproc_macro/rust/token_stream.rs: Moved to...
+ * libproc_macro_internal/rust/token_stream.rs: ...here.
+ * libproc_macro/span.cc: Moved to...
+ * libproc_macro_internal/span.cc: ...here.
+ * libproc_macro/span.h: Moved to...
+ * libproc_macro_internal/span.h: ...here.
+ * libproc_macro/tokenstream.cc: Moved to...
+ * libproc_macro_internal/tokenstream.cc: ...here.
+ * libproc_macro/tokenstream.h: Moved to...
+ * libproc_macro_internal/tokenstream.h: ...here.
+ * libproc_macro/tokentree.cc: Moved to...
+ * libproc_macro_internal/tokentree.cc: ...here.
+ * libproc_macro/tokentree.h: Moved to...
+ * libproc_macro_internal/tokentree.h: ...here.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/literal.cc (Literal__from_string): Add
+ implementation with call to constructor.
+ (Literal::make_literal): Add new constructor which calls the
+ callback.
+ * libproc_macro/literal.h: Add new constructor's
+ prototype.
+ * libproc_macro/proc_macro.cc (bridge_is_available):
+ Change symbol name to match convention.
+ * libproc_macro/registration.h: Add lit_from_str
+ symbol.
+ * libproc_macro/tokenstream.cc (TokenStream::make_tokenstream):
+ Change symbol name to disambiguate with literal from string.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.cc: Remove type alias.
+ * libproc_macro/registration.h: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.h (proc_macro_register_from_str):
+ Remove rogue function prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.cc (not_available): Remove
+ function.
+ * libproc_macro/proc_macro.h (not_available): Remove
+ function prototype.
+ * libproc_macro/registration.h: Change symbol type.
+ * libproc_macro/bridge.h: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.cc (bridge_is_available):
+ Add bridge function.
+ * libproc_macro/proc_macro.h (bridge_is_available):
+ Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.cc (not_available): Add a
+ function to express bridge unavailability.
+ * libproc_macro/proc_macro.h (not_available): Likewise.
+ * libproc_macro/registration.h: Add symbol type.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.cc (Procmacro::make_bang):
+ Change symbol name.
+ * libproc_macro/registration.h: Likewise.
+ * libproc_macro/tokenstream.cc (TokenStream::make_tokenstream): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/literal.cc (Literal__from_string):
+ Update to match rust interface.
+ * libproc_macro/literal.h (Literal__from_string):
+ Likewise.
+ * libproc_macro/tokenstream.cc (TokenStream__from_string):
+ Likewise.
+ * libproc_macro/tokenstream.h (TokenStream__from_string):
+ Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/rust/bridge/literal.rs: Change extern C
+ function argument from raw string pointer and length to
+ FFIString.
+ * libproc_macro/rust/bridge/token_stream.rs: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/rust/bridge/ident.rs: Change raw
+ pointer string with an FFIString.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/ident.cc (Ident__new): Constructor
+ accepts an FFIString now.
+ (Ident__new_raw): Likewise.
+ (Ident::clone): Internal members change means clone also change.
+ (Ident::make_ident): Change constructor call.
+ (Ident::drop): Add call to FFIString::clone.
+ * libproc_macro/ident.h (struct Ident): Remove raw
+ pointer and length, add an FFIString inside instead.
+ (Ident__new): Change constructor.
+ (Ident__new_raw): Change constructor.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.cc (proc_macro_register_from_str):
+ Add registration function.
+ * libproc_macro/proc_macro.h (proc_macro_register_from_str):
+ Add registration function prototype.
+ * libproc_macro/tokenstream.cc (TokenStream::make_tokenstream):
+ Add a new constructor from a string that uses the registered
+ callback.
+ (TokenStream__from_string): Add call to new constructor.
+ * libproc_macro/tokenstream.h: Add registration
+ declaration.
+ * libproc_macro/registration.h: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/ffistring.cc (FFIString::make_ffistring):
+ Add explicit sizeof and utf-8 warning.
+ (FFIString::clone): Add explicit sizeof and utf-8 warning.
+ * libproc_macro/ident.cc (Ident::clone): Likewise.
+ (Ident::make_ident): Likewise.
+ * libproc_macro/tokenstream.cc (TokenStream::grow):
+ Fix vector growth.
+ (TokenStream__clone): Add explicit sizeof.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/tokenstream.cc (TokenStream::grow): Add
+ minimum growing capacity.
+ (TokenStream::push): Change condition.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.h (struct CustomDerivePayload):
+ Rename from CustomDerivePayload to...
+ (struct CustomDerive): ... CustomDerive
+ (struct AttrPayload): Rename from AttrPayload to ...
+ (struct Attribute): ... Attribute
+ (struct BangPayload): Rename from BangPayload to ...
+ (struct Bang): ... Bang
+ (union ProcmacroPayload): Update union with new names.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.h (struct ProcmacroArray):
+ Add ProcmacroArray definition.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/Makefile.am: Add span.cc
+ * libproc_macro/Makefile.in: Regenerate.
+ * libproc_macro/span.cc: New file.
+ * libproc_macro/span.h: New file.
+ * libproc_macro/group.cc (Group::make_group): Add span
+ argument.
+ * libproc_macro/group.h (GROUP_H): Add include
+ directive for spans.
+ * libproc_macro/ident.cc (Ident__new): Add span
+ argument.
+ (Ident__new_raw): Likewise.
+ (Ident::make_ident): Likewise.
+ * libproc_macro/ident.h (Ident__new): Likewise.
+ (Ident__new_raw): Likewise.
+ * libproc_macro/literal.cc (Literal::clone): Clone the
+ span.
+ (Literal::make_literal): Add span argument.
+ (Literal::make_u8): Likewise.
+ (Literal::make_u16): Likewise.
+ (Literal::make_u32): Likewise.
+ (Literal::make_u64): Likewise.
+ (Literal::make_i8): Likewise.
+ (Literal::make_i16): Likewise.
+ (Literal::make_i32): Likewise.
+ (Literal::make_i64): Likewise.
+ (Literal::make_string): Likewise.
+ (Literal::make_byte_string): Likewise.
+ (Literal::make_f32): Likewise.
+ (Literal::make_f64): Likewise.
+ (Literal::make_char): Likewise.
+ (Literal::make_usize): Likewise.
+ (Literal::make_isize): Likewise.
+ * libproc_macro/literal.h (struct Literal): Add span to
+ Literal structure.
+ * libproc_macro/punct.cc (Punct::make_punct): Add span
+ argument to punct constructor.
+ * libproc_macro/punct.h (struct Punct): Add span to
+ Punct structure.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/rust/bridge/group.rs: Add span member
+ to the Group structure.
+ * libproc_macro/rust/bridge/ident.rs: Likewise with the
+ Ident structure.
+ * libproc_macro/rust/bridge/literal.rs: Likewise with
+ the Literal structure.
+ * libproc_macro/rust/bridge/punct.rs: Likewise with the
+ Punct structure.
+ * libproc_macro/rust/bridge/span.rs: Add span
+ internals.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/rust/bridge/ffistring.rs: Implement
+ From trait for FFIString.
+ * libproc_macro/rust/bridge/literal.rs: Change
+ constructor call.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/ffistring.cc (FFIString::make_ffistring):
+ Add copy from source pointer.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/literal.h: Remove has_suffix member
+ attribute from Literal.
+ * libproc_macro/literal.cc: Update constructors.
+ * libproc_macro/rust/bridge/literal.rs: Remove
+ has_suffix attribute from Literal.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/Makefile.am: Add ffistring unit to
+ compiled objects list.
+ * libproc_macro/Makefile.in: Regenerate.
+ * libproc_macro/literal.cc (Literal::drop): Change with
+ a call to ffistring drop function.
+ (Literal::make_literal): Add new helper constructor
+ (Literal__drop): Remove this function.
+ (Literal__string): Likewise.
+ (Literal__byte_string): Likewise.
+ (Literal__from_string): Moved this function.
+ (Literal::make_unsigned): Changed the constructor to match the
+ new layout.
+ (Literal::make_signed): Likewise.
+ (Literal::clone): Reimplement th eclone function.
+ (Literal::make_u8): Changed the constructor, make suffixed by
+ default.
+ (Literal::make_u16): Likewise.
+ (Literal::make_u32): Likewise.
+ (Literal::make_u64): Likewise.
+ (Literal::make_i8): Likewise.
+ (Literal::make_i16): Likewise.
+ (Literal::make_i32): Likewise.
+ (Literal::make_i64): Likewise.
+ (Literal::make_string): Likewise.
+ (Literal::make_byte_string): Likewise.
+ (Literal::make_f32): Likewise.
+ (Literal::make_f64): Likewise.
+ (Literal::make_char): Likewise.
+ (Literal::make_usize): Likewise.
+ (Literal::make_isize): Likewise.
+ (LitKind::make_byte): Add new helper constructor to avoid having
+ to set the payload value.
+ (LitKind::make_char): Likewise.
+ (LitKind::make_integer): Likewise.
+ (LitKind::make_float): Likewise.
+ (LitKind::make_str): Likewise.
+ (LitKind::make_str_raw): Add a new helper constructor which
+ takes the payload value as an argument.
+ (LitKind::make_byte_str): Add new helper constructor to avoid
+ mistakes with payload value.
+ (LitKind::make_byte_str_raw): Add a new helper constructor which
+ takes the payload value as an argument.
+ * libproc_macro/literal.h: Add new functions prototype.
+ (enum UnsignedTag): Removed because it is now unused.
+ (struct Payload128): Likewise.
+ (union UnsignedPayload): Likewise.
+ (struct Unsigned): Likewise.
+ (enum SignedTag): Likewise.
+ (union SignedPayload): Likewise.
+ (struct Signed): Likewise.
+ (enum LiteralTag): Likewise.
+ (enum LitKindTag): Likewise.
+ (struct StringPayload): Likewise.
+ (struct ByteStringPayload): Likewise.
+ (union LitKindPayload): Likewise.
+ (struct UnsignedSuffixPayload): Likewise.
+ (struct LitKind): Add new literal kind struct representation to
+ match the enum on rust side.
+ (struct SignedSuffixPayload): Removed because now unused.
+ (struct UsizePayload): Likewise.
+ (struct IsizePayload): Likewise.
+ (struct Float32Payload): Likewise.
+ (struct Float64Payload): Likewise.
+ (union LiteralPayload): Likewise.
+ (struct Literal): Changed the internals of the structure.
+ (Literal__drop): Removed the drop function fom the c interface.
+ (Literal__string): Removed unused function.
+ (Literal__byte_string): Removed unused function.
+ * libproc_macro/ffistring.cc: New file.
+ * libproc_macro/ffistring.h: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/rust/bridge.rs: Add ffistring module.
+ * libproc_macro/rust/bridge/literal.rs: Rework type
+ internals.
+ * libproc_macro/rust/bridge/ffistring.rs: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.cc (Procmacro::make_derive):
+ Add custom derive macro constructor.
+ (Procmacro::make_attribute): Add attribute macro constructor.
+ (Procmacro::make_bang): Add bang macro constructor.
+ * libproc_macro/proc_macro.h (struct Procmacro):
+ Add helper function prototypes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.h (struct CustomDerivePayload):
+ Add C compatible payload structure.
+ (struct AttrPayload): Likewise.
+ (struct BangPayload): Likewise.
+ (enum ProcmacroTag): Add tag for tagged union.
+ (union ProcmacroPayload): Proc macro payload union.
+ (struct Procmacro): Tagged union.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.h: Add Literal, Punct,
+ Group, TokenTree and Tokenstream headers.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Makefile.am: Remove libtool forwarding.
+ * Makefile.in: Regenerate.
+ * libproc_macro/Makefile.am: Creates an archive instead
+ of using libtool.
+ * libproc_macro/Makefile.in: Regenerate.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/group.cc (Group::make_group): Remove
+ internal namespace.
+ (Group::drop): Likewise.
+ * libproc_macro/group.h (enum Delimiter): Make members
+ upercase.
+ (struct Group):
+ * libproc_macro/ident.cc (Ident::drop): Remove internal
+ namespace.
+ * libproc_macro/ident.h (Ident__clone): Likewise.
+ * libproc_macro/literal.cc (Literal::make_isize):
+ Likewise.
+ * libproc_macro/literal.h (union LiteralPayload):
+ Likewise.
+ (Literal__from_string): Likewise.
+ * libproc_macro/punct.cc (Punct::make_punct): Likewise.
+ * libproc_macro/punct.h (enum Spacing): Make members
+ uppercase.
+ * libproc_macro/tokenstream.cc (TokenStream::make_tokenstream):
+ Remove internal namespace.
+ (TokenStream::grow): Likewise.
+ (TokenStream::push): Likewise.
+ (TokenSream__push): Likewise.
+ (TokenStream__clone): Likewise.
+ (TokenStream__drop): Likewise.
+ * libproc_macro/tokenstream.h (struct TokenStream):
+ Likewise.
+ (TokenSream__push): Likewise.
+ (TokenStream__drop): Likewise.
+ * libproc_macro/tokentree.cc (TokenTree::make_tokentree):
+ Likewise.
+ (TokenTree::drop): Likewise.
+ * libproc_macro/tokentree.h (union TokenTreePayload):
+ Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/group.cc (Group::drop): Add Procmacro
+ namespace.
+ * libproc_macro/group.h: Likewise.
+ * libproc_macro/ident.cc (Ident::drop): Likewise.
+ * libproc_macro/ident.h (Ident__clone): Likewise.
+ * libproc_macro/literal.cc (Literal::make_isize):
+ Likewise.
+ * libproc_macro/literal.h (Literal__from_string):
+ Likewise.
+ * libproc_macro/punct.cc (Punct::make_punct): Likewise.
+ * libproc_macro/punct.h: Likewise.
+ * libproc_macro/tokenstream.cc (TokenStream__drop):
+ Likewise.
+ * libproc_macro/tokenstream.h (TokenStream__drop):
+ Likewise.
+ * libproc_macro/tokentree.cc (TokenTree::drop):
+ Likewise.
+ * libproc_macro/tokentree.h: Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/literal.cc (Literal::drop): Change
+ delete operator to delete[].
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/rust/bridge/token_stream.rs: Implement
+ drop.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/group.cc (Group::drop): Add drop
+ implementation.
+ * libproc_macro/group.h: Add drop prototype.
+ * libproc_macro/tokenstream.cc (TokenStream::drop): Add
+ drop implementation.
+ (TokenStream__drop): Change to a call to TokenStream::drop.
+ * libproc_macro/tokenstream.h: Add drop prototype.
+ * libproc_macro/tokentree.cc (TokenTree::drop): Add
+ drop implementation.
+ * libproc_macro/tokentree.h: Add drop prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/literal.cc (Literal__drop): Replace
+ implementation by a call to Literal::drop.
+ (Literal::drop): Add drop implementation.
+ * libproc_macro/literal.h: Add function prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/ident.cc (Ident__drop): Replace by call
+ to Ident::drop.
+ (Ident::drop): Add drop function.
+ * libproc_macro/ident.h: Add drop prototype.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/group.cc: New file.
+ * libproc_macro/group.h: New file.
+ * libproc_macro/tokenstream.cc: New file.
+ * libproc_macro/tokenstream.h: New file.
+ * libproc_macro/tokentree.cc: New file.
+ * libproc_macro/tokentree.h: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/punct.cc: New file.
+ * libproc_macro/punct.h: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/ident.cc (Ident::make_ident): Add Ident
+ namespace.
+ * libproc_macro/ident.h (Ident__clone): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/ident.cc (Ident__new): Use named
+ constructor.
+ (Ident__new_raw): Use named constructor.
+ (Ident__clone): Use clone member function.
+ (Ident::clone): Make clone const.
+ (Ident::make_ident): Add named construcot.
+ * libproc_macro/ident.h (struct Ident): Add named
+ constructor prototypes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/rust/bridge/ident.rs: Change drop
+ function interface.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/ident.cc: New file.
+ * libproc_macro/ident.h: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/literal.cc (Literal__string): Add call
+ to named constructor.
+ (Literal__byte_string): Likewise.
+ (Literal::make_unsigned): Add function.
+ (Literal::make_signed): Add function.
+ (Literal::clone): Likewise.
+ (Literal::make_u8): Likewise.
+ (Literal::make_u16): Likewise.
+ (Literal::make_u32): Likewise.
+ (Literal::make_u64): Likewise.
+ (Literal::make_i8): Likewise.
+ (Literal::make_i16): Likewise.
+ (Literal::make_i32): Likewise.
+ (Literal::make_i64): Likewise.
+ (Literal::make_string): Likewise.
+ (Literal::make_byte_string): Likewise.
+ (Literal::make_f32): Likewise.
+ (Literal::make_f64): Likewise.
+ (make_char): Likewise.
+ (Literal::make_char): Likewise.
+ (make_usize): Likewise.
+ (Literal::make_usize): Likewise.
+ (make_isize): Likewise.
+ (Literal::make_isize): Likewise.
+ * libproc_macro/literal.h: Add prototypes.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/literal.cc (Literal__from_string):
+ Add abort because unimplemented.
+ * libproc_macro/literal.h (Literal__from_string): Add
+ namespace.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/rust/bridge/literal.rs: Make the
+ pointer mutable.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/literal.h (Literal__drop): Implement
+ drop.
+ (Literal__string): Constructor from a string function prototype.
+ (Literal__byte_string): Constructor from a byte string function
+ prototype.
+ (Literal__from_string): Add function body, no implementation
+ yet.
+ * libproc_macro/literal.cc: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.h (PROC_MACRO_H): Add
+ literal header include directive.
+ * libproc_macro/literal.h: New file.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/proc_macro.cc (test): Remove dummy
+ function.
+ * libproc_macro/proc_macro.h (test): Likewise.
+
+2024-01-16 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * libproc_macro/rust/bridge.rs: New file.
+ * libproc_macro/rust/bridge/group.rs: New file.
+ * libproc_macro/rust/bridge/ident.rs: New file.
+ * libproc_macro/rust/bridge/literal.rs: New file.
+ * libproc_macro/rust/bridge/punct.rs: New file.
+ * libproc_macro/rust/bridge/span.rs: New file.
+ * libproc_macro/rust/bridge/token_stream.rs: New file.
+ * libproc_macro/rust/group.rs: New file.
+ * libproc_macro/rust/ident.rs: New file.
+ * libproc_macro/rust/lib.rs: New file.
+ * libproc_macro/rust/literal.rs: New file.
+ * libproc_macro/rust/punct.rs: New file.
+ * libproc_macro/rust/span.rs: New file.
+ * libproc_macro/rust/token_stream.rs: New file.
+
2024-01-08 Thomas Schwinge <thomas@codesourcery.com>
PR rust/113056
diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog
index 68a8e7d..6eb6964 100644
--- a/libsanitizer/ChangeLog
+++ b/libsanitizer/ChangeLog
@@ -1,3 +1,10 @@
+2024-01-17 YunQiang Su <yunqiang.su@cipunited.com>
+
+ * interception/interception.h (substitution_##func_name):
+ Use macro C_ASM_TAIL_CALL.
+ * sanitizer_common/sanitizer_asm.h: Define C_ASM_TAIL_CALL
+ for MIPS with help of t9.
+
2024-01-02 Andreas Schwab <schwab@suse.de>
* configure.tgt (riscv64-*-linux*): Enable LSan and TSan.
diff --git a/libsanitizer/interception/interception.h b/libsanitizer/interception/interception.h
index 9d8b60b..58e9693 100644
--- a/libsanitizer/interception/interception.h
+++ b/libsanitizer/interception/interception.h
@@ -205,8 +205,9 @@ const interpose_substitution substitution_##func_name[] \
ASM_TYPE_FUNCTION_STR "\n" \
SANITIZER_STRINGIFY(TRAMPOLINE(func)) ":\n" \
SANITIZER_STRINGIFY(CFI_STARTPROC) "\n" \
- SANITIZER_STRINGIFY(ASM_TAIL_CALL) " __interceptor_" \
- SANITIZER_STRINGIFY(ASM_PREEMPTIBLE_SYM(func)) "\n" \
+ C_ASM_TAIL_CALL(SANITIZER_STRINGIFY(TRAMPOLINE(func)), \
+ "__interceptor_" \
+ SANITIZER_STRINGIFY(ASM_PREEMPTIBLE_SYM(func))) "\n" \
SANITIZER_STRINGIFY(CFI_ENDPROC) "\n" \
".size " SANITIZER_STRINGIFY(TRAMPOLINE(func)) ", " \
".-" SANITIZER_STRINGIFY(TRAMPOLINE(func)) "\n" \
diff --git a/libsanitizer/sanitizer_common/sanitizer_asm.h b/libsanitizer/sanitizer_common/sanitizer_asm.h
index bbb18cf..3af66a4 100644
--- a/libsanitizer/sanitizer_common/sanitizer_asm.h
+++ b/libsanitizer/sanitizer_common/sanitizer_asm.h
@@ -53,6 +53,29 @@
# define ASM_TAIL_CALL tail
#endif
+// Currently, almost all of the shared libraries rely on the value of
+// $t9 to get the address of current function, instead of PCREL, even
+// on MIPSr6. To be compatiable with them, we have to set $t9 properly.
+// MIPS uses GOT to get the address of preemptible functions.
+#if defined(__mips64)
+# define C_ASM_TAIL_CALL(t_func, i_func) \
+ "lui $t8, %hi(%neg(%gp_rel(" t_func ")))\n" \
+ "daddu $t8, $t8, $t9\n" \
+ "daddiu $t8, $t8, %lo(%neg(%gp_rel(" t_func ")))\n" \
+ "ld $t9, %got_disp(" i_func ")($t8)\n" \
+ "jr $t9\n"
+#elif defined(__mips__)
+# define C_ASM_TAIL_CALL(t_func, i_func) \
+ ".set noreorder\n" \
+ ".cpload $t9\n" \
+ ".set reorder\n" \
+ "lw $t9, %got(" i_func ")($gp)\n" \
+ "jr $t9\n"
+#elif defined(ASM_TAIL_CALL)
+# define C_ASM_TAIL_CALL(t_func, i_func) \
+ SANITIZER_STRINGIFY(ASM_TAIL_CALL) " " i_func
+#endif
+
#if defined(__ELF__) && defined(__x86_64__) || defined(__i386__) || \
defined(__riscv)
# define ASM_PREEMPTIBLE_SYM(sym) sym@plt
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index c2496d4..fb5474c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,52 @@
+2024-01-17 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/113318
+ * acinclude.m4 (GLIBCXX_CONFIGURE): Add c++26 directory.
+ (GLIBCXX_CHECK_TEXT_ENCODING): Define.
+ * config.h.in: Regenerate.
+ * configure: Regenerate.
+ * configure.ac: Use GLIBCXX_CHECK_TEXT_ENCODING.
+ * include/Makefile.am: Add new headers.
+ * include/Makefile.in: Regenerate.
+ * include/bits/locale_classes.h (locale::encoding): Declare new
+ member function.
+ * include/bits/unicode.h (__charset_alias_match): New function.
+ * include/bits/text_encoding-data.h: New file.
+ * include/bits/version.def (text_encoding): Define.
+ * include/bits/version.h: Regenerate.
+ * include/std/text_encoding: New file.
+ * src/Makefile.am: Add new subdirectory.
+ * src/Makefile.in: Regenerate.
+ * src/c++26/Makefile.am: New file.
+ * src/c++26/Makefile.in: New file.
+ * src/c++26/text_encoding.cc: New file.
+ * src/experimental/Makefile.am: Include c++26 convenience
+ library.
+ * src/experimental/Makefile.in: Regenerate.
+ * python/libstdcxx/v6/printers.py (StdTextEncodingPrinter): New
+ printer.
+ * scripts/gen_text_encoding_data.py: New file.
+ * testsuite/22_locale/locale/encoding.cc: New test.
+ * testsuite/ext/unicode/charset_alias_match.cc: New test.
+ * testsuite/std/text_encoding/cons.cc: New test.
+ * testsuite/std/text_encoding/members.cc: New test.
+ * testsuite/std/text_encoding/requirements.cc: New test.
+
+2024-01-17 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/unicode.h (_Grapheme_cluster_view): Require view.
+ Do not use CTAD for _Utf32_view.
+ (__format_width, __truncate): Do not use CTAD.
+ (enable_borrowed_range<_Utf_view<T, R>>): Define specialization.
+ (enable_borrowed_range<_Grapheme_cluster_view<R>>): Likewise.
+
+2024-01-17 Patrick Palka <ppalka@redhat.com>
+
+ * include/std/ranges (views::_CartesianProduct::operator()):
+ Adjust identity case as per P2540R1.
+ * testsuite/std/ranges/cartesian_product/1.cc (test01):
+ Adjust expected result of the identity case.
+
2024-01-15 Patrick Palka <ppalka@redhat.com>
* include/std/variant (__detail::__variant::_Variadic_union):
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index e7cbf0f..f9ba7ef 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -49,7 +49,7 @@ AC_DEFUN([GLIBCXX_CONFIGURE], [
# Keep these sync'd with the list in Makefile.am. The first provides an
# expandable list at autoconf time; the second provides an expandable list
# (i.e., shell variable) at configure time.
- m4_define([glibcxx_SUBDIRS],[include libsupc++ src src/c++98 src/c++11 src/c++17 src/c++20 src/c++23 src/filesystem src/libbacktrace src/experimental doc po testsuite python])
+ m4_define([glibcxx_SUBDIRS],[include libsupc++ src src/c++98 src/c++11 src/c++17 src/c++20 src/c++23 src/c++26 src/filesystem src/libbacktrace src/experimental doc po testsuite python])
SUBDIRS='glibcxx_SUBDIRS'
# These need to be absolute paths, yet at the same time need to
@@ -5821,6 +5821,34 @@ AC_LANG_SAVE
AC_LANG_RESTORE
])
+dnl
+dnl Check whether the dependencies for std::text_encoding are available.
+dnl
+dnl Defines:
+dnl _GLIBCXX_USE_NL_LANGINFO_L if nl_langinfo_l is in <langinfo.h>.
+dnl
+AC_DEFUN([GLIBCXX_CHECK_TEXT_ENCODING], [
+AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ AC_MSG_CHECKING([whether nl_langinfo_l is defined in <langinfo.h>])
+ AC_TRY_COMPILE([
+ #include <locale.h>
+ #include <langinfo.h>
+ ],[
+ locale_t loc = newlocale(LC_ALL_MASK, "", (locale_t)0);
+ const char* enc = nl_langinfo_l(CODESET, loc);
+ freelocale(loc);
+ ], [ac_nl_langinfo_l=yes], [ac_nl_langinfo_l=no])
+ AC_MSG_RESULT($ac_nl_langinfo_l)
+ if test "$ac_nl_langinfo_l" = yes; then
+ AC_DEFINE_UNQUOTED(_GLIBCXX_USE_NL_LANGINFO_L, 1,
+ [Define if nl_langinfo_l should be used for std::text_encoding.])
+ fi
+
+ AC_LANG_RESTORE
+])
+
# Macros from the top-level gcc directory.
m4_include([../config/gc++filt.m4])
m4_include([../config/tls.m4])
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 17da7bb..906e014 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -841,6 +841,9 @@
/* Define if NLS translations are to be used. */
#undef _GLIBCXX_USE_NLS
+/* Define if nl_langinfo_l should be used for std::text_encoding. */
+#undef _GLIBCXX_USE_NL_LANGINFO_L
+
/* Define if pthreads_num_processors_np is available in <pthread.h>. */
#undef _GLIBCXX_USE_PTHREADS_NUM_PROCESSORS_NP
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index bef2b84..65ce679 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -5529,7 +5529,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
# expandable list at autoconf time; the second provides an expandable list
# (i.e., shell variable) at configure time.
- SUBDIRS='include libsupc++ src src/c++98 src/c++11 src/c++17 src/c++20 src/c++23 src/filesystem src/libbacktrace src/experimental doc po testsuite python'
+ SUBDIRS='include libsupc++ src src/c++98 src/c++11 src/c++17 src/c++20 src/c++23 src/c++26 src/filesystem src/libbacktrace src/experimental doc po testsuite python'
# These need to be absolute paths, yet at the same time need to
# canonicalize only relative paths, because then amd will not unmount
@@ -54517,6 +54517,60 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+# For std::text_encoding
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether nl_langinfo_l is defined in <langinfo.h>" >&5
+$as_echo_n "checking whether nl_langinfo_l is defined in <langinfo.h>... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <locale.h>
+ #include <langinfo.h>
+
+int
+main ()
+{
+
+ locale_t loc = newlocale(LC_ALL_MASK, "", (locale_t)0);
+ const char* enc = nl_langinfo_l(CODESET, loc);
+ freelocale(loc);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_nl_langinfo_l=yes
+else
+ ac_nl_langinfo_l=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_nl_langinfo_l" >&5
+$as_echo "$ac_nl_langinfo_l" >&6; }
+ if test "$ac_nl_langinfo_l" = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define _GLIBCXX_USE_NL_LANGINFO_L 1
+_ACEOF
+
+ fi
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
# Define documentation rules conditionally.
# See if makeinfo has been installed and is modern enough
@@ -55637,7 +55691,7 @@ ac_config_files="$ac_config_files src/libbacktrace/backtrace-supported.h"
# append it here. Only modify Makefiles that have just been created.
#
# Also, get rid of this simulated-VPATH thing that automake does.
-ac_config_files="$ac_config_files include/Makefile libsupc++/Makefile src/Makefile src/c++98/Makefile src/c++11/Makefile src/c++17/Makefile src/c++20/Makefile src/c++23/Makefile src/filesystem/Makefile src/libbacktrace/Makefile src/experimental/Makefile doc/Makefile po/Makefile testsuite/Makefile python/Makefile"
+ac_config_files="$ac_config_files include/Makefile libsupc++/Makefile src/Makefile src/c++98/Makefile src/c++11/Makefile src/c++17/Makefile src/c++20/Makefile src/c++23/Makefile src/c++26/Makefile src/filesystem/Makefile src/libbacktrace/Makefile src/experimental/Makefile doc/Makefile po/Makefile testsuite/Makefile python/Makefile"
ac_config_commands="$ac_config_commands generate-headers"
@@ -56893,6 +56947,7 @@ do
"src/c++17/Makefile") CONFIG_FILES="$CONFIG_FILES src/c++17/Makefile" ;;
"src/c++20/Makefile") CONFIG_FILES="$CONFIG_FILES src/c++20/Makefile" ;;
"src/c++23/Makefile") CONFIG_FILES="$CONFIG_FILES src/c++23/Makefile" ;;
+ "src/c++26/Makefile") CONFIG_FILES="$CONFIG_FILES src/c++26/Makefile" ;;
"src/filesystem/Makefile") CONFIG_FILES="$CONFIG_FILES src/filesystem/Makefile" ;;
"src/libbacktrace/Makefile") CONFIG_FILES="$CONFIG_FILES src/libbacktrace/Makefile" ;;
"src/experimental/Makefile") CONFIG_FILES="$CONFIG_FILES src/experimental/Makefile" ;;
@@ -58404,6 +58459,17 @@ _EOF
. ${multi_basedir}/config-ml.in
{ ml_norecursion=; unset ml_norecursion;}
;;
+ "src/c++26/Makefile":F) cat > vpsed$$ << \_EOF
+s!`test -f '$<' || echo '$(srcdir)/'`!!
+_EOF
+ sed -f vpsed$$ $ac_file > tmp$$
+ mv tmp$$ $ac_file
+ rm vpsed$$
+ echo 'MULTISUBDIR =' >> $ac_file
+ ml_norecursion=yes
+ . ${multi_basedir}/config-ml.in
+ { ml_norecursion=; unset ml_norecursion;}
+ ;;
"src/filesystem/Makefile":F) cat > vpsed$$ << \_EOF
s!`test -f '$<' || echo '$(srcdir)/'`!!
_EOF
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index c8b3633..c68cac4 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -557,6 +557,9 @@ GLIBCXX_CHECK_INIT_PRIORITY
# For __basic_file::native_handle()
GLIBCXX_CHECK_FILEBUF_NATIVE_HANDLES
+# For std::text_encoding
+GLIBCXX_CHECK_TEXT_ENCODING
+
# Define documentation rules conditionally.
# See if makeinfo has been installed and is modern enough
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index c6d6a24..6415235 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -104,6 +104,7 @@ std_headers = \
${std_srcdir}/streambuf \
${std_srcdir}/string \
${std_srcdir}/system_error \
+ ${std_srcdir}/text_encoding \
${std_srcdir}/thread \
${std_srcdir}/unordered_map \
${std_srcdir}/unordered_set \
@@ -159,6 +160,7 @@ bits_freestanding = \
${bits_srcdir}/stl_raw_storage_iter.h \
${bits_srcdir}/stl_relops.h \
${bits_srcdir}/stl_uninitialized.h \
+ ${bits_srcdir}/text_encoding-data.h \
${bits_srcdir}/version.h \
${bits_srcdir}/string_view.tcc \
${bits_srcdir}/unicode.h \
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index 36bb9b0..5a965c8 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -460,6 +460,7 @@ std_freestanding = \
@GLIBCXX_HOSTED_TRUE@ ${std_srcdir}/streambuf \
@GLIBCXX_HOSTED_TRUE@ ${std_srcdir}/string \
@GLIBCXX_HOSTED_TRUE@ ${std_srcdir}/system_error \
+@GLIBCXX_HOSTED_TRUE@ ${std_srcdir}/text_encoding \
@GLIBCXX_HOSTED_TRUE@ ${std_srcdir}/thread \
@GLIBCXX_HOSTED_TRUE@ ${std_srcdir}/unordered_map \
@GLIBCXX_HOSTED_TRUE@ ${std_srcdir}/unordered_set \
@@ -514,6 +515,7 @@ bits_freestanding = \
${bits_srcdir}/stl_raw_storage_iter.h \
${bits_srcdir}/stl_relops.h \
${bits_srcdir}/stl_uninitialized.h \
+ ${bits_srcdir}/text_encoding-data.h \
${bits_srcdir}/version.h \
${bits_srcdir}/string_view.tcc \
${bits_srcdir}/unicode.h \
diff --git a/libstdc++-v3/include/bits/locale_classes.h b/libstdc++-v3/include/bits/locale_classes.h
index 621f2a2..a2e9421 100644
--- a/libstdc++-v3/include/bits/locale_classes.h
+++ b/libstdc++-v3/include/bits/locale_classes.h
@@ -40,6 +40,10 @@
#include <string>
#include <ext/atomicity.h>
+#ifdef __glibcxx_text_encoding
+#include <text_encoding>
+#endif
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -248,6 +252,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
string
name() const;
+#ifdef __glibcxx_text_encoding
+# if __CHAR_BIT__ == 8
+ text_encoding
+ encoding() const;
+# else
+ text_encoding
+ encoding() const = delete;
+# endif
+#endif
+
/**
* @brief Locale equality.
*
diff --git a/libstdc++-v3/include/bits/text_encoding-data.h b/libstdc++-v3/include/bits/text_encoding-data.h
new file mode 100644
index 0000000..7ac2e9d
--- /dev/null
+++ b/libstdc++-v3/include/bits/text_encoding-data.h
@@ -0,0 +1,902 @@
+// Generated by gen_text_encoding_data.py, do not edit.
+
+#ifndef _GLIBCXX_GET_ENCODING_DATA
+# error "This is not a public header, do not include it directly"
+#endif
+
+ { 3, "US-ASCII" },
+ { 3, "iso-ir-6" },
+ { 3, "ANSI_X3.4-1968" },
+ { 3, "ANSI_X3.4-1986" },
+ { 3, "ISO_646.irv:1991" },
+ { 3, "ISO646-US" },
+ { 3, "us" },
+ { 3, "IBM367" },
+ { 3, "cp367" },
+ { 3, "csASCII" },
+ { 4, "ISO_8859-1:1987" },
+ { 4, "iso-ir-100" },
+ { 4, "ISO_8859-1" },
+ { 4, "ISO-8859-1" },
+ { 4, "latin1" },
+ { 4, "l1" },
+ { 4, "IBM819" },
+ { 4, "CP819" },
+ { 4, "csISOLatin1" },
+ { 5, "ISO_8859-2:1987" },
+ { 5, "iso-ir-101" },
+ { 5, "ISO_8859-2" },
+ { 5, "ISO-8859-2" },
+ { 5, "latin2" },
+ { 5, "l2" },
+ { 5, "csISOLatin2" },
+ { 6, "ISO_8859-3:1988" },
+ { 6, "iso-ir-109" },
+ { 6, "ISO_8859-3" },
+ { 6, "ISO-8859-3" },
+ { 6, "latin3" },
+ { 6, "l3" },
+ { 6, "csISOLatin3" },
+ { 7, "ISO_8859-4:1988" },
+ { 7, "iso-ir-110" },
+ { 7, "ISO_8859-4" },
+ { 7, "ISO-8859-4" },
+ { 7, "latin4" },
+ { 7, "l4" },
+ { 7, "csISOLatin4" },
+ { 8, "ISO_8859-5:1988" },
+ { 8, "iso-ir-144" },
+ { 8, "ISO_8859-5" },
+ { 8, "ISO-8859-5" },
+ { 8, "cyrillic" },
+ { 8, "csISOLatinCyrillic" },
+ { 9, "ISO_8859-6:1987" },
+ { 9, "iso-ir-127" },
+ { 9, "ISO_8859-6" },
+ { 9, "ISO-8859-6" },
+ { 9, "ECMA-114" },
+ { 9, "ASMO-708" },
+ { 9, "arabic" },
+ { 9, "csISOLatinArabic" },
+ { 10, "ISO_8859-7:1987" },
+ { 10, "iso-ir-126" },
+ { 10, "ISO_8859-7" },
+ { 10, "ISO-8859-7" },
+ { 10, "ELOT_928" },
+ { 10, "ECMA-118" },
+ { 10, "greek" },
+ { 10, "greek8" },
+ { 10, "csISOLatinGreek" },
+ { 11, "ISO_8859-8:1988" },
+ { 11, "iso-ir-138" },
+ { 11, "ISO_8859-8" },
+ { 11, "ISO-8859-8" },
+ { 11, "hebrew" },
+ { 11, "csISOLatinHebrew" },
+ { 12, "ISO_8859-9:1989" },
+ { 12, "iso-ir-148" },
+ { 12, "ISO_8859-9" },
+ { 12, "ISO-8859-9" },
+ { 12, "latin5" },
+ { 12, "l5" },
+ { 12, "csISOLatin5" },
+ { 13, "ISO-8859-10" },
+ { 13, "iso-ir-157" },
+ { 13, "l6" },
+ { 13, "ISO_8859-10:1992" },
+ { 13, "csISOLatin6" },
+ { 13, "latin6" },
+ { 14, "ISO_6937-2-add" },
+ { 14, "iso-ir-142" },
+ { 14, "csISOTextComm" },
+ { 15, "JIS_X0201" },
+ { 15, "X0201" },
+ { 15, "csHalfWidthKatakana" },
+ { 16, "JIS_Encoding" },
+ { 16, "csJISEncoding" },
+ { 17, "Shift_JIS" },
+ { 17, "MS_Kanji" },
+ { 17, "csShiftJIS" },
+ { 18, "Extended_UNIX_Code_Packed_Format_for_Japanese" },
+ { 18, "csEUCPkdFmtJapanese" },
+ { 18, "EUC-JP" },
+ { 19, "Extended_UNIX_Code_Fixed_Width_for_Japanese" },
+ { 19, "csEUCFixWidJapanese" },
+ { 20, "BS_4730" },
+ { 20, "iso-ir-4" },
+ { 20, "ISO646-GB" },
+ { 20, "gb" },
+ { 20, "uk" },
+ { 20, "csISO4UnitedKingdom" },
+ { 21, "SEN_850200_C" },
+ { 21, "iso-ir-11" },
+ { 21, "ISO646-SE2" },
+ { 21, "se2" },
+ { 21, "csISO11SwedishForNames" },
+ { 22, "IT" },
+ { 22, "iso-ir-15" },
+ { 22, "ISO646-IT" },
+ { 22, "csISO15Italian" },
+ { 23, "ES" },
+ { 23, "iso-ir-17" },
+ { 23, "ISO646-ES" },
+ { 23, "csISO17Spanish" },
+ { 24, "DIN_66003" },
+ { 24, "iso-ir-21" },
+ { 24, "de" },
+ { 24, "ISO646-DE" },
+ { 24, "csISO21German" },
+ { 25, "NS_4551-1" },
+ { 25, "iso-ir-60" },
+ { 25, "ISO646-NO" },
+ { 25, "no" },
+ { 25, "csISO60DanishNorwegian" },
+ { 25, "csISO60Norwegian1" },
+ { 26, "NF_Z_62-010" },
+ { 26, "iso-ir-69" },
+ { 26, "ISO646-FR" },
+ { 26, "fr" },
+ { 26, "csISO69French" },
+ { 27, "ISO-10646-UTF-1" },
+ { 27, "csISO10646UTF1" },
+ { 28, "ISO_646.basic:1983" },
+ { 28, "ref" },
+ { 28, "csISO646basic1983" },
+ { 29, "INVARIANT" },
+ { 29, "csINVARIANT" },
+ { 30, "ISO_646.irv:1983" },
+ { 30, "iso-ir-2" },
+ { 30, "irv" },
+ { 30, "csISO2IntlRefVersion" },
+ { 31, "NATS-SEFI" },
+ { 31, "iso-ir-8-1" },
+ { 31, "csNATSSEFI" },
+ { 32, "NATS-SEFI-ADD" },
+ { 32, "iso-ir-8-2" },
+ { 32, "csNATSSEFIADD" },
+ { 35, "SEN_850200_B" },
+ { 35, "iso-ir-10" },
+ { 35, "FI" },
+ { 35, "ISO646-FI" },
+ { 35, "ISO646-SE" },
+ { 35, "se" },
+ { 35, "csISO10Swedish" },
+ { 36, "KS_C_5601-1987" },
+ { 36, "iso-ir-149" },
+ { 36, "KS_C_5601-1989" },
+ { 36, "KSC_5601" },
+ { 36, "korean" },
+ { 36, "csKSC56011987" },
+ { 37, "ISO-2022-KR" },
+ { 37, "csISO2022KR" },
+ { 38, "EUC-KR" },
+ { 38, "csEUCKR" },
+ { 39, "ISO-2022-JP" },
+ { 39, "csISO2022JP" },
+ { 40, "ISO-2022-JP-2" },
+ { 40, "csISO2022JP2" },
+ { 41, "JIS_C6220-1969-jp" },
+ { 41, "JIS_C6220-1969" },
+ { 41, "iso-ir-13" },
+ { 41, "katakana" },
+ { 41, "x0201-7" },
+ { 41, "csISO13JISC6220jp" },
+ { 42, "JIS_C6220-1969-ro" },
+ { 42, "iso-ir-14" },
+ { 42, "jp" },
+ { 42, "ISO646-JP" },
+ { 42, "csISO14JISC6220ro" },
+ { 43, "PT" },
+ { 43, "iso-ir-16" },
+ { 43, "ISO646-PT" },
+ { 43, "csISO16Portuguese" },
+ { 44, "greek7-old" },
+ { 44, "iso-ir-18" },
+ { 44, "csISO18Greek7Old" },
+ { 45, "latin-greek" },
+ { 45, "iso-ir-19" },
+ { 45, "csISO19LatinGreek" },
+ { 46, "NF_Z_62-010_(1973)" },
+ { 46, "iso-ir-25" },
+ { 46, "ISO646-FR1" },
+ { 46, "csISO25French" },
+ { 47, "Latin-greek-1" },
+ { 47, "iso-ir-27" },
+ { 47, "csISO27LatinGreek1" },
+ { 48, "ISO_5427" },
+ { 48, "iso-ir-37" },
+ { 48, "csISO5427Cyrillic" },
+ { 49, "JIS_C6226-1978" },
+ { 49, "iso-ir-42" },
+ { 49, "csISO42JISC62261978" },
+ { 50, "BS_viewdata" },
+ { 50, "iso-ir-47" },
+ { 50, "csISO47BSViewdata" },
+ { 51, "INIS" },
+ { 51, "iso-ir-49" },
+ { 51, "csISO49INIS" },
+ { 52, "INIS-8" },
+ { 52, "iso-ir-50" },
+ { 52, "csISO50INIS8" },
+ { 53, "INIS-cyrillic" },
+ { 53, "iso-ir-51" },
+ { 53, "csISO51INISCyrillic" },
+ { 54, "ISO_5427:1981" },
+ { 54, "iso-ir-54" },
+ { 54, "ISO5427Cyrillic1981" },
+ { 54, "csISO54271981" },
+ { 55, "ISO_5428:1980" },
+ { 55, "iso-ir-55" },
+ { 55, "csISO5428Greek" },
+ { 56, "GB_1988-80" },
+ { 56, "iso-ir-57" },
+ { 56, "cn" },
+ { 56, "ISO646-CN" },
+ { 56, "csISO57GB1988" },
+ { 57, "GB_2312-80" },
+ { 57, "iso-ir-58" },
+ { 57, "chinese" },
+ { 57, "csISO58GB231280" },
+ { 58, "NS_4551-2" },
+ { 58, "ISO646-NO2" },
+ { 58, "iso-ir-61" },
+ { 58, "no2" },
+ { 58, "csISO61Norwegian2" },
+ { 59, "videotex-suppl" },
+ { 59, "iso-ir-70" },
+ { 59, "csISO70VideotexSupp1" },
+ { 60, "PT2" },
+ { 60, "iso-ir-84" },
+ { 60, "ISO646-PT2" },
+ { 60, "csISO84Portuguese2" },
+ { 61, "ES2" },
+ { 61, "iso-ir-85" },
+ { 61, "ISO646-ES2" },
+ { 61, "csISO85Spanish2" },
+ { 62, "MSZ_7795.3" },
+ { 62, "iso-ir-86" },
+ { 62, "ISO646-HU" },
+ { 62, "hu" },
+ { 62, "csISO86Hungarian" },
+ { 63, "JIS_C6226-1983" },
+ { 63, "iso-ir-87" },
+ { 63, "x0208" },
+ { 63, "JIS_X0208-1983" },
+ { 63, "csISO87JISX0208" },
+ { 64, "greek7" },
+ { 64, "iso-ir-88" },
+ { 64, "csISO88Greek7" },
+ { 65, "ASMO_449" },
+ { 65, "ISO_9036" },
+ { 65, "arabic7" },
+ { 65, "iso-ir-89" },
+ { 65, "csISO89ASMO449" },
+ { 66, "iso-ir-90" },
+ { 66, "csISO90" },
+ { 67, "JIS_C6229-1984-a" },
+ { 67, "iso-ir-91" },
+ { 67, "jp-ocr-a" },
+ { 67, "csISO91JISC62291984a" },
+ { 68, "JIS_C6229-1984-b" },
+ { 68, "iso-ir-92" },
+ { 68, "ISO646-JP-OCR-B" },
+ { 68, "jp-ocr-b" },
+ { 68, "csISO92JISC62991984b" },
+ { 69, "JIS_C6229-1984-b-add" },
+ { 69, "iso-ir-93" },
+ { 69, "jp-ocr-b-add" },
+ { 69, "csISO93JIS62291984badd" },
+ { 70, "JIS_C6229-1984-hand" },
+ { 70, "iso-ir-94" },
+ { 70, "jp-ocr-hand" },
+ { 70, "csISO94JIS62291984hand" },
+ { 71, "JIS_C6229-1984-hand-add" },
+ { 71, "iso-ir-95" },
+ { 71, "jp-ocr-hand-add" },
+ { 71, "csISO95JIS62291984handadd" },
+ { 72, "JIS_C6229-1984-kana" },
+ { 72, "iso-ir-96" },
+ { 72, "csISO96JISC62291984kana" },
+ { 73, "ISO_2033-1983" },
+ { 73, "iso-ir-98" },
+ { 73, "e13b" },
+ { 73, "csISO2033" },
+ { 74, "ANSI_X3.110-1983" },
+ { 74, "iso-ir-99" },
+ { 74, "CSA_T500-1983" },
+ { 74, "NAPLPS" },
+ { 74, "csISO99NAPLPS" },
+ { 75, "T.61-7bit" },
+ { 75, "iso-ir-102" },
+ { 75, "csISO102T617bit" },
+ { 76, "T.61-8bit" },
+ { 76, "T.61" },
+ { 76, "iso-ir-103" },
+ { 76, "csISO103T618bit" },
+ { 77, "ECMA-cyrillic" },
+ { 77, "iso-ir-111" },
+ { 77, "KOI8-E" },
+ { 77, "csISO111ECMACyrillic" },
+ { 78, "CSA_Z243.4-1985-1" },
+ { 78, "iso-ir-121" },
+ { 78, "ISO646-CA" },
+ { 78, "csa7-1" },
+ { 78, "csa71" },
+ { 78, "ca" },
+ { 78, "csISO121Canadian1" },
+ { 79, "CSA_Z243.4-1985-2" },
+ { 79, "iso-ir-122" },
+ { 79, "ISO646-CA2" },
+ { 79, "csa7-2" },
+ { 79, "csa72" },
+ { 79, "csISO122Canadian2" },
+ { 80, "CSA_Z243.4-1985-gr" },
+ { 80, "iso-ir-123" },
+ { 80, "csISO123CSAZ24341985gr" },
+ { 81, "ISO_8859-6-E" },
+ { 81, "csISO88596E" },
+ { 81, "ISO-8859-6-E" },
+ { 82, "ISO_8859-6-I" },
+ { 82, "csISO88596I" },
+ { 82, "ISO-8859-6-I" },
+ { 83, "T.101-G2" },
+ { 83, "iso-ir-128" },
+ { 83, "csISO128T101G2" },
+ { 84, "ISO_8859-8-E" },
+ { 84, "csISO88598E" },
+ { 84, "ISO-8859-8-E" },
+ { 85, "ISO_8859-8-I" },
+ { 85, "csISO88598I" },
+ { 85, "ISO-8859-8-I" },
+ { 86, "CSN_369103" },
+ { 86, "iso-ir-139" },
+ { 86, "csISO139CSN369103" },
+ { 87, "JUS_I.B1.002" },
+ { 87, "iso-ir-141" },
+ { 87, "ISO646-YU" },
+ { 87, "js" },
+ { 87, "yu" },
+ { 87, "csISO141JUSIB1002" },
+ { 88, "IEC_P27-1" },
+ { 88, "iso-ir-143" },
+ { 88, "csISO143IECP271" },
+ { 89, "JUS_I.B1.003-serb" },
+ { 89, "iso-ir-146" },
+ { 89, "serbian" },
+ { 89, "csISO146Serbian" },
+ { 90, "JUS_I.B1.003-mac" },
+ { 90, "macedonian" },
+ { 90, "iso-ir-147" },
+ { 90, "csISO147Macedonian" },
+ { 91, "greek-ccitt" },
+ { 91, "iso-ir-150" },
+ { 91, "csISO150" },
+ { 91, "csISO150GreekCCITT" },
+ { 92, "NC_NC00-10:81" },
+ { 92, "cuba" },
+ { 92, "iso-ir-151" },
+ { 92, "ISO646-CU" },
+ { 92, "csISO151Cuba" },
+ { 93, "ISO_6937-2-25" },
+ { 93, "iso-ir-152" },
+ { 93, "csISO6937Add" },
+ { 94, "GOST_19768-74" },
+ { 94, "ST_SEV_358-88" },
+ { 94, "iso-ir-153" },
+ { 94, "csISO153GOST1976874" },
+ { 95, "ISO_8859-supp" },
+ { 95, "iso-ir-154" },
+ { 95, "latin1-2-5" },
+ { 95, "csISO8859Supp" },
+ { 96, "ISO_10367-box" },
+ { 96, "iso-ir-155" },
+ { 96, "csISO10367Box" },
+ { 97, "latin-lap" },
+ { 97, "lap" },
+ { 97, "iso-ir-158" },
+ { 97, "csISO158Lap" },
+ { 98, "JIS_X0212-1990" },
+ { 98, "x0212" },
+ { 98, "iso-ir-159" },
+ { 98, "csISO159JISX02121990" },
+ { 99, "DS_2089" },
+ { 99, "DS2089" },
+ { 99, "ISO646-DK" },
+ { 99, "dk" },
+ { 99, "csISO646Danish" },
+ { 100, "us-dk" },
+ { 100, "csUSDK" },
+ { 101, "dk-us" },
+ { 101, "csDKUS" },
+ { 102, "KSC5636" },
+ { 102, "ISO646-KR" },
+ { 102, "csKSC5636" },
+ { 103, "UNICODE-1-1-UTF-7" },
+ { 103, "csUnicode11UTF7" },
+ { 104, "ISO-2022-CN" },
+ { 104, "csISO2022CN" },
+ { 105, "ISO-2022-CN-EXT" },
+ { 105, "csISO2022CNEXT" },
+#define _GLIBCXX_TEXT_ENCODING_UTF8_OFFSET 413
+ { 106, "UTF-8" },
+ { 106, "csUTF8" },
+ { 109, "ISO-8859-13" },
+ { 109, "csISO885913" },
+ { 110, "ISO-8859-14" },
+ { 110, "iso-ir-199" },
+ { 110, "ISO_8859-14:1998" },
+ { 110, "ISO_8859-14" },
+ { 110, "latin8" },
+ { 110, "iso-celtic" },
+ { 110, "l8" },
+ { 110, "csISO885914" },
+ { 111, "ISO-8859-15" },
+ { 111, "ISO_8859-15" },
+ { 111, "Latin-9" },
+ { 111, "csISO885915" },
+ { 112, "ISO-8859-16" },
+ { 112, "iso-ir-226" },
+ { 112, "ISO_8859-16:2001" },
+ { 112, "ISO_8859-16" },
+ { 112, "latin10" },
+ { 112, "l10" },
+ { 112, "csISO885916" },
+ { 113, "GBK" },
+ { 113, "CP936" },
+ { 113, "MS936" },
+ { 113, "windows-936" },
+ { 113, "csGBK" },
+ { 114, "GB18030" },
+ { 114, "csGB18030" },
+ { 115, "OSD_EBCDIC_DF04_15" },
+ { 115, "csOSDEBCDICDF0415" },
+ { 116, "OSD_EBCDIC_DF03_IRV" },
+ { 116, "csOSDEBCDICDF03IRV" },
+ { 117, "OSD_EBCDIC_DF04_1" },
+ { 117, "csOSDEBCDICDF041" },
+ { 118, "ISO-11548-1" },
+ { 118, "ISO_11548-1" },
+ { 118, "ISO_TR_11548-1" },
+ { 118, "csISO115481" },
+ { 119, "KZ-1048" },
+ { 119, "STRK1048-2002" },
+ { 119, "RK1048" },
+ { 119, "csKZ1048" },
+ { 1000, "ISO-10646-UCS-2" },
+ { 1000, "csUnicode" },
+ { 1001, "ISO-10646-UCS-4" },
+ { 1001, "csUCS4" },
+ { 1002, "ISO-10646-UCS-Basic" },
+ { 1002, "csUnicodeASCII" },
+ { 1003, "ISO-10646-Unicode-Latin1" },
+ { 1003, "csUnicodeLatin1" },
+ { 1003, "ISO-10646" },
+ { 1004, "ISO-10646-J-1" },
+ { 1004, "csUnicodeJapanese" },
+ { 1005, "ISO-Unicode-IBM-1261" },
+ { 1005, "csUnicodeIBM1261" },
+ { 1006, "ISO-Unicode-IBM-1268" },
+ { 1006, "csUnicodeIBM1268" },
+ { 1007, "ISO-Unicode-IBM-1276" },
+ { 1007, "csUnicodeIBM1276" },
+ { 1008, "ISO-Unicode-IBM-1264" },
+ { 1008, "csUnicodeIBM1264" },
+ { 1009, "ISO-Unicode-IBM-1265" },
+ { 1009, "csUnicodeIBM1265" },
+ { 1010, "UNICODE-1-1" },
+ { 1010, "csUnicode11" },
+ { 1011, "SCSU" },
+ { 1011, "csSCSU" },
+ { 1012, "UTF-7" },
+ { 1012, "csUTF7" },
+ { 1013, "UTF-16BE" },
+ { 1013, "csUTF16BE" },
+ { 1014, "UTF-16LE" },
+ { 1014, "csUTF16LE" },
+ { 1015, "UTF-16" },
+ { 1015, "csUTF16" },
+ { 1016, "CESU-8" },
+ { 1016, "csCESU8" },
+ { 1016, "csCESU-8" },
+ { 1017, "UTF-32" },
+ { 1017, "csUTF32" },
+ { 1018, "UTF-32BE" },
+ { 1018, "csUTF32BE" },
+ { 1019, "UTF-32LE" },
+ { 1019, "csUTF32LE" },
+ { 1020, "BOCU-1" },
+ { 1020, "csBOCU1" },
+ { 1020, "csBOCU-1" },
+ { 1021, "UTF-7-IMAP" },
+ { 1021, "csUTF7IMAP" },
+ { 2000, "ISO-8859-1-Windows-3.0-Latin-1" },
+ { 2000, "csWindows30Latin1" },
+ { 2001, "ISO-8859-1-Windows-3.1-Latin-1" },
+ { 2001, "csWindows31Latin1" },
+ { 2002, "ISO-8859-2-Windows-Latin-2" },
+ { 2002, "csWindows31Latin2" },
+ { 2003, "ISO-8859-9-Windows-Latin-5" },
+ { 2003, "csWindows31Latin5" },
+ { 2004, "hp-roman8" },
+ { 2004, "roman8" },
+ { 2004, "r8" },
+ { 2004, "csHPRoman8" },
+ { 2005, "Adobe-Standard-Encoding" },
+ { 2005, "csAdobeStandardEncoding" },
+ { 2006, "Ventura-US" },
+ { 2006, "csVenturaUS" },
+ { 2007, "Ventura-International" },
+ { 2007, "csVenturaInternational" },
+ { 2008, "DEC-MCS" },
+ { 2008, "dec" },
+ { 2008, "csDECMCS" },
+ { 2009, "IBM850" },
+ { 2009, "cp850" },
+ { 2009, "850" },
+ { 2009, "csPC850Multilingual" },
+ { 2010, "IBM852" },
+ { 2010, "cp852" },
+ { 2010, "852" },
+ { 2010, "csPCp852" },
+ { 2011, "IBM437" },
+ { 2011, "cp437" },
+ { 2011, "437" },
+ { 2011, "csPC8CodePage437" },
+ { 2012, "PC8-Danish-Norwegian" },
+ { 2012, "csPC8DanishNorwegian" },
+ { 2013, "IBM862" },
+ { 2013, "cp862" },
+ { 2013, "862" },
+ { 2013, "csPC862LatinHebrew" },
+ { 2014, "PC8-Turkish" },
+ { 2014, "csPC8Turkish" },
+ { 2015, "IBM-Symbols" },
+ { 2015, "csIBMSymbols" },
+ { 2016, "IBM-Thai" },
+ { 2016, "csIBMThai" },
+ { 2017, "HP-Legal" },
+ { 2017, "csHPLegal" },
+ { 2018, "HP-Pi-font" },
+ { 2018, "csHPPiFont" },
+ { 2019, "HP-Math8" },
+ { 2019, "csHPMath8" },
+ { 2020, "Adobe-Symbol-Encoding" },
+ { 2020, "csHPPSMath" },
+ { 2021, "HP-DeskTop" },
+ { 2021, "csHPDesktop" },
+ { 2022, "Ventura-Math" },
+ { 2022, "csVenturaMath" },
+ { 2023, "Microsoft-Publishing" },
+ { 2023, "csMicrosoftPublishing" },
+ { 2024, "Windows-31J" },
+ { 2024, "csWindows31J" },
+ { 2025, "GB2312" },
+ { 2025, "csGB2312" },
+ { 2026, "Big5" },
+ { 2026, "csBig5" },
+ { 2027, "macintosh" },
+ { 2027, "mac" },
+ { 2027, "csMacintosh" },
+ { 2028, "IBM037" },
+ { 2028, "cp037" },
+ { 2028, "ebcdic-cp-us" },
+ { 2028, "ebcdic-cp-ca" },
+ { 2028, "ebcdic-cp-wt" },
+ { 2028, "ebcdic-cp-nl" },
+ { 2028, "csIBM037" },
+ { 2029, "IBM038" },
+ { 2029, "EBCDIC-INT" },
+ { 2029, "cp038" },
+ { 2029, "csIBM038" },
+ { 2030, "IBM273" },
+ { 2030, "CP273" },
+ { 2030, "csIBM273" },
+ { 2031, "IBM274" },
+ { 2031, "EBCDIC-BE" },
+ { 2031, "CP274" },
+ { 2031, "csIBM274" },
+ { 2032, "IBM275" },
+ { 2032, "EBCDIC-BR" },
+ { 2032, "cp275" },
+ { 2032, "csIBM275" },
+ { 2033, "IBM277" },
+ { 2033, "EBCDIC-CP-DK" },
+ { 2033, "EBCDIC-CP-NO" },
+ { 2033, "csIBM277" },
+ { 2034, "IBM278" },
+ { 2034, "CP278" },
+ { 2034, "ebcdic-cp-fi" },
+ { 2034, "ebcdic-cp-se" },
+ { 2034, "csIBM278" },
+ { 2035, "IBM280" },
+ { 2035, "CP280" },
+ { 2035, "ebcdic-cp-it" },
+ { 2035, "csIBM280" },
+ { 2036, "IBM281" },
+ { 2036, "EBCDIC-JP-E" },
+ { 2036, "cp281" },
+ { 2036, "csIBM281" },
+ { 2037, "IBM284" },
+ { 2037, "CP284" },
+ { 2037, "ebcdic-cp-es" },
+ { 2037, "csIBM284" },
+ { 2038, "IBM285" },
+ { 2038, "CP285" },
+ { 2038, "ebcdic-cp-gb" },
+ { 2038, "csIBM285" },
+ { 2039, "IBM290" },
+ { 2039, "cp290" },
+ { 2039, "EBCDIC-JP-kana" },
+ { 2039, "csIBM290" },
+ { 2040, "IBM297" },
+ { 2040, "cp297" },
+ { 2040, "ebcdic-cp-fr" },
+ { 2040, "csIBM297" },
+ { 2041, "IBM420" },
+ { 2041, "cp420" },
+ { 2041, "ebcdic-cp-ar1" },
+ { 2041, "csIBM420" },
+ { 2042, "IBM423" },
+ { 2042, "cp423" },
+ { 2042, "ebcdic-cp-gr" },
+ { 2042, "csIBM423" },
+ { 2043, "IBM424" },
+ { 2043, "cp424" },
+ { 2043, "ebcdic-cp-he" },
+ { 2043, "csIBM424" },
+ { 2044, "IBM500" },
+ { 2044, "CP500" },
+ { 2044, "ebcdic-cp-be" },
+ { 2044, "ebcdic-cp-ch" },
+ { 2044, "csIBM500" },
+ { 2045, "IBM851" },
+ { 2045, "cp851" },
+ { 2045, "851" },
+ { 2045, "csIBM851" },
+ { 2046, "IBM855" },
+ { 2046, "cp855" },
+ { 2046, "855" },
+ { 2046, "csIBM855" },
+ { 2047, "IBM857" },
+ { 2047, "cp857" },
+ { 2047, "857" },
+ { 2047, "csIBM857" },
+ { 2048, "IBM860" },
+ { 2048, "cp860" },
+ { 2048, "860" },
+ { 2048, "csIBM860" },
+ { 2049, "IBM861" },
+ { 2049, "cp861" },
+ { 2049, "861" },
+ { 2049, "cp-is" },
+ { 2049, "csIBM861" },
+ { 2050, "IBM863" },
+ { 2050, "cp863" },
+ { 2050, "863" },
+ { 2050, "csIBM863" },
+ { 2051, "IBM864" },
+ { 2051, "cp864" },
+ { 2051, "csIBM864" },
+ { 2052, "IBM865" },
+ { 2052, "cp865" },
+ { 2052, "865" },
+ { 2052, "csIBM865" },
+ { 2053, "IBM868" },
+ { 2053, "CP868" },
+ { 2053, "cp-ar" },
+ { 2053, "csIBM868" },
+ { 2054, "IBM869" },
+ { 2054, "cp869" },
+ { 2054, "869" },
+ { 2054, "cp-gr" },
+ { 2054, "csIBM869" },
+ { 2055, "IBM870" },
+ { 2055, "CP870" },
+ { 2055, "ebcdic-cp-roece" },
+ { 2055, "ebcdic-cp-yu" },
+ { 2055, "csIBM870" },
+ { 2056, "IBM871" },
+ { 2056, "CP871" },
+ { 2056, "ebcdic-cp-is" },
+ { 2056, "csIBM871" },
+ { 2057, "IBM880" },
+ { 2057, "cp880" },
+ { 2057, "EBCDIC-Cyrillic" },
+ { 2057, "csIBM880" },
+ { 2058, "IBM891" },
+ { 2058, "cp891" },
+ { 2058, "csIBM891" },
+ { 2059, "IBM903" },
+ { 2059, "cp903" },
+ { 2059, "csIBM903" },
+ { 2060, "IBM904" },
+ { 2060, "cp904" },
+ { 2060, "904" },
+ { 2060, "csIBBM904" },
+ { 2061, "IBM905" },
+ { 2061, "CP905" },
+ { 2061, "ebcdic-cp-tr" },
+ { 2061, "csIBM905" },
+ { 2062, "IBM918" },
+ { 2062, "CP918" },
+ { 2062, "ebcdic-cp-ar2" },
+ { 2062, "csIBM918" },
+ { 2063, "IBM1026" },
+ { 2063, "CP1026" },
+ { 2063, "csIBM1026" },
+ { 2064, "EBCDIC-AT-DE" },
+ { 2064, "csIBMEBCDICATDE" },
+ { 2065, "EBCDIC-AT-DE-A" },
+ { 2065, "csEBCDICATDEA" },
+ { 2066, "EBCDIC-CA-FR" },
+ { 2066, "csEBCDICCAFR" },
+ { 2067, "EBCDIC-DK-NO" },
+ { 2067, "csEBCDICDKNO" },
+ { 2068, "EBCDIC-DK-NO-A" },
+ { 2068, "csEBCDICDKNOA" },
+ { 2069, "EBCDIC-FI-SE" },
+ { 2069, "csEBCDICFISE" },
+ { 2070, "EBCDIC-FI-SE-A" },
+ { 2070, "csEBCDICFISEA" },
+ { 2071, "EBCDIC-FR" },
+ { 2071, "csEBCDICFR" },
+ { 2072, "EBCDIC-IT" },
+ { 2072, "csEBCDICIT" },
+ { 2073, "EBCDIC-PT" },
+ { 2073, "csEBCDICPT" },
+ { 2074, "EBCDIC-ES" },
+ { 2074, "csEBCDICES" },
+ { 2075, "EBCDIC-ES-A" },
+ { 2075, "csEBCDICESA" },
+ { 2076, "EBCDIC-ES-S" },
+ { 2076, "csEBCDICESS" },
+ { 2077, "EBCDIC-UK" },
+ { 2077, "csEBCDICUK" },
+ { 2078, "EBCDIC-US" },
+ { 2078, "csEBCDICUS" },
+ { 2079, "UNKNOWN-8BIT" },
+ { 2079, "csUnknown8BiT" },
+ { 2080, "MNEMONIC" },
+ { 2080, "csMnemonic" },
+ { 2081, "MNEM" },
+ { 2081, "csMnem" },
+ { 2082, "VISCII" },
+ { 2082, "csVISCII" },
+ { 2083, "VIQR" },
+ { 2083, "csVIQR" },
+ { 2084, "KOI8-R" },
+ { 2084, "csKOI8R" },
+ { 2085, "HZ-GB-2312" },
+ { 2086, "IBM866" },
+ { 2086, "cp866" },
+ { 2086, "866" },
+ { 2086, "csIBM866" },
+ { 2087, "IBM775" },
+ { 2087, "cp775" },
+ { 2087, "csPC775Baltic" },
+ { 2088, "KOI8-U" },
+ { 2088, "csKOI8U" },
+ { 2089, "IBM00858" },
+ { 2089, "CCSID00858" },
+ { 2089, "CP00858" },
+ { 2089, "PC-Multilingual-850+euro" },
+ { 2089, "csIBM00858" },
+ { 2090, "IBM00924" },
+ { 2090, "CCSID00924" },
+ { 2090, "CP00924" },
+ { 2090, "ebcdic-Latin9--euro" },
+ { 2090, "csIBM00924" },
+ { 2091, "IBM01140" },
+ { 2091, "CCSID01140" },
+ { 2091, "CP01140" },
+ { 2091, "ebcdic-us-37+euro" },
+ { 2091, "csIBM01140" },
+ { 2092, "IBM01141" },
+ { 2092, "CCSID01141" },
+ { 2092, "CP01141" },
+ { 2092, "ebcdic-de-273+euro" },
+ { 2092, "csIBM01141" },
+ { 2093, "IBM01142" },
+ { 2093, "CCSID01142" },
+ { 2093, "CP01142" },
+ { 2093, "ebcdic-dk-277+euro" },
+ { 2093, "ebcdic-no-277+euro" },
+ { 2093, "csIBM01142" },
+ { 2094, "IBM01143" },
+ { 2094, "CCSID01143" },
+ { 2094, "CP01143" },
+ { 2094, "ebcdic-fi-278+euro" },
+ { 2094, "ebcdic-se-278+euro" },
+ { 2094, "csIBM01143" },
+ { 2095, "IBM01144" },
+ { 2095, "CCSID01144" },
+ { 2095, "CP01144" },
+ { 2095, "ebcdic-it-280+euro" },
+ { 2095, "csIBM01144" },
+ { 2096, "IBM01145" },
+ { 2096, "CCSID01145" },
+ { 2096, "CP01145" },
+ { 2096, "ebcdic-es-284+euro" },
+ { 2096, "csIBM01145" },
+ { 2097, "IBM01146" },
+ { 2097, "CCSID01146" },
+ { 2097, "CP01146" },
+ { 2097, "ebcdic-gb-285+euro" },
+ { 2097, "csIBM01146" },
+ { 2098, "IBM01147" },
+ { 2098, "CCSID01147" },
+ { 2098, "CP01147" },
+ { 2098, "ebcdic-fr-297+euro" },
+ { 2098, "csIBM01147" },
+ { 2099, "IBM01148" },
+ { 2099, "CCSID01148" },
+ { 2099, "CP01148" },
+ { 2099, "ebcdic-international-500+euro" },
+ { 2099, "csIBM01148" },
+ { 2100, "IBM01149" },
+ { 2100, "CCSID01149" },
+ { 2100, "CP01149" },
+ { 2100, "ebcdic-is-871+euro" },
+ { 2100, "csIBM01149" },
+ { 2101, "Big5-HKSCS" },
+ { 2101, "csBig5HKSCS" },
+ { 2102, "IBM1047" },
+ { 2102, "IBM-1047" },
+ { 2102, "csIBM1047" },
+ { 2103, "PTCP154" },
+ { 2103, "csPTCP154" },
+ { 2103, "PT154" },
+ { 2103, "CP154" },
+ { 2103, "Cyrillic-Asian" },
+ { 2104, "Amiga-1251" },
+ { 2104, "Ami1251" },
+ { 2104, "Amiga1251" },
+ { 2104, "Ami-1251" },
+ { 2104, "csAmiga1251" },
+ { 2104, "(Aliases" },
+ { 2104, "are" },
+ { 2104, "provided" },
+ { 2104, "for" },
+ { 2104, "historical" },
+ { 2104, "reasons" },
+ { 2104, "and" },
+ { 2104, "should" },
+ { 2104, "not" },
+ { 2104, "be" },
+ { 2104, "used)" },
+ { 2104, "[Malyshev]" },
+ { 2105, "KOI7-switched" },
+ { 2105, "csKOI7switched" },
+ { 2106, "BRF" },
+ { 2106, "csBRF" },
+ { 2107, "TSCII" },
+ { 2107, "csTSCII" },
+ { 2108, "CP51932" },
+ { 2108, "csCP51932" },
+ { 2109, "windows-874" },
+ { 2109, "cswindows874" },
+ { 2250, "windows-1250" },
+ { 2250, "cswindows1250" },
+ { 2251, "windows-1251" },
+ { 2251, "cswindows1251" },
+ { 2252, "windows-1252" },
+ { 2252, "cswindows1252" },
+ { 2253, "windows-1253" },
+ { 2253, "cswindows1253" },
+ { 2254, "windows-1254" },
+ { 2254, "cswindows1254" },
+ { 2255, "windows-1255" },
+ { 2255, "cswindows1255" },
+ { 2256, "windows-1256" },
+ { 2256, "cswindows1256" },
+ { 2257, "windows-1257" },
+ { 2257, "cswindows1257" },
+ { 2258, "windows-1258" },
+ { 2258, "cswindows1258" },
+ { 2259, "TIS-620" },
+ { 2259, "csTIS620" },
+ { 2259, "ISO-8859-11" },
+ { 2260, "CP50220" },
+ { 2260, "csCP50220" },
+
+#undef _GLIBCXX_GET_ENCODING_DATA
diff --git a/libstdc++-v3/include/bits/unicode.h b/libstdc++-v3/include/bits/unicode.h
index f1b2b35..d025d21 100644
--- a/libstdc++-v3/include/bits/unicode.h
+++ b/libstdc++-v3/include/bits/unicode.h
@@ -32,7 +32,8 @@
#if __cplusplus >= 202002L
#include <array>
-#include <bit>
+#include <bit> // bit_width
+#include <charconv> // __detail::__from_chars_alnum_to_val_table
#include <cstdint>
#include <bits/stl_algo.h>
#include <bits/stl_iterator.h>
@@ -714,15 +715,15 @@ inline namespace __v15_1_0
};
// Split a range into extended grapheme clusters.
- template<ranges::forward_range _View>
+ template<ranges::forward_range _View> requires ranges::view<_View>
class _Grapheme_cluster_view
: public ranges::view_interface<_Grapheme_cluster_view<_View>>
{
public:
constexpr
- _Grapheme_cluster_view(const _View& __v)
- : _M_begin(_Utf32_view(__v).begin())
+ _Grapheme_cluster_view(_View __v)
+ : _M_begin(_Utf32_view<_View>(std::move(__v)).begin())
{ }
constexpr auto begin() const { return _M_begin; }
@@ -946,7 +947,7 @@ inline namespace __v15_1_0
{
if (__s.empty()) [[unlikely]]
return 0;
- _Grapheme_cluster_view __gc(__s);
+ _Grapheme_cluster_view<basic_string_view<_CharT>> __gc(__s);
auto __it = __gc.begin();
const auto __end = __gc.end();
size_t __n = __it.width();
@@ -964,7 +965,7 @@ inline namespace __v15_1_0
if (__s.empty()) [[unlikely]]
return 0;
- _Grapheme_cluster_view __gc(__s);
+ _Grapheme_cluster_view<basic_string_view<_CharT>> __gc(__s);
auto __it = __gc.begin();
const auto __end = __gc.end();
size_t __n = __it.width();
@@ -986,7 +987,7 @@ inline namespace __v15_1_0
return __n;
}
- template<typename _CharT>
+ template<typename _CharT>
consteval bool
__literal_encoding_is_unicode()
{
@@ -1056,8 +1057,68 @@ inline namespace __v15_1_0
__literal_encoding_is_utf8()
{ return __literal_encoding_is_unicode<char>(); }
+ consteval bool
+ __literal_encoding_is_extended_ascii()
+ {
+ return '0' == 0x30 && 'A' == 0x41 && 'Z' == 0x5a
+ && 'a' == 0x61 && 'z' == 0x7a;
+ }
+
+ // https://www.unicode.org/reports/tr22/tr22-8.html#Charset_Alias_Matching
+ constexpr bool
+ __charset_alias_match(string_view __a, string_view __b)
+ {
+ // Map alphanumeric chars to their base 64 value, everything else to 127.
+ auto __map = [](char __c, bool& __num) -> unsigned char {
+ if (__c == '0') [[unlikely]]
+ return __num ? 0 : 127;
+ const auto __v = __detail::__from_chars_alnum_to_val(__c);
+ __num = __v < 10;
+ return __v;
+ };
+
+ auto __ptr_a = __a.begin(), __end_a = __a.end();
+ auto __ptr_b = __b.begin(), __end_b = __b.end();
+ bool __num_a = false, __num_b = false;
+
+ while (true)
+ {
+ // Find the value of the next alphanumeric character in each string.
+ unsigned char __val_a, __val_b;
+ while (__ptr_a != __end_a
+ && (__val_a = __map(*__ptr_a, __num_a)) == 127)
+ ++__ptr_a;
+ while (__ptr_b != __end_b
+ && (__val_b = __map(*__ptr_b, __num_b)) == 127)
+ ++__ptr_b;
+ // Stop when we reach the end of a string, or get a mismatch.
+ if (__ptr_a == __end_a)
+ return __ptr_b == __end_b;
+ else if (__ptr_b == __end_b)
+ return false;
+ else if (__val_a != __val_b)
+ return false; // Found non-matching characters.
+ ++__ptr_a;
+ ++__ptr_b;
+ }
+ return true;
+ }
+
} // namespace __unicode
+namespace ranges
+{
+ template<typename _To, typename _Range>
+ inline constexpr bool
+ enable_borrowed_range<std::__unicode::_Utf_view<_To, _Range>>
+ = enable_borrowed_range<_Range>;
+
+ template<typename _Range>
+ inline constexpr bool
+ enable_borrowed_range<std::__unicode::_Grapheme_cluster_view<_Range>>
+ = enable_borrowed_range<_Range>;
+} // namespace ranges
+
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif // C++20
diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def
index afbec6c..8fb8a28 100644
--- a/libstdc++-v3/include/bits/version.def
+++ b/libstdc++-v3/include/bits/version.def
@@ -1752,6 +1752,16 @@ ftms = {
};
ftms = {
+ name = text_encoding;
+ values = {
+ v = 202306;
+ cxxmin = 26;
+ hosted = yes;
+ extra_cond = "_GLIBCXX_USE_NL_LANGINFO_L";
+ };
+};
+
+ftms = {
name = to_string;
values = {
v = 202306;
diff --git a/libstdc++-v3/include/bits/version.h b/libstdc++-v3/include/bits/version.h
index 9688b24..9ba99de 100644
--- a/libstdc++-v3/include/bits/version.h
+++ b/libstdc++-v3/include/bits/version.h
@@ -2137,6 +2137,17 @@
#undef __glibcxx_want_saturation_arithmetic
// from version.def line 1755
+#if !defined(__cpp_lib_text_encoding)
+# if (__cplusplus > 202302L) && _GLIBCXX_HOSTED && (_GLIBCXX_USE_NL_LANGINFO_L)
+# define __glibcxx_text_encoding 202306L
+# if defined(__glibcxx_want_all) || defined(__glibcxx_want_text_encoding)
+# define __cpp_lib_text_encoding 202306L
+# endif
+# endif
+#endif /* !defined(__cpp_lib_text_encoding) && defined(__glibcxx_want_text_encoding) */
+#undef __glibcxx_want_text_encoding
+
+// from version.def line 1765
#if !defined(__cpp_lib_to_string)
# if (__cplusplus > 202302L) && _GLIBCXX_HOSTED && (__glibcxx_to_chars)
# define __glibcxx_to_string 202306L
@@ -2147,7 +2158,7 @@
#endif /* !defined(__cpp_lib_to_string) && defined(__glibcxx_want_to_string) */
#undef __glibcxx_want_to_string
-// from version.def line 1765
+// from version.def line 1775
#if !defined(__cpp_lib_generator)
# if (__cplusplus >= 202100L) && (__glibcxx_coroutine)
# define __glibcxx_generator 202207L
diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index 3135e6f..7ef835f 100644
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -8748,7 +8748,7 @@ namespace views::__adaptor
operator() [[nodiscard]] (_Ts&&... __ts) const
{
if constexpr (sizeof...(_Ts) == 0)
- return views::empty<tuple<>>;
+ return views::single(tuple{});
else
return cartesian_product_view<all_t<_Ts>...>(std::forward<_Ts>(__ts)...);
}
diff --git a/libstdc++-v3/include/std/text_encoding b/libstdc++-v3/include/std/text_encoding
new file mode 100644
index 0000000..83d023b
--- /dev/null
+++ b/libstdc++-v3/include/std/text_encoding
@@ -0,0 +1,678 @@
+// <text_encoding> -*- C++ -*-
+
+// Copyright The GNU Toolchain Authors.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/text_encoding
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TEXT_ENCODING
+#define _GLIBCXX_TEXT_ENCODING
+
+#pragma GCC system_header
+
+#include <bits/requires_hosted.h>
+
+#define __glibcxx_want_text_encoding
+#include <bits/version.h>
+
+#ifdef __cpp_lib_text_encoding
+#include <compare>
+#include <string_view>
+#include <bits/functional_hash.h> // hash
+#include <bits/ranges_util.h> // view_interface
+#include <bits/unicode.h> // __charset_alias_match
+#include <ext/numeric_traits.h> // __int_traits
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ /**
+ * @brief An interface for accessing the IANA Character Sets registry.
+ * @ingroup locales
+ * @since C++23
+ */
+ struct text_encoding
+ {
+ private:
+ struct _Rep
+ {
+ using id = __INT_LEAST32_TYPE__;
+ id _M_id;
+ const char* _M_name;
+
+ friend constexpr bool
+ operator<(const _Rep& __r, id __m) noexcept
+ { return __r._M_id < __m; }
+
+ friend constexpr bool
+ operator==(const _Rep& __r, string_view __name) noexcept
+ { return __r._M_name == __name; }
+ };
+
+ public:
+ static constexpr size_t max_name_length = 63;
+
+ enum class id : _Rep::id
+ {
+ other = 1,
+ unknown = 2,
+ ASCII = 3,
+ ISOLatin1 = 4,
+ ISOLatin2 = 5,
+ ISOLatin3 = 6,
+ ISOLatin4 = 7,
+ ISOLatinCyrillic = 8,
+ ISOLatinArabic = 9,
+ ISOLatinGreek = 10,
+ ISOLatinHebrew = 11,
+ ISOLatin5 = 12,
+ ISOLatin6 = 13,
+ ISOTextComm = 14,
+ HalfWidthKatakana = 15,
+ JISEncoding = 16,
+ ShiftJIS = 17,
+ EUCPkdFmtJapanese = 18,
+ EUCFixWidJapanese = 19,
+ ISO4UnitedKingdom = 20,
+ ISO11SwedishForNames = 21,
+ ISO15Italian = 22,
+ ISO17Spanish = 23,
+ ISO21German = 24,
+ ISO60DanishNorwegian = 25,
+ ISO69French = 26,
+ ISO10646UTF1 = 27,
+ ISO646basic1983 = 28,
+ INVARIANT = 29,
+ ISO2IntlRefVersion = 30,
+ NATSSEFI = 31,
+ NATSSEFIADD = 32,
+ ISO10Swedish = 35,
+ KSC56011987 = 36,
+ ISO2022KR = 37,
+ EUCKR = 38,
+ ISO2022JP = 39,
+ ISO2022JP2 = 40,
+ ISO13JISC6220jp = 41,
+ ISO14JISC6220ro = 42,
+ ISO16Portuguese = 43,
+ ISO18Greek7Old = 44,
+ ISO19LatinGreek = 45,
+ ISO25French = 46,
+ ISO27LatinGreek1 = 47,
+ ISO5427Cyrillic = 48,
+ ISO42JISC62261978 = 49,
+ ISO47BSViewdata = 50,
+ ISO49INIS = 51,
+ ISO50INIS8 = 52,
+ ISO51INISCyrillic = 53,
+ ISO54271981 = 54,
+ ISO5428Greek = 55,
+ ISO57GB1988 = 56,
+ ISO58GB231280 = 57,
+ ISO61Norwegian2 = 58,
+ ISO70VideotexSupp1 = 59,
+ ISO84Portuguese2 = 60,
+ ISO85Spanish2 = 61,
+ ISO86Hungarian = 62,
+ ISO87JISX0208 = 63,
+ ISO88Greek7 = 64,
+ ISO89ASMO449 = 65,
+ ISO90 = 66,
+ ISO91JISC62291984a = 67,
+ ISO92JISC62991984b = 68,
+ ISO93JIS62291984badd = 69,
+ ISO94JIS62291984hand = 70,
+ ISO95JIS62291984handadd = 71,
+ ISO96JISC62291984kana = 72,
+ ISO2033 = 73,
+ ISO99NAPLPS = 74,
+ ISO102T617bit = 75,
+ ISO103T618bit = 76,
+ ISO111ECMACyrillic = 77,
+ ISO121Canadian1 = 78,
+ ISO122Canadian2 = 79,
+ ISO123CSAZ24341985gr = 80,
+ ISO88596E = 81,
+ ISO88596I = 82,
+ ISO128T101G2 = 83,
+ ISO88598E = 84,
+ ISO88598I = 85,
+ ISO139CSN369103 = 86,
+ ISO141JUSIB1002 = 87,
+ ISO143IECP271 = 88,
+ ISO146Serbian = 89,
+ ISO147Macedonian = 90,
+ ISO150 = 91,
+ ISO151Cuba = 92,
+ ISO6937Add = 93,
+ ISO153GOST1976874 = 94,
+ ISO8859Supp = 95,
+ ISO10367Box = 96,
+ ISO158Lap = 97,
+ ISO159JISX02121990 = 98,
+ ISO646Danish = 99,
+ USDK = 100,
+ DKUS = 101,
+ KSC5636 = 102,
+ Unicode11UTF7 = 103,
+ ISO2022CN = 104,
+ ISO2022CNEXT = 105,
+ UTF8 = 106,
+ ISO885913 = 109,
+ ISO885914 = 110,
+ ISO885915 = 111,
+ ISO885916 = 112,
+ GBK = 113,
+ GB18030 = 114,
+ OSDEBCDICDF0415 = 115,
+ OSDEBCDICDF03IRV = 116,
+ OSDEBCDICDF041 = 117,
+ ISO115481 = 118,
+ KZ1048 = 119,
+ UCS2 = 1000,
+ UCS4 = 1001,
+ UnicodeASCII = 1002,
+ UnicodeLatin1 = 1003,
+ UnicodeJapanese = 1004,
+ UnicodeIBM1261 = 1005,
+ UnicodeIBM1268 = 1006,
+ UnicodeIBM1276 = 1007,
+ UnicodeIBM1264 = 1008,
+ UnicodeIBM1265 = 1009,
+ Unicode11 = 1010,
+ SCSU = 1011,
+ UTF7 = 1012,
+ UTF16BE = 1013,
+ UTF16LE = 1014,
+ UTF16 = 1015,
+ CESU8 = 1016,
+ UTF32 = 1017,
+ UTF32BE = 1018,
+ UTF32LE = 1019,
+ BOCU1 = 1020,
+ UTF7IMAP = 1021,
+ Windows30Latin1 = 2000,
+ Windows31Latin1 = 2001,
+ Windows31Latin2 = 2002,
+ Windows31Latin5 = 2003,
+ HPRoman8 = 2004,
+ AdobeStandardEncoding = 2005,
+ VenturaUS = 2006,
+ VenturaInternational = 2007,
+ DECMCS = 2008,
+ PC850Multilingual = 2009,
+ PC8DanishNorwegian = 2012,
+ PC862LatinHebrew = 2013,
+ PC8Turkish = 2014,
+ IBMSymbols = 2015,
+ IBMThai = 2016,
+ HPLegal = 2017,
+ HPPiFont = 2018,
+ HPMath8 = 2019,
+ HPPSMath = 2020,
+ HPDesktop = 2021,
+ VenturaMath = 2022,
+ MicrosoftPublishing = 2023,
+ Windows31J = 2024,
+ GB2312 = 2025,
+ Big5 = 2026,
+ Macintosh = 2027,
+ IBM037 = 2028,
+ IBM038 = 2029,
+ IBM273 = 2030,
+ IBM274 = 2031,
+ IBM275 = 2032,
+ IBM277 = 2033,
+ IBM278 = 2034,
+ IBM280 = 2035,
+ IBM281 = 2036,
+ IBM284 = 2037,
+ IBM285 = 2038,
+ IBM290 = 2039,
+ IBM297 = 2040,
+ IBM420 = 2041,
+ IBM423 = 2042,
+ IBM424 = 2043,
+ PC8CodePage437 = 2011,
+ IBM500 = 2044,
+ IBM851 = 2045,
+ PCp852 = 2010,
+ IBM855 = 2046,
+ IBM857 = 2047,
+ IBM860 = 2048,
+ IBM861 = 2049,
+ IBM863 = 2050,
+ IBM864 = 2051,
+ IBM865 = 2052,
+ IBM868 = 2053,
+ IBM869 = 2054,
+ IBM870 = 2055,
+ IBM871 = 2056,
+ IBM880 = 2057,
+ IBM891 = 2058,
+ IBM903 = 2059,
+ IBM904 = 2060,
+ IBM905 = 2061,
+ IBM918 = 2062,
+ IBM1026 = 2063,
+ IBMEBCDICATDE = 2064,
+ EBCDICATDEA = 2065,
+ EBCDICCAFR = 2066,
+ EBCDICDKNO = 2067,
+ EBCDICDKNOA = 2068,
+ EBCDICFISE = 2069,
+ EBCDICFISEA = 2070,
+ EBCDICFR = 2071,
+ EBCDICIT = 2072,
+ EBCDICPT = 2073,
+ EBCDICES = 2074,
+ EBCDICESA = 2075,
+ EBCDICESS = 2076,
+ EBCDICUK = 2077,
+ EBCDICUS = 2078,
+ Unknown8BiT = 2079,
+ Mnemonic = 2080,
+ Mnem = 2081,
+ VISCII = 2082,
+ VIQR = 2083,
+ KOI8R = 2084,
+ HZGB2312 = 2085,
+ IBM866 = 2086,
+ PC775Baltic = 2087,
+ KOI8U = 2088,
+ IBM00858 = 2089,
+ IBM00924 = 2090,
+ IBM01140 = 2091,
+ IBM01141 = 2092,
+ IBM01142 = 2093,
+ IBM01143 = 2094,
+ IBM01144 = 2095,
+ IBM01145 = 2096,
+ IBM01146 = 2097,
+ IBM01147 = 2098,
+ IBM01148 = 2099,
+ IBM01149 = 2100,
+ Big5HKSCS = 2101,
+ IBM1047 = 2102,
+ PTCP154 = 2103,
+ Amiga1251 = 2104,
+ KOI7switched = 2105,
+ BRF = 2106,
+ TSCII = 2107,
+ CP51932 = 2108,
+ windows874 = 2109,
+ windows1250 = 2250,
+ windows1251 = 2251,
+ windows1252 = 2252,
+ windows1253 = 2253,
+ windows1254 = 2254,
+ windows1255 = 2255,
+ windows1256 = 2256,
+ windows1257 = 2257,
+ windows1258 = 2258,
+ TIS620 = 2259,
+ CP50220 = 2260
+ };
+ using enum id;
+
+ constexpr text_encoding() = default;
+
+ constexpr explicit
+ text_encoding(string_view __enc) noexcept
+ : _M_rep(_S_find_name(__enc))
+ {
+ __enc.copy(_M_name, max_name_length);
+ }
+
+ // @pre i has the value of one of the enumerators of id.
+ constexpr
+ text_encoding(id __i) noexcept
+ : _M_rep(_S_find_id(__i))
+ {
+ if (string_view __name(_M_rep->_M_name); !__name.empty())
+ __name.copy(_M_name, max_name_length);
+ }
+
+ constexpr id mib() const noexcept { return id(_M_rep->_M_id); }
+
+ constexpr const char* name() const noexcept { return _M_name; }
+
+ struct aliases_view : ranges::view_interface<aliases_view>
+ {
+ private:
+ class _Iterator;
+ struct _Sentinel { };
+
+ public:
+ constexpr _Iterator begin() const noexcept;
+ constexpr _Sentinel end() const noexcept { return {}; }
+
+ private:
+ friend struct text_encoding;
+
+ constexpr explicit aliases_view(const _Rep* __r) : _M_begin(__r) { }
+
+ const _Rep* _M_begin = nullptr;
+ };
+
+ constexpr aliases_view
+ aliases() const noexcept
+ {
+ return _M_rep->_M_name[0] ? aliases_view(_M_rep) : aliases_view{nullptr};
+ }
+
+ friend constexpr bool
+ operator==(const text_encoding& __a,
+ const text_encoding& __b) noexcept
+ {
+ if (__a.mib() == id::other && __b.mib() == id::other) [[unlikely]]
+ return _S_comp(__a._M_name, __b._M_name);
+ else
+ return __a.mib() == __b.mib();
+ }
+
+ friend constexpr bool
+ operator==(const text_encoding& __encoding, id __i) noexcept
+ { return __encoding.mib() == __i; }
+
+#if __CHAR_BIT__ == 8
+ static consteval text_encoding
+ literal() noexcept
+ {
+#ifdef __GNUC_EXECUTION_CHARSET_NAME
+ return text_encoding(__GNUC_EXECUTION_CHARSET_NAME);
+#elif defined __clang_literal_encoding__
+ return text_encoding(__clang_literal_encoding__);
+#else
+ return text_encoding();
+#endif
+ }
+
+ static text_encoding
+ environment();
+
+ template<id _Id>
+ static bool
+ environment_is()
+ { return text_encoding(_Id)._M_is_environment(); }
+#else
+ static text_encoding literal() = delete;
+ static text_encoding environment() = delete;
+ template<id> static bool environment_is() = delete;
+#endif
+
+ private:
+ const _Rep* _M_rep = _S_reps + 1; // id::unknown
+ char _M_name[max_name_length + 1] = {0};
+
+ bool
+ _M_is_environment() const;
+
+ static inline constexpr _Rep _S_reps[] = {
+ { 1, "" }, { 2, "" },
+#define _GLIBCXX_GET_ENCODING_DATA
+#include <bits/text_encoding-data.h>
+#ifdef _GLIBCXX_GET_ENCODING_DATA
+# error "Invalid text_encoding data"
+#endif
+ { 9999, nullptr }, // sentinel
+ };
+
+ static constexpr bool
+ _S_comp(string_view __a, string_view __b)
+ { return __unicode::__charset_alias_match(__a, __b); }
+
+ static constexpr const _Rep*
+ _S_find_name(string_view __name) noexcept
+ {
+#ifdef _GLIBCXX_TEXT_ENCODING_UTF8_OFFSET
+ // Optimize the common UTF-8 case to avoid a linear search through all
+ // strings in the table using the _S_comp function.
+ if (__name == "UTF-8")
+ return _S_reps + 2 + _GLIBCXX_TEXT_ENCODING_UTF8_OFFSET;
+#endif
+
+ // The first two array elements (other and unknown) don't have names.
+ // The last element is a sentinel that can never match anything.
+ const auto __first = _S_reps + 2, __end = std::end(_S_reps) - 1;
+ for (auto __r = __first; __r != __end; ++__r)
+ if (_S_comp(__r->_M_name, __name))
+ {
+ // Might have matched an alias. Find the first entry for this ID.
+ const auto __id = __r->_M_id;
+ while (__r[-1]._M_id == __id)
+ --__r;
+ return __r;
+ }
+ return _S_reps; // id::other
+ }
+
+ static constexpr const _Rep*
+ _S_find_id(id __id) noexcept
+ {
+ const auto __i = (_Rep::id)__id;
+ const auto __r = std::lower_bound(_S_reps, std::end(_S_reps) - 1, __i);
+ if (__r->_M_id == __i) [[likely]]
+ return __r;
+ else
+ {
+ // Preconditions: i has the value of one of the enumerators of id.
+ __glibcxx_assert(__r->_M_id == __i);
+ return _S_reps + 1; // id::unknown
+ }
+ }
+ };
+
+ template<>
+ struct hash<text_encoding>
+ {
+ size_t
+ operator()(const text_encoding& __enc) const noexcept
+ { return std::hash<text_encoding::id>()(__enc.mib()); }
+ };
+
+ class text_encoding::aliases_view::_Iterator
+ {
+ public:
+ using value_type = const char*;
+ using reference = const char*;
+ using difference_type = int;
+
+ constexpr _Iterator() = default;
+
+ constexpr value_type
+ operator*() const
+ {
+ if (_M_dereferenceable()) [[likely]]
+ return _M_rep->_M_name;
+ else
+ {
+ __glibcxx_assert(_M_dereferenceable());
+ return "";
+ }
+ }
+
+ constexpr _Iterator&
+ operator++()
+ {
+ if (_M_dereferenceable()) [[likely]]
+ ++_M_rep;
+ else
+ {
+ __glibcxx_assert(_M_dereferenceable());
+ *this = _Iterator{};
+ }
+ return *this;
+ }
+
+ constexpr _Iterator&
+ operator--()
+ {
+ const bool __decrementable
+ = _M_rep != nullptr && _M_rep[-1]._M_id == _M_id;
+ if (__decrementable) [[likely]]
+ --_M_rep;
+ else
+ {
+ __glibcxx_assert(__decrementable);
+ *this = _Iterator{};
+ }
+ return *this;
+ }
+
+ constexpr _Iterator
+ operator++(int)
+ {
+ auto __it = *this;
+ ++*this;
+ return __it;
+ }
+
+ constexpr _Iterator
+ operator--(int)
+ {
+ auto __it = *this;
+ --*this;
+ return __it;
+ }
+
+ constexpr value_type
+ operator[](difference_type __n) const
+ { return *(*this + __n); }
+
+ constexpr _Iterator&
+ operator+=(difference_type __n)
+ {
+ if (_M_rep != nullptr)
+ {
+ if (__n > 0)
+ {
+ if (__n < (std::end(_S_reps) - _M_rep)
+ && _M_rep[__n - 1]._M_id == _M_id) [[likely]]
+ _M_rep += __n;
+ else
+ *this == _Iterator{};
+ }
+ else if (__n < 0)
+ {
+ if (__n > (_S_reps - _M_rep)
+ && _M_rep[__n]._M_id == _M_id) [[likely]]
+ _M_rep += __n;
+ else
+ *this == _Iterator{};
+ }
+ }
+ if (__n != 0)
+ __glibcxx_assert(_M_rep != nullptr);
+ return *this;
+ }
+
+ constexpr _Iterator&
+ operator-=(difference_type __n)
+ {
+ using _Traits = __gnu_cxx::__int_traits<difference_type>;
+ if (__n == _Traits::__min) [[unlikely]]
+ return operator+=(_Traits::__max);
+ return operator+=(-__n);
+ }
+
+ constexpr difference_type
+ operator-(const _Iterator& __i) const
+ {
+ if (_M_id == __i._M_id)
+ return _M_rep - __i._M_rep;
+ __glibcxx_assert(_M_id == __i._M_id);
+ return __gnu_cxx::__int_traits<difference_type>::__max;
+ }
+
+ constexpr bool
+ operator==(const _Iterator&) const = default;
+
+ constexpr bool
+ operator==(_Sentinel) const noexcept
+ { return !_M_dereferenceable(); }
+
+ constexpr strong_ordering
+ operator<=>(const _Iterator& __i) const
+ {
+ __glibcxx_assert(_M_id == __i._M_id);
+ return _M_rep <=> __i._M_rep;
+ }
+
+ friend constexpr _Iterator
+ operator+(_Iterator __i, difference_type __n)
+ {
+ __i += __n;
+ return __i;
+ }
+
+ friend constexpr _Iterator
+ operator+(difference_type __n, _Iterator __i)
+ {
+ __i += __n;
+ return __i;
+ }
+
+ friend constexpr _Iterator
+ operator-(_Iterator __i, difference_type __n)
+ {
+ __i -= __n;
+ return __i;
+ }
+
+ private:
+ friend class text_encoding;
+
+ constexpr explicit
+ _Iterator(const _Rep* __r) noexcept
+ : _M_rep(__r), _M_id(__r ? __r->_M_id : 0)
+ { }
+
+ constexpr bool
+ _M_dereferenceable() const noexcept
+ { return _M_rep != nullptr && _M_rep->_M_id == _M_id; }
+
+ const _Rep* _M_rep = nullptr;
+ _Rep::id _M_id = 0;
+ };
+
+ constexpr auto
+ text_encoding::aliases_view::begin() const noexcept
+ -> _Iterator
+ { return _Iterator(_M_begin); }
+
+namespace ranges
+{
+ // Opt-in to borrowed_range concept
+ template<>
+ inline constexpr bool
+ enable_borrowed_range<std::text_encoding::aliases_view> = true;
+}
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace std
+
+#endif // __cpp_lib_text_encoding
+#endif // _GLIBCXX_TEXT_ENCODING
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 032a7aa..a6c2ed4 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -2324,6 +2324,21 @@ class StdIntegralConstantPrinter(printer_base):
typename = strip_versioned_namespace(self._typename)
return "{}<{}, {}>".format(typename, value_type, value)
+class StdTextEncodingPrinter(printer_base):
+ """Print a std::text_encoding."""
+
+ def __init__(self, typename, val):
+ self._val = val
+ self._typename = typename
+
+ def to_string(self):
+ rep = self._val['_M_rep'].dereference()
+ if rep['_M_id'] == 1:
+ return self._val['_M_name']
+ if rep['_M_id'] == 2:
+ return 'unknown'
+ return rep['_M_name']
+
# A "regular expression" printer which conforms to the
# "SubPrettyPrinter" protocol from gdb.printing.
class RxPrinter(object):
@@ -2807,6 +2822,8 @@ def build_libstdcxx_dictionary():
libstdcxx_printer.add_version('std::', 'integral_constant',
StdIntegralConstantPrinter)
+ libstdcxx_printer.add_version('std::', 'text_encoding',
+ StdTextEncodingPrinter)
if hasattr(gdb.Value, 'dynamic_type'):
libstdcxx_printer.add_version('std::', 'error_code',
diff --git a/libstdc++-v3/scripts/gen_text_encoding_data.py b/libstdc++-v3/scripts/gen_text_encoding_data.py
new file mode 100755
index 0000000..2d6f3e4
--- /dev/null
+++ b/libstdc++-v3/scripts/gen_text_encoding_data.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python3
+#
+# Script to generate tables for libstdc++ std::text_encoding.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3, or (at your option) any later
+# version.
+#
+# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# To update the Libstdc++ static data in <bits/text_encoding-data.h> download
+# the latest:
+# https://www.iana.org/assignments/character-sets/character-sets-1.csv
+# Then run this script and save the output to
+# include/bits/text_encoding-data.h
+
+import sys
+import csv
+
+if len(sys.argv) != 2:
+ print("Usage: %s <character sets csv>" % sys.argv[0], file=sys.stderr)
+ sys.exit(1)
+
+print("// Generated by gen_text_encoding_data.py, do not edit.\n")
+print("#ifndef _GLIBCXX_GET_ENCODING_DATA")
+print('# error "This is not a public header, do not include it directly"')
+print("#endif\n")
+
+
+charsets = {}
+with open(sys.argv[1], newline='') as f:
+ reader = csv.reader(f)
+ next(reader) # skip header row
+ for row in reader:
+ mib = int(row[2])
+ if mib in charsets:
+ raise ValueError("Multiple rows for mibEnum={}".format(mib))
+ name = row[1]
+ aliases = row[5].split()
+ # Ensure primary name comes first
+ if name in aliases:
+ aliases.remove(name)
+ charsets[mib] = [name] + aliases
+
+# Remove "NATS-DANO" and "NATS-DANO-ADD"
+charsets.pop(33, None)
+charsets.pop(34, None)
+
+count = 0
+for mib in sorted(charsets.keys()):
+ names = charsets[mib]
+ if names[0] == "UTF-8":
+ print("#define _GLIBCXX_TEXT_ENCODING_UTF8_OFFSET {}".format(count))
+ for name in names:
+ print(' {{ {:4}, "{}" }},'.format(mib, name))
+ count += len(names)
+
+# <text_encoding> gives an error if this macro is left defined.
+# Do this last, so that the generated output is not usable unless we reach here.
+print("\n#undef _GLIBCXX_GET_ENCODING_DATA")
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 7292ae7..37ba149 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -43,7 +43,7 @@ experimental_dir =
endif
## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE.
-SUBDIRS = c++98 c++11 c++17 c++20 c++23 \
+SUBDIRS = c++98 c++11 c++17 c++20 c++23 c++26 \
$(filesystem_dir) $(backtrace_dir) $(experimental_dir)
# Cross compiler support.
@@ -77,6 +77,7 @@ vpath % $(top_srcdir)/src/c++11
vpath % $(top_srcdir)/src/c++17
vpath % $(top_srcdir)/src/c++20
vpath % $(top_srcdir)/src/c++23
+vpath % $(top_srcdir)/src/c++26
if ENABLE_FILESYSTEM_TS
vpath % $(top_srcdir)/src/filesystem
endif
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 31819c9..1bdf0da 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -241,8 +241,8 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
-DIST_SUBDIRS = c++98 c++11 c++17 c++20 c++23 filesystem libbacktrace \
- experimental
+DIST_SUBDIRS = c++98 c++11 c++17 c++20 c++23 c++26 filesystem \
+ libbacktrace experimental
ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
ACLOCAL = @ACLOCAL@
ALLOCATOR_H = @ALLOCATOR_H@
@@ -491,7 +491,7 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS)
@GLIBCXX_HOSTED_FALSE@backtrace_dir =
@GLIBCXX_HOSTED_FALSE@experimental_dir =
@GLIBCXX_HOSTED_TRUE@experimental_dir = experimental
-SUBDIRS = c++98 c++11 c++17 c++20 c++23 \
+SUBDIRS = c++98 c++11 c++17 c++20 c++23 c++26 \
$(filesystem_dir) $(backtrace_dir) $(experimental_dir)
@VTV_CYGMIN_FALSE@toolexeclib_LTLIBRARIES = libstdc++.la
@@ -1024,6 +1024,7 @@ vpath % $(top_srcdir)/src/c++11
vpath % $(top_srcdir)/src/c++17
vpath % $(top_srcdir)/src/c++20
vpath % $(top_srcdir)/src/c++23
+vpath % $(top_srcdir)/src/c++26
@ENABLE_FILESYSTEM_TS_TRUE@vpath % $(top_srcdir)/src/filesystem
@ENABLE_BACKTRACE_TRUE@vpath % $(top_srcdir)/src/libbacktrace
vpath % $(top_srcdir)/src/experimental
diff --git a/libstdc++-v3/src/c++26/Makefile.am b/libstdc++-v3/src/c++26/Makefile.am
new file mode 100644
index 0000000..000ced1
--- /dev/null
+++ b/libstdc++-v3/src/c++26/Makefile.am
@@ -0,0 +1,109 @@
+## Makefile for the C++26 sources of the GNU C++ Standard library.
+##
+## Copyright (C) 1997-2023 Free Software Foundation, Inc.
+##
+## This file is part of the libstdc++ version 3 distribution.
+## Process this file with automake to produce Makefile.in.
+
+## This file is part of the GNU ISO C++ Library. This library is free
+## software; you can redistribute it and/or modify it under the
+## terms of the GNU General Public License as published by the
+## Free Software Foundation; either version 3, or (at your option)
+## any later version.
+
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License along
+## with this library; see the file COPYING3. If not see
+## <http://www.gnu.org/licenses/>.
+
+include $(top_srcdir)/fragment.am
+
+# Convenience library for C++26 runtime.
+noinst_LTLIBRARIES = libc++26convenience.la
+
+headers =
+
+if ENABLE_EXTERN_TEMPLATE
+# XTEMPLATE_FLAGS = -fno-implicit-templates
+inst_sources =
+else
+# XTEMPLATE_FLAGS =
+inst_sources =
+endif
+
+sources = text_encoding.cc
+
+vpath % $(top_srcdir)/src/c++26
+
+
+if GLIBCXX_HOSTED
+libc__26convenience_la_SOURCES = $(sources) $(inst_sources)
+else
+libc__26convenience_la_SOURCES =
+endif
+
+# AM_CXXFLAGS needs to be in each subdirectory so that it can be
+# modified in a per-library or per-sub-library way. Need to manually
+# set this option because CONFIG_CXXFLAGS has to be after
+# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
+# as the occasion calls for it.
+AM_CXXFLAGS = \
+ -std=gnu++26 \
+ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
+ $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \
+ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) \
+ -fimplicit-templates
+
+AM_MAKEFLAGS = \
+ "gxx_include_dir=$(gxx_include_dir)"
+
+# Libtool notes
+
+# 1) In general, libtool expects an argument such as `--tag=CXX' when
+# using the C++ compiler, because that will enable the settings
+# detected when C++ support was being configured. However, when no
+# such flag is given in the command line, libtool attempts to figure
+# it out by matching the compiler name in each configuration section
+# against a prefix of the command line. The problem is that, if the
+# compiler name and its initial flags stored in the libtool
+# configuration file don't match those in the command line, libtool
+# can't decide which configuration to use, and it gives up. The
+# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
+# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
+# attempt to infer which configuration to use.
+#
+# The second tag argument, `--tag disable-shared` means that libtool
+# only compiles each source once, for static objects. In actuality,
+# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
+# the libtool command that is used create the object, which is
+# suitable for shared libraries. The `--tag disable-shared` must be
+# placed after --tag CXX lest things CXX undo the affect of
+# disable-shared.
+
+# 2) Need to explicitly set LTCXXCOMPILE so that EXTRA_CXX_FLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
+LTCXXCOMPILE = \
+ $(LIBTOOL) --tag CXX --tag disable-shared \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(EXTRA_CXX_FLAGS)
+
+LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
+
+# 3) We'd have a problem when building the shared libstdc++ object if
+# the rules automake generates would be used. We cannot allow g++ to
+# be used since this would add -lstdc++ to the link line which of
+# course is problematic at this point. So, we get the top-level
+# directory to configure libstdc++-v3 to use gcc as the C++
+# compilation driver.
+CXXLINK = \
+ $(LIBTOOL) --tag CXX --tag disable-shared \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXX) \
+ $(VTV_CXXLINKFLAGS) \
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
diff --git a/libstdc++-v3/src/c++26/Makefile.in b/libstdc++-v3/src/c++26/Makefile.in
new file mode 100644
index 0000000..77e73b2
--- /dev/null
+++ b/libstdc++-v3/src/c++26/Makefile.in
@@ -0,0 +1,747 @@
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = src/c++26
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
+ $(top_srcdir)/../config/enable.m4 \
+ $(top_srcdir)/../config/futex.m4 \
+ $(top_srcdir)/../config/hwcaps.m4 \
+ $(top_srcdir)/../config/iconv.m4 \
+ $(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/lib-ld.m4 \
+ $(top_srcdir)/../config/lib-link.m4 \
+ $(top_srcdir)/../config/lib-prefix.m4 \
+ $(top_srcdir)/../config/lthostflags.m4 \
+ $(top_srcdir)/../config/multi.m4 \
+ $(top_srcdir)/../config/no-executables.m4 \
+ $(top_srcdir)/../config/override.m4 \
+ $(top_srcdir)/../config/toolexeclibdir.m4 \
+ $(top_srcdir)/../config/unwind_ipinfo.m4 \
+ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
+ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/../config/gc++filt.m4 \
+ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+ $(top_srcdir)/../config/cet.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libc__26convenience_la_LIBADD =
+am__objects_1 = text_encoding.lo
+am__objects_2 =
+@GLIBCXX_HOSTED_TRUE@am_libc__26convenience_la_OBJECTS = \
+@GLIBCXX_HOSTED_TRUE@ $(am__objects_1) $(am__objects_2)
+libc__26convenience_la_OBJECTS = $(am_libc__26convenience_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp =
+am__depfiles_maybe =
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(libc__26convenience_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
+ACLOCAL = @ACLOCAL@
+ALLOCATOR_H = @ALLOCATOR_H@
+ALLOCATOR_NAME = @ALLOCATOR_NAME@
+ALLOC_FILE = @ALLOC_FILE@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_FLAGS = @ATOMIC_FLAGS@
+ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@
+BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@
+BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@
+BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@
+BASIC_FILE_CC = @BASIC_FILE_CC@
+BASIC_FILE_H = @BASIC_FILE_H@
+CC = @CC@
+CCODECVT_CC = @CCODECVT_CC@
+CCOLLATE_CC = @CCOLLATE_CC@
+CCTYPE_CC = @CCTYPE_CC@
+CFLAGS = @CFLAGS@
+CLOCALE_CC = @CLOCALE_CC@
+CLOCALE_H = @CLOCALE_H@
+CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@
+CMESSAGES_CC = @CMESSAGES_CC@
+CMESSAGES_H = @CMESSAGES_H@
+CMONEY_CC = @CMONEY_CC@
+CNUMERIC_CC = @CNUMERIC_CC@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@
+CPU_OPT_BITS_RANDOM = @CPU_OPT_BITS_RANDOM@
+CPU_OPT_EXT_RANDOM = @CPU_OPT_EXT_RANDOM@
+CSTDIO_H = @CSTDIO_H@
+CTIME_CC = @CTIME_CC@
+CTIME_H = @CTIME_H@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXFILT = @CXXFILT@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+C_INCLUDE_DIR = @C_INCLUDE_DIR@
+DBLATEX = @DBLATEX@
+DEBUG_FLAGS = @DEBUG_FLAGS@
+DEFS = @DEFS@
+DOT = @DOT@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EH_POOL_FLAGS = @EH_POOL_FLAGS@
+ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@
+EXEEXT = @EXEEXT@
+EXTRA_CFLAGS = @EXTRA_CFLAGS@
+EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
+FGREP = @FGREP@
+FORMAT_FILE = @FORMAT_FILE@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
+GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
+GLIBCXX_LIBS = @GLIBCXX_LIBS@
+GREP = @GREP@
+HWCAP_CFLAGS = @HWCAP_CFLAGS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LONG_DOUBLE_128_FLAGS = @LONG_DOUBLE_128_FLAGS@
+LONG_DOUBLE_ALT128_COMPAT_FLAGS = @LONG_DOUBLE_ALT128_COMPAT_FLAGS@
+LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@
+LTLIBICONV = @LTLIBICONV@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
+OPT_LDFLAGS = @OPT_LDFLAGS@
+OS_INC_SRCDIR = @OS_INC_SRCDIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDFLATEX = @PDFLATEX@
+RANLIB = @RANLIB@
+SECTION_FLAGS = @SECTION_FLAGS@
+SECTION_LDFLAGS = @SECTION_LDFLAGS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SYMVER_FILE = @SYMVER_FILE@
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+VIEW_FILE = @VIEW_FILE@
+VTV_CXXFLAGS = @VTV_CXXFLAGS@
+VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
+VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
+WARN_FLAGS = @WARN_FLAGS@
+XMLCATALOG = @XMLCATALOG@
+XMLLINT = @XMLLINT@
+XSLTPROC = @XSLTPROC@
+XSL_STYLE_DIR = @XSL_STYLE_DIR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+baseline_dir = @baseline_dir@
+baseline_subdir_switch = @baseline_subdir_switch@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+check_msgfmt = @check_msgfmt@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
+exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
+glibcxx_MOFILES = @glibcxx_MOFILES@
+glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
+glibcxx_POFILES = @glibcxx_POFILES@
+glibcxx_builddir = @glibcxx_builddir@
+glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
+glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
+glibcxx_cxx98_abi = @glibcxx_cxx98_abi@
+glibcxx_localedir = @glibcxx_localedir@
+glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
+glibcxx_prefixdir = @glibcxx_prefixdir@
+glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_toolexecdir = @glibcxx_toolexecdir@
+glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
+gxx_include_dir = @gxx_include_dir@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libtool_VERSION = @libtool_VERSION@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+multi_basedir = @multi_basedir@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+port_specific_symbol_files = @port_specific_symbol_files@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+python_mod_dir = @python_mod_dir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+thread_header = @thread_header@
+tmake_file = @tmake_file@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+toplevel_builddir = @toplevel_builddir@
+toplevel_srcdir = @toplevel_srcdir@
+
+# May be used by various substitution variables.
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
+MAINT_CHARSET = latin1
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+PWD_COMMAND = $${PWDCMD-pwd}
+STAMP = echo timestamp >
+toolexecdir = $(glibcxx_toolexecdir)
+toolexeclibdir = $(glibcxx_toolexeclibdir)
+@ENABLE_WERROR_FALSE@WERROR_FLAG =
+@ENABLE_WERROR_TRUE@WERROR_FLAG = -Werror
+@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS =
+@ENABLE_EXTERN_TEMPLATE_TRUE@XTEMPLATE_FLAGS = -fno-implicit-templates
+@GLIBCXX_LDBL_ALT128_COMPAT_FALSE@LDBL_128_FLAGS =
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@LDBL_128_FLAGS = $(LONG_DOUBLE_128_FLAGS)
+
+# These bits are all figured out from configure. Look in acinclude.m4
+# or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS.
+CONFIG_CXXFLAGS = \
+ $(SECTION_FLAGS) $(HWCAP_CFLAGS) -frandom-seed=$@ $(LDBL_128_FLAGS)
+
+WARN_CXXFLAGS = \
+ $(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once
+
+
+# -I/-D flags to pass when compiling.
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS)
+
+# Convenience library for C++26 runtime.
+noinst_LTLIBRARIES = libc++26convenience.la
+headers =
+# XTEMPLATE_FLAGS =
+@ENABLE_EXTERN_TEMPLATE_FALSE@inst_sources =
+
+# XTEMPLATE_FLAGS = -fno-implicit-templates
+@ENABLE_EXTERN_TEMPLATE_TRUE@inst_sources =
+sources = text_encoding.cc
+@GLIBCXX_HOSTED_FALSE@libc__26convenience_la_SOURCES =
+@GLIBCXX_HOSTED_TRUE@libc__26convenience_la_SOURCES = $(sources) $(inst_sources)
+
+# AM_CXXFLAGS needs to be in each subdirectory so that it can be
+# modified in a per-library or per-sub-library way. Need to manually
+# set this option because CONFIG_CXXFLAGS has to be after
+# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
+# as the occasion calls for it.
+AM_CXXFLAGS = \
+ -std=gnu++26 \
+ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
+ $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \
+ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) \
+ -fimplicit-templates
+
+AM_MAKEFLAGS = \
+ "gxx_include_dir=$(gxx_include_dir)"
+
+
+# Libtool notes
+
+# 1) In general, libtool expects an argument such as `--tag=CXX' when
+# using the C++ compiler, because that will enable the settings
+# detected when C++ support was being configured. However, when no
+# such flag is given in the command line, libtool attempts to figure
+# it out by matching the compiler name in each configuration section
+# against a prefix of the command line. The problem is that, if the
+# compiler name and its initial flags stored in the libtool
+# configuration file don't match those in the command line, libtool
+# can't decide which configuration to use, and it gives up. The
+# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
+# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
+# attempt to infer which configuration to use.
+#
+# The second tag argument, `--tag disable-shared` means that libtool
+# only compiles each source once, for static objects. In actuality,
+# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
+# the libtool command that is used create the object, which is
+# suitable for shared libraries. The `--tag disable-shared` must be
+# placed after --tag CXX lest things CXX undo the affect of
+# disable-shared.
+
+# 2) Need to explicitly set LTCXXCOMPILE so that EXTRA_CXX_FLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
+LTCXXCOMPILE = \
+ $(LIBTOOL) --tag CXX --tag disable-shared \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(EXTRA_CXX_FLAGS)
+
+LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
+
+# 3) We'd have a problem when building the shared libstdc++ object if
+# the rules automake generates would be used. We cannot allow g++ to
+# be used since this would add -lstdc++ to the link line which of
+# course is problematic at this point. So, we get the top-level
+# directory to configure libstdc++-v3 to use gcc as the C++
+# compilation driver.
+CXXLINK = \
+ $(LIBTOOL) --tag CXX --tag disable-shared \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXX) \
+ $(VTV_CXXLINKFLAGS) \
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/fragment.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps src/c++26/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign --ignore-deps src/c++26/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/fragment.am $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+libc++26convenience.la: $(libc__26convenience_la_OBJECTS) $(libc__26convenience_la_DEPENDENCIES) $(EXTRA_libc__26convenience_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(CXXLINK) $(libc__26convenience_la_OBJECTS) $(libc__26convenience_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+.cc.o:
+ $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ $(AM_V_CXX)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags dvi dvi-am html html-am info \
+ info-am install install-am install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am
+
+.PRECIOUS: Makefile
+
+
+vpath % $(top_srcdir)/src/c++26
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/libstdc++-v3/src/c++26/text_encoding.cc b/libstdc++-v3/src/c++26/text_encoding.cc
new file mode 100644
index 0000000..33c6c07
--- /dev/null
+++ b/libstdc++-v3/src/c++26/text_encoding.cc
@@ -0,0 +1,91 @@
+// Definitions for <text_encoding> -*- C++ -*-
+
+// Copyright The GNU Toolchain Authors.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+#include <text_encoding>
+#include <locale>
+
+#ifdef _GLIBCXX_USE_NL_LANGINFO_L
+#include <locale.h>
+#include <langinfo.h>
+
+#if __CHAR_BIT__ == 8
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+text_encoding
+__locale_encoding(const char* name)
+{
+ text_encoding enc;
+ if (locale_t loc = ::newlocale(LC_CTYPE_MASK, name, (locale_t)0))
+ {
+ if (const char* codeset = ::nl_langinfo_l(CODESET, loc))
+ {
+ string_view s(codeset);
+ if (s.size() < text_encoding::max_name_length)
+ enc = text_encoding(s);
+ }
+ ::freelocale(loc);
+ }
+ return enc;
+}
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace std
+
+std::text_encoding
+std::text_encoding::environment()
+{
+ return std::__locale_encoding("");
+}
+
+bool
+std::text_encoding::_M_is_environment() const
+{
+ bool matched = false;
+ if (locale_t loc = ::newlocale(LC_CTYPE_MASK, "", (locale_t)0))
+ {
+ if (const char* codeset = ::nl_langinfo_l(CODESET, loc))
+ {
+ string_view sv(codeset);
+ for (auto alias : aliases())
+ if (__unicode::__charset_alias_match(alias, sv))
+ {
+ matched = true;
+ break;
+ }
+ }
+ ::freelocale(loc);
+ }
+ return matched;
+}
+
+std::text_encoding
+std::locale::encoding() const
+{
+ return std::__locale_encoding(name().c_str());
+}
+#endif // CHAR_BIT == 8
+
+#endif // _GLIBCXX_USE_NL_LANGINFO_L
diff --git a/libstdc++-v3/src/experimental/Makefile.am b/libstdc++-v3/src/experimental/Makefile.am
index 8259f98..6241430 100644
--- a/libstdc++-v3/src/experimental/Makefile.am
+++ b/libstdc++-v3/src/experimental/Makefile.am
@@ -47,10 +47,12 @@ libstdc__exp_la_SOURCES = $(sources)
libstdc__exp_la_LIBADD = \
$(top_builddir)/src/c++23/libc++23convenience.la \
+ $(top_builddir)/src/c++26/libc++26convenience.la \
$(filesystem_lib) $(backtrace_lib)
libstdc__exp_la_DEPENDENCIES = \
$(top_builddir)/src/c++23/libc++23convenience.la \
+ $(top_builddir)/src/c++26/libc++26convenience.la \
$(filesystem_lib) $(backtrace_lib)
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
diff --git a/libstdc++-v3/src/experimental/Makefile.in b/libstdc++-v3/src/experimental/Makefile.in
index 0ff402d..13a1f2a 100644
--- a/libstdc++-v3/src/experimental/Makefile.in
+++ b/libstdc++-v3/src/experimental/Makefile.in
@@ -462,10 +462,12 @@ sources = \
libstdc__exp_la_SOURCES = $(sources)
libstdc__exp_la_LIBADD = \
$(top_builddir)/src/c++23/libc++23convenience.la \
+ $(top_builddir)/src/c++26/libc++26convenience.la \
$(filesystem_lib) $(backtrace_lib)
libstdc__exp_la_DEPENDENCIES = \
$(top_builddir)/src/c++23/libc++23convenience.la \
+ $(top_builddir)/src/c++26/libc++26convenience.la \
$(filesystem_lib) $(backtrace_lib)
diff --git a/libstdc++-v3/testsuite/22_locale/locale/encoding.cc b/libstdc++-v3/testsuite/22_locale/locale/encoding.cc
new file mode 100644
index 0000000..18825fb
--- /dev/null
+++ b/libstdc++-v3/testsuite/22_locale/locale/encoding.cc
@@ -0,0 +1,36 @@
+// { dg-options "-lstdc++exp" }
+// { dg-do run { target c++26 } }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+void
+test_encoding()
+{
+ const std::locale c = std::locale::classic();
+ std::text_encoding c_enc = c.encoding();
+ VERIFY( c_enc == std::text_encoding::ASCII );
+
+ const std::locale fr = std::locale(ISO_8859(15, fr_FR));
+ std::text_encoding fr_enc = fr.encoding();
+ VERIFY( fr_enc == std::text_encoding::ISO885915 );
+
+ const std::locale en = std::locale(ISO_8859(1, en_US));
+ std::text_encoding en_enc = en.encoding();
+ VERIFY( en_enc == std::text_encoding::ISOLatin1 );
+
+#if __cpp_exceptions
+ try {
+ const std::locale c_utf8 = std::locale("C.UTF-8");
+ VERIFY( c_utf8.encoding() == std::text_encoding::UTF8 );
+ } catch (...) {
+ }
+#endif
+}
+
+int main()
+{
+ test_encoding();
+}
diff --git a/libstdc++-v3/testsuite/ext/unicode/charset_alias_match.cc b/libstdc++-v3/testsuite/ext/unicode/charset_alias_match.cc
new file mode 100644
index 0000000..f6272ae
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/unicode/charset_alias_match.cc
@@ -0,0 +1,18 @@
+// { dg-do compile { target c++20 } }
+#include <format>
+
+using std::__unicode::__charset_alias_match;
+static_assert( __charset_alias_match("UTF-8", "utf8") == true );
+static_assert( __charset_alias_match("UTF-8", "u.t.f-008") == true );
+static_assert( __charset_alias_match("UTF-8", "utf-80") == false );
+static_assert( __charset_alias_match("UTF-8", "ut8") == false );
+
+static_assert( __charset_alias_match("iso8859_1", "ISO-8859-1") == true );
+
+static_assert( __charset_alias_match("", "") == true );
+static_assert( __charset_alias_match("", ".") == true );
+static_assert( __charset_alias_match("--", "...") == true );
+static_assert( __charset_alias_match("--a", "a...") == true );
+static_assert( __charset_alias_match("--a010", "a..10.") == true );
+static_assert( __charset_alias_match("--a010", "a..1.0") == false );
+static_assert( __charset_alias_match("aaaa", "000.00.0a0a)0aa...") == true );
diff --git a/libstdc++-v3/testsuite/std/ranges/cartesian_product/1.cc b/libstdc++-v3/testsuite/std/ranges/cartesian_product/1.cc
index f69f965..7281cd8 100644
--- a/libstdc++-v3/testsuite/std/ranges/cartesian_product/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/cartesian_product/1.cc
@@ -24,9 +24,9 @@ test01()
int w[] = {9};
auto v0 = views::cartesian_product();
- VERIFY( ranges::end(v0) - ranges::begin(v0) == 0 );
- VERIFY( ranges::size(v0) == 0 );
- VERIFY( ranges::empty(v0) );
+ VERIFY( ranges::end(v0) - ranges::begin(v0) == 1 );
+ VERIFY( ranges::size(v0) == 1 );
+ VERIFY( !ranges::empty(v0) );
auto v1 = views::cartesian_product(x);
VERIFY( ranges::end(v1) - ranges::begin(v1) == 3 );
diff --git a/libstdc++-v3/testsuite/std/text_encoding/cons.cc b/libstdc++-v3/testsuite/std/text_encoding/cons.cc
new file mode 100644
index 0000000..b9d9364
--- /dev/null
+++ b/libstdc++-v3/testsuite/std/text_encoding/cons.cc
@@ -0,0 +1,113 @@
+// { dg-do run { target c++26 } }
+
+#include <text_encoding>
+#include <string_view>
+#include <testsuite_hooks.h>
+
+using namespace std::string_view_literals;
+
+constexpr void
+test_default_construct()
+{
+ std::text_encoding e0;
+ VERIFY( e0.mib() == std::text_encoding::unknown );
+ VERIFY( e0.name()[0] == '\0' ); // P2862R1 name() should never return null
+ VERIFY( e0.aliases().empty() );
+}
+
+constexpr void
+test_construct_by_name()
+{
+ std::string_view s;
+ std::text_encoding e0(s);
+ VERIFY( e0.mib() == std::text_encoding::other );
+ VERIFY( e0.name() == s );
+ VERIFY( e0.aliases().empty() );
+
+ s = "not a real encoding";
+ std::text_encoding e1(s);
+ VERIFY( e1.mib() == std::text_encoding::other );
+ VERIFY( e1.name() == s );
+ VERIFY( e1.aliases().empty() );
+
+ VERIFY( e1 != e0 );
+ VERIFY( e1 == e0.mib() );
+
+ s = "utf8";
+ std::text_encoding e2(s);
+ VERIFY( e2.mib() == std::text_encoding::UTF8 );
+ VERIFY( e2.name() == s );
+ VERIFY( ! e2.aliases().empty() );
+ VERIFY( e2.aliases().front() == "UTF-8"sv );
+
+ s = "Latin-1"; // matches "latin1"
+ std::text_encoding e3(s);
+ VERIFY( e3.mib() == std::text_encoding::ISOLatin1 );
+ VERIFY( e3.name() == s );
+ VERIFY( ! e3.aliases().empty() );
+ VERIFY( e3.aliases().front() == "ISO_8859-1:1987"sv ); // primary name
+
+ s = "U.S."; // matches "us"
+ std::text_encoding e4(s);
+ VERIFY( e4.mib() == std::text_encoding::ASCII );
+ VERIFY( e4.name() == s );
+ VERIFY( ! e4.aliases().empty() );
+ VERIFY( e4.aliases().front() == "US-ASCII"sv ); // primary name
+}
+
+constexpr void
+test_construct_by_id()
+{
+ std::text_encoding e0(std::text_encoding::other);
+ VERIFY( e0.mib() == std::text_encoding::other );
+ VERIFY( e0.name() == ""sv );
+ VERIFY( e0.aliases().empty() );
+
+ std::text_encoding e1(std::text_encoding::unknown);
+ VERIFY( e1.mib() == std::text_encoding::unknown );
+ VERIFY( e1.name() == ""sv );
+ VERIFY( e1.aliases().empty() );
+
+ std::text_encoding e2(std::text_encoding::UTF8);
+ VERIFY( e2.mib() == std::text_encoding::UTF8 );
+ VERIFY( e2.name() == "UTF-8"sv );
+ VERIFY( ! e2.aliases().empty() );
+ VERIFY( e2.aliases().front() == std::string_view(e2.name()) );
+ bool found = false;
+ for (auto alias : e2.aliases())
+ if (alias == "csUTF8"sv)
+ {
+ found = true;
+ break;
+ }
+ VERIFY( found );
+}
+
+constexpr void
+test_copy_construct()
+{
+ std::text_encoding e0;
+ std::text_encoding e1 = e0;
+ VERIFY( e1 == e0 );
+
+ std::text_encoding e2(std::text_encoding::UTF8);
+ auto e3 = e2;
+ VERIFY( e3 == e2 );
+
+ e1 = e3;
+ VERIFY( e1 == e2 );
+}
+
+int main()
+{
+ auto run_tests = [] {
+ test_default_construct();
+ test_construct_by_name();
+ test_construct_by_id();
+ test_copy_construct();
+ return true;
+ };
+
+ run_tests();
+ static_assert( run_tests() );
+}
diff --git a/libstdc++-v3/testsuite/std/text_encoding/members.cc b/libstdc++-v3/testsuite/std/text_encoding/members.cc
new file mode 100644
index 0000000..adbd74a
--- /dev/null
+++ b/libstdc++-v3/testsuite/std/text_encoding/members.cc
@@ -0,0 +1,86 @@
+// { dg-options "-lstdc++exp" }
+// { dg-do run { target c++26 } }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+
+#include <text_encoding>
+#include <string_view>
+#include <locale.h>
+#include <testsuite_hooks.h>
+
+using namespace std::string_view_literals;
+
+void
+test_literal()
+{
+ const std::text_encoding lit = std::text_encoding::literal();
+ VERIFY( lit.name() == std::string_view(__GNUC_EXECUTION_CHARSET_NAME) );
+}
+
+void
+test_env()
+{
+ const std::text_encoding env = std::text_encoding::environment();
+
+ if (env.mib() == std::text_encoding::UTF8)
+ VERIFY( std::text_encoding::environment_is<std::text_encoding::UTF8>() );
+
+ ::setlocale(LC_ALL, ISO_8859(1, en_US));
+ const std::text_encoding env1 = std::text_encoding::environment();
+ VERIFY( env1 == env );
+
+ ::setlocale(LC_ALL, ISO_8859(15, fr_FR));
+ const std::text_encoding env2 = std::text_encoding::environment();
+ VERIFY( env2 == env );
+}
+
+void
+test_every_id()
+{
+ for (int i = 0; i <= 2260; ++i)
+ {
+ std::text_encoding::id mib{i};
+ switch (i)
+ {
+ case 0:
+ case 33 ... 34:
+ case 107 ... 108:
+ case 120 ... 999:
+ case 1022 ... 1999:
+ case 2110 ... 2249:
+ // These do not correspond to an enumerator of std::text_encoding::id
+ // so are not valid arguments to the constructor. Without assertions
+ // enabled, we map bad IDs to id::unknown as a libstdc++ extension.
+#ifndef _GLIBCXX_ASSERTIONS
+ {
+ std::text_encoding bad{mib};
+ VERIFY( bad.mib() == std::text_encoding::unknown );
+ VERIFY( bad.name() == ""sv );
+ }
+#endif
+ continue;
+ }
+ std::text_encoding enc{mib};
+ auto aliases = enc.aliases();
+ if (i == 1 || i == 2)
+ VERIFY( enc.name() == ""sv );
+ else
+ VERIFY( enc.name() == std::string_view(aliases.front()) );
+ auto begin = aliases.begin();
+ auto end = aliases.end();
+ VERIFY( (begin + std::ranges::distance(aliases)) == end );
+#ifndef _GLIBCXX_ASSERTIONS
+ // This is an error, but with assertions disabled is guaranteed safe:
+ VERIFY( begin[std::ranges::distance(aliases)] == ""sv );
+ // Likewise:
+ VERIFY( begin[999999] == *begin );
+#endif
+ }
+}
+
+int main()
+{
+ test_literal();
+ test_env();
+ test_every_id();
+}
diff --git a/libstdc++-v3/testsuite/std/text_encoding/requirements.cc b/libstdc++-v3/testsuite/std/text_encoding/requirements.cc
new file mode 100644
index 0000000..a1d5d6b
--- /dev/null
+++ b/libstdc++-v3/testsuite/std/text_encoding/requirements.cc
@@ -0,0 +1,77 @@
+// { dg-do compile { target c++26 } }
+// { dg-add-options no_pch }
+
+#include <text_encoding>
+#ifndef __cpp_lib_text_encoding
+# error "Feature-test macro for text_encoding missing in <text_encoding>"
+#elif __cpp_lib_text_encoding != 202306L
+# error "Feature-test macro for text_encoding has wrong value in <text_encoding>"
+#endif
+
+#undef __cpp_lib_expected
+#include <version>
+#ifndef __cpp_lib_text_encoding
+# error "Feature-test macro for text_encoding missing in <version>"
+#elif __cpp_lib_text_encoding != 202306L
+# error "Feature-test macro for text_encoding has wrong value in <version>"
+#endif
+
+#include <concepts>
+#include <ranges>
+static_assert( std::is_trivially_copyable_v<std::text_encoding> );
+
+using aliases_view = std::text_encoding::aliases_view;
+static_assert( std::copyable<aliases_view> );
+static_assert( std::ranges::view<aliases_view> );
+static_assert( std::ranges::random_access_range<aliases_view> );
+static_assert( std::ranges::borrowed_range<aliases_view> );
+static_assert( std::same_as<std::ranges::range_value_t<aliases_view>,
+ const char*> );
+static_assert( std::same_as<std::ranges::range_reference_t<aliases_view>,
+ const char*> );
+
+#include <testsuite_hooks.h>
+
+constexpr bool
+test_constexpr_iterator()
+{
+ // This encoding has two aliases, "UTF-8" and "csUTF8".
+ const auto a = std::text_encoding(std::text_encoding::UTF8).aliases();
+ const auto begin = a.begin();
+ const auto end = a.end();
+ auto iter = begin;
+ VERIFY( *iter == *begin );
+ VERIFY( *iter == iter[0] );
+ VERIFY( iter[1] == begin[1] );
+ --++iter;
+ VERIFY( iter == begin );
+ auto iter2 = iter++;
+ VERIFY( iter2 == begin );
+ VERIFY( iter != begin );
+ iter2 = iter--;
+ VERIFY( iter2 != begin );
+ VERIFY( iter == begin );
+ iter++++; // Increments prvalue returned by operator++(int) instead of iter.
+ VERIFY( iter == iter2 );
+ iter----; // Decrements prvalue returned by operator++(int) instead of iter.
+ VERIFY( iter == begin );
+ const auto d = std::ranges::distance(a);
+ iter += d;
+ VERIFY( iter == end );
+ VERIFY( (iter - begin) == d );
+ VERIFY( (begin + 2) == iter );
+ VERIFY( (2 + begin) == iter );
+ VERIFY( iter[-1] == begin[1] );
+ iter -= d;
+ VERIFY( iter == begin );
+ VERIFY( *(iter + 1) == iter[1] );
+ VERIFY( (1 + iter - 1) == begin );
+ VERIFY( (-1 + (iter - -2) + -1) == begin );
+
+ std::ranges::iterator_t<std::text_encoding::aliases_view> singular{};
+ VERIFY( (singular + 0) == singular );
+ VERIFY( (singular - 0) == singular );
+
+ return true;
+}
+static_assert( test_constexpr_iterator() );