]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
3 weeks agoFix scan-asm failure for loongarch64 after recent ext-dce changes
Jeff Law [Sat, 30 May 2026 17:01:14 +0000 (11:01 -0600)] 
Fix scan-asm failure for loongarch64 after recent ext-dce changes

The recent changes to ext-dce to promote narrow operations into wider modes
when the extended bits are dead slightly twiddled the output for a loongarch64
test.  This just adjusts the expected output.

Pushing to the trunk.

gcc/testsuite

* gcc.target/loongarch/la64/mul-const-reduction.c: Adjust expected
output.

3 weeks agoxtensa: Optimize 'insvsi' insn pattern if TARGET_DEPBITS is not configured
Takayuki 'January June' Suwa [Mon, 25 May 2026 22:32:43 +0000 (07:32 +0900)] 
xtensa: Optimize 'insvsi' insn pattern if TARGET_DEPBITS is not configured

By default, the RTX generation pass conservatively expands bit-field
insertion to an insn sequence consisting of the bit mask and shift of
the inserted value, the bit-inversion mask of the destination, and finally
a logical-OR.

However, if the logical-AND operation on an inverted bit-field mask is
relatively expensive, it is more advantageous to shift the inserted value
without masking it and then follow the idiom '(A & M) | (B & ~M)' ->
'((A ^ B) & M) ^ B'.

     /* example */
     struct foo {
       unsigned int x:10;
       unsigned int y:11;
       unsigned int z:11;
     };
     struct foo test0(struct foo a, unsigned int b) {
       a.x = b;
       return a;
     }
     struct foo test1(struct foo a, unsigned int b) {
       a.y = b;
       return a;
     }

     ;; before (-Os ; !BITS_BIG_ENDIAN | !TARGET_DEPBITS)
     test0:
      entry sp, 32
      movi a8, -0x400 ;; = ~0x000003FF
      extui a3, a3, 0, 10 ;; mask
      and a2, a2, a8 ;; inverted mask
      or a2, a2, a3 ;; logical-OR
      retw.n
      .literal_position
      .literal .LC0, -2096129 ;; = ~0x001FFC00
     test1:
      entry sp, 32
      l32r a8, .LC0
      extui a3, a3, 0, 11 ;; mask
      slli a3, a3, 10 ;;
      and a2, a2, a8 ;; inverted mask
      or a2, a2, a3 ;; logical-OR
      retw.n

     ;; after (-Os ; !BITS_BIG_ENDIAN | !TARGET_DEPBITS)
     test0:
      entry sp, 32
      xor a3, a2, a3
      extui a3, a3, 0, 10 ;; mask
      xor a2, a2, a3
      retw.n
     test1:
      entry sp, 32
      slli a3, a3, 10 ;; bit-position alignment
      xor a3, a2, a3
      extui a3, a3, 10, 11 ;; mask
      slli a3, a3, 10 ;;
      xor a2, a2, a3
      retw.n

gcc/ChangeLog:

* config/xtensa/xtensa.md (insvsi_intermal):
Rename from 'insvsi'.
(insvsi): New expansion pattern that also addresses situations
where the DEPBITS machine instruction is unavailable.

3 weeks agoxtensa: Remove '*splice_bits' insn pattern
Takayuki 'January June' Suwa [Mon, 25 May 2026 22:30:45 +0000 (07:30 +0900)] 
xtensa: Remove '*splice_bits' insn pattern

This patch reverts the previous commit "xtensa: Optimize bitwise splicing
operation" (e3a4bd0bbdccdde0cff85f93064b01a44fb10d2a).

In recent versions of gcc, expressions like '(A & M) | (B & ~M)' are
transformed into '((A ^ B) & M) ^ B' by GIMPLE simplification, so the
existence of that MD pattern is no longer relevant.

gcc/ChangeLog:

* config/xtensa/xtensa.md (*splice_bits):
Remove.

3 weeks agofortran: fix ICE with procedure pointer declared in BLOCK
Jerry DeLisle [Wed, 27 May 2026 02:21:52 +0000 (19:21 -0700)] 
fortran: fix ICE with procedure pointer declared in BLOCK

Procedure pointer declared inside a BLOCK construct in a program that has
contained procedures caused an ICE in convert_nonlocal_reference_op
(tree-nested.cc) because get_proc_pointer_decl set the proc pointer's
DECL_CONTEXT to NULL instead of the enclosing program function decl.

The root cause: the condition to call gfc_add_decl_to_function vs
gfc_add_decl_to_parent_function checked whether proc_name->backend_decl
matched current_function_decl.  For a BLOCK namespace the proc_name has
FL_LABEL flavor and its backend_decl is never set, so the condition failed
and gfc_add_decl_to_parent_function was called.  That function sets
DECL_CONTEXT to DECL_CONTEXT(current_function_decl), which is NULL for a
top-level program.  The tree-nested pass then found no nesting level
matching target_context = NULL and crashed in the internal_error call
dereferencing the NULL target_context.

Fix: add the missing BLOCK namespace check (FL_LABEL flavor) so that
procedure pointers in BLOCK constructs are treated like regular variables
and added to the enclosing function via gfc_add_decl_to_function.

Assisted by: Claude Sonnet 4.6

PR fortran/105582

gcc/fortran/ChangeLog:

* trans-decl.cc (get_proc_pointer_decl): Add FL_LABEL check to
route BLOCK-construct procedure pointers to gfc_add_decl_to_function
rather than gfc_add_decl_to_parent_function.

gcc/testsuite/ChangeLog:

* gfortran.dg/block_proc_ptr_1.f90: New test.

3 weeks agoc++: Don't ICE on the static constexpr expansion-stmt vars during mangling [PR125123]
Jakub Jelinek [Sat, 30 May 2026 15:49:18 +0000 (17:49 +0200)] 
c++: Don't ICE on the static constexpr expansion-stmt vars during mangling [PR125123]

The following testcase ICEs, because we decide to mangle the (for the time
being as workaround static constexpr variables created for expansion
statements).  And if there is more than one in the same function and we
mangle both, we ICE because they mangle the same.

The problem is that cp_finish_decl does not determine_local_discriminator
for DECL_ARTIFICIAL vars.
The following patch fixes that by calling it even for DECL_ARTIFICIAL vars.
The patch also sets DECL_IGNORED_P on those vars, I think there is no
value exposing those in the debug information, the iterating is done
at compile time and all user IMHO cares are the individual user variables
initialized to whatever was derived from the temporaries.

2026-05-29  Jakub Jelinek  <jakub@redhat.com>

PR c++/125123
* parser.cc (cp_build_range_for_decls): If range_temp or begin
are static, set DECL_IGNORED_P on it.
* pt.cc (finish_expansion_stmt): Similarly for iter.
* decl.cc (cp_finish_decl): Call determine_local_discriminator
etc. also for DECL_ARTIFICIAL TREE_STATIC vars.

* g++.dg/cpp26/expansion-stmt42.C: New test.

Reviewed-by: Jason Merrill <jason@redhat.com>
3 weeks agotestsuite: Fix testsuite failures after typo fixes
Dhruv Chawla [Sun, 17 May 2026 10:21:21 +0000 (10:21 +0000)] 
testsuite: Fix testsuite failures after typo fixes

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/testsuite/ChangeLog:

* g++.dg/opt/pr104515.C: Fix typo in dejagnu check pattern.
* g++.dg/tree-ssa/pr88797.C: Likewise.
* gcc.dg/ipa/fnsummary-1.c: Likewise.
* gcc.dg/tree-ssa/copy-headers-7.c: Likewise.
* gcc.dg/tree-ssa/split-path-11.c: Likewise.
* gcc.dg/tree-ssa/split-path-13.c: Likewise.
* gcc.dg/tree-ssa/split-path-2.c: Likewise.
* gcc.dg/tree-ssa/split-path-5.c: Likewise.

3 weeks agoRe-flow lines made longer than 80 characters by typo fixes
Dhruv Chawla [Sun, 17 May 2026 06:58:00 +0000 (06:58 +0000)] 
Re-flow lines made longer than 80 characters by typo fixes

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ada/ChangeLog:

* gnathtml.pl: Reflow long line.

gcc/ChangeLog:

* builtins.def: Reflow long line.
* graphite-isl-ast-to-gimple.cc (graphite_copy_stmts_from_block): Likewise.
* lto-streamer.h: Likewise.
* prime-paths.cc (struct xpair): Likewise.

gcc/fortran/ChangeLog:

* gfortran.texi: Reflow long line.

include/ChangeLog:

* hsa.h: Reflow long line.

libgcobol/ChangeLog:

* README: Reflow long line.

libiberty/ChangeLog:

* simple-object-mach-o.c (simple_object_mach_o_write_segment): Reflow
long line.

libstdc++-v3/ChangeLog:

* include/bits/stl_algo.h: Reflow long line.

3 weeks agolto-plugin: Fix typos in lto-plugin.c
Dhruv Chawla [Thu, 14 May 2026 09:30:57 +0000 (09:30 +0000)] 
lto-plugin: Fix typos in lto-plugin.c

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
lto-plugin/ChangeLog:

* lto-plugin.c (startswith): Fix typos.
(exec_lto_wrapper): Likewise.
(symbol_strength): Likewise.

3 weeks agolibvtv: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 09:29:55 +0000 (09:29 +0000)] 
libvtv: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libvtv/ChangeLog:

* vtv_fail.cc: Fix typos.
* vtv_malloc.cc (__vtv_free): Likewise.
* vtv_map.h (class insert_only_hash_map): Likewise.
* vtv_rts.cc (init_set_symbol_debug): Likewise.
* vtv_utils.cc (vtv_log_write): Likewise.

3 weeks agolibstdc++: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 09:28:27 +0000 (09:28 +0000)] 
libstdc++: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libstdc++-v3/ChangeLog:

* configure: Regenerate.
* acinclude.m4: Fix typos.
* configure.ac: Likewise.
* doc/doxygen/doxygroups.cc: Likewise.
* doc/doxygen/stdheader.cc (init_map): Likewise.
* include/bits/basic_string.h: Likewise.
* include/bits/chrono.h: Likewise.
* include/bits/chrono_io.h: Likewise.
* include/bits/cpyfunc_impl.h: Likewise.
* include/bits/funcref_impl.h: Likewise.
* include/bits/locale_conv.h: Likewise.
* include/bits/mofunc_impl.h: Likewise.
* include/bits/shared_ptr_base.h: Likewise.
* include/bits/simd_details.h: Likewise.
* include/bits/stl_algo.h: Likewise.
* include/bits/stl_deque.h: Likewise.
* include/bits/stl_iterator.h: Likewise.
* include/bits/stl_map.h: Likewise.
* include/bits/stl_multimap.h: Likewise.
* include/bits/stl_multiset.h: Likewise.
* include/bits/stl_set.h: Likewise.
* include/bits/unicode.h: Likewise.
* include/bits/unique_ptr.h: Likewise.
* include/bits/version.h: Likewise.
* include/experimental/bits/simd.h: Likewise.
* include/experimental/bits/simd_fixed_size.h: Likewise.
* include/experimental/bits/simd_x86_conversions.h: Likewise.
* include/ext/concurrence.h: Likewise.
* include/ext/pb_ds/detail/container_base_dispatch.hpp: Likewise.
* include/ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp: Likewise.
* include/ext/pb_ds/detail/tree_policy/sample_tree_node_update.hpp: Likewise.
* include/ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp: Likewise.
* include/ext/pb_ds/tree_policy.hpp: Likewise.
* include/ext/pb_ds/trie_policy.hpp: Likewise.
* include/parallel/multiway_merge.h: Likewise.
* include/pstl/parallel_backend_tbb.h (__parallel_transform_reduce): Likewise.
(class __merge_func): Likewise.
(class __stable_sort_func): Likewise.
(__parallel_stable_sort): Likewise.
* include/tr1/shared_ptr.h: Likewise.
* libsupc++/hash_bytes.cc: Likewise.
* libsupc++/vmi_class_type_info.cc (__do_find_public_src): Likewise.
* src/c++17/fast_float/fast_float.h (struct parse_options): Likewise.
(rounds_to_nearest): Likewise.

3 weeks agolibquadmath: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 09:24:50 +0000 (09:24 +0000)] 
libquadmath: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libquadmath/ChangeLog:

* math/powq.c: Fix typos.
* math/rem_pio2q.c: Likewise.
* printf/printf_fp.c (__quadmath_printf_fp): Likewise.
* update-quadmath.py: Likewise

3 weeks agolibitm: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 09:23:57 +0000 (09:23 +0000)] 
libitm: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libitm/ChangeLog:

* configure: Regenerate.
* acinclude.m4: Fix typos.
* dispatch.h (struct method_group): Likewise.
* method-gl.cc: Likewise.
* method-ml.cc: Likewise.
* method-serial.cc: Likewise.

3 weeks agolibiberty: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 09:22:42 +0000 (09:22 +0000)] 
libiberty: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libiberty/ChangeLog:

* bcopy.c: Fix typos.
* bsearch.c: Likewise.
* bsearch_r.c: Likewise.
* configure.ac: Likewise.
* cp-demangle.c (d_print_comp_inner): Likewise.
(d_print_comp): Likewise.
* d-demangle.c (dlang_identifier): Likewise.
* dyn-string.c: Likewise.
* ldirname.c: Likewise.
* make-relative-prefix.c (make_relative_prefix_1): Likewise.
* obstacks.texi: Likewise.
* pex-win32.c (argv_to_cmdline): Likewise.
(spawn_script): Likewise.
* random.c (random): Likewise.
(setstate): Likewise.
* regex.c (WIDE_CHAR_SUPPORT): Likewise.
(convert_mbs_to_wcs): Likewise.
(PREFIX): Likewise.
(wcs_compile_range): Likewise.
(count_mbs_length): Likewise.
(wcs_re_match_2_internal): Likewise.
(byte_re_match_2_internal): Likewise.
* sigsetmask.c: Likewise.
* simple-object-elf.c (SHT_SYMTAB_SHNDX): Likewise.
(STV_HIDDEN): Likewise.
(simple_object_elf_copy_lto_debug_sections): Likewise.
* simple-object-mach-o.c (struct mach_o_header_32): Likewise.
(struct mach_o_header_64): Likewise.
(simple_object_mach_o_write_segment): Likewise.
* strsignal.c (defined): Likewise.

3 weeks agolibgomp: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 09:19:21 +0000 (09:19 +0000)] 
libgomp: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libgomp/ChangeLog:

* configure: Regenerate.
* acinclude.m4: Fix typos.
* env.c (parse_places_var): Likewise.
(parse_stacksize): Likewise.
(parse_wait_policy): Likewise.
(parse_affinity): Likewise.
(initialize_env): Likewise.
* libgomp.h (struct target_mem_desc): Likewise.
* plugin/build-target-indirect-htab.h: Likewise.
* plugin/plugin-gcn.c (struct hsa_runtime_fn_info): Likewise.
(struct hip_runtime_fn_info): Likewise.
(limit_worker_threads): Likewise.
(max_isa_vgprs): Likewise.
(GOMP_OFFLOAD_get_name): Likewise.
* plugin/plugin-nvptx.c (GOMP_OFFLOAD_get_name): Likewise.
* target.c (gomp_map_vars_internal): Likewise.
(GOMP_target_ext): Likewise.

3 weeks agolibgm2: Fix typos in configure.ac
Dhruv Chawla [Thu, 14 May 2026 09:17:28 +0000 (09:17 +0000)] 
libgm2: Fix typos in configure.ac

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libgm2/ChangeLog:

* configure.ac: Fix typos.

3 weeks agolibgfortran: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 09:16:32 +0000 (09:16 +0000)] 
libgfortran: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libgfortran/ChangeLog:

* caf/caf_error.h (caf_runtime_error): Fix typos.
* caf/libcaf.h: Likewise.
* caf/mpi.c (caf_runtime_error): Likewise.
* caf/shmem.c (_gfortran_caf_deregister): Likewise.
* caf/shmem/alloc.h: Likewise.
* caf/shmem/shared_memory.c (shared_memory_get_env): Likewise.
* caf/shmem/supervisor.h (struct caf_shmem_token): Likewise.
* caf/shmem/teams_mgmt.h (struct caf_shmem_team): Likewise.
* caf/single.c (caf_runtime_error): Likewise.
(_gfortran_caf_deregister): Likewise.
* intrinsics/args.c (get_command_i4): Likewise.
* intrinsics/chmod.c: Likewise.
* intrinsics/env.c (PREFIX): Likewise.
* intrinsics/trigd.c: Likewise.
* io/async.c (init_adv_cond): Likewise.
* io/file_pos.c (st_rewind): Likewise.
* io/format.c (parse_format_list): Likewise.
* io/open.c (new_unit): Likewise.
(st_open): Likewise.
* io/transfer.c (write_block): Likewise.
(unformatted_read): Likewise.
(unformatted_write): Likewise.
(formatted_transfer_scalar_write): Likewise.
* io/transfer128.c (export_proto): Likewise.
* io/unix.c (buf_init): Likewise.
(mem_read): Likewise.
* io/write.c (btoa): Likewise.
(list_formatted_write): Likewise.
* runtime/select_inc.c (select_string): Likewise.

3 weeks agolibgcc: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 09:10:21 +0000 (09:10 +0000)] 
libgcc: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libgcc/ChangeLog:

* fixed-bit.c: Fix typos.
* libgcov-interface.c (__gcov_reset_int): Likewise.
(__gcov_dump_int): Likewise.
* libgcov-util.c (FLAG_ONE_HOT): Likewise.
(calculate_overlap): Likewise.
* unwind-dw2.c: Likewise.
* unwind-seh.c (_Unwind_GetTextRelBase): Likewise.

3 weeks agolibdecnumber: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 09:07:11 +0000 (09:07 +0000)] 
libdecnumber: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libdecnumber/ChangeLog:

* decBasic.c (decCanonical): Fix typos.
(decDivide): Likewise.
(decFiniteMultiply): Likewise.
(decFloatMultiply): Likewise.
(decFloatQuantize): Likewise.
(decToInt32): Likewise.
* decCommon.c (decFinalize): Likewise.
(decFloatFromString): Likewise.
* decContext.c (decContextGetStatus): Likewise.
* decNumber.c (decToString): Likewise.
(decAddOp): Likewise.
(decMalloc): Likewise.
* decNumberLocal.h: Likewise.

3 weeks agolibcpp: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 08:57:09 +0000 (08:57 +0000)] 
libcpp: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libcpp/ChangeLog:

* files.cc (_cpp_stack_translated_file): Fix typos.
(_cpp_get_file_path): Likewise.
* include/cpplib.h (PREV_FALLTHROUGH): Likewise.
(struct cpp_options): Likewise.
* include/line-map.h (enum lc_reason): Likewise.
* internal.h (struct cpp_buffer): Likewise.
* lex.cc (lex_raw_string): Likewise.
(cpp_directive_only_process): Likewise.
* line-map.cc (linemap_add): Likewise.
(linemap_module_restore): Likewise.
(rich_location::get_last_fixit_hint): Likewise.
* macro.cc (_cpp_builtin_macro_text): Likewise.
(arg_token_ptr_at): Likewise.
(replace_args): Likewise.
(reached_end_of_context): Likewise.
(cpp_get_token_1): Likewise.
(create_iso_definition): Likewise.
(get_deferred_or_lazy_macro): Likewise.
* traditional.cc (check_output_buffer): Likewise.

3 weeks agolibcody: Fix typos in README.md
Dhruv Chawla [Thu, 14 May 2026 08:54:44 +0000 (08:54 +0000)] 
libcody: Fix typos in README.md

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libcody/ChangeLog:

* README.md: Fix typos.

3 weeks agolibbacktrace: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 08:54:02 +0000 (08:54 +0000)] 
libbacktrace: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libbacktrace/ChangeLog:

* allocfail.sh: Fix typos.
* elf.c (elf_fetch_bits): Likewise.

3 weeks agolibatomic: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 08:53:12 +0000 (08:53 +0000)] 
libatomic: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
libatomic/ChangeLog:

* acinclude.m4: Fix typos.
* libatomic_i.h (__attribute__): Likewise.
* configure: Regenerate.

3 weeks agovect: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 11:38:36 +0000 (11:38 +0000)] 
vect: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ChangeLog:

* tree-vect-data-refs.cc (vect_get_smallest_scalar_type): Fix typos.
(vect_preserves_scalar_order_p): Likewise.
(vect_slp_analyze_instance_dependence): Likewise.
(vect_enhance_data_refs_alignment): Likewise.
(vect_check_gather_scatter): Likewise.
(vect_grouped_store_supported): Likewise.
* tree-vect-generic.cc (type_for_widest_vector_mode): Likewise.
* tree-vect-loop-manip.cc (vect_set_loop_condition_partial_vectors_avx512): Likewise.
(get_live_virtual_operand_on_edge): Likewise.
(vect_can_peel_nonlinear_iv_p): Likewise.
(vect_do_peeling): Likewise.
* tree-vect-loop.cc (vec_init_loop_exit_info): Likewise.
(vect_verify_full_masking_avx512): Likewise.
(vect_verify_loop_lens): Likewise.
(vect_analyze_loop_costing): Likewise.
(vect_analyze_loop_2): Likewise.
(vect_analyze_loop): Likewise.
(vect_is_simple_reduction): Likewise.
(vect_create_epilog_for_reduction): Likewise.
(vectorizable_lane_reducing): Likewise.
(vectorizable_reduction): Likewise.
(vectorizable_live_operation): Likewise.
(vect_record_loop_len): Likewise.
(scale_profile_for_vect_loop): Likewise.
(vect_update_ivs_after_vectorizer_for_early_breaks): Likewise.
* tree-vect-patterns.cc (vect_recog_bit_insert_pattern): Likewise.
(vect_recog_build_binary_gimple_stmt): Likewise.
(vect_recog_sat_sub_pattern_transform): Likewise.
(vect_recog_sat_sub_pattern): Likewise.
(add_code_for_floorceilround_divmod): Likewise.
(vect_recog_bool_pattern): Likewise.
(struct vect_recog_func): Likewise.
* tree-vect-slp-patterns.cc (class complex_pattern): Likewise.
(compatible_complex_nodes_p): Likewise.
* tree-vect-slp.cc (vect_slp_tree_uniform_p): Likewise.
(vect_def_types_match): Likewise.
(vect_record_max_nunits): Likewise.
(vect_analyze_slp_instance): Likewise.
(vect_lower_load_permutations): Likewise.
(vect_optimize_slp_pass::is_compatible_layout): Likewise.
* tree-vect-stmts.cc (vect_get_strided_load_store_ops): Likewise.
(vectorizable_simd_clone_call): Likewise.
(vectorizable_store): Likewise.
(vectorizable_load): Likewise.
(vectorizable_condition): Likewise.
(vectorizable_early_exit): Likewise.
* tree-vectorizer.cc (vector_costs::compare_inside_loop_cost): Likewise.
* tree-vectorizer.h (enum vect_reduction_type): Likewise.

3 weeks agotree-ssa: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 12:04:38 +0000 (12:04 +0000)] 
tree-ssa: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ChangeLog:

* tree-ssa-alias-compare.h: Fix typos.
* tree-ssa-alias.cc (ptr_deref_may_alias_decl_p): Likewise.
(ao_ref_alignment): Likewise.
(component_ref_to_zero_sized_trailing_array_p): Likewise.
(access_path_may_continue_p): Likewise.
(nonoverlapping_component_refs_p_1): Likewise.
(nonoverlapping_array_refs_p): Likewise.
(refs_may_alias_p_2): Likewise.
(ref_maybe_used_by_call_p_1): Likewise.
(stmt_kills_ref_p): Likewise.
* tree-ssa-ccp.cc: Likewise.
* tree-ssa-dce.cc (mark_all_reaching_defs_necessary_1): Likewise.
(propagate_necessity): Likewise.
(propagate_counts): Likewise.
(eliminate_unnecessary_stmts): Likewise.
* tree-ssa-dom.cc (pass_dominator::execute): Likewise.
* tree-ssa-dse.cc: Likewise.
* tree-ssa-forwprop.cc (new_src_based_on_copy): Likewise.
(optimize_agr_copyprop_1): Likewise.
(pass_forwprop::execute): Likewise.
* tree-ssa-ifcombine.cc (tree_ssa_ifcombine_bb_1): Likewise.
(pass_tree_ifcombine::execute): Likewise.
* tree-ssa-live.cc (remove_unused_scope_block_p): Likewise.
* tree-ssa-loop-ch.cc (loop_combined_static_and_iv_p): Likewise.
(should_duplicate_loop_header_p): Likewise.
* tree-ssa-loop-im.cc (get_coldest_out_loop): Likewise.
(determine_max_movement): Likewise.
(execute_sm_exit): Likewise.
(hoist_memory_references): Likewise.
* tree-ssa-loop-ivcanon.cc (constant_after_peeling): Likewise.
(loop_edge_to_cancel): Likewise.
(unloop_loops): Likewise.
(try_unroll_loop_completely): Likewise.
(adjust_loop_info_after_peeling): Likewise.
(tree_unroll_loops_completely_1): Likewise.
* tree-ssa-loop-ivopts.cc (struct iv_inv_expr_ent): Likewise.
(dump_cand): Likewise.
(group_compare_offset): Likewise.
(split_address_groups): Likewise.
(get_computation_aff_1): Likewise.
(iv_ca_dump): Likewise.
* tree-ssa-loop-niter.cc (number_of_iterations_ne): Likewise.
(number_of_iterations_popcount): Likewise.
(idx_infer_loop_bounds): Likewise.
(infer_loop_bounds_from_signedness): Likewise.
(discover_iteration_bound_by_body_walk): Likewise.
(loop_exits_before_overflow): Likewise.
* tree-ssa-loop-niter.h: Likewise.
* tree-ssa-loop-prefetch.cc (should_issue_prefetch_p): Likewise.
(schedule_prefetches): Likewise.
* tree-ssa-loop-split.cc (split_loop): Likewise.
(find_vdef_in_loop): Likewise.
(get_cond_branch_to_split_loop): Likewise.
* tree-ssa-math-opts.cc (powi_as_mults): Likewise.
(expand_pow_as_sqrts): Likewise.
(gimple_expand_builtin_pow): Likewise.
(convert_mult_to_widen): Likewise.
(convert_plusminus_to_widen): Likewise.
* tree-ssa-phiopt.cc (replace_phi_edge_with_variable): Likewise.
(factor_out_conditional_operation): Likewise.
(cond_if_else_store_replacement_1): Likewise.
(execute_over_cond_phis): Likewise.
* tree-ssa-phiprop.cc (can_handle_load): Likewise.
(propagate_with_phi): Likewise.
* tree-ssa-pre.cc (get_or_alloc_expr_for_nary): Likewise.
(sorted_array_from_bitmap_set): Likewise.
(value_dies_in_block_x): Likewise.
(compute_antic_aux): Likewise.
* tree-ssa-propagate.cc (substitute_and_fold_engine::substitute_and_fold): Likewise.
* tree-ssa-reassoc.cc (get_rank): Likewise.
(remove_visited_stmt_chain): Likewise.
* tree-ssa-sccvn.cc (vn_reference_eq): Likewise.
(vn_reference_lookup_call): Likewise.
(vn_nary_op_eq): Likewise.
(vn_nary_op_insert_into): Likewise.
(visit_reference_op_call): Likewise.
(visit_phi): Likewise.
(eliminate_dom_walker::eliminate_stmt): Likewise.
(eliminate_dom_walker::eliminate_cleanup): Likewise.
(process_bb): Likewise.
* tree-ssa-scopedtables.cc (hashable_expr_equal_p): Likewise.
* tree-ssa-structalias.cc (determine_global_memory_access): Likewise.
(clear_dependence_clique): Likewise.
* tree-ssa-threadbackward.cc (back_threader_profitability::profitable_path_p): Likewise.
* tree-ssa-threadedge.cc (propagate_threaded_block_debug_into): Likewise.
* tree-ssa-uninit.cc (warn_uninit): Likewise.
(execute_late_warn_uninitialized): Likewise.
* tree-ssanames.cc (range_info_get_range): Likewise.

3 weeks agotree: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 16:16:01 +0000 (16:16 +0000)] 
tree: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ChangeLog:

* tree-assume.cc (assume_query::calculate_phi): Fix typos.
* tree-cfg.cc (assign_discriminators): Likewise.
(stmt_starts_bb_p): Likewise.
(move_stmt_op): Likewise.
(ifconvertable_edge): Likewise.
* tree-cfgcleanup.cc (maybe_remove_forwarder_block): Likewise.
(cleanup_tree_cfg_noloop): Likewise.
* tree-chrec.cc (scev_is_linear_expression): Likewise.
* tree-complex.cc (expand_complex_div_wide): Likewise.
* tree-core.h (enum built_in_class): Likewise.
* tree-data-ref.cc (dump_alias_pair): Likewise.
(create_ifn_alias_checks): Likewise.
* tree-data-ref.h (struct data_dependence_relation): Likewise.
* tree-eh.cc (lower_try_finally_fallthru_label): Likewise.
(lower_eh_dispatch): Likewise.
* tree-if-conv.cc (idx_within_array_bound): Likewise.
(base_object_writable): Likewise.
(ifcvt_memrefs_wont_trap): Likewise.
(get_loop_body_in_if_conv_order): Likewise.
(predicate_scalar_phi): Likewise.
* tree-inline.cc (remap_type_1): Likewise.
(declare_return_variable): Likewise.
(inline_forbidden_p): Likewise.
(estimate_num_insns): Likewise.
(copy_decl_for_dup_finish): Likewise.
* tree-into-ssa.cc (get_ssa_name_ann): Likewise.
(clear_ssa_name_info): Likewise.
(insert_updated_phi_nodes_compare_uids): Likewise.
(update_ssa): Likewise.
* tree-loop-distribution.cc (enum partition_kind): Likewise.
(struct partition): Likewise.
(class loop_distribution): Likewise.
(loop_distribution::classify_partition): Likewise.
(loop_distribution::pg_add_dependence_edges): Likewise.
(add_partition_graph_edge): Likewise.
(free_partition_graph_vdata): Likewise.
(pg_unmark_merged_alias_ddrs): Likewise.
(version_loop_by_alias_check): Likewise.
* tree-object-size.cc (gimplify_size_expressions): Likewise.
(object_sizes_execute): Likewise.
* tree-parloops.cc (parloops_is_simple_reduction): Likewise.
(transform_to_exit_first_loop_alt): Likewise.
* tree-predcom.cc (pcom_worker::suitable_component_p): Likewise.
(pcom_worker::determine_roots_comp): Likewise.
(prepare_initializers_chain_store_elim): Likewise.
(pcom_worker::tree_predictive_commoning_loop): Likewise.
* tree-profile.cc (condition_uid): Likewise.
(cov_length): Likewise.
(tree_profiling): Likewise.
* tree-scalar-evolution.cc (scev_dfs::add_to_evolution_1): Likewise.
(scev_reset): Likewise.
(expression_expensive_p): Likewise.
* tree-sra.cc (struct access): Likewise.
(build_access_from_call_arg): Likewise.
(path_comparable_for_same_access): Likewise.
(child_would_conflict_in_acc): Likewise.
(sra_modify_call_arg): Likewise.
* tree-switch-conversion.cc (can_log2): Likewise.
(switch_conversion::exp_index_transform): Likewise.
* tree-switch-conversion.h (enum cluster_type): Likewise.
* tree-vrp.cc (remove_unreachable::handle_early): Likewise.
* tree.cc (build5): Likewise.
(get_file_function_name): Likewise.
(build_opaque_vector_type): Likewise.
(array_ref_flexible_size_p): Likewise.
(verify_type_variant): Likewise.
(gimple_canonical_types_compatible_p): Likewise.
* tree.h (decl_debug_args_insert): Likewise.
(strip_pointer_types): Likewise.

3 weeks agortl-ssa: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 11:21:13 +0000 (11:21 +0000)] 
rtl-ssa: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ChangeLog:

* rtl-ssa/access-utils.h (drop_memory_access): Fix typos.
* rtl-ssa/accesses.cc (clobber_info::recompute_group): Likewise.
* rtl-ssa/accesses.h: Likewise.
* rtl-ssa/blocks.cc (function_info::add_artificial_accesses): Likewise.
* rtl-ssa/functions.h: Likewise.
* rtl-ssa/insns.cc (function_info::record_use): Likewise.
* rtl-ssa/insns.h: Likewise.

3 weeks agolto: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 16:07:46 +0000 (16:07 +0000)] 
lto: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ChangeLog:

* lto-cgraph.cc (get_alias_symbol): Fix typos.
(input_node): Likewise.
(input_varpool_node): Likewise.
* lto-ltrans-cache.cc: Likewise.
* lto-streamer-in.cc (lto_location_cache::revert_location_cache): Likewise.
(lto_location_cache::input_location_and_block): Likewise.
(lto_location_cache::input_location): Likewise.
(lto_input_location): Likewise.
* lto-streamer-out.cc (lto_variably_modified_type_p): Likewise.
(lto_is_streamable): Likewise.
(DFS::DFS): Likewise.
(cmp_symbol_files): Likewise.
(lto_output): Likewise.
* lto-streamer.h (enum LTO_tags): Likewise.
* lto-wrapper.cc (merge_flto_options): Likewise.
(run_gcc): Likewise.

gcc/lto/ChangeLog:

* Make-lang.in: Fix typos.
* lto-common.cc (read_cgraph_and_symbols): Likewise.
* lto-lang.cc (lto_post_options): Likewise.
* lto-partition.cc (add_symbol_to_partition_1): Likewise.
(partition_over_target_split): Likewise.
(lto_balanced_map): Likewise.
(rename_statics): Likewise.
* lto-symtab.cc (lto_cgraph_replace_node): Likewise.
(lto_varpool_replace_node): Likewise.
(lto_symtab_merge_symbols): Likewise.
* lto.cc (stream_out_partitions): Likewise.
(do_whole_program_analysis): Likewise.

3 weeks agojit: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 11:19:47 +0000 (11:19 +0000)] 
jit: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/jit/ChangeLog:

* TODO.rst: Fix typos.
* docs/cp/intro/tutorial03.rst: Likewise.
* docs/cp/topics/functions.rst: Likewise.
* docs/cp/topics/types.rst: Likewise.
* docs/internals/index.rst: Likewise.
* docs/intro/tutorial02.rst: Likewise.
* docs/intro/tutorial03.rst: Likewise.
* docs/topics/compatibility.rst: Likewise.
* docs/topics/contexts.rst: Likewise.
* docs/topics/functions.rst: Likewise.
* docs/topics/performance.rst: Likewise.
* docs/topics/types.rst: Likewise.
* jit-builtins.cc (builtins_manager::make_type): Likewise.
* jit-playback.cc (make_fake_args): Likewise.
(get_source_file): Likewise.
(get_source_line): Likewise.
* jit-recording.h (types_kinda_same_internal): Likewise.
* libgccjit.cc (gcc_jit_context_new_struct_constructor): Likewise.
* libgccjit.h (gcc_jit_case_as_object): Likewise.

3 weeks agoinclude: Fix typos in various files
Dhruv Chawla [Mon, 11 May 2026 15:31:07 +0000 (15:31 +0000)] 
include: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
include/ChangeLog:

* demangle.h (enum demangle_component_type): Fix typos.
* doubly-linked-list.h: Likewise.
* floatformat.h (struct floatformat): Likewise.
* gcc-cp-fe.def (GCC_METHOD1): Likewise.
(GCC_METHOD2): Likewise.
* gomp-constants.h (enum gomp_map_kind): Likewise.
(GOMP_TARGET_ARG_THREAD_LIMIT): Likewise.
* hsa.h: Likewise.
* hsa_ext_amd.h (hsa_amd_signal_value_pointer): Likewise.
(hsa_amd_memory_lock): Likewise.
(hsa_amd_pointer_info): Likewise.
(hsa_amd_ipc_memory_create): Likewise.
(hsa_amd_ipc_signal_create): Likewise.
* libiberty.h (PEX_STDOUT_APPEND): Likewise.
* longlong.h: Likewise.
* plugin-api.h (enum ld_plugin_status): Likewise.
* splay-tree.h (struct splay_tree_s): Likewise.

3 weeks agoipa: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 11:29:49 +0000 (11:29 +0000)] 
ipa: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ChangeLog:

* ipa-comdats.cc: Fix typos.
* ipa-cp.cc (good_cloning_opportunity_p): Likewise.
(dump_profile_updates): Likewise.
(update_counts_for_self_gen_clones): Likewise.
(update_profiling_info): Likewise.
(adjust_refs_in_act_callers): Likewise.
(struct cloning_opportunity_ranking): Likewise.
* ipa-fnsummary.cc (evaluate_conditions_for_known_args): Likewise.
(unmodified_parm_or_parm_agg_item): Likewise.
(guards_builtin_unreachable): Likewise.
(analyze_function_body): Likewise.
(estimate_edge_devirt_benefit): Likewise.
* ipa-fnsummary.h (cross_module_call_p): Likewise.
* ipa-free-lang-data.cc (fld_simplified_type_name): Likewise.
(free_lang_data_in_decl): Likewise.
* ipa-icf-gimple.cc (func_checker::compare_decl): Likewise.
(func_checker::compatible_types_p): Likewise.
(func_checker::compare_gimple_asm): Likewise.
* ipa-icf.cc (sem_function::hash_stmt): Likewise.
(sem_item_optimizer::subdivide_classes_by_equality): Likewise.
(sem_item_optimizer::traverse_congruence_split): Likewise.
(sem_item_optimizer::process_cong_reduction): Likewise.
* ipa-inline-transform.cc (mark_all_inlined_calls_cdtor): Likewise.
(preserve_function_body_p): Likewise.
* ipa-inline.cc (enum can_inline_edge_by_limits_flags): Likewise.
(can_early_inline_edge_p): Likewise.
(early_inliner): Likewise.
* ipa-locality-cloning.cc (edge_redirectable_p): Likewise.
(clone_node_as_needed): Likewise.
(partition_callchain): Likewise.
* ipa-modref.cc (modref_eaf_analysis::merge_with_ssa_name): Likewise.
* ipa-param-manipulation.cc (ipa_param_adjustments::get_surviving_params): Likewise.
(purge_all_uses): Likewise.
(ipa_param_body_adjustments::mark_dead_statements): Likewise.
(replace_with_mapped_expr): Likewise.
(ipa_param_body_adjustments::get_new_param_chain): Likewise.
(record_argument_state): Likewise.
(ipa_param_body_adjustments::perform_cfun_body_modifications): Likewise.
* ipa-param-manipulation.h (struct ipa_replace_map): Likewise.
* ipa-polymorphic-call.cc (ipa_polymorphic_call_context::combine_with): Likewise.
* ipa-prop.cc (struct ipa_vr_ggc_hash_traits): Likewise.
(noted_fnptr_hasher::equal): Likewise.
(ipa_set_ancestor_jf): Likewise.
(check_stmt_for_type_change): Likewise.
(param_type_may_change_p): Likewise.
(find_dominating_aa_status): Likewise.
(parm_ref_data_pass_through_p): Likewise.
(build_agg_jump_func_from_list): Likewise.
(analyze_agg_content_value): Likewise.
(ipa_single_noted_fnptr_in_record): Likewise.
(ipa_make_edge_direct_to_target): Likewise.
(combine_controlled_uses_counters): Likewise.
(ipa_duplicate_jump_function): Likewise.
(ipa_write_jump_function): Likewise.
(useful_ipcp_transformation_info_p): Likewise.
* ipa-prop.h (struct GTY): Likewise.
* ipa-reference.cc (ipa_reference_var_uid): Likewise.
(ipa_reference_get_written_global): Likewise.
(union_static_var_sets): Likewise.
* ipa-split.cc (split_function): Likewise.
* ipa-sra.cc (isra_track_scalar_value_uses): Likewise.
(process_scan_results): Likewise.
(flip_all_hints_pessimistic): Likewise.
(flip_all_param_hints_pessimistic): Likewise.
* ipa-strub.cc (get_strub_mode_attr_parm): Likewise.
(compute_strub_mode): Likewise.
* ipa-utils.cc (ipa_merge_profiles): Likewise.
(recursive_call_p): Likewise.
(stmt_may_terminate_function_p): Likewise.
(find_always_executed_bbs): Likewise.
* ipa-utils.h (type_with_linkage_p): Likewise.
(lto_streaming_expected_p): Likewise.
* ipa-visibility.cc (varpool_node::externally_visible_p): Likewise.
* ipa.cc (update_inlined_to_pointer): Likewise.
(enqueue_node): Likewise.
(process_references): Likewise.
(set_readonly_bit): Likewise.
(clear_addressable_bit): Likewise.
(BOTTOM): Likewise.
(propagate_single_user): Likewise.

3 weeks agogimple: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 16:23:34 +0000 (16:23 +0000)] 
gimple: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ChangeLog:

* gimple-array-bounds.cc (trailing_array): Fix typos.
* gimple-crc-optimization.cc (crc_optimization::set_defs): Likewise.
* gimple-fold.cc (get_range_strlen): Likewise.
(can_refer_decl_in_current_unit_p): Likewise.
(gimple_fold_builtin_bcopy): Likewise.
(get_range_strlen_tree): Likewise.
(gimple_fold_builtin_stpcpy): Likewise.
(fold_stmt_1): Likewise.
(fold_truth_andor_for_ifcombine): Likewise.
(gimple_fold_stmt_to_constant): Likewise.
(fold_const_aggregate_ref): Likewise.
(gimple_get_virt_method_for_vtable): Likewise.
(rewrite_to_defined_unconditional): Likewise.
(gimple_build): Likewise.
(gimple_convert): Likewise.
* gimple-harden-control-flow.cc (pass_harden_control_flow_redundancy::execute): Likewise.
* gimple-loop-interchange.cc (loop_cand::can_interchange_p): Likewise.
(loop_cand::analyze_lcssa_phis): Likewise.
(should_interchange_loops): Likewise.
* gimple-loop-jam.cc (tree_loop_unroll_and_jam): Likewise.
* gimple-low.cc (find_assumption_locals_r): Likewise.
* gimple-match-exports.cc (try_conditional_simplification): Likewise.
* gimple-predicate-analysis.cc (find_matching_predicate_in_rest_chains): Likewise.
(uninit_analysis::func_t::phi_arg_set): Likewise.
(predicate::dump): Likewise.
* gimple-predicate-analysis.h (class uninit_analysis): Likewise.
* gimple-range-cache.cc (sbr_vector::bb_range_p): Likewise.
(block_range_cache::set_bb_range): Likewise.
* gimple-range-gori.cc (gori_compute::compute_operand_range): Likewise.
(gori_stmt_info::gori_stmt_info): Likewise.
(gori_calc_operands): Likewise.
(gori_on_edge): Likewise.
(gori_name_helper): Likewise.
* gimple-range-infer.h: Likewise.
* gimple-range-phi.cc (phi_group::phi_group): Likewise.
(phi_group::calculate_using_modifier): Likewise.
(phi_analyzer::operator[]): Likewise.
* gimple-range-phi.h: Likewise.
* gimple-range.cc (dom_ranger::range_of_stmt): Likewise.
* gimple-ssa-isolate-paths.cc (is_addr_local): Likewise.
(warn_return_addr_local): Likewise.
* gimple-ssa-pta-constraints.cc (get_constraint_for_ssa_var): Likewise.
(find_func_clobbers): Likewise.
(create_variable_info_for): Likewise.
(associate_varinfo_to_alias): Likewise.
* gimple-ssa-sccopy.cc: Likewise.
* gimple-ssa-split-paths.cc (count_stmts_in_block): Likewise.
(poor_ifcvt_pred): Likewise.
(is_feasible_trace): Likewise.
* gimple-ssa-sprintf.cc (get_int_range): Likewise.
(handle_printf_call): Likewise.
* gimple-ssa-store-merging.cc (get_location_for_stmts): Likewise.
* gimple-ssa-strength-reduction.cc: Likewise.
* gimple-ssa-warn-access.cc (call_arg): Likewise.
* gimple-ssa-warn-restrict.cc (builtin_memref::offset_out_of_bounds): Likewise.
(builtin_access::overlap_size): Likewise.
(maybe_diag_access_bounds): Likewise.
* gimple.def (GIMPLE_PHI): Likewise.
* gimple.h (gimple_goto_dest): Likewise.

3 weeks agogenerators: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 11:32:57 +0000 (11:32 +0000)] 
generators: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ChangeLog:

* genattrtab.cc (min_fn): Fix typos.
(get_attr_order): Likewise.
(optimize_attrs): Likewise.
* genautomata.cc (struct unit_usage): Likewise.
* gengtype-state.cc (s_expr_writer::write_any_indent): Likewise.
(write_state): Likewise.
* gengtype.cc (struct file_rule_st): Likewise.
(walk_type): Likewise.
(write_roots): Likewise.
* genmatch.cc (expr::gen_transform): Likewise.
(usage): Likewise.
* genopinit.cc (open_outfile): Likewise.
(handle_overloaded_code_for): Likewise.
(main): Likewise.
* genoutput.cc (operand_data_hasher::equal): Likewise.
* genpreds.cc (FOR_ALL_CONSTRAINTS): Likewise.
* genrecog.cc (prune_invalid_results): Likewise.
(split_out_patterns): Likewise.
* gensupport.cc (parse_section): Likewise.
(convert_syntax): Likewise.
(mark_operands_from_match_dup): Likewise.

3 weeks agogcc/[s-z]*: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 08:50:56 +0000 (08:50 +0000)] 
gcc/[s-z]*: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ChangeLog:

* sanopt.cc: Fix typos.
* sched-deps.cc (sched_analyze_2): Likewise.
* sel-sched-ir.cc (alloc_target_context): Likewise.
(av_set_union_and_live): Likewise.
(make_regions_from_loop_nest): Likewise.
* sel-sched-ir.h (struct _list_iterator): Likewise.
(struct succs_info): Likewise.
(SUCCS_ALL): Likewise.
* sel-sched.cc (moveup_expr): Likewise.
(moveup_expr_cached): Likewise.
(get_spec_check_type_for_insn): Likewise.
(get_expr_cost): Likewise.
(find_place_for_bookkeeping): Likewise.
(update_and_record_unavailable_insns): Likewise.
(move_op_at_first_insn): Likewise.
(calculate_new_fences): Likewise.
* shrink-wrap.cc (live_edge_for_reg): Likewise.
(try_shrink_wrapping): Likewise.
* simplify-rtx.cc
(simplify_context::simplify_logical_relational_operation): Likewise.
(simplify_const_vector_subreg): Likewise.
* spellcheck.cc (assert_not_suggested_for): Likewise.
* stringpool.h: Likewise.
* sym-exec/sym-exec-state.cc (state::do_shift_right): Likewise.
(state::get_parent_with_const_child): Likewise.
(state::add_numbers): Likewise.
(state::add_equal_cond): Likewise.
(state::add_not_equal_cond): Likewise.
* sym-exec/sym-exec-state.h (class state): Likewise.
* symbol-summary.h: Likewise.
* symtab.cc (symtab_node::noninterposable_alias): Likewise.
(symtab_node::equal_address_to): Likewise.
* system.h (gcc_stablesort_r): Likewise.
* target-hooks-macros.h: Likewise.
* target.def: Likewise.
* targhooks.cc (default_floatn_mode): Likewise.
(default_floatn_builtin_p): Likewise.
(default_builtin_vector_alignment_reachable): Likewise.
(default_addr_space_for_artificial_rodata): Likewise.
* text-art/ruler.cc (x_ruler::update_layout): Likewise.
* text-art/ruler.h (class x_ruler): Likewise.
* timevar.def (TV_ISOLATE_ERRONEOUS_PATHS): Likewise.
* trans-mem.cc (ipa_tm_scan_irr_block): Likewise.
(ipa_tm_execute): Likewise.
* typed-splay-tree.h (class typed_splay_tree): Likewise.
* ubsan.cc (instrument_bool_enum_load): Likewise.
* value-prof.cc: Likewise.
* value-range.cc (irange::union_append): Likewise.
(irange::snap): Likewise.
(irange::snap_subranges): Likewise.
(irange::get_bitmask): Likewise.
* value-range.h (irange_bitmask::get_precision): Likewise.
* value-relation.cc (dom_oracle::next_relation): Likewise.
(block_relation_iterator::block_relation_iterator): Likewise.
* var-tracking.cc (shared_hash_find): Likewise.
(emit_note_insn_var_location): Likewise.
* varasm.cc (mergeable_constant_section): Likewise.
(finish_tm_clone_pairs): Likewise.
(default_binds_local_p_3): Likewise.
* vr-values.cc (simplify_using_ranges::simplify): Likewise.
* vtable-verify.cc: Likewise.
* warning-control.cc (has_warning_spec): Likewise.
* wide-int.cc (wi::from_mpz): Likewise.
(wi::force_to_size): Likewise.
(wi::divmod_internal): Likewise.
* wide-int.h (wi::bitreverse): Likewise.
(wi::umin): Likewise.
(wi::mul_high): Likewise.
(wi::div_trunc): Likewise.
(wi::sdiv_trunc): Likewise.
(wi::udiv_trunc): Likewise.
(wi::div_floor): Likewise.
(wi::sdiv_floor): Likewise.
(wi::udiv_floor): Likewise.
(wi::div_ceil): Likewise.
(wi::udiv_ceil): Likewise.
(wi::div_round): Likewise.
(wi::gcd): Likewise.
(wi::mod_trunc): Likewise.
(wi::smod_trunc): Likewise.
(wi::umod_trunc): Likewise.
(wi::mod_floor): Likewise.
(wi::umod_floor): Likewise.
(wi::mod_ceil): Likewise.

3 weeks agogcc/[o-r]*: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 07:55:28 +0000 (07:55 +0000)] 
gcc/[o-r]*: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/objc/ChangeLog:

* objc-act.cc (objc_compare_types): Fix typos.
(objc_decl_method_attributes): Likewise.
(build_fast_enumeration_state_template): Likewise.
(objc_finish_foreach_loop): Likewise.
* objc-act.h (objc_common_register_features): Likewise.
* objc-runtime-hooks.h (struct objc_runtime_hooks): Likewise.

gcc/ChangeLog:

* omp-expand.cc (expand_oacc_collapse_vars): Likewise.
(expand_omp_for_init_vars): Likewise.
(expand_omp_for): Likewise.
(expand_omp_atomic_fetch_op): Likewise.
(build_omp_regions_1): Likewise.
* omp-general.cc (omp_is_allocatable_or_ptr): Likewise.
* omp-low.cc (lower_rec_input_clauses): Likewise.
(lower_omp): Likewise.
* omp-offload.cc (oacc_validate_dims): Likewise.
(oacc_loop_process): Likewise.
(oacc_loop_fixed_partitions): Likewise.
(oacc_loop_auto_partitions): Likewise.
(execute_oacc_device_lower): Likewise.
* omp-simd-clone.cc (simd_clone_clauses_extract): Likewise.
(ipa_simd_modify_stmt_ops): Likewise.
* optabs-query.cc (lshift_cheap_p): Likewise.
* optabs-query.h (trapv_binoptab_p): Likewise.
(get_vec_cmp_icode): Likewise.
* optabs.cc (expand_binop): Likewise.
(expand_vec_perm_var): Likewise.
(expand_compare_and_swap_loop): Likewise.
(expand_atomic_load): Likewise.
(maybe_optimize_fetch_op): Likewise.
(can_reuse_operands_p): Likewise.
* opts-global.cc (init_options_once): Likewise.
* opts.h (struct cl_option): Likewise.
* pair-fusion.cc (pair_fusion_bb_info::try_fuse_pair): Likewise.
* pair-fusion.h (enum class): Likewise.
* passes.cc (account_profile_1): Likewise.
* path-coverage.cc (instrument_prime_paths): Likewise.
* plugin.cc (get_event_last): Likewise.
* pointer-query.cc (handle_min_max_size): Likewise.
(handle_array_ref): Likewise.
(handle_ssa_name): Likewise.
* poly-int.h (struct if_lossless): Likewise.
(POLY_POLY_COEFF): Likewise.
* postreload-gcse.cc (gcse_after_reload_main): Likewise.
* predict.cc (expr_expected_value_1): Likewise.
(is_exit_with_zero_arg): Likewise.
(predict_paths_for_bb): Likewise.
(estimate_bb_frequencies): Likewise.
(rebuild_frequencies): Likewise.
(make_pass_rebuild_frequencies): Likewise.
* pretty-print-format-impl.h: Likewise.
* pretty-print.h: Likewise.
* prime-paths.cc (struct xpair): Likewise.
(edge_matrix): Likewise.
(test_build_ccfg): Likewise.
* print-rtl.cc (rtx_writer::print_rtx_operand_code_r): Likewise.
* profile-count.h (class profile_probability): Likewise.
* pta-andersen.cc (merge_node_constraints): Likewise.
(add_graph_edge): Likewise.
* range-op.cc (bool): Likewise.
(operator_cast::op1_range): Likewise.
(operator_bitwise_and::wi_fold): Likewise.
(operator_bitwise_and::op1_range): Likewise.
* range-op.h: Likewise.
* read-md.h (class md_reader): Likewise.
* read-rtl-function.cc (lookup_reg_by_dump_name): Likewise.
* real.cc: Likewise.
* recog.h: Likewise.
* ree.cc (find_and_remove_re): Likewise.
* reg-notes.def (REG_CFA_NOTE): Likewise.
* reginfo.cc (reg_allocno_class): Likewise.
* reload1.cc (will_delete_init_insn_p): Likewise.
(emit_reload_insns): Likewise.
* resource.cc (mark_referenced_resources): Likewise.
(mark_target_live_regs): Likewise.
* rtl.def (DEFINE_SPECIAL_PREDICATE): Likewise.
(COND): Likewise.
(DEFINE_SUBST): Likewise.
* rtl.h (const_vec_series_p_1): Likewise.
(const_vec_series_p): Likewise.

3 weeks agogcc/[e-m]*: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 06:17:01 +0000 (06:17 +0000)] 
gcc/[e-m]*: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ChangeLog:

* emit-rtl.h (struct rtl_data): Fix typos.
(struct address_reload_context): Likewise.
* explow.cc (anti_adjust_stack_and_probe): Likewise.
* explow.h (anti_adjust_stack_and_probe_stack_clash): Likewise.
* expmed.cc (store_bit_field_using_insv): Likewise.
(expand_mult): Likewise.
(emit_store_flag_force): Likewise.
(equivalent_cmp_code): Likewise.
* expr.cc (class op_by_pieces_d): Likewise.
(op_by_pieces_d::run): Likewise.
(use_group_regs): Likewise.
(get_def_for_expr): Likewise.
(emit_move_insn): Likewise.
(expand_expr_real): Likewise.
(expand_expr_real_gassign): Likewise.
* ext-dce.cc (ext_dce_process_uses): Likewise.
(ext_dce_process_bb): Likewise.
(ext_dce_rd_confluence_n): Likewise.
* fibonacci_heap.h (fibonacci_heap::cut): Likewise.
* fold-const.cc (combine_comparisons): Likewise.
(operand_compare::operand_equal_p): Likewise.
(fold_view_convert_vector_encoding): Likewise.
(fold_truth_andor): Likewise.
* fold-const.h: Likewise.
* function.cc (temp_address_hasher::equal): Likewise.
(gen_call_used_regs_seq): Likewise.
* gcc-diagnostic-spec.cc (GTY): Likewise.
(warning_suppressed_at): Likewise.
* gcc.cc (driver::maybe_run_linker): Likewise.
* gcov.cc (print_usage): Likewise.
(strip_extention): Likewise.
* gdbhooks.py: Likewise.
* gimplify.cc (gimplify_decl_expr): Likewise.
(gimplify_modify_expr): Likewise.
(oacc_default_clause): Likewise.
(omp_notice_variable): Likewise.
* graph.cc (draw_cfg_nodes): Likewise.
* graphite-dependences.cc (scop_get_reads_and_writes): Likewise.
* graphite-isl-ast-to-gimple.cc (graphite_copy_stmts_from_block): Likewise.
* haifa-sched.cc (model_set_excess_costs): Likewise.
(analyze_set_insn_for_autopref): Likewise.
(autopref_multipass_dfa_lookahead_guard): Likewise.
* hash-map-traits.h (HASH_MAP_TRAITS_H): Likewise.
* hosthooks.h (struct host_hooks): Likewise.
* ifcvt.cc (noce_try_sign_bit_splat): Likewise.
* input.cc (line_table_test::line_table_test): Likewise.
* internal-fn.def (PHI): Likewise.
* internal-fn.h (enum ifn_goacc_loop_kind): Likewise.
* ira-build.cc (create_insn_allocnos): Likewise.
* ira-color.cc (ira_mark_new_stack_slot): Likewise.
* ira-int.h: Likewise.
* ira.cc (struct sloc): Likewise.
* json-parsing.cc (parser::require_one_of): Likewise.
* langhooks.h (struct lang_hooks_for_decls): Likewise.
* libgdiagnostics.cc: Likewise.
* libgdiagnostics.h (diagnostic_manager_write_patch): Likewise.
* loop-invariant.cc (MAX_CANON_ADDR_PARTS): Likewise.
* lra-assigns.cc (reload_pseudo_compare_func): Likewise.
* lra-constraints.cc (match_reload): Likewise.
(process_alt_operands): Likewise.
(process_address_1): Likewise.
(lra_constraints): Likewise.
(inherit_in_ebb): Likewise.
* lra-eliminations.cc (init_elim_table): Likewise.
* lra-remat.cc: Likewise.
* machmode.h (struct int_n_data_t): Likewise.
* mem-stats.h (mem_alloc_description::register_descriptor): Likewise.
(mem_alloc_description::unregister_descriptor): Likewise.
* mode-switching.cc (optimize_mode_switching): Likewise.
* modulo-sched.cc (schedule_reg_moves): Likewise.
(optimize_sc): Likewise.

3 weeks agogcc/[a-d]*: Fix typos in various files
Dhruv Chawla [Thu, 14 May 2026 06:01:23 +0000 (06:01 +0000)] 
gcc/[a-d]*: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ChangeLog:

* adjust-alignment.cc (pass_adjust_alignment::execute): Fix typos.
* alias.cc (alias_set_subset_of): Likewise.
(alias_ptr_types_compatible_p): Likewise.
(get_alias_set): Likewise.
(record_component_aliases): Likewise.
(base_alias_check): Likewise.
* alloc-pool.h: Likewise.
* asan.cc (insert_if_then_before_iter): Likewise.
(asan_expand_check_ifn): Likewise.
(hwasan_expand_check_ifn): Likewise.
* asan.h (sanitize_flags_p): Likewise.
* asm-toplevel.cc (analyze_toplevel_extended_asm): Likewise.
* attr-fnspec.h: Likewise.
* attribs.cc (decl_attributes): Likewise.
* auto-profile.cc (function_instance::match): Likewise.
(function_instance::remove_icall_target): Likewise.
(autofdo_source_profile::offline_external_functions): Likewise.
(afdo_set_bb_count): Likewise.
(scale_bbs): Likewise.
(afdo_adjust_guessed_profile): Likewise.
* basic-block.h (find_fallthru_edge): Likewise.
* bbitmap.h: Likewise.
* bitmap.cc (bitmap_list_find_element): Likewise.
* bitmap.h: Likewise.
* btfout.cc (BTF_INFO_SECTION_FLAGS): Likewise.
(btf_asm_type): Likewise.
(output_btf_vars): Likewise.
(btf_add_used_type_1): Likewise.
* builtins.cc (string_length): Likewise.
(expand_builtin_setjmp_setup): Likewise.
(inline_expand_builtin_bytecmp): Likewise.
* builtins.def: Likewise.
* ccmp.cc (get_compare_parts): Likewise.
(expand_ccmp_next): Likewise.
* ccmp.h: Likewise.
* cfg.cc (update_bb_profile_for_threading): Likewise.
* cfganal.cc (post_order_compute): Likewise.
* cfgbuild.cc (find_many_sub_basic_blocks): Likewise.
* cfgexpand.cc (vars_ssa_cache::dump): Likewise.
(add_scope_conflicts_1): Likewise.
(set_parm_rtl): Likewise.
(expand_one_ssa_partition): Likewise.
(expand_one_var): Likewise.
(discover_nonconstant_array_refs_r): Likewise.
(pass_expand::execute): Likewise.
* cfgloop.cc (get_estimated_loop_iterations): Likewise.
* cfgloopanal.cc (loop_count_in): Likewise.
* cfgloopmanip.cc (loop_exit_for_scaling): Likewise.
(update_loop_exit_probability_scale_dom_bbs): Likewise.
* cgraph.cc (add_detected_attribute_1): Likewise.
(cgraph_edge::maybe_hot_p): Likewise.
* cgraph.h (struct cgraph_node): Likewise.
* cif-code.def (ORIGINALLY_INDIRECT_CALL): Likewise.
* collect2.cc (main): Likewise.
* combine.cc (simplify_comparison): Likewise.
(distribute_notes): Likewise.
* configure.ac: Likewise.
* coretypes.h (enum pad_direction): Likewise.
* coroutine-passes.cc (make_pass_coroutine_lower_builtins): Likewise.
* coverage.cc (coverage_compute_profile_id): Likewise.
* cse.cc (struct set): Likewise.
(try_back_substitute_reg): Likewise.
(count_stores): Likewise.
* cselib.cc (struct cselib_hasher): Likewise.
* ctfc.cc (ctfc_get_num_ctf_vars): Likewise.
(ctf_add_string): Likewise.
(ctf_add_function_arg): Likewise.
* ctfc.h (GTY): Likewise.
(CTF_AUX_STRTAB): Likewise.
(ctfc_get_num_ctf_vars): Likewise.
* ctfout.cc (ctf_asm_sou_lmember): Likewise.
(output_ctf_header): Likewise.
* debug.h: Likewise.
* defaults.h: Likewise.
* df-problems.cc (df_simulate_fixup_sets): Likewise.
(df_simulate_finalize_backwards): Likewise.
* diagnostic-context-rich-location.cc
(lazy_diagnostic_context_path::make_inner_path): Likewise.
* diagnostics/color.cc (auto_enable_urls): Likewise.
* diagnostics/context.h: Likewise.
* diagnostics/sarif-sink.cc (get_message_from_result): Likewise.
* double-int.cc (double_int::lrotate): Likewise.
* dwarf2asm.cc (dw2_asm_output_delta_uleb128): Likewise.
* dwarf2cfi.cc (dwarf2out_frame_debug_expr): Likewise.
* dwarf2ctf.cc (ctf_get_AT_data_member_location): Likewise.
(handle_ctf_type_tags): Likewise.
* dwarf2out.cc (cst_pool_loc_descr): Likewise.
(loc_list_for_address_of_addr_expr_of_indirect_ref): Likewise.
(resolve_args_picking_1): Likewise.
(typed_binop_from_tree): Likewise.
(gen_array_type_die): Likewise.
* dwarf2out.h (struct dw_val_node): Likewise.
(dw_loc_dtprel): Likewise.

3 weeks agofortran: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 11:16:57 +0000 (11:16 +0000)] 
fortran: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/fortran/ChangeLog:

* check.cc (oct2bin): Fix typos.
(gfc_check_move_alloc): Likewise.
* class.cc (gfc_intrinsic_hash_value): Likewise.
* decl.cc (copy_prefix): Likewise.
* dependency.cc (gfc_dep_compare_expr): Likewise.
* expr.cc (gfc_check_assign_symbol): Likewise.
* frontend-passes.cc (combine_array_constructor): Likewise.
(doloop_code): Likewise.
(doloop_warn): Likewise.
(matmul_lhs_realloc): Likewise.
* gfortran.h: Likewise.
* gfortran.texi: Likewise.
* interface.cc (compare_parameter): Likewise.
* intrinsic.cc (add_functions): Likewise.
(add_subroutines): Likewise.
* invoke.texi: Likewise.
* lang.opt: Likewise.
* module.cc (mio_full_f2k_derived): Likewise.
* openmp.cc (gfc_match_omp_variable_list): Likewise.
* resolve.cc (resolve_global_procedure): Likewise.
(gfc_fixup_inferred_type_refs): Likewise.
(gfc_verify_binding_labels): Likewise.
(resolve_fl_parameter): Likewise.
* trans-array.cc (gfc_set_loop_bounds_from_array_spec): Likewise.
(gfc_trans_array_constructor_value): Likewise.
(maybe_substitute_expr): Likewise.
(duplicate_allocatable_coarray): Likewise.
* trans-decl.cc (gfc_trans_deferred_vars): Likewise.
* trans-expr.cc (gfc_vptr_size_get): Likewise.
(gfc_trans_subcomponent_assign): Likewise.
(gfc_conv_expr): Likewise.
(fcncall_realloc_result): Likewise.
(alloc_scalar_allocatable_for_assignment): Likewise.
(gfc_trans_assignment_1): Likewise.
* trans-openmp.cc (gfc_omp_deep_mapping_cnt): Likewise.
* trans-stmt.cc (trans_associate_var): Likewise.
(gfc_trans_allocate): Likewise.
* trans.cc (gfc_finalize_tree_expr): Likewise.

3 weeks agofixincludes: Fix typos in various files
Dhruv Chawla [Mon, 11 May 2026 15:25:48 +0000 (15:25 +0000)] 
fixincludes: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
fixincludes/ChangeLog:

* README: Fix typos.
* fixinc.in: Likewise.
* fixincl.c (quoted_file_exists): Likewise.
* fixlib.c (fix_path_separators): Likewise.
* inclhack.def: Likewise.

3 weeks agodoc: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 11:10:49 +0000 (11:10 +0000)] 
doc: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ChangeLog:

* doc/analyzer.texi: Fix typos.
* doc/cpp.texi: Likewise.
* doc/extend.texi: Likewise.
* doc/gcov.texi: Likewise.
* doc/gm2.texi: Likewise.
* doc/gty.texi: Likewise.
* doc/install.texi: Likewise.
* doc/invoke.texi: Likewise.
* doc/libgdiagnostics/topics/compatibility.rst: Likewise.
* doc/libgdiagnostics/topics/physical-locations.rst: Likewise.
* doc/libgdiagnostics/tutorial/07-execution-paths.rst: Likewise.
* doc/libgdiagnostics/tutorial/08-message-buffers.rst: Likewise.
* doc/match-and-simplify.texi: Likewise.
* doc/md.texi: Likewise.
* doc/optinfo.texi: Likewise.
* doc/params.texi: Likewise.
* doc/poly-int.texi: Likewise.
* doc/riscv-ext.texi: Likewise.
* doc/rtl.texi: Likewise.
* doc/sourcebuild.texi: Likewise.
* doc/tm.texi: Likewise.
* doc/tm.texi.in: Likewise.
* doc/tree-ssa.texi: Likewise.

3 weeks agod: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 11:02:25 +0000 (11:02 +0000)] 
d: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/d/ChangeLog:

* d-attribs.cc (d_handle_alloc_size_attribute): Fix typos.
* d-codegen.cc (build_boolop): Likewise.
(get_frame_for_symbol): Likewise.
* d-gimplify.cc (empty_modify_p): Likewise.
* d-lang.cc (d_parse_file): Likewise.
* d-spec.cc (lang_specific_driver): Likewise.
* d-target.cc (Target::systemLinkage): Likewise.
* decl.cc (get_fndecl_arguments): Likewise.
(build_class_instance): Likewise.
* expr.cc: Likewise.
* implement-d.texi: Likewise.
* intrinsics.cc (call_builtin_fn): Likewise.
(expand_intrinsic_bsf): Likewise.
(expand_intrinsic_rotate): Likewise.
(expand_intrinsic_vastart): Likewise.
(expand_intrinsic_checkedint): Likewise.
(expand_volatile_load): Likewise.
(expand_volatile_store): Likewise.
(expand_intrinsic_vec_convert): Likewise.
(expand_intrinsic_vec_blend): Likewise.
(expand_intrinsic_vec_shuffle): Likewise.
(expand_intrinsic_vec_shufflevector): Likewise.
(expand_intrinsic_vec_load_unaligned): Likewise.
* modules.cc (get_dso_registry_fn): Likewise.
* toir.cc: Likewise.
* typeinfo.cc: Likewise.
* types.cc (finish_aggregate_type): Likewise.

3 weeks agocp: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 10:59:08 +0000 (10:59 +0000)] 
cp: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/cp/ChangeLog:

* call.cc (involves_qualification_conversion_p): Fix typos.
(build_user_type_conversion_1): Likewise.
(complain_about_access): Likewise.
(maybe_warn_class_memaccess): Likewise.
* class.cc (inherit_targ_abi_tags): Likewise.
(warn_hidden): Likewise.
(maybe_add_class_template_decl_list): Likewise.
(check_bases_and_members): Likewise.
(dfs_accumulate_vtbl_inits): Likewise.
* constexpr.cc (cx_check_missing_mem_inits): Likewise.
(cxx_eval_call_expression): Likewise.
(modifying_const_object_error): Likewise.
(cxx_replaceable_global_alloc_fn): Likewise.
* contracts.cc (copy_contracts_list): Likewise.
(check_redecl_contract): Likewise.
(update_late_contract): Likewise.
(get_precondition_function): Likewise.
* coroutines.cc (cp_coroutine_transform::build_ramp_function): Likewise.
* cp-tree.def (DISJ_CONSTR): Likewise.
* cp-tree.h (struct lang_decl_base): Likewise.
(SCOPE_DEPTH): Likewise.
(set_anon_aggr_type_field): Likewise.
(struct cp_decl_specifier_seq): Likewise.
* decl.cc (reshape_init_array_1): Likewise.
(omp_declare_variant_finalize): Likewise.
(grokdeclarator): Likewise.
(copy_type_enum): Likewise.
* decl2.cc (struct priority_map_traits): Likewise.
(determine_visibility): Likewise.
(constrain_class_visibility): Likewise.
(one_static_initialization_or_destruction): Likewise.
* g++spec.cc (lang_specific_driver): Likewise.
* init.cc (constant_value_1): Likewise.
(build_new): Likewise.
* mangle.cc (write_unqualified_name): Likewise.
* method.cc (inherited_ctor_binfo): Likewise.
(synthesized_method_walk): Likewise.
* module.cc (GTY): Likewise.
(trees_out::lang_decl_bools): Likewise.
(trees_out::core_vals): Likewise.
(trees_in::core_vals): Likewise.
(trees_in::install_implicit_member): Likewise.
(trees_in::odr_duplicate): Likewise.
(instantiating_tu_local_entity): Likewise.
(sort_cluster): Likewise.
(module_state::write_define): Likewise.
(module_state::write_begin): Likewise.
(declare_module): Likewise.
(init_modules): Likewise.
* name-lookup.cc (name_lookup::ambiguous): Likewise.
(pushdecl): Likewise.
(suggest_alternatives_for_1): Likewise.
(maybe_add_fuzzy_decl): Likewise.
* name-lookup.h (INHERITED_VALUE_BINDING_P): Likewise.
(HIDDEN_TYPE_BINDING_P): Likewise.
(BINDING_VECTOR_GLOBAL_DUPS_P): Likewise.
* operators.def: Likewise.
* parser.cc (cp_lexer_new_main): Likewise.
(get_cast_suggestion): Likewise.
(cp_parser_expression): Likewise.
(cp_parser_simple_type_specifier): Likewise.
(cp_parser_noexcept_specification_opt): Likewise.
(cp_parser_lookup_name): Likewise.
(class_decl_loc_t::diag_mismatched_tags): Likewise.
(cp_parser_cache_defarg): Likewise.
(cp_parser_objc_statement): Likewise.
(cp_parser_omp_loop_nest): Likewise.
(cp_parser_omp_taskloop): Likewise.
(cp_parser_objc_at_property_declaration): Likewise.
* parser.h (struct cp_unparsed_functions_entry): Likewise.
* pt.cc (tsubst_friend_class): Likewise.
(use_pack_expansion_extra_args_p): Likewise.
(tsubst_unary_left_fold): Likewise.
(tsubst_unary_right_fold): Likewise.
(filter_memfn_lookup): Likewise.
* semantics.cc (maybe_convert_cond): Likewise.
(finish_switch_cond): Likewise.
(cp_finish_omp_clause_doacross_sink): Likewise.
(finish_omp_target_clauses_r): Likewise.
* tree.cc (build_cplus_new): Likewise.
(apply_identity_attributes): Likewise.
* vtable-class-hierarchy.cc (vtv_compute_class_hierarchy_transitive_closure): Likewise.
(vtv_generate_init_routine): Likewise.

3 weeks agocobol, libgcobol: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 10:51:03 +0000 (10:51 +0000)] 
cobol, libgcobol: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/cobol/ChangeLog:

* compare.cc (alpha_compare): Fix typos.
* Make-lang.in: Fix typos.
* except.cc (cbl_enabled_exceptions_t::turn_on_off): Likewise.
* genapi.cc (MAX_AFTERS): Likewise.
(cobol_compare): Likewise.
(enter_program_common): Likewise.
(parser_bsearch_end): Likewise.
(parser_set_pointers): Likewise.
* gengen.cc (chain_parameter_to_function): Likewise.
* gengen.h (gg_return): Likewise.
* genutil.cc (refer_is_clean): Likewise.
* lexio.cc (right_margin): Likewise.
(maybe_add_space): Likewise.
* messages.cc: Likewise.
* parse_ante.h (procedure_division_ready): Likewise.
* structs.cc (create_cblc_field_t): Likewise.
* symbols.cc (special_pair_cmp): Likewise.
(symbol_table_init): Likewise.
(symbol_label_add): Likewise.
* symbols.h: Likewise.
* util.cc (date_time_fmt): Likewise.
(cobol_lineno): Likewise.

libgcobol/ChangeLog:

* README: Fix typos.
* charmaps.cc (__gg__iconverter): Likewise.
* common-defs.h (enum cbl_field_attr_t): Likewise.
* gcobolio.h: Likewise.
* gfileio.cc (__gg__file_stash): Likewise.
* gmath.cc (__gg__pow): Likewise.
* inspect.cc (inspect_backward_format_1): Likewise.
(__gg__inspect_format_1): Likewise.
(inspect_backward_format_2): Likewise.
(__gg__inspect_format_2): Likewise.
(__gg__inspect_format_1_sbc): Likewise.
* intrinsic.cc (gets_month): Likewise.
* libgcobol.cc (get_time_nanoseconds_local): Likewise.
(__gg__compare_2): Likewise.
(display_both): Likewise.
(accept_envar): Likewise.
(__gg__set_pointer): Likewise.
(struct cbl_exception_t): Likewise.
(default_exception_handler): Likewise.
(convert_for_convert): Likewise.
* valconv.cc: Likewise.
* xmlparse.cc (struct xml_ec_value_t): Likewise.

3 weeks agoc-family, c: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 10:48:53 +0000 (10:48 +0000)] 
c-family, c: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/c-family/ChangeLog:

* c-attribs.cc (append_access_attr): Fix typos.
(append_access_attr_idxs): Likewise.
(has_attribute): Likewise.
* c-common.cc (get_cpp_ttype_from_string_type): Likewise.
(cb_get_suggestion): Likewise.
(maybe_add_include_fixit): Likewise.
* c-common.h (convert_vector_to_array_for_subscript): Likewise.
* c-cppbuiltin.cc (builtin_define_type_max): Likewise.
* c-format.cc (check_format_info_main): Likewise.
(check_format_types): Likewise.
* c-omp.cc (c_omp_categorize_directive): Likewise.
* c-opts.cc (c_common_post_options): Likewise.
* c-ubsan.cc (ubsan_instrument_bounds): Likewise.

gcc/c/ChangeLog:

* c-decl.cc (pop_file_scope): Fix typos.
(diagnose_mismatched_decls): Likewise.
(parser_xref_tag): Likewise.
(verify_counted_by_attribute): Likewise.
* c-fold.cc (c_disable_warnings): Likewise.
* c-parser.cc (c_parser_do_statement): Likewise.
(c_parser_expression): Likewise.
(c_parser_objc_at_property_declaration): Likewise.
* c-tree.h (struct c_declspecs): Likewise.
* c-typeck.cc (build_access_with_size_for_counted_by): Likewise.
(build_modify_expr): Likewise.
(c_find_omp_var_r): Likewise.
* gimple-parser.cc (c_parser_gimple_compound_statement): Likewise.

3 weeks agoanalyzer: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 10:46:00 +0000 (10:46 +0000)] 
analyzer: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/analyzer/ChangeLog:

* access-diagram.cc: Fix typos.
* analyzer.cc (fixup_tree_for_diagnostic_1): Likewise.
(tree_to_json): Likewise.
* bounds-checking.cc: Likewise.
* constraint-manager.cc (constraint_manager::impossible_derived_conditions_p): Likewise.
* diagnostic-manager.cc (prune_frame): Likewise.
* engine.cc (get_eh_outedge): Likewise.
(maybe_process_run_of_enodes): Likewise.
* inlining-iterator.h: Likewise.
* ops.cc (call_and_return_op::execute): Likewise.
* pending-diagnostic.h (class pending_diagnostic): Likewise.
* region-model-asm.cc: Likewise.
* region-model.cc (check_one_function_attr_null_terminated_string_arg): Likewise.
(region_model::deref_rvalue): Likewise.
(region_model::scan_for_null_terminator): Likewise.
(region_model::check_for_null_terminated_string_arg): Likewise.
(model_merger::mergeable_svalue_p): Likewise.
(test_canonicalization_4): Likewise.
* region.cc (region::accept): Likewise.
* setjmp-longjmp.cc (region_model::on_longjmp): Likewise.
* sm-fd.cc: Likewise.
* sm-malloc.cc: Likewise.
* sm-taint.cc: Likewise.
* store.cc (binding_cluster::maybe_get_compound_binding): Likewise.
(binding_cluster::can_merge_p): Likewise.
(store::replay_call_summary): Likewise.
* svalue.cc (svalue::can_merge_p): Likewise.
(widening_svalue::eval_condition_without_cm): Likewise.

3 weeks agoalgol68, libga68: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 10:36:21 +0000 (10:36 +0000)] 
algol68, libga68: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/algol68/ChangeLog:

* a68-imports-archive.cc (struct Archive_fl_header): Fix typos.
* a68-imports.cc (encoded_mode_free): Likewise.
* a68-low-chars.cc (a68_char_repr): Likewise.
* a68-low-clauses.cc (a68_lower_label): Likewise.
(a68_lower_labeled_unit): Likewise.
(a68_lower_completer): Likewise.
(a68_lower_initialiser_series): Likewise.
(a68_lower_case_clause): Likewise.
* a68-low-decls.cc (a68_lower_variable_declaration): Likewise.
(a68_lower_procedure_variable_declaration): Likewise.
* a68-low-ints.cc (a68_get_int_skip_tree): Likewise.
(a68_int_maxval): Likewise.
* a68-low-moids.cc (lower_struct_mode): Likewise.
* a68-low-multiples.cc (a68_multiple_single_bound_check): Likewise.
* a68-low-prelude.cc (a68_lower_divab3): Likewise.
(a68_lower_upb3): Likewise.
(a68_lower_lwb3): Likewise.
* a68-low-procs.cc (a68_get_proc_skip_tree): Likewise.
* a68-low-reals.cc (a68_real_maxval): Likewise.
(a68_real_minval): Likewise.
* a68-low-units.cc (a68_lower_identifier): Likewise.
* a68-low.cc (a68_low_assignation): Likewise.
* a68-moids-misc.cc (a68_is_firm): Likewise.
(a68_is_coercible_series): Likewise.
* a68-parser-bottom-up.cc (strange_separator): Likewise.
(a68_bottom_up_parser): Likewise.
* a68-parser-prelude.cc (stand_prelude): Likewise.
* a68-parser-scanner.cc (a68_lexical_analyser): Likewise.
* a68-parser-scope.cc (a68_scope_checker): Likewise.
* a68-parser-serial-dsa.cc (serial_dsa_check_serial_clause): Likewise.
* a68-parser-taxes.cc (test_firmly_related_ops_local): Likewise.
* a68-parser.cc: Likewise.
* a68-types.h (struct KEYWORD_T): Likewise.
(struct OPTIONS_T): Likewise.
(struct NODE_T): Likewise.
(struct MODE_CACHE_T): Likewise.
* ga68-coding-guidelines.texi: Likewise.
* ga68.texi: Likewise.

libga68/ChangeLog:

* ga68-error.c: Fix typos.
* ga68-unistr.c (_libga68_u32_cmp): Likewise.
(_libga68_u8_uctomb): Likewise.
(_libga68_u32_to_u8): Likewise.

3 weeks agoada: Fix typos in various files
Dhruv Chawla [Wed, 13 May 2026 10:31:25 +0000 (10:31 +0000)] 
ada: Fix typos in various files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/ada/ChangeLog:

* adaint.c (__gnat_set_OWNER_ACL): Fix typos.
* aux-io.c: Likewise.
* cio.c: Likewise.
* cstreams.c: Likewise.
* doc/gnat_rm/gnat_language_extensions.rst: Likewise.
* doc/gnat_rm/implementation_defined_attributes.rst: Likewise.
* doc/gnat_rm/implementation_defined_characteristics.rst: Likewise.
* doc/gnat_rm/implementation_defined_pragmas.rst: Likewise.
* doc/gnat_rm/interfacing_to_other_languages.rst: Likewise.
* doc/gnat_rm/representation_clauses_and_pragmas.rst: Likewise.
* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst: Likewise.
* doc/gnat_rm/the_gnat_library.rst: Likewise.
* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Likewise.
* doc/gnat_ugn/gnat_and_program_execution.rst: Likewise.
* doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
* doc/gnat_ugn/platform_specific_information.rst: Likewise.
* doc/gnat_ugn/the_gnat_compilation_model.rst: Likewise.
* doc/share/conf.py: Likewise.
* gcc-interface/decl.cc (components_to_record): Likewise.
* gcc-interface/misc.cc (gnat_get_array_descr_info): Likewise.
(get_array_bit_stride): Likewise.
* gcc-interface/trans.cc (Loop_Statement_to_gnu): Likewise.
(gnat_to_gnu): Likewise.
* gcc-interface/utils.cc (gnat_pushdecl): Likewise.
(maybe_pad_type): Likewise.
(finish_record_type): Likewise.
(process_deferred_decl_context): Likewise.
* gnat_rm.texi: Likewise.
* gnat_ugn.texi: Likewise.
* gnathtml.pl: Likewise.
* gsocket.h: Likewise.
* init.c (__gnat_handle_vms_condition): Likewise.
(GNAT$STOP): Likewise.
* raise-gcc.c (db_phases): Likewise.
* rtinit.c (__gnat_runtime_initialize): Likewise.
* sigtramp-arm-qnx.c: Likewise.
* sigtramp-vxworks-target.h (defined): Likewise.
* sigtramp-vxworks.c: Likewise.
* sysdep.c: Likewise.
* terminals.c (defined): Likewise.
(__gnat_new_tty): Likewise.
(__gnat_close_tty): Likewise.
(__gnat_tty_name): Likewise.
* tracebak.c (PC_ADJUST): Likewise.

3 weeks agotoplevel: Fix typos in build files
Dhruv Chawla [Mon, 11 May 2026 15:18:41 +0000 (15:18 +0000)] 
toplevel: Fix typos in build files

Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
ChangeLog:

* Makefile.def: Fix typos.
* Makefile.in: Likewise.
* Makefile.tpl: Likewise.

gcc/ChangeLog:

* Makefile.in: Fix typos.

3 weeks agoc: some cleanups for the comptypes hierarchy of functions
Martin Uecker [Sun, 24 May 2026 10:23:05 +0000 (12:23 +0200)] 
c: some cleanups for the comptypes hierarchy of functions

comptypes returns an int where a value of two indicates that a warning
is needed due to a mismatch of attributes.  Change all related functions
to return a boolean and use comptypes_internal in the one caller
(comp_target_types) that requires the additional information.  This allows
simplifying the code a bit and removes the need for two wrapper functions.
Fix a caller that tested for == 1 instead of != 0.

gcc/c/ChangeLog:
* c-decl.cc (diagnose_mismatched_decls): Adapt.
* c-tree.h (comptypes, comptypes_check_enum_int): Adapt.
(comptypes_check_different_types): Remove.
* c-typeck.cc (compatible_types_for_indirection_note_p): Fix.
(comptypes_internal): Remove outdated info from comment.
(comptypes, comptypes_check_enum_int): Adapt.
(comptypes_check_different_types,comp_parm_types): Remove.
(comp_target_types,build_function_call_vec,digest_init): Adapt.

3 weeks agoc, middle-end: Implement C2Y N3705: bit-precise enum
Jakub Jelinek [Sat, 30 May 2026 07:46:29 +0000 (09:46 +0200)] 
c, middle-end: Implement C2Y N3705: bit-precise enum

The following patch implements the C2Y
https://www.open-std.org/jtc1/sc22/WG14/www/docs/n3705.htm - bit-precise enum
paper.
In c_parser_enum_specifier it allows {,signed,unsigned} _BitInt(N) types as
fixed underlying type of enums for -std=c2y/-std=gnu2y and the rest of the
patch deals with that, mostly by adjusting the preexisting BITINT_TYPE_P macro
(which was just used in one spot though) to not just include BITINT_TYPE
types, but ENUMERAL_TYPE with BITINT_TYPE as underlying type, and changing
lots of places that use TREE_CODE (type) == BITINT_TYPE to
BITINT_TYPE_P (type).
Like normal ENUMERAL_TYPEs are uselessly convertible in GIMPLE with same
precision/sign INTEGER_TYPEs, ENUMERAL_TYPEs with BITINT_TYPE as underlying type
are uselessly convertible with same precision/sign BITINT_TYPE and vice
versa, so that extends the number of spots that need to use BITINT_TYPE_P
macros.
For bit-fields with enumeral types with underlying fixed bit-precise type,
WG14 issue 1021 wording is used, in that those bit-fields promote to the
underlying bit-precise type.

2026-05-30  Jakub Jelinek  <jakub@redhat.com>

gcc/
* tree.h (BITINT_TYPE_P): Return true also for ENUMERAL_TYPE with
BITINT_TYPE as underlying type.
* stor-layout.cc (finish_bitfield_representative): Use BITINT_TYPE_P
macro.
(layout_type): Likewise.  Lay out ENUMERAL_TYPEs with BITINT_TYPE as
underlying type the same as BITINT_TYPEs.
* gimple-lower-bitint.cc (maybe_cast_middle_bitint): Use BITINT_TYPE_P
macro.
(mergeable_op, optimizable_arith_overflow, comparison_op,
bitint_large_huge::handle_cast, bitint_large_huge::lower_shift_stmt,
bitint_large_huge::lower_muldiv_stmt,
bitint_large_huge::lower_mul_overflow,
bitint_large_huge::lower_bit_query,
bitint_large_huge::lower_call, bitint_large_huge::lower_asm,
bitint_large_huge::lower_stmt, build_bitint_stmt_ssa_conflicts,
arith_overflow_arg_kind, gimple_lower_bitint): Likewise.
* gimple-expr.cc (useless_type_conversion_p): Likewise.
* fold-const.cc (make_range_step): Likewise.
(range_check_type): For ENUMERAL_TYPEs with BITINT_TYPE as underlying
type use the underlying type.
(extract_muldiv_1): Use BITINT_TYPE_P macro.
(native_encode_wide_int): Likewise.
(native_interpret_int): Likewise.
* vr-values.cc
(simplify_using_ranges::simplify_float_conversion_using_ranges):
Likewise.
* cfgexpand.cc (expand_debug_expr): Likewise.
* convert.cc (convert_to_integer_1): Add special case for ENUMERAL_TYPE
with underlying BITINT_TYPE.
* tree-ssa-sccvn.cc (vn_walk_cb_data::push_partial_def): Use
BITINT_TYPE_P macro.
(vn_reference_lookup_3): Likewise.
(eliminate_dom_walker::eliminate_stmt): Likewise.
* match.pd (ctz(ext(X)) == ctz(X), popcount(zext(X)) == popcount(X),
parity(zext(X)) == parity(X), a != 0 ? CLZ(a) : CST -> .CLZ(a),
a != 0 ? CTZ(a) : CST -> .CTZ(a), ffs(ext(X)) == ffs(X)): Likewise.
* builtins.cc (fold_builtin_bit_query): Likewise.
* explow.cc (promote_function_mode): Handle ENUMERAL_TYPE with
BITINT_TYPE as underlying type like BITINT_TYPE.
(promote_mode): Likewise.
* expr.cc (EXTEND_BITINT): Use BITINT_TYPE_P macro.
(expand_expr_real_1): Likewise.
* fold-const-call.cc (fold_const_call_ss): Likewise.
* gimple-fold.cc (gimple_fold_builtin_memset): Likewise.
(clear_padding_type_may_have_padding_p): Handle ENUMERAL_TYPE
with BITINT_TYPE as underlying type like BITINT_TYPE.
(type_has_padding_at_level_p): Likewise.
(clear_padding_type): Likewise.
* gimple-match-exports.cc (build_call_internal): Use BITINT_TYPE_P
macro.
* internal-fn.cc (expand_ubsan_result_store): Likewise.
* tree-sra.cc (create_access): Likewise.
(analyze_access_subtree): Likewise.
* tree-ssa-phiopt.cc (cond_removal_in_builtin_zero_pattern): Likewise.
* tree-ssa.cc (maybe_optimize_var): Likewise.
* tree-switch-conversion.cc (switch_conversion::array_value_type):
Likewise.
(switch_conversion::build_arrays): Likewise.
(jump_table_cluster::emit): Likewise.
* ubsan.cc (ubsan_encode_value): Likewise.
(ubsan_type_descriptor): Handle ENUMERAL_TYPE with BITINT_TYPE as
underlying type like BITINT_TYPE.
(instrument_si_overflow): Use BITINT_TYPE_P macro.
* varasm.cc (output_constant): Handle ENUMERAL_TYPE with BITINT_TYPE
as underlying type like BITINT_TYPE.
* config/aarch64/aarch64.cc (aarch64_return_in_memory_1): Use
BITINT_TYPE_P macro.
(bitint_or_aggr_of_bitint_p): Likewise.
(aarch64_composite_type_p): Likewise.
* config/arm/arm.cc (arm_return_in_memory): Likewise.
(arm_needs_doubleword_align): Likewise.
* config/i386/i386.cc (classify_argument): Handle ENUMERAL_TYPE with
BITINT_TYPE as underlying type like BITINT_TYPE.
* config/loongarch/loongarch.h: Use BITINT_TYPE_P macro.
gcc/c-family/
* c-attribs.cc (type_valid_for_vector_size): Use BITINT_TYPE_P macro.
* c-common.cc (c_common_get_narrower): For ENUMERAL_TYPE with
BITINT_TYPE as underlying type convert to the underlying type.
(c_common_signed_or_unsigned_type): Use BITINT_TYPE_P macro.
(sync_resolve_size): Likewise.
(atomic_bitint_fetch_using_cas_loop): Likewise.
(resolve_overloaded_builtin): Likewise.
gcc/c/
* c-parser.cc (c_parser_enum_specifier): Implement
C2Y N3705: bit-precise enum.  Allow for flag_isoc2y enumerated
types with BITINT_TYPE as underlying type.
* c-lang.cc (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Redefine.
* c-tree.h (c_enum_underlying_base_type): Declare.
* c-objc-common.cc (c_enum_underlying_base_type): New function.
* c-decl.cc (finish_struct): Use BITINT_TYPE_P macro.
* c-typeck.cc (perform_integral_promotions): Promote bit-fields with
enum type with underlying fixed _BitInt type to that _BitInt type.
gcc/testsuite/
* gcc.dg/bitint-133.c: New test.
* gcc.dg/bitint-134.c: New test.
* gcc.dg/bitint-135.c: New test.
* gcc.dg/bitint-136.c: New test.
* gcc.dg/torture/bitint-99.c: New test.

Reviewed-by: Joseph Myers <josmyers@redhat.com>
3 weeks agocobol: Include m4/autoconf.m4. [PR125503]
Robert Dubner [Sat, 30 May 2026 02:48:59 +0000 (22:48 -0400)] 
cobol: Include m4/autoconf.m4. [PR125503]

libgcobol/ChangeLog:

PR cobol/125503
* m4/autoconf.m4: New file.

3 weeks agoswitch-conv: Remove label from case_bit_test
Andrew Pinski [Sun, 17 May 2026 08:42:12 +0000 (01:42 -0700)] 
switch-conv: Remove label from case_bit_test

The label for case_bit_test is only used to stability
the qsort but the target bb here could be used for that.
So let's remove the label from case_bit_test and stability
the qsort by using the target bb's index.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* tree-switch-conversion.cc (case_bit_test::cmp): Stability
based on the index of the target bb instead.
(bit_test_cluster::emit): Remove setting of the label field
of case_bit_test.
* tree-switch-conversion.h (case_bit_test): Remove the label
field.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
3 weeks agoDaily bump.
GCC Administrator [Sat, 30 May 2026 00:16:40 +0000 (00:16 +0000)] 
Daily bump.

3 weeks agoFix pr125453-1.c at -O2 on some targets
Andrew Pinski [Fri, 29 May 2026 16:02:10 +0000 (09:02 -0700)] 
Fix pr125453-1.c at -O2 on some targets

On some targets at -O2, pr125453-1.c testcase produces
a -Wstringop-overflow warning. Since this testcase is not testing
the warnings but rather an ICE, we can just add -w to the additional
options.

Pushed as obvious after testing it on x86_64-linux-gnu.

gcc/testsuite/ChangeLog:

* gcc.dg/torture/pr125453-1.c: Add -w to the options.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
3 weeks agoranger-fold: Don't call into gimple_stmt_nonnegative_p [PR125475]
Andrew Pinski [Thu, 28 May 2026 04:09:01 +0000 (21:09 -0700)] 
ranger-fold: Don't call into gimple_stmt_nonnegative_p [PR125475]

When fold_using_range::fold_stmt comes in with a varying range,
it currently calls gimple_stmt_nonnegative_p to see if the value
is non-negative. But in the case where it matters (pr33738.C),
it will return true always because here we have just an unsigned type.
That sets the range to `[0, type_max]`. So instead we should
check if the type_min/type_max is not the same as precisionmin/precisionmax
and set the range to `[type_min, type_max]` in that case.

This fixes a recusion if we change tree_expr_nonnegative_p over to use
the ranger and I suspect might it help Ada code too.

PR tree-optimization/125475

gcc/ChangeLog:

* gimple-range-fold.cc (fold_using_range::fold_stmt): Don't call
gimple_stmt_nonnegative_p. Instead set the varying range to
`[type_min, type_max]` if not the same as the precision.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
3 weeks agocontrib: Make dg-extract-results.py tolerant of unparseable files
Kevin Buettner [Fri, 29 May 2026 18:29:02 +0000 (11:29 -0700)] 
contrib: Make dg-extract-results.py tolerant of unparseable files

This commit is for the benefit of GDB, but as the binutils-gdb
repository shares the contrib/ directory with GCC, this commit
must first be applied to GCC and then copied back to binutils-gdb.

When running GDB tests in parallel (make check -j$(nproc)), the
consolidated gdb.sum and gdb.log files are produced by
contrib/dg-extract-results.py, which merges per-test output files.

If any single per-test output file is malformed (e.g., due to a
DejaGnu EILSEQ crash, which is how I encountered this problem), the
script aborts via self.fatal().  Because this script is invoked via a
Makefile command using shell redirection, this causes the top-level
output files to be left as empty, zero-byte files, discarding valid
results from all other tests.

Fix by making the script tolerant of unparseable input files.  Wrap
each file's parsing in a try/except block.  When a file cannot be
parsed, emit a warning to stderr and continue processing remaining
files.  This ensures that crashing tests do not destroy the
consolidated output for the entire parallel build.

Tested on Fedora 44 using the GCC testsuite (make check-gcc
-j$(nproc)). The consolidated results are produced correctly with
no regressions.

This commit fixes this GDB bug:

https://sourceware.org/bugzilla/show_bug.cgi?id=34147

contrib/ChangeLog:

* dg-extract-results.py: Show warnings instead of erroring out
when encountering an unparseable file.

3 weeks agoAVR: ad target/121343 - Use hard-reg constraints in FMUL[S[U]] insns.
Georg-Johann Lay [Fri, 29 May 2026 19:11:45 +0000 (21:11 +0200)] 
AVR: ad target/121343 - Use hard-reg constraints in FMUL[S[U]] insns.

PR target/121343
gcc/
* config/avr/avr.md (FMUL): New int iterator.
(fmul, fmul_X, fmul_1, fmul_2): New int attributes.
(fmul, fmuls, fmulsu): Turn from expander to insn_and_split.
(fmul_insn, fmuls_insn, fmulsu_insn): Remove.

3 weeks agolibstdc++: Adjust flat_set::swap swapping order
Patrick Palka [Fri, 29 May 2026 19:21:06 +0000 (15:21 -0400)] 
libstdc++: Adjust flat_set::swap swapping order

In r17-908 I accidentally made us swap the comparator first, but we
decided that the container should be swapped first.

libstdc++-v3/ChangeLog:

* include/std/flat_set (_Flat_set_impl::swap): Swap _M_cont
first.

3 weeks agoFortran: checking of passed character length [PR125393]
Harald Anlauf [Thu, 28 May 2026 20:49:26 +0000 (22:49 +0200)] 
Fortran: checking of passed character length [PR125393]

Commit r16-3462 enhanced checking of character length passed to a character
dummy.  However, when the actual argument was an array element, its storage
size was estimated from all elements up to the end of the array.  This
could give a bogus warning when the dummy argument was of a scalar
character type.  Fix check for this case to actually compare the character
lengths of actual and dummy.

PR fortran/125393

gcc/fortran/ChangeLog:

* interface.cc (get_expr_storage_size): Additionally return
character length.
(gfc_compare_actual_formal): When the formal is a scalar character
variable, use character lengths, not array storage size for check.

gcc/testsuite/ChangeLog:

* gfortran.dg/argument_checking_28.f90: New test.

3 weeks agolibstdc++: allocate_at_least ask only what it reports (P0401)
Nathan Myers [Tue, 26 May 2026 14:41:27 +0000 (10:41 -0400)] 
libstdc++: allocate_at_least ask only what it reports (P0401)

allocate_at_least is rounding up the allocation request size to
its default alignment, which may be more than an integral
multiple of the object size requested. When the memory is freed,
what the container reports it is freeing differs from the amount
that was allocated. This patch rounds the request size back down
to what will be reported to the caller.

The algorithm to compute the allocation is altered in response
to findings on godbolt.org, which indicate dropping to uint8 to
perform the division is a pessimization everywhere other than
x86. The new version emits code for multiplication, instead.

In addition, the remaining -m32 test that failed under the new
allocation method is fixed, and guards are added for building
with -fno-aligned-new and for -fno-sized-deallocation.

Tested on x86 -m64/-m32.

libstdc++-v3/ChangeLog:
* include/bits/new_allocator.h (allocate_at_least): Reduce
allocation to match what is reported.
* testsuite/20_util/allocator/allocate_at_least2.cc: Add tests.
* testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
Fix, for -m32 and new allocation results.

3 weeks agocobol: Speed improvements; function prototypes; POSIX compatibility.
Robert Dubner [Fri, 29 May 2026 13:43:07 +0000 (09:43 -0400)] 
cobol: Speed improvements; function prototypes; POSIX compatibility.

1) The execution speed of ADD N TO VAR and SUBTRACT N FROM VAR where N
is an integer in the range -9 through +9 and VAR is of type Numeric
Display is improved through specialized code in genmath.cc

2) The execution speed of FILE READ of line-sequential files is improved
by using a 64K read buffer.

3) COBOL function prototypes are implemented.

4) These changes include the beginning of implementing the POSIX
compatibility layer.

5) Added the ability to detect GOTO_EXPR that lack matching LABEL_EXPR.

Co-authored-by: Robert Dubner <rdubner@symas.com>
Co-authored-by: James K. Lowden <jklowden@cobolworx.com>
Co-authored-by: Xavier Del Campo <xdelcampo@symas.com>
gcc/cobol/ChangeLog:

* Make-lang.in: Include gcobc script.
* cdf.y: Change formal parameters of cdf_literalize().
* cobol1.cc (cobol_langhook_handle_option): Add OPT_ftrunc option.
* compare.cc (total_digits_tree): Remove debugging statements.
(float_compare): Likewise.
* copybook.h (class copybook_elem_t): Update conditional close().
* dts.h: Change copyright notice.
* gcobc: Likewise.
* gcobol.1: Likewise.
* gcobol.3: Likewise.
* gcobolspec.cc (COMPAT_LIBRARY): POSIX compatibility.
(POSIX_LIBRARY): Likewise.
(lang_specific_driver): Likewise.
* genapi.cc (section_label): Missing LABEL_EXPR detection.
(paragraph_label): Likewise.
(internal_perform_through): Likewise.
(enter_program_common): Add comment.
(parser_enter_program): Change current_program_index() handling.
(build_alter_switch): Missing LABEL_EXPR detection.
(parser_display_internal): Handle REFER_T_ADDRESS_OF flag.
(create_and_call): ADDRESS OF is passed BY VALUE.
* gengen.cc (LOOK_FOR_MISSING_LABELS_not): Missing LABEL_EXPR
detection.
(dump_missing_labels): Likewise.
(gg_append_statement): Likewise.
(gg_struct_field_ref): Likewise.
(LABEL_ROOT): Likewise.
(gg_create_goto_pair): Likewise.
(scm_dump_generic_nodes): Forward declaration.
(gg_leaving_the_source_code_file): Missing LABEL_EXPR detection.
(label_decl_text_from_expr): New function.
* gengen.h (gg_create_assembler_name): New declaration.
(label_decl_text_from_expr): New declaration.
* genmath.cc (uchar_f_node): Fast ADD N TO NUMERIC-DISPLAY.
(uchar_ten_node): Likewise.
(fast_add): Likewise.
(fast_subtract): Likewise.
(parser_add): Likewise.
(add_floats): Likewise.
(ordinary_add_format_1): Likewise.
(ordinary_subtract_format_1): Likewise.
(add_case_1): Likewise.
(add_case_2): Likewise.
(add_case_3): Likewise.
(parser_multiply): Likewise.
(add_case_4): Likewise.
(add_litN_to_numdisp): Likewise.
(add_format_1): Likewise.
(add_format_2): Likewise.
(add_format_3): Likewise.
(subtract_floats): Likewise.
(subtract_format_1): Likewise.
(subtract_format_2): Likewise.
(subtract_format_3): Likewise.
(parser_subtract): Likewise.
* genutil.cc (refer_has_depends): False when type == FldIndex.
* lang-specs.h: Add fdefaultbyte, fstatic-call, ftrunc.
* lang.opt: Add ftrunc.
* lexio.cc (cdftext::open_input): Improved error message.
* parse.y: CDF support, POSIX support.
* parse_ante.h (cbl_division_t): Different enum.
(mode_syntax_only): New implementation of syntax_only.
(parse_error_inc): Likewise.
(resume_parsing): Likewise.
(successful_parse): Likewise.
(name_of): Formal parameter is now const.
(nice_name_of): Likewise.
(ast_op): Chanage formal parameters.
(prototype_ok): COBOL function prototypes.
(struct prototype_type_t): Likewise.
(is_allowed_name): Likewise.
(prototype_add): Likewise.
(prototype_args): Likewise.
(verify_args): Likewise.
(valid_pointer_relop): New function.
(field_value_all): Eliminate.
(current_field): COBOL function prototypes.
(ast_enter_exit_section): Improved error messages.
(data_division_ready): Improved mode_syntax_only.
(file_section_fd_set): Change "return false" to "return 0".
(ast_end_program): Improved mode_syntax_only.
* scan_ante.h (symbol_function_token): Use symbol_function_any().
(symbol_exists): Change for() loop termination.
(typed_name): COBOL function prototypes.
* structs.cc: Support for buffered FILE READ.
* symbols.cc (symbol_field_location): Use field_locs[] map.
(symbol_table_extend): Likewise.
(is_prototypical): COBOL function prototypes.
(symbol_elem_cmp): Likewise.
(symbol_program): Likewise.
(struct symbol_elem_t): Likewise.
(symbol_function): Likewise.
(enum protoreq_t): Likewise.
(symbol_function_impl): Likewise.
(struct cbl_label_t): Likewise.
(symbol_function_any): Likewise.
(symbols_dump): Likewise.
(cbl_field_t::attr_str): Likewise.
(field_str): Likewise.
(symbols_update): Likewise.
(symbol_field_add): Likewise.
(symbol_field_same_as): Likewise.
(cbl_alphabet_t::reencode): Detect iconv() errors.
(symbol_program_add): COBOL function prototypes.
* symbols.h (enum dspc_t): Enum for Division, Section, Paragraph,
Clause.
(cbl_prototype_ok): COBOL function prototypes.
(valid_move): Handle strong typing.
(struct parameter_t): Improved function parameter handling.
(struct cbl_ffi_arg_t): Likewise.
(struct cbl_label_t): COBOL function prototypes.
(struct function_descr_t): Likewise.
(struct cbl_alphabet_t): Detect iconv() errors.
(struct cbl_file_t): Support for LINAGE and the like.
(prototype_args):COBOL function prototypes.
(is_prototypical):COBOL function prototypes.
(is_numeric): Refmods are not numeric.
(struct symbol_elem_t): Additional declarations.
* symfind.cc (update_symbol_map2): Use symbols map.
* token_names.h: New comment.
* util.cc (cbl_prototype_ok): COBOL function prototypes.
(cdf_literalize): New formal parameters.
(effective_type): New function.
(valid_move): Handle strong typing.
(cobol_trunc_binary): Handle new ftrunc option.
(parse_error_reset): Forward declaration.
(parse_file): Formatting.
* util.h (cobol_trunc_binary): New declaration.

libgcobol/ChangeLog:

* Makefile.am: Add AM_COBC and AM_COBFLAGS; update
toolexeclib_LTLIBRARIES with libgcobol_posix.la and
libgcobol_compat_gnu.la.
* Makefile.in: POSIX compatibility support.
* aclocal.m4: Regenerate.
* charmaps.cc (__gg__iconverter): Restore map of encoding pairs.
(__gg__get_charmap): Change how encodings are mapped.
* charmaps.h (CHARMAPS_H): Include #include <map>.
(DEFAULT_32_ENCODING): Wrap in __FreeBSD__ conditional.
(error_msg_direct): Wrap in IN_TARGET_LIBS.
(class cbl_iconv_t): Wrapper for iconv() calls.
(class charmap_t): Explicit constructor.
* compat/README.md: POSIX compatibility layer.
* compat/gnu/lib/CBL_ALLOC_MEM.cbl: Likewise.
* compat/gnu/lib/CBL_CHECK_FILE_EXIST.cbl: Likewise.
* compat/gnu/lib/CBL_DELETE_FILE.cbl: Likewise.
* compat/gnu/lib/CBL_FREE_MEM.cbl: Likewise.
* compat/gnu/udf/stored-char-length.cbl: Likewise.
* compat/t/Makefile: Likewise.
* compat/t/smoke.cbl: Likewise.
* configure: Regenerate.
* configure.ac: New macros
* configure.tgt: Likewise.
* ec.h (enum ec_type_t): New implementor-defined ec_imp_iconv_open_e
exception.
* encodings.h (_ENCODINGS_H_): #include <type_traits> for mapping
the cbl_encoding_t values.
(struct cbl_encoding_t_hash): Likewise.
* exceptl.h (ec_type_of): Remove "extern" from declaration.
* gcobolio.h (FILE_BUFFER_SIZE): READ FILE buffer size.
* gfileio.cc (sequential_file_write): Honor non-ascii encodings.
(line_sequential_file_read): Buffered FILE READ.
(line_sequential_file_read_sbc): Buffered FILE READ.
* intrinsic.cc (string_to_dest): Eliminate function.
(get_all_time): Replace __gg__convert_encoding() with
__gg__iconverter().
(__gg__when_compiled): Likewise.
* io.cc (__compat_file_status_word): POSIX compatibility layer.
* io.h (enum file_high_t): Likewise.
(enum file_status_t): Likewise.
* libgcobol.cc (init_var_both): Eliminate call to
initialize_program_state().
(__gg__move): Eliminate call to __gg__convert_encoding_length;
handle REFER_T_ADDRESS_OF.
(display_both): Handle REFER_T_ADDRESS_OF.
(__gg__display_clean): Likewise.
(__gg__convert_encoding): Eliminate function.
(__gg__convert_encoding_length): Likewise.
(default_exception_handler): Improve exception handling.
(ec_type_descr): Likewise.
(ec_type_disposition): Likewise.
(ec_is_fatal): Likewise.
(__gg__check_fatal_exception): Likewise.
(__gg__set_env_value): Remove call to __gg__convert_encoding.
* libgcobol.h (__gg__convert_encoding): Eliminate.
(__gg__convert_encoding_length): Eliminate.
* posix/bin/udf-gen: POSIX compatibility.
* posix/cpy/posix-errno.cbl: Likewise.
* posix/cpy/psx-lseek.cpy: Likewise.
* posix/cpy/psx-open.cpy: Likewise.
* posix/cpy/statbuf.cpy: Likewise.
* posix/cpy/tm.cpy: Likewise.
* posix/shim/lseek.cc (offsetof): Likewise.
(posix_lseek): Likewise.
* posix/shim/open.cc (posix_open): Likewise.
* posix/t/errno.cbl: Likewise.
* posix/t/exit.cbl: Likewise.
* posix/t/localtime.cbl: Likewise.
* posix/t/stat.cbl: Likewise.
* posix/udf/posix-exit.cbl: Likewise.
* posix/udf/posix-ftruncate.cbl: Likewise.
* posix/udf/posix-localtime.cbl: Likewise.
* posix/udf/posix-lseek.cbl: Likewise.
* posix/udf/posix-mkdir.cbl: Likewise.
* posix/udf/posix-open.cbl: Likewise.
* posix/udf/posix-read.cbl: Likewise.
* posix/udf/posix-stat.cbl: Likewise.
* posix/udf/posix-unlink.cbl: Likewise.
* posix/udf/posix-write.cbl: Likewise.
* valconv.cc: New exceptions.
* compat/gnu/cpy/cblproto.cpy: New file.
* compat/gnu/cpy/cbltypes.cpy: New file.
* compat/gnu/cpy/stored-char-length.cpy: New file.
* compat/gnu/lib/CBL_CLOSE_FILE.cbl: New file.
* compat/gnu/lib/CBL_CREATE_FILE.cbl: New file.
* compat/gnu/lib/CBL_OPEN_FILE.cbl: New file.
* compat/gnu/lib/CBL_READ_FILE.cbl: New file.
* compat/gnu/lib/CBL_WRITE_FILE.cbl: New file.
* compat/gnu/lib/cbl_alloc_mem.3: New file.
* compat/gnu/lib/cbl_alloc_mem.cbl3: New file.
* compat/gnu/lib/cbl_check_file_exist.3: New file.
* compat/gnu/lib/cbl_close_file.3: New file.
* compat/gnu/lib/cbl_create_file.3: New file.
* compat/gnu/lib/cbl_delete_file.3: New file.
* compat/gnu/lib/cbl_free_mem.3: New file.
* compat/gnu/lib/cbl_open_file.3: New file.
* compat/gnu/lib/cbl_read_file.3: New file.
* compat/gnu/lib/cbl_write_file.3: New file.
* compat/gnu/udf/cobrt-file-status.cbl: New file.
* posix/cpy/posix-close.cpy: New file.
* posix/cpy/posix-errno.cpy: New file.
* posix/cpy/posix-exit.cpy: New file.
* posix/cpy/posix-fstat.cpy: New file.
* posix/cpy/posix-ftruncate.cpy: New file.
* posix/cpy/posix-localtime.cpy: New file.
* posix/cpy/posix-lseek.cpy: New file.
* posix/cpy/posix-mkdir.cpy: New file.
* posix/cpy/posix-open.cpy: New file.
* posix/cpy/posix-read.cpy: New file.
* posix/cpy/posix-stat.cpy: New file.
* posix/cpy/posix-unlink.cpy: New file.
* posix/cpy/posix-write.cpy: New file.
* posix/shim/fstat.cc: New file.
* posix/udf/posix-close.cbl: New file.
* posix/udf/posix-errno.cbl: New file.
* posix/udf/posix-fstat.cbl: New file.

gcc/testsuite/ChangeLog:

* cobol.dg/group2/37-digit_Initialization_of_fundamental_types.cob:
Updated compiler error message.
* cobol.dg/group2/BINARY_and_COMP-5.cob:
Likewise.
* cobol.dg/group2/Check_for_equality_of_COMP-1___COMP-2.cob:
Likewise.
* cobol.dg/group2/Multi-target_MOVE_with_subscript_re-evaluation.cob:
Likewise.
* cobol.dg/group2/Named_conditionals_-_fixed__float__and_alphabetic.cob:
Likewise.
* cobol.dg/group2/Simple_p-scaling.cob:
Likewise.
* cobol.dg/group2/access_to_OPTIONAL_LINKAGE_item_not_passed.cob:
Likewise.
* cobol.dg/group2/compare_national_to_display.cob:
Likewise.
* cobol.dg/group2/comprensive_compare_comp-1_comp-5.cob:
Likewise.
* cobol.dg/group2/CBL_ALLOC_MEM___CBL_FREE_MEM.cob: New test.
* cobol.dg/group2/CBL_ALLOC_MEM___CBL_FREE_MEM.out: New test.
* cobol.dg/group2/CBL_CHECK_FILE_EXIST.cob: New test.
* cobol.dg/group2/CBL_CHECK_FILE_EXIST.out: New test.
* cobol.dg/group2/CBL_CREATE_FILE___CBL_WRITE_FILE___CBL_CLOSE_FILE.cob: New test.
* cobol.dg/group2/CBL_DELETE_FILE.cob: New test.
* cobol.dg/group2/CBL_DELETE_FILE.out: New test.
* cobol.dg/group2/CBL_OPEN_FILE___CBL_CLOSE_FILE.cob: New test.
* cobol.dg/group2/CBL_OPEN_FILE___CBL_CLOSE_FILE.out: New test.
* cobol.dg/group2/CBL_OPEN_FILE___CBL_READ_FILE___CBL_CLOSE_FILE.cob: New test.
* cobol.dg/group2/CBL_OPEN_FILE___CBL_READ_FILE___CBL_CLOSE_FILE.out: New test.
* cobol.dg/group2/CBL_READ_FILE__check_file_size_with_flags___128.cob: New test.
* cobol.dg/group2/Complex_HEX__VALUE_and_MOVE_-_UTF-16.cob: New test.
* cobol.dg/group2/Complex_HEX__VALUE_and_MOVE_-_UTF-16.out: New test.
* cobol.dg/group2/MOVE_LEVEL_78.cob: New test.
* cobol.dg/group2/MOVE_LEVEL_78.out: New test.
* cobol.dg/group2/add_-1_to_negative_pic_S9999.cob: New test.
* cobol.dg/group2/add_-1_to_negative_pic_S9999.out: New test.
* cobol.dg/group2/add_-1_to_pic_9999.cob: New test.
* cobol.dg/group2/add_-1_to_pic_9999.out: New test.
* cobol.dg/group2/add_-1_to_positive_pic_S9999.cob: New test.
* cobol.dg/group2/add_-1_to_positive_pic_S9999.out: New test.
* cobol.dg/group2/add_1_to_pic_9999.cob: New test.
* cobol.dg/group2/add_1_to_pic_9999.out: New test.
* cobol.dg/group2/add_1_to_positive_pic_S9999.cob: New test.
* cobol.dg/group2/add_1_to_positive_pic_S9999.out: New test.
* cobol.dg/group2/add__1_to_negative_pic_S9999.cob: New test.
* cobol.dg/group2/add__1_to_negative_pic_S9999.out: New test.
* cobol.dg/group2/ambiguous_PERFORM.cob: New test.
* cobol.dg/group2/ambiguous_PERFORM.out: New test.
* cobol.dg/group2/cbltypes.cpy: New test.
* cobol.dg/group2/compare_float_to_other_types.cob: New test.
* cobol.dg/group2/compare_float_to_other_types.out: New test.
* cobol.dg/group2/move_numeric_to_alphanumeric.cob: New test.
* cobol.dg/group2/move_numeric_to_alphanumeric.out: New test.

3 weeks agoOpenMP: Reject omp_{cgroup,pteam,thread}_mem_alloc for static vars in ALLOCATE direct...
Tobias Burnus [Fri, 29 May 2026 14:51:18 +0000 (16:51 +0200)] 
OpenMP: Reject omp_{cgroup,pteam,thread}_mem_alloc for static vars in ALLOCATE directive [PR122892]

Using omp_{cgroup,pteam,thread}_mem_alloc for static variables was not
very useful as currently worded in the spec; hence, OpenMP 6.1 will
disallow it also for for local static variables, OpenMP 6.0 already
disallowed for other static variables. Cf. OpenMP specification
issue #4665.

For Fortran, the check is modified while for C the check was completely
missing. Both has been rectified by this commit. For C++, the allocate
directive still has to be added.

PR c/122892

gcc/c/ChangeLog:

* c-parser.cc (c_parser_omp_allocate): Reject
omp_{cgroup,pteam,thread}_mem_alloc for static variables.

gcc/fortran/ChangeLog:

* openmp.cc (gfc_resolve_omp_allocate): Reject
omp_{cgroup,pteam,thread}_mem_alloc also for local static
variables.

gcc/ChangeLog:

* gimplify.cc (gimplify_scan_omp_clauses): Update for removed
plural -S in GOMP_OMP_PREDEF_ALLOC_THREAD.

include/ChangeLog:

* gomp-constants.h (GOMP_OMP_PREDEF_ALLOC_THREADS): Rename to ...
(GOMP_OMP_PREDEF_ALLOC_THREAD): ... this.
(GOMP_OMP_PREDEF_ALLOC_CGROUP, GOMP_OMP_PREDEF_ALLOC_PTEAM): Define
with the value of omp_{cgroup,pteam}_mem_alloc

libgomp/ChangeLog:

* allocator.c (_Static_assert): Add asserts for the values of
GOMP_OMP_PREDEF_ALLOC_CGROUP and GOMP_OMP_PREDEF_ALLOC_PTEAM.

gcc/testsuite/ChangeLog:

* gfortran.dg/gomp/allocate-static-3.f90: Modify to also
disallow local static variables.
* c-c++-common/gomp/allocate-20.c: New test.

3 weeks agolibgcc: Support -mcall-ms2sysv-xlogues on FreeBSD/x86
Rainer Orth [Fri, 29 May 2026 14:24:40 +0000 (16:24 +0200)] 
libgcc: Support -mcall-ms2sysv-xlogues on FreeBSD/x86

With the bulk of the gcc.target/x86_64/abi tests fixed on FreeBSD/amd64,
a couple remain:

FAIL: gcc.target/x86_64/abi/ms-sysv/ms-sysv.c -mcall-ms2sysv-xlogues -O2 "-DGEN_ARGS=-p0\ --omit-rbp-clobbers" (test for excess errors)

and five more.  They all fail to link like

gld-2.46: /tmp//ccXprYoX.o: in function `msabi_00_0':
ms-sysv.c:(.text+0x30): undefined reference to `__sse_savms64f_12'

and many more missing symbols.  Those are usually provided in libgcc.a
by i386/t-msabi, so this patch includes them on FreeBSD/x86, too.  As
with the previous fixes, the resms64*.h and savms64*.h files need to
include .note.GNU-stack, too.

Bootstrapped without regressions on amd64-pc-freebsd15.0 with both gld
and /usr/bin/ld (lld), and x86_64-pc-linux-gnu.

2026-03-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

libgcc:
* config.host <i[34567]86-*-freebsd*> (tmake_file): Add
i386/t-msabi.
<x86_64-*-freebsd*>: Likewise.
* config/i386/i386-asm.h: Update comment.

* config/i386/resms64.h: Use .note.GNU-stack on FreeBSD, too.
* config/i386/resms64f.h: Likewise.
* config/i386/resms64fx.h: Likewise.
* config/i386/resms64x.h: Likewise.
* config/i386/savms64.h: Likewise.
* config/i386/savms64f.h: Likewise.

3 weeks agogccrs: workaround -Wrestrict false positive [PR114385]
Marc Poulhiès [Thu, 28 May 2026 20:11:52 +0000 (22:11 +0200)] 
gccrs: workaround  -Wrestrict false positive [PR114385]

Recent change gives:

In file included from /gccrs/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/string:45,
                 from ../../gcc/rust/rust-system.h:34,
                 from ../../gcc/rust/lex/rust-token.cc:19:
In static member function 'static constexpr std::char_traits<char>::char_type* std::char_traits<char>::copy(char_type*, const char_type*, std::size_t)',
    inlined from 'static constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, size_type) [with _CharT = char; _Traits = std:
:char_traits<char>; _Alloc = std::allocator<char>]' at /gccrs/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4
87:21,
    inlined from 'static constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, size_type) [with _CharT = char; _Traits = std:
:char_traits<char>; _Alloc = std::allocator<char>]' at /gccrs/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4
82:7,
    inlined from 'constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_mutate(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Trait
s = std::char_traits<char>; _Alloc = std::allocator<char>]' at /gccrs/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_st
ring.tcc:403:15,
    inlined from 'constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_append(const _CharT*, size_type) [
with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' at /gccrs/build/prev-x86_64-pc-linux-gnu/libstdc+
+-v3/include/bits/basic_string.tcc:498:17,
    inlined from 'constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::append(const _CharT*, size_type) [wit
h _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' at /gccrs/build/prev-x86_64-pc-linux-gnu/libstdc++-v
3/include/bits/basic_string.h:1624:18,
    inlined from 'constexpr _Str std::__str_concat(const typename _Str::value_type*, typename _Str::size_type, const typename _Str::value_type*, typename _Str::size_type,
const typename _Str::allocator_type&) [with _Str = __cxx11::basic_string<char>]' at /gccrs/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/
include/bits/basic_string.h:3908:19,
    inlined from 'constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*) [with
_CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]' at /gccrs/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/bi
ts/basic_string.h:3984:31,
    inlined from 'std::string Rust::Token::as_string() const' at ../../gcc/rust/lex/rust-token.cc:251:45:
/gccrs/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/bits/char_traits.h:432:56: error: 'void* __builtin_memcpy(void*, const void*
, long unsigned int)' accessing 18446744073709551609 or more bytes at offsets 0 and 0 overlaps 9223372036854775795 bytes at offset -9223372036854775802 [-Werror=restrict]
  432 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
      |                                        ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~

Split the concatenation to avoid the warning.

Fix comes from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125404#c2

gcc/rust/ChangeLog:
PR tree-optimization/114385
* lex/rust-token.cc (Token::as_string): split concatenation.

Co-authored-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
3 weeks ago[riscv] Fix sync builtins unspec->unspecv
Nathan Sidwell [Thu, 28 May 2026 12:35:17 +0000 (08:35 -0400)] 
[riscv] Fix sync builtins unspec->unspecv

gcc/
* config/riscv/sync.md: Move & rename atomic unspec enums to unspecv
enum. Use renamed UNSPECV_$NAME enums.
* config/riscv/sync-rvwmo.md: Use renamed UNSPECV_$NAME enums.
* config/riscv/sync-ztso.md: Use renamed UNSPECV_$NAME enums.

3 weeks agoaarch64: add __ARM_FEATURE_ macros for SVE2.2 and SME2.2
Artemiy Volkov [Thu, 12 Mar 2026 12:21:06 +0000 (12:21 +0000)] 
aarch64: add __ARM_FEATURE_ macros for SVE2.2 and SME2.2

This patch defines __ARM_FEATURE_ macros for the SVE2.2 and SME2.2
extensions, together with necessary new tests.  In the v1 of the series
(https://gcc.gnu.org/pipermail/gcc-patches/2026-February/707393.html),
this was a part of the first patch, but now it's been moved to the tail
end of the series so that these definitions aren't visible before the
contents of the extensions are actually available.

gcc/ChangeLog:

* config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins):
Emit definitions for __ARM_FEATURE_{SVE,SME}2p2.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/pragma_cpp_predefs_3.c: Add SVE2p2 tests.
* gcc.target/aarch64/pragma_cpp_predefs_4.c: Add SME2p2 test.

3 weeks agoaarch64: implement FMUL SME instruction
Artemiy Volkov [Fri, 16 Jan 2026 13:09:52 +0000 (13:09 +0000)] 
aarch64: implement FMUL SME instruction

The SME2.2 extension introduces the following variants of a new
streaming-mode instruction:

- FMUL (Multi-vector floating-point multiply by vector)
- FMUL (Multi-vector floating-point multiply)

The first operand is a multi-vector consisting of two or four vectors, and
the second operand either has the same type, or is a single vector of the
underlying type.  New intrinsics are documented in the ACLE manual [0] and
are as follows:

svfloat{16,32,64}x{2,4}_t svmul[_single_f{16,32,64}_x{2,4}]
  (svfloat{16,32,64}x{2,4}_t zd, svfloat{16,32,64}_t zm) __arm_streaming;

svfloat{16,32,64}x{2,4}_t svmul[_f{16,32,64}_x{2,4}]
  (svfloat{16,32,64}x{2,4}_t zd, svfloat{16,32,64}x{2,4}_t zm) __arm_streaming;

This patch implements the above changes throughout the SVE builtin
description files and aarch64-sve2.md.

[0] https://github.com/ARM-software/acle

gcc/ChangeLog:

* config/aarch64/aarch64-sve-builtins-sve2.def (svmul): Define new
SVE function variant.
* config/aarch64/aarch64-sve2.md (@aarch64_sve_<optab><mode>): New
instruction pattern.
(@aarch64_sve_<optab><mode>_single): Likewise.
* config/aarch64/aarch64.h (TARGET_STREAMING_SME2p2): New macro.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sme2/acle-asm/mul_f16_x2.c: New test.
* gcc.target/aarch64/sme2/acle-asm/mul_f16_x4.c: Likewise.
* gcc.target/aarch64/sme2/acle-asm/mul_f32_x2.c: Likewise.
* gcc.target/aarch64/sme2/acle-asm/mul_f32_x4.c: Likewise.
* gcc.target/aarch64/sme2/acle-asm/mul_f64_x2.c: Likewise.
* gcc.target/aarch64/sme2/acle-asm/mul_f64_x4.c: Likewise.

3 weeks agoaarch64: implement changes for COMPACT and EXPAND SVE instructions
Artemiy Volkov [Sat, 10 Jan 2026 15:16:59 +0000 (15:16 +0000)] 
aarch64: implement changes for COMPACT and EXPAND SVE instructions

SVE2.2 and SME2.2 extensions introduce the following changes related to
COMPACT/EXPAND instructions:

- COMPACT (Copy Active vector elements to lower-numbered elements) for 8-
  and 16-bit-wide vector elements: these variants of an existing instruction
  are new in SVE2.2 (or in streaming mode, SME2.2)
- COMPACT (Copy Active vector elements to lower-numbered elements) for 32-
  and 64-bit-wide vector elements: previously only legal in non-streaming
  mode, these variants are now allowed in streaming mode under SME2.2
- EXPAND (Copy lower-numbered vector elements to Active elements): this
  instruction is new in SVE2.2 (or in streaming mode, SME2.2)

The new supporting intrinsics are documented in the ACLE manual [0] and
are as follows:

sv{uint,int}{8,16}_t svcompact[_{u,s}{8,16}]
  (svbool_t pg, sv{uint,int}{8,16}_t zn);
sv{mfloat8,bfloat16,float16}_t svcompact[_{mf8,bf16,f16}]
  (svbool_t pg, sv{mfloat8,bfloat16,float16}_t zn);

sv{uint,int}{8,16,32,64}_t svexpand[_{u,s}{8,16,32,64}]
  (svbool_t pg, sv{uint,int}{8,16,32,64}_t zn);
svfloat{16,32,64}_t svexpand[_f{16,32,64}]
  (svbool_t pg, svfloat{16,32,64}_t zn);
sv{mfloat8,bfloat16}_t svexpand[_{mf8,bf16}]
  (svbool_t pg, sv{mfloat8,bfloat16}_t zn);

This patch implements the above changes throughout the SVE builtin
description files and aarch64-sve{,2}.md.

New ASM tests have been added as usual; also, an adjustment has been made
to aarch64-ssve.exp in g++.target/ to reflect the fact that the svcompact
intrinsic is not nonstreaming-only anymore.

[0] https://github.com/ARM-software/acle

gcc/ChangeLog:

* config/aarch64/aarch64-sve-builtins-base.cc (class svexpand_impl):
Define new SVE function base.
* config/aarch64/aarch64-sve-builtins-base.def (svcompact): Allow
execution in streaming mode when SME2p2 is enabled.
* config/aarch64/aarch64-sve-builtins-base.h (svexpand): Declare
new SVE function base.
* config/aarch64/aarch64-sve-builtins-sve2.def (svcompact): Define
new SVE function.
(svexpand): Likewise.
* config/aarch64/aarch64-sve.md (@aarch64_sve_compact<mode>):
Enable 32- and 64-bit element variants under SME2p2.  New
insn pattern for 8- and 16-bit elements.
(@aarch64_sve_expand<mode>): New insn pattern.
* config/aarch64/aarch64.h (TARGET_SVE_OR_SME2p2): New macro.
* config/aarch64/aarch64.md (UNSPEC_SVE_EXPAND): New UNSPEC.

gcc/testsuite/ChangeLog:

* g++.target/aarch64/sve/aarch64-ssve.exp: Add sve2p2 to the
target string.  Move svcompact from $nonstreaming_only to
$streaming_ok.
* gcc.target/aarch64/sve2/acle/asm/compact_bf16.c: New test.
* gcc.target/aarch64/sve2/acle/asm/compact_f32.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/compact_f64.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/compact_mf8.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/compact_s16.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/compact_s32.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/compact_s64.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/compact_s8.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/compact_u16.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/compact_u32.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/compact_u64.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/compact_u8.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/expand_bf16.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/expand_f32.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/expand_f64.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/expand_mf8.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/expand_s16.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/expand_s32.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/expand_s64.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/expand_s8.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/expand_u16.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/expand_u32.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/expand_u64.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/expand_u8.c: Likewise.

3 weeks agoaarch64: implement FIRSTP and LASTP SVE instructions
Artemiy Volkov [Wed, 17 Dec 2025 13:27:21 +0000 (13:27 +0000)] 
aarch64: implement FIRSTP and LASTP SVE instructions

This commit implements patterns and intrinsics for these two instructions
new in SVE2.2 (or in streaming mode, SME2.2):

- FIRSTP (Scalar index of first true predicate element (predicated))
- LASTP (Scalar index of last true predicate element (predicated))

The new intrinsics are documented in the ACLE manual [0] and have the
following signatures:

int64_t svfirstp_b{8,16,32,64} (svbool_t pg, svbool_t pn);
int64_t svlastp_b{8,16,32,64} (svbool_t pg, svbool_t pn);

The intrinsics are implemented in the usual way; the new
svfirst_lastp_impl base class is used for both families.  The ->fold ()
method implements constant folding except for LASTP under
-msve-vector-bits=scalable.  On the .md side, the patterns for both new
instructions are implemented using UNSPECs as they can't be expressed in
terms of standard RTL.

Included are standard asm tests (which are heavily based on cntp_* tests
from the sve directory), as well as some general C tests
demonstrating aforementioned optimizations when PG and/or PN are constant
vectors.

[0] https://github.com/ARM-software/acle

gcc/ChangeLog:

* config/aarch64/aarch64-sve-builtins-sve2.cc
(class svfirst_lastp_impl): Define new SVE function base class.
(svfirstp): Define new SVE function base.
(svlastp): Likewise.
* config/aarch64/aarch64-sve-builtins-sve2.def (svfirstp): Define
new SVE function.
(svlastp): Likewise.
* config/aarch64/aarch64-sve-builtins-sve2.h (svfirstp): Declare
new SVE function base.
* config/aarch64/aarch64-sve2.md (@aarch64_pred_firstp<mode>): New
insn pattern.
(@aarch64_pred_lastp<mode>): Likewise.
* config/aarch64/iterators.md (UNSPEC_FIRSTP): New UNSPEC.
(UNSPEC_LASTP): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve2/acle/asm/firstp_b16.c: New test.
* gcc.target/aarch64/sve2/acle/asm/firstp_b32.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/firstp_b64.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/firstp_b8.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/lastp_b16.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/lastp_b32.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/lastp_b64.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/lastp_b8.c: Likewise.
* gcc.target/aarch64/sve2/acle/general/firstp.c: Likewise.
* gcc.target/aarch64/sve2/acle/general/lastp.c: Likewise.

3 weeks agoaarch64: implement FRINT32/64 SVE instructions
Artemiy Volkov [Thu, 11 Dec 2025 11:17:46 +0000 (11:17 +0000)] 
aarch64: implement FRINT32/64 SVE instructions

SVE2.2 (or in streaming mode, SME2.2) adds the following SVE
instructions:

- FRINT32X (Floating-point round to 32-bit integer (predicated))
- FRINT32Z (Floating-point round to 32-bit integer, rounding toward zero
  (predicated))
- FRINT64X (Floating-point round to 64-bit integer (predicated))
- FRINT64Z (Floating-point round to 64-bit integer, rounding toward zero
  (predicated))

The intrinsics that expand to them are defined in the ACLE manual [0]:

svfloat{32,64}_t svrint32x{_f32,_f64}_z
  (svbool_t pg, svfloat{32,64}_t zn);
svfloat{32,64}_t svrint32x{_f32,_f64}_x
  (svbool_t pg, svfloat{32,64}_t zn);
svfloat{32,64}_t svrint32x{_f32,_f64}_m
  (svfloat{32,64}_t inactive, svbool_t pg, svfloat{32,64}_t zn);

svfloat{32,64}_t svrint32z{_f32,_f64}_z
  (svbool_t pg, svfloat{32,64}_t zn);
svfloat{32,64}_t svrint32z{_f32,_f64}_x
  (svbool_t pg, svfloat{32,64}_t zn);
svfloat{32,64}_t svrint32z{_f32,_f64}_m
  (svfloat{32,64}_t inactive, svbool_t pg, svfloat{32,64}_t zn);

svfloat{32,64}_t svrint64x{_f32,_f64}_z
  (svbool_t pg, svfloat{32,64}_t zn);
svfloat{32,64}_t svrint64x{_f32,_f64}_x
  (svbool_t pg, svfloat{32,64}_t zn);
svfloat{32,64}_t svrint64x{_f32,_f64}_m
  (svfloat{32,64}_t inactive, svbool_t pg, svfloat{32,64}_t zn);

svfloat{32,64}_t svrint64z{_f32,_f64}_z
  (svbool_t pg, svfloat{32,64}_t zn);
svfloat{32,64}_t svrint64z{_f32,_f64}_x
  (svbool_t pg, svfloat{32,64}_t zn);
svfloat{32,64}_t svrint64z{_f32,_f64}_m
  (svfloat{32,64}_t inactive, svbool_t pg, svfloat{32,64}_t zn);

The implementation of new intrinsics and RTL patterns is quite
straightforward, and a standard set of ASM tests has been added to the
sve2/acle/asm directory.

[0] https://github.com/ARM-software/acle

Changes since v1:
- Append extension names to comments in aarch64-sve2.md.

gcc/ChangeLog:

* config/aarch64/aarch64-sve-builtins-sve2.cc (svrint32x): Define
new function base.
(svrint32z): Likewise.
(svrint64x): Likewise.
(svrint64z): Likewise.
* config/aarch64/aarch64-sve-builtins-sve2.def (svrint32x):
Define new SVE function.
(svrint32z): Likewise.
(svrint64x): Likewise.
(svrint64z): Likewise.
* config/aarch64/aarch64-sve-builtins-sve2.h (svrint32x): Declare
new function base.
(svrint32z): Likewise.
(svrint64x): Likewise.
(svrint32z): Likewise.
* config/aarch64/aarch64-sve-builtins.cc (TYPES_sd_float): New
type set.
(sd_float): New SVE type array.
* config/aarch64/aarch64-sve2.md (@cond_<frintnzs_op><mode>): New
insn pattern.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve2/acle/asm/rint32x_f32.c: New test.
* gcc.target/aarch64/sve2/acle/asm/rint32x_f64.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rint32z_f32.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rint32z_f64.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rint64x_f32.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rint64x_f64.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rint64z_f32.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rint64z_f64.c: Likewise.

3 weeks agoaarch64: add zeroing forms for predicated SVE top FP conversions
Artemiy Volkov [Sat, 10 Jan 2026 07:40:59 +0000 (07:40 +0000)] 
aarch64: add zeroing forms for predicated SVE top FP conversions

SVE2.2 (or in streaming mode, SME2.2) adds support for zeroing
predication for the following SVE FP conversion instructions:

SVE1:
- BFCVTNT (Single-precision convert to BFloat16 (top, predicated))

SVE2:
- FCVTLT (Floating-point widening convert (top, predicated))
- FCVTNT (Floating-point narrowing convert (top, predicated))
- FCVTXNT (Double-precision convert to single-precision, rounding
  to odd (top, predicated))

Additionally, this patch implements corresponding intrinsics documented in
the ACLE manual [0] with the following signatures:

svfloat{32,64}_t svcvtlt_{f32[_f16],_f64[_f32]}_z
  (svbool_t pg, svfloat{16,32}_t op);

sv{bfloat16,float16,float32}_t svcvtnt_{f16[_f32],_f32[_f64],_bf16[_f32]}_z
  (sv{bfloat16,float16,float32}_t even, svbool_t pg, svfloat{32,64}_t op);

svfloat32_t svcvtxnt_f32[_f64]_z
  (svfloat32_t even, svbool_t pg, svfloat64_t op);

This patch adds an alternative that emits a single zeroing-predication
form of the instructions mentioned above (as long as the sve2p2_or_sme2p2
condition holds) to corresponding RTL patterns.  For narrowing conversions
([B]FCVTNT and FCVTXNT), since an additional merge operand controlling the
values of inactive lanes is required, the intrinsics have been changed to
use the new top_narrowing_convert SVE function base class; this new class
injects a const_vector selector operand at expand time.  Depending on the
value of this operand, either the destination vector or a constant zero
vector is used to supply values for inactive lanes.

The new tests all have "_z" in their names since they only cover the
zeroing-predication versions of their respective intrinsics.

[0] https://github.com/ARM-software/acle

gcc/ChangeLog:

* config/aarch64/aarch64-sve-builtins-base.cc (class svcvtnt_impl):
Remove.
(svcvtnt): Redefine using narrowing_top_convert.
* config/aarch64/aarch64-sve-builtins-functions.h
(class narrowing_top_convert): New SVE function base class.
(NARROWING_TOP_CONVERT0): New function-like macro for specializing
narrowing_top_convert.
(NARROWING_TOP_CONVERT1): Likewise.
* config/aarch64/aarch64-sve-builtins-sve2.cc (class svcvtxnt_impl):
Remove.
(svcvtxnt): Redefine using narrowing_top_convert.
* config/aarch64/aarch64-sve-builtins-sve2.def (svcvtlt): Allow
zeroing predication.
(svcvtnt): Likewise.
(svcvtxnt): Likewise.
* config/aarch64/aarch64-sve.md (@aarch64_sve_cvtnt<mode>):
Convert to compact syntax. Add operand 4 for values of
inactive lanes.  New alternative for zeroing predication.
* config/aarch64/aarch64-sve2.md
(*cond_<sve_fp_op><mode>_relaxed): Convert to compact syntax.
New alternative for zeroing predication.
(*cond_<sve_fp_op><mode>_strict): Likewise.
(@aarch64_sve_cvtnt<mode>): Convert to compact syntax. Add
operand 4 for values of inactive lanes.  New alternative for
zeroing predication.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve2/acle/asm/cvtlt_f32_z.c: New test.
* gcc.target/aarch64/sve2/acle/asm/cvtlt_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cvtnt_bf16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cvtnt_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cvtnt_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cvtxnt_f32_z.c: Likewise.

3 weeks agoaarch64: add zeroing forms for predicated SVE int-/FP-to-FP conversions
Artemiy Volkov [Fri, 9 Jan 2026 19:30:52 +0000 (19:30 +0000)] 
aarch64: add zeroing forms for predicated SVE int-/FP-to-FP conversions

SVE2.2 (or in streaming mode, SME2.2) adds support for zeroing
predication for the following SVE FP conversion instructions:

SVE1:
- SCVTF (Signed integer convert to floating-point (predicated))
- UCVTF (Unsigned integer convert to floating-point (predicated))
- FCVT (Floating-point convert (predicated))
- BFCVT (Single-precision convert to BFloat16 (predicated))

SVE2:
- FCVTX (Double-precision convert to single-precision, rounding to
  odd (predicated))

The SVE1 instructions are spread over several patterns for various
combinations of source/destination widths and FP semantics, and the FCVTX
instruction is serviced by two patterns in the aarch64-sve2.md file via
the SVE2_COND_FP_UNARY_NARROWB iterator (one for strict, the other for
relaxed FP semantics).  The patch adds an alternative that emits a single
zeroing-predication version of an instruction whenever the merge operand
is a constant zero vector and the sve2p2_or_sme2p2 condition holds.

As with the original cvt_b?f* tests in the sve/acle/asm directory,
testcases for conversions from both integral and floating-point types
coexist in the same files and are grouped only by the destination type.
FCVTX tests are added in a separate file.

gcc/ChangeLog:

* config/aarch64/aarch64-sve.md
(*cond_<optab>_nonextend<SVE_FULL_HSDI:mode><SVE_FULL_F:mode>_relaxed):
New alternative for zeroing predication.  Add `arch` attribute
to every alternative.
(*cond_<optab>_nonextend<SVE_HSDI:mode><SVE_PARTIAL_F:mode>_relaxed):
Likewise.
(*cond_<optab>_nonextend<SVE_FULL_HSDI:mode><SVE_FULL_F:mode>_strict):
Likewise.
(*cond_<optab>_extend<VNx4SI_ONLY:mode><VNx2DF_ONLY:mode>):
Likewise.
(*cond_<optab>_trunc<SVE_FULL_SDF:mode><SVE_FULL_HSF:mode>):
Likewise.
(*cond_<optab>_trunc<SVE_SDF:mode><SVE_PARTIAL_HSF:mode>):
Likewise.
(*cond_<optab>_trunc<VNx4SF_ONLY:mode><VNx8BF_ONLY:mode>):
Likewise.
(*cond_<optab>_nontrunc<SVE_FULL_HSF:mode><SVE_FULL_SDF:mode>):
Likewise.
(*cond_<optab>_nontrunc<SVE_PARTIAL_HSF:mode><SVE_SDF:mode>_relaxed):
Likewise.
* config/aarch64/aarch64-sve2.md
(*cond_<sve_fp_op><mode>_any_relaxed): Likewise.
(*cond_<sve_fp_op><mode>_any_strict): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve2/acle/asm/cvt_bf16_z.c: New test.
* gcc.target/aarch64/sve2/acle/asm/cvt_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cvt_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cvt_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cvtx_f32_z.c: Likewise.

3 weeks agoaarch64: add zeroing forms for predicated SVE FP-to-integer conversions
Artemiy Volkov [Wed, 14 Jan 2026 13:32:58 +0000 (13:32 +0000)] 
aarch64: add zeroing forms for predicated SVE FP-to-integer conversions

SVE2.2 (or in streaming mode, SME2.2) adds support for zeroing predication
for all variants of the following FP-to-integer conversion instructions:

- FCVTZU (Floating-point convert to unsigned integer, rounding toward zero
  (predicated))
- FCVTZS (Floating-point convert to signed integer, rounding toward zero
  (predicated))

To implement this change, this patch adds a new alternative to patterns
involving the SVE_COND_FCVTI iterator and accepting an independent value
as the merge operand.  The new alternative has the new zeroing-predication
forms as the output string and is only enabled when sve2p2_or_sme2p2 is
true in the target architecture.

The new ASM tests only cover the "_z" versions of the intrinsics and as
such all have the "_z" suffix in their name, and are grouped by type of
the destination operand.

gcc/ChangeLog:

* config/aarch64/aarch64-sve.md
(*cond_<optab>_nontrunc<SVE_FULL_F:mode><SVE_FULL_HSDI:mode>_relaxed):
New alternative for zeroing predication.  Add `arch` attribute
to every alternative.
(*cond_<optab>_nontrunc<SVE_PARTIAL_F:mode><SVE_HSDI:mode>_relaxed):
Likewise.
(*cond_<optab>_nontrunc<SVE_FULL_F:mode><SVE_FULL_HSDI:mode>_strict):
Likewise.
(*cond_<optab>_trunc<VNx2DF_ONLY:mode><VNx4SI_ONLY:mode>):
Likewise.
(*cond_<optab>_trunc<VNx2DF_ONLY:mode><VNx2SI_ONLY:mode>_relaxed):
Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve2/acle/asm/cvt_s16_z.c: New test.
* gcc.target/aarch64/sve2/acle/asm/cvt_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cvt_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cvt_u16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cvt_u32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cvt_u64_z.c: Likewise.

3 weeks agoaarch64: add zeroing forms for predicated SVE FP unary operations
Artemiy Volkov [Fri, 9 Jan 2026 19:05:28 +0000 (19:05 +0000)] 
aarch64: add zeroing forms for predicated SVE FP unary operations

SVE2.2 (or in streaming mode, SME2.2) adds support for zeroing predication
for the following floating-point unary instructions:

SVE:

- FABS (Floating-point absolute value (predicated))
- FNEG (Floating-point negate (predicated))
- FRECPX (Floating-point reciprocal exponent (predicated))
- FRINT<r> (Floating-point round to integral value (predicated))
- FSQRT (Floating-point square root (predicated))

SVE2:
- FLOGB (Floating-point base 2 logarithm as integer (predicated))

These instructions are covered by SVE_COND_FP_UNARY for SVE and
SVE2_COND_INT_UNARY_FP for SVE2, thus this change is limited to two
patterns in each of aarch64-sve.md and aarch64-sve2.md (one for relaxed,
and one for strict FP semantics).  The change is to add a new alternative
with Dz as operand 3 (the merge operand), enabled only if the
sve2p2_or_sme2p2 condition holds and emitting a single instruction with
zeroing predication.

The tests that have been added are based on the original SVE tests
for corresponding instructions, but all have a "_z" suffix in their name
since they only test codegen for the "_z" variants of the corresponding
intrinsics.

gcc/ChangeLog:

* config/aarch64/aarch64-sve.md (*cond_<optab><mode>_any_relaxed):
New alternative for zeroing predication.  Add `arch` attribute
to every alternative.
(*cond_<optab><mode>_any_strict): Likewise.
* config/aarch64/aarch64-sve2.md (*cond_<sve_fp_op><mode>):
Likewise.
(*cond_<sve_fp_op><mode>_strict): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve2/acle/asm/abs_f16_z.c: New test.
* gcc.target/aarch64/sve2/acle/asm/abs_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/abs_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/logb_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/logb_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/logb_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/neg_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/neg_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/neg_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/recpx_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/recpx_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/recpx_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rinta_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rinta_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rinta_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rinti_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rinti_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rinti_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintm_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintm_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintm_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintn_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintn_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintn_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintp_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintp_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintp_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintx_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintx_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintx_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintz_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintz_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rintz_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/sqrt_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/sqrt_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/sqrt_f64_z.c: Likewise.

3 weeks agoaarch64: add zeroing forms for predicated SVE bit reversal operations
Artemiy Volkov [Fri, 9 Jan 2026 17:50:22 +0000 (17:50 +0000)] 
aarch64: add zeroing forms for predicated SVE bit reversal operations

SVE2.2 (or in streaming mode, SME2.2) adds support for zeroing
predication for the following SVE bit reversal instructions:

- REVB, REVH, REVW (Reverse bytes / halfwords / words within elements
  (predicated))
- REVD (Reverse 64-bit doublewords in elements (predicated)) (SVE2 only)

The first three are covered by the SVE_INT_UNARY code iterator, and REVD,
being SVE2-only, has a standalone pattern in aarch64-sve2.md.  This patch
adds an alternative for the zeroing-predication forms of the original
instructions.  The pattern for REVD also required changes to the predicate
for operand 3 to accept constant zero RTX whenever SVE2.2 is enabled.
Additionally, use the /z form of the REVD instruction for PRED_X
predication to save a data dependency.

The tests that have been added are based on the original SVE/SVE2 tests
for corresponding instructions, but all have a "_z" suffix in their name
since they only test codegen for the "_z" variants of the corresponding
intrinsics.

gcc/ChangeLog:

* config/aarch64/aarch64-sve.md (@cond_<optab><mode>):
New alternative for zeroing predication.  Add `arch` attribute
to every alternative.
* config/aarch64/aarch64-sve2.md (@aarch64_pred_<optab><mode>):
Use zeroing predication variant for PRED_X.
(@cond_<optab><mode>): Accept constant zero as operand 3.  New
alternative for zeroing predication.  Add `arch` attribute to
every alternative.
* config/aarch64/predicates.md (aarch64_simd_reg_or_direct_zero):
New predicate.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve2/acle/asm/revb_s16_z.c: New test.
* gcc.target/aarch64/sve2/acle/asm/revb_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revb_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revb_u16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revb_u32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revb_u64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revd_bf16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revd_f16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revd_f32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revd_f64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revd_s16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revd_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revd_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revd_s8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revd_u16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revd_u32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revd_u64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revd_u8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revh_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revh_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revh_u32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revh_u64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revw_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/revw_u64_z.c: Likewise.

3 weeks agoaarch64: add zeroing forms for predicated SVE integer extends
Artemiy Volkov [Wed, 31 Dec 2025 11:30:05 +0000 (11:30 +0000)] 
aarch64: add zeroing forms for predicated SVE integer extends

SVE2.2 (or in streaming mode, SME2.2) adds support for zeroing
predication for the following SVE integer extension instructions:

- SXTB, SXTH, SXTW (Signed byte / halfword / word extend (predicated))
- UXTB, UXTH, UXTW (Unsigned byte / halfword / word extend (predicated))

The functional change is limited to two patterns in aarch64-sve.md
handling SVE extends merging with an independent value, to which this
patch adds a new alternative that emits a single zeroing-predication form
of an instruction as long as the sve2p2_or_sme2p2 condition holds.

The tests that have been added are based on the original SVE tests
for corresponding instructions, but all have a "_z" suffix in their name
since they only test codegen for the "_z" variants of the corresponding
intrinsics.

gcc/ChangeLog:

* config/aarch64/aarch64-sve.md
(@aarch64_cond_sxt<SVE_FULL_HSDI:mode><SVE_PARTIAL_I:mode>):
New alternative for zeroing predication.  Add `arch` attribute
to every alternative.
(*cond_uxt<mode>_any): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve2/acle/asm/extb_s16_z.c: New test.
* gcc.target/aarch64/sve2/acle/asm/extb_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/extb_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/extb_u16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/extb_u32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/extb_u64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/exth_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/exth_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/exth_u32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/exth_u64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/extw_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/extw_u64_z.c: Likewise.

3 weeks agoaarch64: add zeroing forms for predicated SVE integer unary operations
Artemiy Volkov [Fri, 9 Jan 2026 17:48:19 +0000 (17:48 +0000)] 
aarch64: add zeroing forms for predicated SVE integer unary operations

SVE2.2 (or in streaming mode, SME2.2) adds support for zeroing predication
for the following integer unary instructions:

SVE:
- ABS (Absolute value (predicated))
- CLS (Count leading sign bits (predicated))
- CLZ (Count leading zero bits (predicated))
- CNT (Count non-zero bits (predicated))
- CNOT (Logically invert boolean condition (predicated))
- NEG (Negate (predicated))
- NOT (Bitwise invert (predicated))
- RBIT (Reverse bits (predicated))

SVE2:
- SQABS (Signed saturating absolute value)
- SQNEG (Signed saturating negate)
- URECPE (Unsigned reciprocal estimate (predicated))
- URSRQTE (Unsigned reciprocal square root estimate (predicated))

These instructions are covered by the SVE_INT_UNARY and SVE2_U32_UNARY
iterators, except for CNOT, which has a standalone pattern.  Therefore,
three patterns across aarch64-sve.md and aarch64-sve2.md had to be
provided with a new alternative, having Dz (const_vector of all zeroes) as
the merge operand.  The new alternatives are conditional upon the
sve2p2_or_sme2p2 test added earlier, and emit the new zeroing-predication
forms of the original instructions.

The tests that have been added are based on the original SVE/SVE2 tests
for corresponding instructions, but all have a "_z" suffix in their name
since they only test codegen for the "_z" variants of the corresponding
intrinsics.

gcc/ChangeLog:

* config/aarch64/aarch64-sve.md (*cond_<optab><mode>_any):
New alternative for zeroing predication.  Add `arch` attribute
to every alternative.
(*cond_cnot<mode>_any): Likewise.
* config/aarch64/aarch64-sve2.md: (*cond_<sve_int_op><mode>):
Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve2/acle/asm/abs_s16_z.c: New test.
* gcc.target/aarch64/sve2/acle/asm/abs_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/abs_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/abs_s8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cls_s16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cls_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cls_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cls_s8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/clz_s16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/clz_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/clz_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/clz_s8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/clz_u16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/clz_u32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/clz_u64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/clz_u8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnot_s16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnot_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnot_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnot_s8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnot_u16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnot_u32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnot_u64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnot_u8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnt_s16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnt_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnt_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnt_s8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnt_u16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnt_u32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnt_u64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/cnt_u8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/neg_s16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/neg_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/neg_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/neg_s8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/not_s16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/not_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/not_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/not_s8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/not_u16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/not_u32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/not_u64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/not_u8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/qabs_s16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/qabs_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/qabs_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/qabs_s8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/qneg_s16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/qneg_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/qneg_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/qneg_s8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rbit_s16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rbit_s32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rbit_s64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rbit_s8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rbit_u16_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rbit_u32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rbit_u64_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rbit_u8_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/recpe_u32_z.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/rsqrte_u32_z.c: Likewise.

3 weeks agoaarch64: add preliminary definitions for SVE2.2/SME2.2
Artemiy Volkov [Thu, 12 Mar 2026 12:19:29 +0000 (12:19 +0000)] 
aarch64: add preliminary definitions for SVE2.2/SME2.2

This is a preparatory patch for the bulk of the SVE2.2/SME2.2 support
series, putting into place some machinery used by the later patches.  This
includes TARGET_* constants that are set based on ISA flags, and new
match_test definitions that are used to enable/disable individual
instruction patterns/alternatives.

On the testsuite side of things, this patch adds two new effective-target
checks in lib/target-supports.exp, one for each of SVE2.2-capable HW and
toolchain.

v1 of this patch also contained __ARM_FEATURE_* macro definitions for
SVE2.2 and SME2.2, but these have been moved to the end of the series to
improve bisection.

gcc/ChangeLog:

* config/aarch64/aarch64.h (TARGET_SVE2p2): New macro.
(TARGET_SME2p2): Likewise.
(TARGET_SVE2p2_OR_SME2p2): Likewise.
* config/aarch64/aarch64.md (arches): Add sve2p2_or_sme2p2 enum
constant.
(arch): Add test for sve2p2_or_sme2p2.
* doc/invoke.texi: Document sve2p2 and sme2p2 extensions.

gcc/testsuite/ChangeLog:

* lib/target-supports.exp
(check_effective_target_aarch64_sve2p2_hw): New target check.
(check_effective_target_aarch64_sve2p2_ok): New target check.
(exts_sve2): Add sme2p2.

3 weeks agoi386: Rewrite index*1+disp into base+disp
LIU Hao [Fri, 29 May 2026 10:17:53 +0000 (12:17 +0200)] 
i386: Rewrite index*1+disp into base+disp

Sometimes, GCC may synthesize an address like [index * 1 + displacement]. This
commit rewrites that into [base + displacement], to eliminate the requirement
of an SIB byte (which is always the case, as RSP isn't a valid index), and to
allow a small displacement to be encoded in one byte.

gcc/ChangeLog:

* config/i386/i386.cc (ix86_decompose_address): Add a special case where
there's no base, there's an index, and the scale is 1.

gcc/testsuite/ChangeLog:

* gcc.target/i386/rewrite-sib-without-base.c: New test.

Signed-off-by: LIU Hao <lh_mouse@126.com>
3 weeks agotestsuite: Tweak sse2-p{add,sub}[bdw]-2.c tests for -march=cascadelake
Roger Sayle [Fri, 29 May 2026 09:26:31 +0000 (10:26 +0100)] 
testsuite: Tweak sse2-p{add,sub}[bdw]-2.c tests for -march=cascadelake

Update the recently added gcc.target/i386/sse2-p{add,sub}[bdw]-2.c
tests for -march=cascadelake.  Committed as obvious.

2026-05-29  Roger Sayle  <roger@nextmovesoftware.com>

gcc/testsuite/ChangeLog
* gcc.target/i386/sse2-paddb-2.c: Support -march=cascadelake.
* gcc.target/i386/sse2-paddd-2.c: Likewise.
* gcc.target/i386/sse2-paddw-2.c: Likewise.
* gcc.target/i386/sse2-psubb-2.c: Likewise.
* gcc.target/i386/sse2-psubd-2.c: Likewise.
* gcc.target/i386/sse2-psubw-2.c: Likewise.

3 weeks agoada: Fix bug when reading multibyte utf-8 character
Marc Poulhiès [Fri, 27 Mar 2026 15:29:16 +0000 (16:29 +0100)] 
ada: Fix bug when reading multibyte utf-8 character

A multibyte utf-8 character has its msb set, which is the sign bit for a
signed value.

The get_immediate C function, for linux (and others) uses read() when
the character is read from a terminal. It was using a "char" type, so it
can be both signed or unsigned (target dependent). On target where char
is signed, it means that reading a multibyte utf-8 character will
produce a negative value. For example:

€ = 0xE2 0x82 0xAC

The first byte is 0xE2, which is -30 for a signed char.

Then the value is written in a signed int, still as -30 (0xFFFF_FFE2),
and the caller fails a range check because 0xFFFF_FFE2 is not in the
unsigned range for a Character (0..255).

Fixing the variable to an unsigned char avoids the conversion to a
signed value.

gcc/ada/ChangeLog:

* sysdep.c (getc_immediate_common): Read character as unsigned
value.

3 weeks agoada: Cleanup of Analyze_Aspect_Specifications and related code
Bob Duff [Thu, 26 Mar 2026 22:25:58 +0000 (18:25 -0400)] 
ada: Cleanup of Analyze_Aspect_Specifications and related code

Rename Decorate to be Decorate_Aspect_Links; seems more readable.
Change it to support N_Attribute_Definition_Clause in addition
to N_Pragma. Move most calls to it into Insert_Aitem.

Move call to Set_Has_Delayed_Rep_Aspects to be near
calls to Set_Has_Delayed_Aspects.

Make Anod and Eloc variables more local to where they are used.

Misc comment improvements, including removing some useless ones.

gcc/ada/ChangeLog:

* sem_ch13.adb (Delay_Aspect): Remove the side effect.
(Decorate): Rename to be Decorate_Aspect_Links.
Generalize.
(Insert_Aitem): Call Decorate_Aspect_Links.
* aspects.ads: Minor comment improvement: we don't need to worry;
we just need to do it.
* einfo.ads: Minor comment improvement.

3 weeks agoada: Implement AI22-0154 (Revised resolution of indexing aspects)
Gary Dismukes [Tue, 24 Mar 2026 00:40:04 +0000 (00:40 +0000)] 
ada: Implement AI22-0154 (Revised resolution of indexing aspects)

Customer code was running into an error due to a violation of the
rule for indexing aspects that any functions declared in the same
package spec that do not satisfy the legality rules for eligible
indexing functions make the aspects illegal. In this case it was
due to a derived type inheriting a function of the parent type
that had indexing aspects. Consideration of this problem led
to proposing language changes in AI22-0154, which revises the
resolution rules to take the indexing profile requirements into
account (rather than allowing resolution indexing aspect names
to consider any available function declared within the scope).
This set of changes implements the revised resolution rules,
allowing the compiler to accept the customer code.

In some cases the compiler will now issue a warning instead of
ignoring an ineligible candidate entity. Specifically this is
done when a candidate interpretation is a function that has at
least a first formal of the type associated with the aspect,
but doesn't satisfy other requirements of the particular
indexing aspect. We impose this limitation so as to avoid
issuing too many false-positive warnings.

These changes also reduce technical debt by removing code in
Sem_Util.Inherit_Nonoverridable_Aspect that was handling checking
and addition of new indexing functions for derived types via calls
to Check_Function_For_Indexing_Aspect. That handling is now covered
fully by Check_Indexing_Functions (which itself makes calls to
Check_Function_For_Indexing_Aspect).

Additionally, these changes attempt to implement rule changes
specified by AI22-0159/01 (Inheritance for aspects allowed to
denote multiple subprograms), an AI that was added to address
problems identified while finalizing AI22-0154.

gcc/ada/ChangeLog:

* sem_ch6.adb (New_Overloaded_Entity): Add missing call to
Check_For_Primitive_Subprogram (Is_Primitive must be set).
* sem_ch13.ads (Check_Function_For_Indexing_Aspect): Move declaration
to package body.
* sem_ch13.adb (Check_Indexing_Functions): Remove early return for
derived types. Pass appropriate values for the new Boolean parameters
on existing calls to Check_Function_For_Indexing_Aspect. Perform a
second interpretation loop, calling Check_Function_For_Indexing_Aspect
and passing Indexing_Found for the Has_Eligible_Func parameter and True
for the Error_On_Ineligible parameter, and remove the existing call
to Error_Msg_NE that was flagging nonlocal entities (a similar error
is now reported inside procedure Check_Function_For_Indexing_Aspect).
Suppress call to Check_Inherited_Indexing in derived type cases.
(Check_Nonoverridable_Aspect_Subprograms): Remove early return when
the aspect spec does not come from source, so aspects of derived types
will also go through this procedure. Check restrictions of AI22-0159/01
for derived types and inheritance of aspects. Replace iteration over
overloaded interpretations with iteration over Aspect_Subprograms (and
only do that for indexing aspects). Condition Sloc for existing error
check for nonprimitive operations based on whether the aspect comes
from source, posting the error on the entity rather than the aspect
if the aspect is not given explicitly.
(Analyze_Aspects_At_Freeze_Point): Split off a new case alternative
for iterator aspects, and specialize treatment for indexing aspects
by forcing a search for new indexing functions. When none are found,
issue an error only in the case where the type has no inherited
indexing functions. Test that the version is at least Ada_2012 rather
than Ada_2022 for calling Check_Nonoverridable_Aspect_Subprograms.
(Check_Function_For_Indexing_Aspect): Move declaration from the package
spec to the body. Add Has_Eligible_Func and Error_On_Ineligible formals
and update spec comment.
Return early if the candidate subprogram was already inherited (present
in Aspect_Subprograms).
For a scope mismatch on Subp, report error only when Has_Eligible_Func
is False and Error_On_Ineligible is True (and never a warning).
Add "<<" in several calls to Report_Ineligible_Indexing_Function
(formerly Illegal_Indexing) to allow either warnings or errors.
Return without adding subprogram to Aspect_Subprograms when
Error_On_Ineligible is False.
(Report_Ineligible_Indexing_Function): Name changed from
Illegal_Indexing.
Return early when only a warning can be issued and the ineligible
subprogram is inherited, or if its first formal (if any) does not match
the aspect's associated type (to reduce false-positive warnings).
Set Error_Msg_Warn based on Error_On_Ineligible formal.
Report a continuation message identifying the ineligible entity.
Remove comment preceding body that has been obviated by AI22-0154.
* sem_util.adb (Inherit_Nonoverridable_Aspect): Remove the loop over
primitives that was checking and adding eligible primitives. That code
was incomplete, and collection of new indexing functions for derived
types is now handled by Check_Indexing_Functions. Also remove the
associated "???" comment.

3 weeks agoada: Document the gnatg switch
Tonu Naks [Wed, 11 Mar 2026 12:59:36 +0000 (12:59 +0000)] 
ada: Document the gnatg switch

gcc/ada/ChangeLog:

* doc/gnat_rm.rst: update toctree
* doc/gnat_rm/about_this_guide.rst: add reference
* doc/gnat_rm/gnat_implementation_mode.rst: new file
* opt.ads: remove redundant comment
* gnat_rm.texi: Regenerate.

3 weeks agoada: Minor typo fix in documentation
Marc Poulhiès [Thu, 26 Mar 2026 12:00:06 +0000 (13:00 +0100)] 
ada: Minor typo fix in documentation

gcc/ada/ChangeLog:

* doc/gnat_rm/gnat_language_extensions.rst (Destructors): fix
typo.
* gnat_rm.texi: Regenerate.

3 weeks agoada: Complete previous light runtime configuration fix
Ronan Desplanques [Thu, 26 Mar 2026 08:58:56 +0000 (09:58 +0100)] 
ada: Complete previous light runtime configuration fix

A recent fix for light runtime configuration was missing a crucial part:
it left an #include directive that needed to be removed. This patch
completes that fix.

gcc/ada/ChangeLog:

* argv.c: Remove unused include directive.

3 weeks agoada: Create a boolean version of Warnings_Suppressed
Viljar Indus [Wed, 25 Mar 2026 13:18:52 +0000 (15:18 +0200)] 
ada: Create a boolean version of Warnings_Suppressed

Add a Boolean overload of Warnings_Suppressed that wraps the existing
String_Id version, simplifying call sites that only need to know whether
warnings are suppressed at a location rather than the suppression reason.

gcc/ada/ChangeLog:

* erroutc.ads (Warnings_Suppressed): New Boolean overload.
* errout.adb (Error_Msg_Internal): Use Boolean Warnings_Suppressed.
* errutil.adb (Error_Msg): Likewise.

3 weeks agoada: Improve error message insertion methods
Viljar Indus [Wed, 25 Mar 2026 10:57:10 +0000 (12:57 +0200)] 
ada: Improve error message insertion methods

Extract the error chain insertion logic into dedicated subprograms.
Insert_Error_Msg adds a new message into the chain and adds the next and
previous pointers, making the deferred Set_Prev_Pointers pass in Finalize
redundant. Find_Msg_Insertion_Point and Is_Before extract the existing
logic for finding the insertion point in Error_Msg_Internal.

gcc/ada/ChangeLog:

* errout.adb (Is_Before): New helper function.
(Find_Msg_Insertion_Point): New procedure.
(Error_Msg_Internal): Use Find_Msg_Insertion_Point and Insert_Error_Msg.
(Finalize): Remove call to Set_Prev_Pointers.
(Set_Prev_Pointers): Removed.
* erroutc.adb (Insert_Error_Msg): New procedure.
* erroutc.ads (Insert_Error_Msg): New declaration.

3 weeks agoada: Do not set Global_Discard_Names in GNATprove_Mode
Andres Toom [Mon, 16 Mar 2026 09:55:09 +0000 (11:55 +0200)] 
ada: Do not set Global_Discard_Names in GNATprove_Mode

GNATprove now supports the Image attribute of enumerated types. Hence,
it is important to keep the names of the enumeration literals to be able
to properly reason about them.

gcc/ada/ChangeLog:

* gnat1drv.adb (Adjust_Global_Switches): Do not set
Global_Discard_Names in GNATprove_Mode.

3 weeks agoada: Fix light runtime configurations
Ronan Desplanques [Wed, 25 Mar 2026 13:39:35 +0000 (14:39 +0100)] 
ada: Fix light runtime configurations

A recent changed added a dependency from the environment-related
functions in argv.c to env.c. This broke some runtime configurations that
provide command line support but no environment variable support.

This fixes the issue by moving all of argv.c's environment-related code
to env.c. It also tweaks a comment in passing.

gcc/ada/ChangeLog:

* argv.c (__gnat_env_count) (__gnat_len_env) (__gnat_fill_env): Move
to...
* env.c (__gnat_env_count) (__gnat_len_env) (__gnat_fill_env):
...here. Tweak comment.

3 weeks agoada: Do not disable conformance warning in GNAT_Mode
Bob Duff [Tue, 24 Mar 2026 22:43:16 +0000 (18:43 -0400)] 
ada: Do not disable conformance warning in GNAT_Mode

The switch -gnatw_p enables a warning during conformance
checking that is stricter than the standard Ada conformance
rules. This patch removes the test for -gnatg mode when
issuing the warning, because that is redundant -- -gnatg
already turns off -gnatw_p.

We do not want this warning enabled in GNAT sources, but there is
no need to have -gnatg involved explicitly.
The same goes for In_Internal_Unit.

gcc/ada/ChangeLog:

* sem_ch6.adb (Subprogram_Subtypes_Have_Same_Declaration):
Remove tests for In_Internal_Unit and GNAT_Mode.

3 weeks agoada: VAST Check_Entity_Chain
Marc Poulhiès [Thu, 12 Mar 2026 16:28:18 +0000 (17:28 +0100)] 
ada: VAST Check_Entity_Chain

Add Check_Entity_Chain to VAST: checks the Next_Entity/Prev_Entity are
consistent for entity chains.

Currently only checked for entities that are used as Scope.

Fixing existing inconsistencies is not direct.

Any call to Copy_And_Swap creates an incorrect chain, where the new node
has its Prev/Next/First/Last links copied from the original node, but
back links are not changed, leading to something like this for
Copy_And_Swap (Priv, Full):

  ,----,       ,----,       ,----,     ,----,
  | A  |------>| B  |------>|Priv|---->| D  |---> Empty
  |    |<------|    |<------|    |<----|    |
  '----'       '----'       '----'     '----'
                   ^                    ^
                   |        ,----,      |
                   `--------|Full|------`
                            |    |
                            '----'

And then after a while, probably after Exchange_Entities() the links are
incorrect and traversing the chain from First to Last or from Last to
First does not yield the same elements.

gcc/ada/ChangeLog:

* vast.adb (Check_Enum)<Check_Entity_Chain>: Add.
(Status)<Check_Entity_Chain>: Set to Print_And_Continue.
(Check_Entity_Chain): New.
(Check_Scope): Call Check_Entity_Chain.

3 weeks agoada: Add Delete_Error_And_Continuation_Msgs and refactor duplicate code in errout...
Viljar Indus [Sat, 21 Mar 2026 01:25:05 +0000 (03:25 +0200)] 
ada: Add Delete_Error_And_Continuation_Msgs and refactor duplicate code in errout and errutil

Packages errout and errutil were sharing a lot of code. Extract all of
the common functionality to erroutc.
Extract Delete_Specifically_Suppressed_Warnings and Set_Prev_Pointers.

gcc/ada/ChangeLog:

* errout.adb (Delete_Warning_And_Continuations): use
Delete_Error_And_Continuation_Msgs.
(Output_Messages): Call new refactored subprograms.
(Delete_Specifically_Suppressed_Warnings): New
procedure.
* (Set_Prev_Pointers): New procedure.
* (Finalize): use Delete_Specifically_Suppressed_Warnigns and
Set_Prev_Pointers.
(Finalize): use Delete_Error_And_Continuation_Msgs.
* erroutc.adb (Delete_Error_And_Continuation_Msgs): New procedure.
(Remove_Duplicate_Errors): New_Function.
(Write_All_Errors_In_Brief_Format): New function.
(Write_All_Errors_In_Verbose_Format): New function.
(Write_Error_Summary): New function.
* erroutc.ads (Delete_Error_And_Continuation_Msgs): Likewise.
(Remove_Duplicate_Errors): Likewise.
(Write_All_Errors_In_Brief_Format): Likewise.
(Write_All_Errors_In_Verbose_Format): Likewise.
(Write_Error_Summary): Likewise.
* errutil.adb (Finalize): Call new refactored subprograms.

3 weeks agoada: Add Filter_And_Delete_Errors
Viljar Indus [Sat, 21 Mar 2026 01:01:33 +0000 (03:01 +0200)] 
ada: Add Filter_And_Delete_Errors

gcc/ada/ChangeLog:

* errout.adb (Remove_Warning_Messages): Use
Filter_And_Delete_Errors.
* errout.ads (Purge_Messages): Renamed to
Delete_Error_Msgs_In_Range.
* erroutc.adb (Filter_And_Delete_Errors): New procedure.
(Purge_Messages): Renamed to Delete_Error_Msgs_In_Range.
* erroutc.ads (Filter_And_Delete_Errors): New procedure.
(Purge_Messages): Renamed to Delete_Error_Msgs_In_Range.
* par-ch5.adb (Missing_Begin): call Delete_Error_Msgs_In_Range.

3 weeks agoada: Simplify Warning_Specifically_Suppressed calls.
Viljar Indus [Fri, 20 Mar 2026 13:47:54 +0000 (15:47 +0200)] 
ada: Simplify Warning_Specifically_Suppressed calls.

In most places we only care about whether the warning was suppressed or
not and we never care what the exact reason was. Add a new subprogram
Warning_Is_Suppressed for that purpose.

gcc/ada/ChangeLog:

* errout.adb (Finalize): use Warning_Is_Suppressed.
* erroutc.adb (Warning_Is_Suppressed): New subprogram.
* erroutc.ads (Warning_Is_Suppressed): Likewise.

3 weeks agoada: Refactor error message deletion
Viljar Indus [Fri, 20 Mar 2026 13:15:07 +0000 (15:15 +0200)] 
ada: Refactor error message deletion

Extract the common code from multiple places where we deleted
messages into one common subprogram.

gcc/ada/ChangeLog:

* errout.adb: Use Delete_Error_Msg.
* erroutc.adb (Delete_Error_Msg): New subprogram.
* erroutc.ads (Delete_Error_Msg): Likewise.

3 weeks agoada: Fix crash on qualified bounds during unnesting
Eric Botcazou [Tue, 24 Mar 2026 09:23:08 +0000 (10:23 +0100)] 
ada: Fix crash on qualified bounds during unnesting

The problem is that the Activation_Record_Component field is accessed for
an E_Package entity, which does not contain any.

gcc/ada/ChangeLog:

* exp_unst.adb (Note_Uplevel_Bound_Trav): Do not register an uplevel
reference for a package.  Use a single if_statement in the body.

3 weeks agoada: Remove obsolete trick in Analyze_Function_Return
Eric Botcazou [Sat, 21 Mar 2026 11:24:35 +0000 (12:24 +0100)] 
ada: Remove obsolete trick in Analyze_Function_Return

The compiler no longer creates a temporary for controlled aggregate returns.

gcc/ada/ChangeLog:

* sem_ch6.adb (Analyze_Function_Return): Remove obsolete code that
wraps the return in a block when the expression is an aggregate.

3 weeks agoada: Create a function for checking Suppressed loop warnings
Viljar Indus [Fri, 20 Mar 2026 10:43:16 +0000 (12:43 +0200)] 
ada: Create a function for checking Suppressed loop warnings

gcc/ada/ChangeLog:

* errout.adb (Error_Msg): Add new function
In_Loop_With_Suppressed_Warnings.

3 weeks agoada: Simplify implementation of instantiation messages
Viljar Indus [Thu, 12 Mar 2026 14:27:00 +0000 (16:27 +0200)] 
ada: Simplify implementation of instantiation messages

Remove duplication and extra variables and simplify control flow.

gcc/ada/ChangeLog:

* errout.adb (Error_Msg_N): Simplify code.

3 weeks agoada: Improve dmsg
Viljar Indus [Fri, 20 Mar 2026 15:23:14 +0000 (17:23 +0200)] 
ada: Improve dmsg

Add missing attributes to dmsg. Additionally add support for
printing locations and fixes.

gcc/ada/ChangeLog:

* erroutc-pretty_emitter.adb (To_String): Relocated to erroutc.
(To_File_Name): Likewise.
(Line_To_String): Likewise.
(Column_To_String): Likewise.
* erroutc.adb (dedit): New function for debugging edits.
(dfix): New function for debuging fixes.
(dloc): New function for debugging locations.
(dmsg): Print missing Error_Msg_Object attributes.
(To_String): New function for printing spans
(To_String): Relocated from erroutc-pretty_emitter.adb
(To_File_Name): Likewise.
* erroutc.ads: Likewise.