aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTobias Burnus <tburnus@baylibre.com>2025-05-20 13:39:18 +0200
committerTobias Burnus <tburnus@baylibre.com>2025-05-20 13:39:18 +0200
commitbc76738d12f06a5efc2b998c2d6fcc093288771f (patch)
tree06013d6bed3c8147b8215c01a1d985baa3eb7ec1 /gcc
parent033dc40acd5c13cc1c474c229eaba7d96112fc26 (diff)
parent911cfea5e59798e04479ad475870935ccfae004b (diff)
downloadgcc-bc76738d12f06a5efc2b998c2d6fcc093288771f.zip
gcc-bc76738d12f06a5efc2b998c2d6fcc093288771f.tar.gz
gcc-bc76738d12f06a5efc2b998c2d6fcc093288771f.tar.bz2
Merge branch 'releases/gcc-15' into devel/omp/gcc-15
Merge up to r15-9715-g911cfea5e59798 (May 20, 2025).
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog22
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/config/alpha/alpha.cc23
-rw-r--r--gcc/cp/ChangeLog39
-rw-r--r--gcc/cp/class.cc6
-rw-r--r--gcc/cp/decl2.cc14
-rw-r--r--gcc/cp/module.cc47
-rw-r--r--gcc/cp/optimize.cc4
-rw-r--r--gcc/cp/pt.cc6
-rw-r--r--gcc/cp/rtti.cc1
-rw-r--r--gcc/doc/gm2.texi2
-rw-r--r--gcc/dwarf2out.cc3
-rw-r--r--gcc/fortran/ChangeLog60
-rw-r--r--gcc/fortran/check.cc42
-rw-r--r--gcc/fortran/dump-parse-tree.cc7
-rw-r--r--gcc/fortran/gfortran.h3
-rw-r--r--gcc/fortran/resolve.cc7
-rw-r--r--gcc/fortran/trans-intrinsic.cc51
-rw-r--r--gcc/fortran/trans-openmp.cc20
-rw-r--r--gcc/m2/ChangeLog57
-rw-r--r--gcc/m2/gm2-compiler/M2Check.mod21
-rw-r--r--gcc/m2/gm2-compiler/M2GenGCC.mod3
-rw-r--r--gcc/m2/gm2-compiler/M2Quads.mod10
-rw-r--r--gcc/m2/gm2-compiler/M2Range.mod43
-rw-r--r--gcc/m2/gm2-compiler/PCSymBuild.mod13
-rw-r--r--gcc/m2/gm2-compiler/SymbolTable.def16
-rw-r--r--gcc/m2/gm2-compiler/SymbolTable.mod138
-rw-r--r--gcc/m2/gm2-libs/FormatStrings.mod4
-rw-r--r--gcc/po/ChangeLog12
-rw-r--r--gcc/po/sv.po24
-rw-r--r--gcc/po/zh_CN.po341
-rw-r--r--gcc/testsuite/ChangeLog135
-rw-r--r--gcc/testsuite/g++.dg/abi/base-defaulted2.C12
-rw-r--r--gcc/testsuite/g++.dg/modules/clone-4_a.C12
-rw-r--r--gcc/testsuite/g++.dg/modules/clone-4_b.C12
-rw-r--r--gcc/testsuite/g++.dg/modules/openmp-1.C9
-rw-r--r--gcc/testsuite/g++.dg/modules/partial-8.h8
-rw-r--r--gcc/testsuite/g++.dg/modules/partial-8_a.C10
-rw-r--r--gcc/testsuite/g++.dg/modules/partial-8_b.C8
-rw-r--r--gcc/testsuite/g++.dg/modules/partial-8_c.C7
-rw-r--r--gcc/testsuite/g++.dg/modules/partial-8_d.C9
-rw-r--r--gcc/testsuite/g++.dg/modules/tinfo-3_a.H7
-rw-r--r--gcc/testsuite/g++.dg/modules/tinfo-3_b.C8
-rw-r--r--gcc/testsuite/g++.dg/template/unify13.C18
-rw-r--r--gcc/testsuite/gcc.target/alpha/memcpy-nested-offset-long.c76
-rw-r--r--gcc/testsuite/gcc.target/alpha/memcpy-nested-offset-quad.c64
-rw-r--r--gcc/testsuite/gfortran.dg/interface_61.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/pr120049_a.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/pr120049_b.f908
-rw-r--r--gcc/testsuite/gfortran.dg/pr120191_1.f90614
-rw-r--r--gcc/testsuite/gfortran.dg/pr120191_2.f9084
-rw-r--r--gcc/testsuite/gfortran.dg/pr120191_3.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/pr120196.f9026
-rw-r--r--gcc/testsuite/gm2.dg/doc/examples/plugin/fail/assignvalue.mod25
-rw-r--r--gcc/testsuite/gm2.dg/doc/examples/plugin/fail/doc-examples-plugin-fail.exp25
-rw-r--r--gcc/testsuite/gm2/pim/fail/constintarraybyte.mod10
-rw-r--r--gcc/testsuite/gm2/pim/pass/highbit.mod13
-rw-r--r--gcc/testsuite/gm2/pim/pass/highbit2.mod13
-rw-r--r--gcc/testsuite/gm2/pimlib/run/pass/format2.mod63
-rw-r--r--gcc/testsuite/lib/gm2-dg.exp37
60 files changed, 2079 insertions, 340 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5f52642..4c214df 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,25 @@
+2025-05-16 Maciej W. Rozycki <macro@orcam.me.uk>
+
+ Backported from master:
+ 2025-04-19 Maciej W. Rozycki <macro@orcam.me.uk>
+
+ * config/alpha/alpha.cc
+ (alpha_get_mem_rtx_alignment_and_offset): Recurse into
+ COMPONENT_REF nodes.
+
+2025-05-14 Kyle Huey <me@kylehuey.com>
+
+ * dwarf2out.cc (resolve_addr_in_expr): Propagate dtprel into the address
+ table when appropriate.
+
+2025-05-13 Gaius Mulley <gaiusmod2@gmail.com>
+
+ Backported from master:
+ 2025-05-12 Gaius Mulley <gaiusmod2@gmail.com>
+
+ PR modula2/120188
+ * doc/gm2.texi (Semantic checking): Add -fm2-plugin command line option.
+
2025-05-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/120211
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 823f45b..4ea9877 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20250512
+20250520
diff --git a/gcc/config/alpha/alpha.cc b/gcc/config/alpha/alpha.cc
index ba470d9..14e7da5 100644
--- a/gcc/config/alpha/alpha.cc
+++ b/gcc/config/alpha/alpha.cc
@@ -4291,14 +4291,10 @@ alpha_get_mem_rtx_alignment_and_offset (rtx expr, int &a, HOST_WIDE_INT &o)
tree mem = MEM_EXPR (expr);
if (mem != NULL_TREE)
- switch (TREE_CODE (mem))
- {
- case MEM_REF:
- tree_offset = mem_ref_offset (mem).force_shwi ();
- tree_align = get_object_alignment (get_base_address (mem));
- break;
+ {
+ HOST_WIDE_INT comp_offset = 0;
- case COMPONENT_REF:
+ for (; TREE_CODE (mem) == COMPONENT_REF; mem = TREE_OPERAND (mem, 0))
{
tree byte_offset = component_ref_field_offset (mem);
tree bit_offset = DECL_FIELD_BIT_OFFSET (TREE_OPERAND (mem, 1));
@@ -4307,14 +4303,15 @@ alpha_get_mem_rtx_alignment_and_offset (rtx expr, int &a, HOST_WIDE_INT &o)
|| !poly_int_tree_p (byte_offset, &offset)
|| !tree_fits_shwi_p (bit_offset))
break;
- tree_offset = offset + tree_to_shwi (bit_offset) / BITS_PER_UNIT;
+ comp_offset += offset + tree_to_shwi (bit_offset) / BITS_PER_UNIT;
}
- tree_align = get_object_alignment (get_base_address (mem));
- break;
- default:
- break;
- }
+ if (TREE_CODE (mem) == MEM_REF)
+ {
+ tree_offset = comp_offset + mem_ref_offset (mem).force_shwi ();
+ tree_align = get_object_alignment (get_base_address (mem));
+ }
+ }
if (reg_align > mem_align)
{
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f950c61..ae663cd 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,42 @@
+2025-05-15 Patrick Palka <ppalka@redhat.com>
+
+ Backported from master:
+ 2025-05-15 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/120161
+ * pt.cc (unify) <case RECORD_TYPE>: When comparing specializations
+ of a non-primary template, still perform a type comparison.
+
+2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ Backported from master:
+ 2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/120125
+ * module.cc (trees_out::write_function_def): Only set
+ DECL_NOT_REALLY_EXTERN if the importer might need to emit it.
+ * optimize.cc (maybe_thunk_body): Don't assume 'fn' has a cgraph
+ node created.
+
+2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ Backported from master:
+ 2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/119864
+ * decl2.cc (start_objects): Only use module initialized for
+ host.
+ (c_parse_final_cleanups): Don't always create an OMP offload
+ init function in modules.
+
+2025-05-12 Jason Merrill <jason@redhat.com>
+
+ Backported from master:
+ 2025-05-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/120012
+ * class.cc (check_non_pod_aggregate): Check is_empty_class.
+
2025-05-07 Jason Merrill <jason@redhat.com>
Backported from master:
diff --git a/gcc/cp/class.cc b/gcc/cp/class.cc
index 6767ac1..93ad9d6 100644
--- a/gcc/cp/class.cc
+++ b/gcc/cp/class.cc
@@ -6835,8 +6835,10 @@ check_non_pod_aggregate (tree field)
tree type = TREE_TYPE (field);
if (TYPE_IDENTIFIER (type) == as_base_identifier)
type = TYPE_CONTEXT (type);
- if (!CLASS_TYPE_P (type) || (!CLASSTYPE_NON_POD_AGGREGATE (type)
- && !CLASSTYPE_NON_AGGREGATE_POD (type)))
+ if (!CLASS_TYPE_P (type)
+ || is_empty_class (type)
+ || (!CLASSTYPE_NON_POD_AGGREGATE (type)
+ && !CLASSTYPE_NON_AGGREGATE_POD (type)))
return;
tree size = end_of_class (type, (DECL_FIELD_IS_BASE (field)
? eoc_nvsize : eoc_nv_or_dsize));
diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc
index 23b4bfe..d019d4d 100644
--- a/gcc/cp/decl2.cc
+++ b/gcc/cp/decl2.cc
@@ -4189,7 +4189,11 @@ start_objects (bool initp, unsigned priority, bool has_body,
bool omp_target = false)
{
bool default_init = initp && priority == DEFAULT_INIT_PRIORITY;
- bool is_module_init = default_init && module_global_init_needed ();
+ /* FIXME: We may eventually want to treat OpenMP offload initializers
+ in modules specially as well. */
+ bool is_module_init = (default_init
+ && !omp_target
+ && module_global_init_needed ());
tree name = NULL_TREE;
if (is_module_init)
@@ -5881,12 +5885,8 @@ c_parse_final_cleanups (void)
if (static_init_fini_fns[true]->get_or_insert (DEFAULT_INIT_PRIORITY))
has_module_inits = true;
- if (flag_openmp)
- {
- if (!static_init_fini_fns[2 + true])
- static_init_fini_fns[2 + true] = priority_map_t::create_ggc ();
- static_init_fini_fns[2 + true]->get_or_insert (DEFAULT_INIT_PRIORITY);
- }
+ /* FIXME: We need to work out what static constructors on OpenMP offload
+ target in modules will look like. */
}
/* Generate initialization and destruction functions for all
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index f562bf8..f8fa7f1 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -8097,18 +8097,37 @@ trees_in::install_entity (tree decl)
gcc_checking_assert (!existed);
slot = ident;
}
- else if (state->is_partition ())
- {
- /* The decl is already in the entity map, but we see it again now from a
- partition: we want to overwrite if the original decl wasn't also from
- a (possibly different) partition. Otherwise, for things like template
- instantiations, make_dependency might not realise that this is also
- provided from a partition and should be considered part of this module
- (and thus always emitted into the primary interface's CMI). */
+ else
+ {
unsigned *slot = entity_map->get (DECL_UID (decl));
- module_state *imp = import_entity_module (*slot);
- if (!imp->is_partition ())
- *slot = ident;
+
+ /* The entity must be in the entity map already. However, DECL may
+ be the DECL_TEMPLATE_RESULT of an existing partial specialisation
+ if we matched it while streaming another instantiation; in this
+ case we already registered that TEMPLATE_DECL. */
+ if (!slot)
+ {
+ tree type = TREE_TYPE (decl);
+ gcc_checking_assert (TREE_CODE (decl) == TYPE_DECL
+ && CLASS_TYPE_P (type)
+ && CLASSTYPE_TEMPLATE_SPECIALIZATION (type));
+ slot = entity_map->get (DECL_UID (CLASSTYPE_TI_TEMPLATE (type)));
+ }
+ gcc_checking_assert (slot);
+
+ if (state->is_partition ())
+ {
+ /* The decl is already in the entity map, but we see it again now
+ from a partition: we want to overwrite if the original decl
+ wasn't also from a (possibly different) partition. Otherwise,
+ for things like template instantiations, make_dependency might
+ not realise that this is also provided from a partition and
+ should be considered part of this module (and thus always
+ emitted into the primary interface's CMI). */
+ module_state *imp = import_entity_module (*slot);
+ if (!imp->is_partition ())
+ *slot = ident;
+ }
}
return true;
@@ -12638,7 +12657,11 @@ trees_out::write_function_def (tree decl)
{
unsigned flags = 0;
- flags |= 1 * DECL_NOT_REALLY_EXTERN (decl);
+ /* Whether the importer should emit this definition, if used. */
+ flags |= 1 * (DECL_NOT_REALLY_EXTERN (decl)
+ && (get_importer_interface (decl)
+ != importer_interface::always_import));
+
if (f)
{
flags |= 2;
diff --git a/gcc/cp/optimize.cc b/gcc/cp/optimize.cc
index 6f9a77f..fc4d6c2 100644
--- a/gcc/cp/optimize.cc
+++ b/gcc/cp/optimize.cc
@@ -309,8 +309,8 @@ maybe_thunk_body (tree fn, bool force)
defer_mangling_aliases = save_defer_mangling_aliases;
cgraph_node::get_create (fns[0])->set_comdat_group (comdat_group);
cgraph_node::get_create (fns[1])->add_to_same_comdat_group
- (cgraph_node::get_create (fns[0]));
- symtab_node::get (fn)->add_to_same_comdat_group
+ (cgraph_node::get (fns[0]));
+ symtab_node::get_create (fn)->add_to_same_comdat_group
(symtab_node::get (fns[0]));
if (fns[2])
/* If *[CD][12]* dtors go into the *[CD]5* comdat group and dtor is
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index d794083..fc2b31f 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -26012,10 +26012,10 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
INNERMOST_TEMPLATE_ARGS (CLASSTYPE_TI_ARGS (parm)),
INNERMOST_TEMPLATE_ARGS (CLASSTYPE_TI_ARGS (t)),
UNIFY_ALLOW_NONE, explain_p);
- else
- return unify_success (explain_p);
+ gcc_checking_assert (t == arg);
}
- else if (!same_type_ignoring_top_level_qualifiers_p (parm, arg))
+
+ if (!same_type_ignoring_top_level_qualifiers_p (parm, arg))
return unify_type_mismatch (explain_p, parm, arg);
return unify_success (explain_p);
diff --git a/gcc/cp/rtti.cc b/gcc/cp/rtti.cc
index 3539962..8393301 100644
--- a/gcc/cp/rtti.cc
+++ b/gcc/cp/rtti.cc
@@ -468,6 +468,7 @@ get_tinfo_decl_direct (tree type, tree name, int pseudo_ix)
DECL_IGNORED_P (d) = 1;
TREE_READONLY (d) = 1;
TREE_STATIC (d) = 1;
+ TREE_ADDRESSABLE (d) = 1;
/* Tell equal_address_to that different tinfo decls never
overlap. */
if (vec_safe_is_empty (unemitted_tinfo_decls))
diff --git a/gcc/doc/gm2.texi b/gcc/doc/gm2.texi
index cb52e8c..8293da4 100644
--- a/gcc/doc/gm2.texi
+++ b/gcc/doc/gm2.texi
@@ -1495,7 +1495,7 @@ from @samp{bad} will cause an overflow to @samp{foo}. If we compile
the code with the following options:
@example
-$ gm2 -g -fsoft-check-all -O2 -c assignvalue.mod
+$ gm2 -g -fsoft-check-all -O2 -fm2-plugin -c assignvalue.mod
assignvalue.mod:16:0:inevitable that this error will occur at run time,
assignment will result in an overflow
@end example
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index 8c711e4..b5a7886 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -31099,7 +31099,8 @@ resolve_addr_in_expr (dw_attr_node *a, dw_loc_descr_ref loc)
return false;
remove_addr_table_entry (loc->dw_loc_oprnd1.val_entry);
loc->dw_loc_oprnd1.val_entry
- = add_addr_table_entry (rtl, ate_kind_rtx);
+ = add_addr_table_entry (rtl, loc->dtprel
+ ? ate_kind_rtx_dtprel : ate_kind_rtx);
}
break;
case DW_OP_const4u:
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 2697deb..3116650 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,63 @@
+2025-05-19 Tobias Burnus <tburnus@baylibre.com>
+
+ Backported from master:
+ 2025-05-15 Tobias Burnus <tburnus@baylibre.com>
+
+ * trans-openmp.cc (gfc_omp_deep_mapping_do): Handle SSA_NAME if
+ a def_stmt is available.
+
+2025-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ Backported from master:
+ 2025-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/120049
+ * check.cc (gfc_check_c_associated): Modify checks to avoid
+ ICE and allow use, intrinsic :: iso_c_binding from a separate
+ module file.
+
+2025-05-15 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ Backported from master:
+ 2025-05-14 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/120139
+ * dump-parse-tree.cc (get_c_type_name): If no constant
+ size of an array exists, output an asterisk.
+
+2025-05-15 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ Backported from master:
+ 2025-05-14 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/120107
+ * dump-parse-tree.cc (write_type): Do not dump non-interoperable
+ types.
+
+2025-05-13 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/120163
+ * gfortran.h: Add formal_resolved to gfc_symbol.
+ * resolve.cc (gfc_resolve_formal_arglist): Set it.
+ (resolve_function): Do not call gfc_get_formal_from_actual_arglist
+ if we already resolved a formal arglist.
+ (resolve_call): Likewise.
+
+2025-05-13 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-05-13 Jakub Jelinek <jakub@redhat.com>
+ Daniil Kochergin <daniil2472s@gmail.com>
+ Tobias Burnus <tburnus@baylibre.com>
+
+ PR fortran/120191
+ * trans-intrinsic.cc (strip_kind_from_actual): Remove.
+ (gfc_conv_intrinsic_minmaxloc): Don't call strip_kind_from_actual.
+ Free and clear kind_arg->expr if non-NULL. Set back_arg->name to
+ "%VAL" instead of a loop looking for last argument. Remove actual
+ variable, use array_arg instead. Free and clear dim_arg->expr if
+ non-NULL for BT_CHARACTER cases instead of using a loop.
+
2025-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/119928
diff --git a/gcc/fortran/check.cc b/gcc/fortran/check.cc
index 9c66c25..0073cd0 100644
--- a/gcc/fortran/check.cc
+++ b/gcc/fortran/check.cc
@@ -5919,30 +5919,40 @@ gfc_check_c_sizeof (gfc_expr *arg)
bool
gfc_check_c_associated (gfc_expr *c_ptr_1, gfc_expr *c_ptr_2)
{
- if (c_ptr_1->ts.type != BT_DERIVED
- || c_ptr_1->ts.u.derived->from_intmod != INTMOD_ISO_C_BINDING
- || (c_ptr_1->ts.u.derived->intmod_sym_id != ISOCBINDING_PTR
- && c_ptr_1->ts.u.derived->intmod_sym_id != ISOCBINDING_FUNPTR))
+ if (c_ptr_1)
{
- gfc_error ("Argument C_PTR_1 at %L to C_ASSOCIATED shall have the "
- "type TYPE(C_PTR) or TYPE(C_FUNPTR)", &c_ptr_1->where);
- return false;
+ if (c_ptr_1->expr_type == EXPR_FUNCTION && c_ptr_1->ts.type == BT_VOID)
+ return true;
+
+ if (c_ptr_1->ts.type != BT_DERIVED
+ || c_ptr_1->ts.u.derived->from_intmod != INTMOD_ISO_C_BINDING
+ || (c_ptr_1->ts.u.derived->intmod_sym_id != ISOCBINDING_PTR
+ && c_ptr_1->ts.u.derived->intmod_sym_id != ISOCBINDING_FUNPTR))
+ {
+ gfc_error ("Argument C_PTR_1 at %L to C_ASSOCIATED shall have the "
+ "type TYPE(C_PTR) or TYPE(C_FUNPTR)", &c_ptr_1->where);
+ return false;
+ }
}
if (!scalar_check (c_ptr_1, 0))
return false;
- if (c_ptr_2
- && (c_ptr_2->ts.type != BT_DERIVED
+ if (c_ptr_2)
+ {
+ if (c_ptr_2->expr_type == EXPR_FUNCTION && c_ptr_2->ts.type == BT_VOID)
+ return true;
+
+ if (c_ptr_2->ts.type != BT_DERIVED
|| c_ptr_2->ts.u.derived->from_intmod != INTMOD_ISO_C_BINDING
|| (c_ptr_1->ts.u.derived->intmod_sym_id
- != c_ptr_2->ts.u.derived->intmod_sym_id)))
- {
- gfc_error ("Argument C_PTR_2 at %L to C_ASSOCIATED shall have the "
- "same type as C_PTR_1: %s instead of %s", &c_ptr_1->where,
- gfc_typename (&c_ptr_1->ts),
- gfc_typename (&c_ptr_2->ts));
- return false;
+ != c_ptr_2->ts.u.derived->intmod_sym_id))
+ {
+ gfc_error ("Argument C_PTR_2 at %L to C_ASSOCIATED shall have the "
+ "same type as C_PTR_1: %s instead of %s", &c_ptr_1->where,
+ gfc_typename (&c_ptr_1->ts), gfc_typename (&c_ptr_2->ts));
+ return false;
+ }
}
if (c_ptr_2 && !scalar_check (c_ptr_2, 1))
diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc
index 9708964..648109b 100644
--- a/gcc/fortran/dump-parse-tree.cc
+++ b/gcc/fortran/dump-parse-tree.cc
@@ -4350,6 +4350,8 @@ get_c_type_name (gfc_typespec *ts, gfc_array_spec *as, const char **pre,
mpz_clear (sz);
*asterisk = false;
}
+ else
+ *asterisk = true;
}
return ret;
}
@@ -4394,10 +4396,11 @@ write_type (gfc_symbol *sym)
{
gfc_component *c;
- /* Don't dump our iso c module, nor vtypes. */
+ /* Don't dump types that are not interoperable, our very own ISO C Binding
+ module, or vtypes. */
if (sym->from_intmod == INTMOD_ISO_C_BINDING || sym->attr.flavor != FL_DERIVED
- || sym->attr.vtype)
+ || sym->attr.vtype || !sym->attr.is_bind_c)
return;
fprintf (dumpfile, "typedef struct %s {\n", sym->name);
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index c9cf072..903712a 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -2074,6 +2074,9 @@ typedef struct gfc_symbol
This is legal in Fortran, but can cause problems with autogenerated
C prototypes for C23. */
unsigned ext_dummy_arglist_mismatch:1;
+ /* Set if the formal arglist has already been resolved, to avoid
+ trying to generate it again from actual arguments. */
+ unsigned formal_resolved:1;
/* Reference counter, used for memory management.
diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 3872b39..9d31062 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -533,7 +533,8 @@ gfc_resolve_formal_arglist (gfc_symbol *proc)
}
}
}
-
+ if (sym)
+ sym->formal_resolved = 1;
gfc_current_ns = orig_current_ns;
}
@@ -3472,7 +3473,7 @@ resolve_function (gfc_expr *expr)
&expr->where, &sym->formal_at);
}
}
- else
+ else if (!sym->formal_resolved)
{
gfc_get_formal_from_actual_arglist (sym, expr->value.function.actual);
sym->formal_at = expr->where;
@@ -4033,7 +4034,7 @@ resolve_call (gfc_code *c)
&c->loc, &csym->formal_at);
}
}
- else
+ else if (!csym->formal_resolved)
{
gfc_get_formal_from_actual_arglist (csym, c->ext.actual);
csym->formal_at = c->loc;
diff --git a/gcc/fortran/trans-intrinsic.cc b/gcc/fortran/trans-intrinsic.cc
index 6ffc3e0..974e25f 100644
--- a/gcc/fortran/trans-intrinsic.cc
+++ b/gcc/fortran/trans-intrinsic.cc
@@ -4716,22 +4716,6 @@ maybe_absent_optional_variable (gfc_expr *e)
}
-/* Remove unneeded kind= argument from actual argument list when the
- result conversion is dealt with in a different place. */
-
-static void
-strip_kind_from_actual (gfc_actual_arglist * actual)
-{
- for (gfc_actual_arglist *a = actual; a; a = a->next)
- {
- if (a && a->name && strcmp (a->name, "kind") == 0)
- {
- gfc_free_expr (a->expr);
- a->expr = NULL;
- }
- }
-}
-
/* Emit code for minloc or maxloc intrinsic. There are many different cases
we need to handle. For performance reasons we sometimes create two
loops instead of one, where the second one is much simpler.
@@ -4926,7 +4910,7 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op)
tree b_if, b_else;
tree back;
gfc_loopinfo loop, *ploop;
- gfc_actual_arglist *actual, *array_arg, *dim_arg, *mask_arg, *kind_arg;
+ gfc_actual_arglist *array_arg, *dim_arg, *mask_arg, *kind_arg;
gfc_actual_arglist *back_arg;
gfc_ss *arrayss = nullptr;
gfc_ss *maskss = nullptr;
@@ -4945,8 +4929,7 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op)
int n;
bool optional_mask;
- actual = expr->value.function.actual;
- array_arg = actual;
+ array_arg = expr->value.function.actual;
dim_arg = array_arg->next;
mask_arg = dim_arg->next;
kind_arg = mask_arg->next;
@@ -4955,14 +4938,16 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op)
bool dim_present = dim_arg->expr != nullptr;
bool nested_loop = dim_present && expr->rank > 0;
- /* The last argument, BACK, is passed by value. Ensure that
- by setting its name to %VAL. */
- for (gfc_actual_arglist *a = actual; a; a = a->next)
+ /* Remove kind. */
+ if (kind_arg->expr)
{
- if (a->next == NULL)
- a->name = "%VAL";
+ gfc_free_expr (kind_arg->expr);
+ kind_arg->expr = NULL;
}
+ /* Pass BACK argument by value. */
+ back_arg->name = "%VAL";
+
if (se->ss)
{
if (se->ss->info->useflags)
@@ -4984,25 +4969,19 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op)
}
}
- arrayexpr = actual->expr;
+ arrayexpr = array_arg->expr;
- /* Special case for character maxloc. Remove unneeded actual
- arguments, then call a library function. */
+ /* Special case for character maxloc. Remove unneeded "dim" actual
+ argument, then call a library function. */
if (arrayexpr->ts.type == BT_CHARACTER)
{
gcc_assert (expr->rank == 0);
- gfc_actual_arglist *a = actual;
- strip_kind_from_actual (a);
- while (a)
+ if (dim_arg->expr)
{
- if (a->name && strcmp (a->name, "dim") == 0)
- {
- gfc_free_expr (a->expr);
- a->expr = NULL;
- }
- a = a->next;
+ gfc_free_expr (dim_arg->expr);
+ dim_arg->expr = NULL;
}
gfc_conv_intrinsic_funcall (se, expr);
return;
diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc
index 64e5cec..7a63f52 100644
--- a/gcc/fortran/trans-openmp.cc
+++ b/gcc/fortran/trans-openmp.cc
@@ -2568,6 +2568,26 @@ gfc_omp_deep_mapping_do (bool is_cnt, gimple *ctx, tree clause,
else
while (TREE_CODE (tmp) == COMPONENT_REF || TREE_CODE (tmp) == ARRAY_REF)
tmp = TREE_OPERAND (tmp, TREE_CODE (tmp) == COMPONENT_REF ? 1 : 0);
+ if (TREE_CODE (tmp) == MEM_REF)
+ tmp = TREE_OPERAND (tmp, 0);
+ if (TREE_CODE (tmp) == SSA_NAME)
+ {
+ gimple *def_stmt = SSA_NAME_DEF_STMT (tmp);
+ if (gimple_code (def_stmt) == GIMPLE_ASSIGN)
+ {
+ tmp = gimple_assign_rhs1 (def_stmt);
+ if (poly)
+ {
+ tmp = TYPE_FIELDS (type);
+ type = TREE_TYPE (tmp);
+ }
+ else
+ while (TREE_CODE (tmp) == COMPONENT_REF
+ || TREE_CODE (tmp) == ARRAY_REF)
+ tmp = TREE_OPERAND (tmp,
+ TREE_CODE (tmp) == COMPONENT_REF ? 1 : 0);
+ }
+ }
/* If the clause argument is nonallocatable, skip is-allocate check. */
if (GFC_DECL_GET_SCALAR_ALLOCATABLE (tmp)
|| GFC_DECL_GET_SCALAR_POINTER (tmp)
diff --git a/gcc/m2/ChangeLog b/gcc/m2/ChangeLog
index f56104b..cb70f1c 100644
--- a/gcc/m2/ChangeLog
+++ b/gcc/m2/ChangeLog
@@ -1,3 +1,60 @@
+2025-05-13 Gaius Mulley <gaiusmod2@gmail.com>
+
+ Backported from master:
+ 2025-05-05 Gaius Mulley <gaiusmod2@gmail.com>
+
+ PR modula2/120117
+ * gm2-compiler/M2GenGCC.mod (FoldBecomes): Remove the call to
+ RemoveQuad since this is performed by TypeCheckBecomes.
+ * gm2-compiler/PCSymBuild.mod (buildConstFunction): Rewrite
+ header comment.
+ Check for a set or a type aliased set and appropriately
+ skip type equivalences and obtain the element type.
+ * gm2-compiler/SymbolTable.mod (PutConst): Add call to
+ CheckBreak.
+
+2025-05-13 Gaius Mulley <gaiusmod2@gmail.com>
+
+ Backported from master:
+ 2025-04-24 Gaius Mulley <gaiusmod2@gmail.com>
+
+ PR modula2/119915
+ * gm2-libs/FormatStrings.mod (PerformFormatString): Handle
+ the %u and %x format specifiers in a similar way to the %d
+ specifier. Avoid using Slice and use Copy instead.
+
+2025-05-13 Gaius Mulley <gaiusmod2@gmail.com>
+
+ Backported from master:
+ 2025-04-24 Gaius Mulley <gaiusmod2@gmail.com>
+
+ PR modula2/119914
+ * gm2-compiler/M2Check.mod (checkConstMeta): Add check for
+ Ztype, Rtype and Ctype and unbounded arrays.
+ (IsZRCType): New procedure function.
+ (isZRC): Add comment.
+ * gm2-compiler/M2Quads.mod:
+ * gm2-compiler/M2Range.mod (gdbinit): New procedure.
+ (BreakWhenRangeCreated): Ditto.
+ (CheckBreak): Ditto.
+ (InitRange): Call CheckBreak.
+ (Init): Add gdbhook and initialize interactive watch point.
+ * gm2-compiler/SymbolTable.def (GetNthParamAnyClosest): New
+ procedure function.
+ * gm2-compiler/SymbolTable.mod (BreakSym): Remove constant.
+ (BreakSym): Add Variable.
+ (stop): Remove.
+ (gdbhook): New procedure.
+ (BreakWhenSymCreated): Ditto.
+ (CheckBreak): Ditto.
+ (NewSym): Call CheckBreak.
+ (Init): Add gdbhook and initialize interactive watch point.
+ (MakeProcedure): Replace guarded call to stop with CheckBreak.
+ (GetNthParamChoice): New procedure function.
+ (GetNthParamOrdered): Ditto.
+ (GetNthParamAnyClosest): Ditto.
+ (GetOuterModuleScope): Ditto.
+
2025-04-25 Release Manager
* GCC 15.1.0 released.
diff --git a/gcc/m2/gm2-compiler/M2Check.mod b/gcc/m2/gm2-compiler/M2Check.mod
index 528c51d..d86ef8e 100644
--- a/gcc/m2/gm2-compiler/M2Check.mod
+++ b/gcc/m2/gm2-compiler/M2Check.mod
@@ -803,7 +803,12 @@ BEGIN
THEN
typeRight := GetDType (right) ;
typeLeft := GetDType (left) ;
- RETURN doCheckPair (result, tinfo, typeLeft, typeRight)
+ IF IsZRCType (typeLeft) AND IsUnbounded (typeRight)
+ THEN
+ RETURN false
+ ELSE
+ RETURN doCheckPair (result, tinfo, typeLeft, typeRight)
+ END
END ;
RETURN result
END checkConstMeta ;
@@ -868,7 +873,19 @@ END checkSubrangeTypeEquivalence ;
(*
- isZRC -
+ IsZRCType - return TRUE if type is a ZType, RType or a CType.
+*)
+
+PROCEDURE IsZRCType (type: CARDINAL) : BOOLEAN ;
+BEGIN
+ RETURN (type = CType) OR (type = ZType) OR (type = RType)
+END IsZRCType ;
+
+
+(*
+ isZRC - return TRUE if zrc is a ZType, RType or a CType
+ and sym is either a complex type when zrc = CType
+ or is not a composite type when zrc is a RType or ZType.
*)
PROCEDURE isZRC (zrc, sym: CARDINAL) : BOOLEAN ;
diff --git a/gcc/m2/gm2-compiler/M2GenGCC.mod b/gcc/m2/gm2-compiler/M2GenGCC.mod
index a1e3c07..bc1d588 100644
--- a/gcc/m2/gm2-compiler/M2GenGCC.mod
+++ b/gcc/m2/gm2-compiler/M2GenGCC.mod
@@ -2914,9 +2914,6 @@ BEGIN
IF TypeCheckBecomes (p, quad)
THEN
PerformFoldBecomes (p, quad)
- ELSE
- GetQuad (quad, op, des, op2, expr) ;
- RemoveQuad (p, des, quad)
END
END
END
diff --git a/gcc/m2/gm2-compiler/M2Quads.mod b/gcc/m2/gm2-compiler/M2Quads.mod
index 9bb8c4d..4022657 100644
--- a/gcc/m2/gm2-compiler/M2Quads.mod
+++ b/gcc/m2/gm2-compiler/M2Quads.mod
@@ -69,6 +69,7 @@ FROM SymbolTable IMPORT ModeOfAddr, GetMode, PutMode, GetSymName, IsUnknown,
GetArraySubscript, GetDimension,
GetParam,
GetNth, GetNthParamAny,
+ GetNthParamAnyClosest,
GetFirstUsed, GetDeclaredMod,
GetQuads, GetReadQuads, GetWriteQuads,
GetWriteLimitQuads, GetReadLimitQuads,
@@ -5676,7 +5677,8 @@ BEGIN
WHILE i<=ParamTotal DO
IF i <= NoOfParamAny (Proc)
THEN
- FormalI := GetParam(Proc, i) ;
+ (* FormalI := GetParam(Proc, i) ; *)
+ FormalI := GetNthParamAnyClosest (Proc, i, GetCurrentModule ()) ;
IF CompilerDebugging
THEN
n1 := GetSymName(FormalI) ;
@@ -5801,7 +5803,7 @@ BEGIN
MetaError3 ('parameter {%3n} in {%1dD} causes a mismatch it was declared as a {%2d}', call, GetNth (call, i), i)
END ;
BuildRange (InitTypesParameterCheck (tokno, CheckedProcedure, i,
- GetParam (CheckedProcedure, i),
+ GetNthParamAnyClosest (CheckedProcedure, i, GetCurrentModule ()),
GetParam (ProcType, i), ParamCheckId)) ;
INC(i)
END
@@ -6150,7 +6152,7 @@ BEGIN
MetaErrorStringT2 (tokpos, Msg, ProcedureSym, ParameterNo) ;
IF NoOfParamAny (ProcedureSym) >= ParameterNo
THEN
- FormalParam := GetNthParamAny (ProcedureSym, ParameterNo) ;
+ FormalParam := GetNthParamAnyClosest (ProcedureSym, ParameterNo, GetCurrentModule ()) ;
IF IsUnboundedParamAny (ProcedureSym, ParameterNo)
THEN
MetaErrorT2 (GetVarDeclFullTok (FormalParam), 'formal parameter {%1ad} has an open array type {%2tad}',
@@ -6205,7 +6207,7 @@ BEGIN
MetaErrorStringT2 (tokpos, Msg, ProcedureSym, ParameterNo) ;
IF NoOfParamAny (ProcedureSym) >= ParameterNo
THEN
- FormalParam := GetNthParamAny (ProcedureSym, ParameterNo) ;
+ FormalParam := GetNthParamAnyClosest (ProcedureSym, ParameterNo, GetCurrentModule ()) ;
IF IsUnboundedParamAny (ProcedureSym, ParameterNo)
THEN
MetaErrorT2 (GetVarDeclFullTok (FormalParam), '{%W}formal parameter {%1ad} has an open array type {%2tad}',
diff --git a/gcc/m2/gm2-compiler/M2Range.mod b/gcc/m2/gm2-compiler/M2Range.mod
index 2a5bfab..8e3943a 100644
--- a/gcc/m2/gm2-compiler/M2Range.mod
+++ b/gcc/m2/gm2-compiler/M2Range.mod
@@ -154,6 +154,34 @@ TYPE
VAR
TopOfRange: CARDINAL ;
RangeIndex: Index ;
+ BreakRange: CARDINAL ;
+
+
+PROCEDURE gdbhook ;
+END gdbhook ;
+
+
+(*
+ BreakWhenRangeCreated - to be called interactively by gdb.
+*)
+
+PROCEDURE BreakWhenRangeCreated (r: CARDINAL) ;
+BEGIN
+ BreakRange := r
+END BreakWhenRangeCreated ;
+
+
+(*
+ CheckBreak - if sym = BreakRange then call gdbhook.
+*)
+
+PROCEDURE CheckBreak (r: CARDINAL) ;
+BEGIN
+ IF BreakRange = r
+ THEN
+ gdbhook
+ END
+END CheckBreak ;
(*
@@ -302,6 +330,7 @@ BEGIN
THEN
InternalError ('out of memory error')
ELSE
+ CheckBreak (r) ;
WITH p^ DO
type := none ;
des := NulSym ;
@@ -3746,7 +3775,19 @@ END WriteRangeCheck ;
PROCEDURE Init ;
BEGIN
TopOfRange := 0 ;
- RangeIndex := InitIndex(1)
+ RangeIndex := InitIndex(1) ;
+ BreakWhenRangeCreated (0) ; (* Disable the intereactive range watch. *)
+ (* To examine the range when it is created run cc1gm2 from gdb
+ and set a break point on gdbhook.
+ (gdb) break gdbhook
+ (gdb) run
+ Now below interactively call BreakWhenRangeCreated with the symbol
+ under investigation. *)
+ gdbhook ;
+ (* Now is the time to interactively call gdb, for example:
+ (gdb) print BreakWhenRangeCreated (1234)
+ (gdb) cont
+ and you will arrive at gdbhook when this symbol is created. *)
END Init ;
diff --git a/gcc/m2/gm2-compiler/PCSymBuild.mod b/gcc/m2/gm2-compiler/PCSymBuild.mod
index b124c3e..3bffe86 100644
--- a/gcc/m2/gm2-compiler/PCSymBuild.mod
+++ b/gcc/m2/gm2-compiler/PCSymBuild.mod
@@ -64,7 +64,7 @@ FROM SymbolTable IMPORT NulSym, ModeOfAddr, ProcedureKind,
GetFromOuterModule,
CheckForEnumerationInCurrentModule,
GetMode, PutVariableAtAddress, ModeOfAddr, SkipType,
- IsSet, PutConstSet,
+ IsSet, PutConstSet, IsType,
IsConst, IsConstructor, PutConst, PutConstructor,
PopValue, PushValue,
MakeTemporary, PutVar,
@@ -1408,9 +1408,10 @@ END TypeToMeta ;
(*
- buildConstFunction - we are only concerned about resolving the return type o
+ buildConstFunction - we are only concerned about resolving the return type of
a function, so we can ignore all parameters - except
- the first one in the case of VAL(type, foo).
+ the first one in the case of VAL(type, foo)
+ and the type of bar in MIN (bar) and MAX (bar).
buildConstFunction uses a unary exprNode to represent
a function.
*)
@@ -1866,11 +1867,11 @@ BEGIN
THEN
IF (func=Min) OR (func=Max)
THEN
- IF IsSet (sym)
+ IF IsSet (sym) OR (IsType (sym) AND IsSet (SkipType (sym)))
THEN
- type := SkipType(GetType(sym))
+ type := GetType (SkipType (sym))
ELSE
- (* sym is the type required for MAX, MIN and VAL *)
+ (* sym is the type required for MAX, MIN and VAL. *)
type := sym
END
ELSE
diff --git a/gcc/m2/gm2-compiler/SymbolTable.def b/gcc/m2/gm2-compiler/SymbolTable.def
index 85a3672..2a9865a 100644
--- a/gcc/m2/gm2-compiler/SymbolTable.def
+++ b/gcc/m2/gm2-compiler/SymbolTable.def
@@ -3478,4 +3478,20 @@ PROCEDURE UsesOptArgAny (Sym: CARDINAL) : BOOLEAN ;
PROCEDURE GetProcedureKindDesc (kind: ProcedureKind) : String ;
+(*
+ GetNthParamAnyClosest - returns the nth parameter from the order
+ proper procedure, forward declaration
+ or definition module procedure.
+ It chooses the parameter which is closest
+ in source terms to currentmodule.
+ The same module will return using the order
+ proper procedure, forward procedure, definition module.
+ Whereas an imported procedure will choose from
+ DefProcedure, ProperProcedure, ForwardProcedure.
+*)
+
+PROCEDURE GetNthParamAnyClosest (sym: CARDINAL; ParamNo: CARDINAL;
+ currentmodule: CARDINAL) : CARDINAL ;
+
+
END SymbolTable.
diff --git a/gcc/m2/gm2-compiler/SymbolTable.mod b/gcc/m2/gm2-compiler/SymbolTable.mod
index 826d2d3..ff661dc 100644
--- a/gcc/m2/gm2-compiler/SymbolTable.mod
+++ b/gcc/m2/gm2-compiler/SymbolTable.mod
@@ -122,8 +122,6 @@ CONST
UnboundedAddressName = "_m2_contents" ;
UnboundedHighName = "_m2_high_%d" ;
- BreakSym = 203 ;
-
TYPE
ProcAnyBoolean = PROCEDURE (CARDINAL, ProcedureKind) : BOOLEAN ;
ProcAnyCardinal = PROCEDURE (CARDINAL, ProcedureKind) : CARDINAL ;
@@ -930,6 +928,7 @@ VAR
(* passes and reduce duplicate *)
(* errors. *)
ConstLitArray : Indexing.Index ;
+ BreakSym : CARDINAL ; (* Allows interactive debugging. *)
(*
@@ -1032,11 +1031,34 @@ END FinalSymbol ;
(*
- stop - a debugger convenience hook.
+ gdbhook - a debugger convenience hook.
+*)
+
+PROCEDURE gdbhook ;
+END gdbhook ;
+
+
+(*
+ BreakWhenSymCreated - to be called interactively by gdb.
*)
-PROCEDURE stop ;
-END stop ;
+PROCEDURE BreakWhenSymCreated (sym: CARDINAL) ;
+BEGIN
+ BreakSym := sym
+END BreakWhenSymCreated ;
+
+
+(*
+ CheckBreak - if sym = BreakSym then call gdbhook.
+*)
+
+PROCEDURE CheckBreak (sym: CARDINAL) ;
+BEGIN
+ IF sym = BreakSym
+ THEN
+ gdbhook
+ END
+END CheckBreak ;
(*
@@ -1053,10 +1075,7 @@ BEGIN
SymbolType := DummySym
END ;
PutIndice(Symbols, sym, pSym) ;
- IF sym = BreakSym
- THEN
- stop
- END ;
+ CheckBreak (sym) ;
INC(FreeSymbol)
END NewSym ;
@@ -1660,6 +1679,18 @@ PROCEDURE Init ;
VAR
pCall: PtrToCallFrame ;
BEGIN
+ BreakWhenSymCreated (NulSym) ; (* Disable the intereactive sym watch. *)
+ (* To examine the symbol table when a symbol is created run cc1gm2 from gdb
+ and set a break point on gdbhook.
+ (gdb) break gdbhook
+ (gdb) run
+ Now below interactively call BreakWhenSymCreated with the symbol
+ under investigation. *)
+ gdbhook ;
+ (* Now is the time to interactively call gdb, for example:
+ (gdb) print BreakWhenSymCreated (1234)
+ (gdb) cont
+ and you will arrive at gdbhook when this symbol is created. *)
AnonymousName := 0 ;
CurrentError := NIL ;
InitTree (ConstLitPoolTree) ;
@@ -3959,10 +3990,7 @@ VAR
BEGIN
tok := CheckTok (tok, 'procedure') ;
Sym := DeclareSym(tok, ProcedureName) ;
- IF Sym = BreakSym
- THEN
- stop
- END ;
+ CheckBreak (Sym) ;
IF NOT IsError(Sym)
THEN
pSym := GetPsym(Sym) ;
@@ -6926,6 +6954,89 @@ END GetNthParamAny ;
(*
+ GetNthParamChoice - returns the parameter definition from
+ sym:ParamNo:kind or NulSym.
+*)
+
+PROCEDURE GetNthParamChoice (sym: CARDINAL; ParamNo: CARDINAL;
+ kind: ProcedureKind) : CARDINAL ;
+BEGIN
+ IF GetProcedureParametersDefined (sym, kind)
+ THEN
+ RETURN GetNthParam (sym, kind, ParamNo)
+ ELSE
+ RETURN NulSym
+ END
+END GetNthParamChoice ;
+
+
+(*
+ GetNthParamOrdered - returns the parameter definition from list {a, b, c}
+ in order.
+ sym:ParamNo:{a,b,c} or NulSym.
+*)
+
+PROCEDURE GetNthParamOrdered (sym: CARDINAL; ParamNo: CARDINAL;
+ a, b, c: ProcedureKind) : CARDINAL ;
+VAR
+ param: CARDINAL ;
+BEGIN
+ param := GetNthParamChoice (sym, ParamNo, a) ;
+ IF param = NulSym
+ THEN
+ param := GetNthParamChoice (sym, ParamNo, b) ;
+ IF param = NulSym
+ THEN
+ param := GetNthParamChoice (sym, ParamNo, c)
+ END
+ END ;
+ RETURN param
+END GetNthParamOrdered ;
+
+
+(*
+ GetNthParamAnyClosest - returns the nth parameter from the order
+ proper procedure, forward declaration
+ or definition module procedure.
+ It chooses the parameter which is closest
+ in source terms to currentmodule.
+ The same module will return using the order
+ proper procedure, forward procedure, definition module.
+ Whereas an imported procedure will choose from
+ DefProcedure, ProperProcedure, ForwardProcedure.
+*)
+
+PROCEDURE GetNthParamAnyClosest (sym: CARDINAL; ParamNo: CARDINAL;
+ currentmodule: CARDINAL) : CARDINAL ;
+BEGIN
+ IF GetOuterModuleScope (currentmodule) = GetOuterModuleScope (sym)
+ THEN
+ (* Same module. *)
+ RETURN GetNthParamOrdered (sym, ParamNo,
+ ProperProcedure, ForwardProcedure, DefProcedure)
+ ELSE
+ (* Procedure is imported. *)
+ RETURN GetNthParamOrdered (sym, ParamNo,
+ DefProcedure, ProperProcedure, ForwardProcedure)
+ END
+END GetNthParamAnyClosest ;
+
+
+(*
+ GetOuterModuleScope - returns the outer module symbol scope for sym.
+*)
+
+PROCEDURE GetOuterModuleScope (sym: CARDINAL) : CARDINAL ;
+BEGIN
+ WHILE NOT (IsDefImp (sym) OR
+ (IsModule (sym) AND (GetScope (sym) = NulSym))) DO
+ sym := GetScope (sym)
+ END ;
+ RETURN sym
+END GetOuterModuleScope ;
+
+
+(*
The Following procedures fill in the symbol table with the
symbol entities.
*)
@@ -7154,6 +7265,7 @@ VAR
pSym: PtrToSymbol ;
BEGIN
pSym := GetPsym(Sym) ;
+ CheckBreak (Sym) ;
WITH pSym^ DO
CASE SymbolType OF
diff --git a/gcc/m2/gm2-libs/FormatStrings.mod b/gcc/m2/gm2-libs/FormatStrings.mod
index ec2985b..aea8da9 100644
--- a/gcc/m2/gm2-libs/FormatStrings.mod
+++ b/gcc/m2/gm2-libs/FormatStrings.mod
@@ -378,7 +378,7 @@ BEGIN
THEN
INC (afterperc) ;
Cast (u, w) ;
- in := ConCat (in, Slice (fmt, startpos, nextperc)) ;
+ in := Copy (fmt, in, startpos, nextperc) ;
in := ConCat (in, CardinalToString (u, width, leader, 16, TRUE)) ;
startpos := afterperc ;
DSdbExit (NIL) ;
@@ -387,7 +387,7 @@ BEGIN
THEN
INC (afterperc) ;
Cast (u, w) ;
- in := ConCat (in, Slice (fmt, startpos, nextperc)) ;
+ in := Copy (fmt, in, startpos, nextperc) ;
in := ConCat (in, CardinalToString (u, width, leader, 10, FALSE)) ;
startpos := afterperc ;
DSdbExit (NIL) ;
diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog
index f78bda3..1db7cd5 100644
--- a/gcc/po/ChangeLog
+++ b/gcc/po/ChangeLog
@@ -1,3 +1,15 @@
+2025-05-15 Joseph Myers <josmyers@redhat.com>
+
+ * zh_CN.po: Update.
+
+2025-05-14 Joseph Myers <josmyers@redhat.com>
+
+ * sv.po: Update.
+
+2025-05-12 Joseph Myers <josmyers@redhat.com>
+
+ * sv.po: Update.
+
2025-04-30 Joseph Myers <josmyers@redhat.com>
* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
diff --git a/gcc/po/sv.po b/gcc/po/sv.po
index 31e5502..28318cd 100644
--- a/gcc/po/sv.po
+++ b/gcc/po/sv.po
@@ -32,7 +32,7 @@ msgstr ""
"Project-Id-Version: gcc 15.1.0\n"
"Report-Msgid-Bugs-To: https://gcc.gnu.org/bugs/\n"
"POT-Creation-Date: 2025-04-23 19:27+0000\n"
-"PO-Revision-Date: 2025-05-10 14:36+0200\n"
+"PO-Revision-Date: 2025-05-14 22:41+0200\n"
"Last-Translator: Göran Uddeborg <goeran@uddeborg.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"Language: sv\n"
@@ -2732,7 +2732,7 @@ msgstr "Varna för avslutande blanktecken på rader utom i råa stränglitterale
#: c-family/c.opt:1523
#, no-c-format
msgid "Warn about trailing whitespace on lines except when in raw string literals. Equivalent to Wtrailing-whitespace=blanks when enabled or Wtrailing-whitespace=none when disabled."
-msgstr "Varna för avslutande mellanrum på rader utom i råa strängliteraler. Ekvivalent med Wtrailing-whitespace=blanks när det är aktiverat eller Wtrailing-whitespace=none när det är avaktiverat."
+msgstr "Varna för avslutande mellanrum på rader utom i råa stränglitteraler. Ekvivalent med Wtrailing-whitespace=blanks när det är aktiverat eller Wtrailing-whitespace=none när det är avaktiverat."
#: c-family/c.opt:1527
#, no-c-format
@@ -3864,7 +3864,7 @@ msgstr "-finternal-ebcdic\tIntern bearbetning är i EBCDIC kodsida 1140"
#: cobol/lang.opt:94
#, no-c-format
msgid "Enable/disable static linkage for CALL literals"
-msgstr "Aktivera/avaktivera statisk länkning för CALL-literaler"
+msgstr "Aktivera/avaktivera statisk länkning för CALL-litteraler"
#: cobol/lang.opt:98
#, no-c-format
@@ -4719,7 +4719,7 @@ msgstr "Det maximala djupet av exploderade noder som skall förekomma i en dot-d
#: analyzer/analyzer.opt:59
#, no-c-format
msgid "The number of bytes at which to ellipsize string literals in analyzer text art diagrams."
-msgstr "Antalet byte vid vilket strängliteraler i textkonstdiagram från analyseraren skall ha ellips."
+msgstr "Antalet byte vid vilket stränglitteraler i textkonstdiagram från analyseraren skall ha ellips."
#: analyzer/analyzer.opt:63
#, no-c-format
@@ -6677,7 +6677,7 @@ msgstr "Parameter för att styra vilka återskrivningsmöjligheter vi försöker
#: config/aarch64/aarch64.opt:437
#, no-c-format
msgid "Warn about usage of experimental Function Multi Versioning."
-msgstr "Varna för användning av experminetell funktionsmultiversionering."
+msgstr "Varna för användning av experimentell funktionsmultiversionering."
#: config/linux.opt:24
#, no-c-format
@@ -8848,7 +8848,7 @@ msgstr "Gör så att länkarens lättnadsmaskin antar att programräknaren slår
#: config/avr/avr.opt:112
#, no-c-format
msgid "Optimization. Accumulate outgoing function arguments and acquire/release the needed stack space for outgoing function arguments in function prologue/epilogue. Without this option, outgoing arguments are pushed before calling a function and popped afterwards. This option can lead to reduced code size for functions that call many functions that get their arguments on the stack like, for example printf."
-msgstr "Optimering. Samla utgående funktionsargument och ta/släpp det nödvändiga stackutrymmet för utgående funktionsargument i funktionsprologen/-epilogen. Utan denna flagga trycks utgående argument på stacken före anrop av en funktion och plockas efteråt. Denna flagga kan medföra reducerad kodstorlek för funktioner som anropar många funktioner som får sina argument på stacken som, till exempel printf."
+msgstr "Optimering. Samla utgående funktionsargument och ta/släpp det nödvändiga stackutrymmet för utgående funktionsargument i funktionsprologen/-epilogen. Utan denna flagga trycks utgående argument på stacken före anrop av en funktion och plockas efteråt. Denna flagga kan medföra reducerad kodstorlek för funktioner som anropar många funktioner som får sina argument på stacken, som till exempel printf."
#: config/avr/avr.opt:116
#, no-c-format
@@ -8878,7 +8878,7 @@ msgstr "Enheten har sektionen .rodata placerad i RAM-området."
#: config/avr/avr.opt:137
#, no-c-format
msgid "This option is used internally for multilib generation and selection. The device has no SPH special function register."
-msgstr "Denna flagga används internt för multilib-generering och -val. Enheten har inga speiciella SPH-fuktionsregister."
+msgstr "Denna flagga används internt för multilib-generering och -val. Enheten har inga speciella SPH-fuktionsregister."
#: config/avr/avr.opt:141
#, no-c-format
@@ -14856,7 +14856,7 @@ msgstr "Skriv en KÄLLFIL.opt-record.json-fil med detaljer om vilka optimeringar
#: common.opt:2469
#, no-c-format
msgid "Detect loops calculating CRC and replace with faster implementation. If the target supports CRC instruction and the CRC loop uses the same polynomial as the one used in the CRC instruction, directly replace with the corresponding CRC instruction. Otherwise, if the target supports carry-less-multiplication instruction, generate CRC using it. If neither case applies, generate table-based CRC."
-msgstr "Upptäck slingor som beräknar CRC och ersätt dem med en snabbare implementation. Om målet stödjer en CRC-instruktion och CRC-slingan använder samma polynom smo det som används i CRC-instruktionen, ersätt då direkt med motsvarande CRC-instruktion. Annars, om målet stöjder en instruktion för minnesfri multiplikation, generera en CRC som använder det. Om inget av fallen är tillämpligt, generera tabellbaserad CRC."
+msgstr "Upptäck slingor som beräknar CRC och ersätt dem med en snabbare implementation. Om målet stödjer en CRC-instruktion och CRC-slingan använder samma polynom smo det som används i CRC-instruktionen, ersätt då direkt med motsvarande CRC-instruktion. Annars, om målet stödjer en instruktion för minnesfri multiplikation, generera en CRC som använder det. Om inget av fallen är tillämpligt, generera tabellbaserad CRC."
#: common.opt:2483
#, no-c-format
@@ -17528,7 +17528,7 @@ msgstr "Framtvinga användningen av SLP vid vektorisering, misslyckas om det int
#: params.opt:1266
#, no-c-format
msgid "Maximum number of basic blocks before VRP switches to a fast model with less memory requirements."
-msgstr "Maximalt antal grundblock innan VRP byter till en snabb modell med mintre minneskrav."
+msgstr "Maximalt antal grundblock innan VRP byter till en snabb modell med mindre minneskrav."
#: params.opt:1270
#, no-c-format
@@ -17563,7 +17563,7 @@ msgstr "den anropade returnerar en post"
#: calls.cc:2565
msgid "target is not able to optimize the call into a sibling call"
-msgstr "målet kan inte optinera anropet till ett syskonanrop"
+msgstr "målet kan inte optimera anropet till ett syskonanrop"
#: calls.cc:2574
msgid "callee returns twice"
@@ -49107,7 +49107,7 @@ msgstr "%<detach%>-klausulens händelsehandtag har typen %qT istället för %<om
#: cp/parser.cc:42940
#, gcc-internal-format
msgid "string literal must not contain %<\\0%>"
-msgstr "strängliteraler får inte innehålla %<\\0%>"
+msgstr "stränglitteraler får inte innehålla %<\\0%>"
#: c/c-parser.cc:20581 c/c-parser.cc:20702 cp/parser.cc:42835
#: cp/parser.cc:42975
@@ -52621,7 +52621,6 @@ msgstr "%s: regcomp: %s"
msgid "logic error: missing inode for %s"
msgstr "logikfel: saknad inod för %s"
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104709
#: cobol/util.cc:2141
#, gcc-internal-format, gfc-internal-format
msgid "failed compiling %s"
@@ -78141,7 +78140,6 @@ msgstr "HOLDS-uttryck vid %L måste vara ett skalärt logiskt uttryck"
msgid "ORDERED clause parameter is less than COLLAPSE at %L"
msgstr "ORDERED-klausulparameter är mindre än COLLAPSE vid %L"
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107122
#: fortran/openmp.cc:8623
#, gcc-internal-format, gfc-internal-format
msgid "ORDER clause must not be used together with ORDERED at %L"
diff --git a/gcc/po/zh_CN.po b/gcc/po/zh_CN.po
index a5073c1..3f9023f 100644
--- a/gcc/po/zh_CN.po
+++ b/gcc/po/zh_CN.po
@@ -4,7 +4,7 @@
# Meng Jie <zuxy.meng@gmail.com>, 2005-2014.
# Jeff Bai <jeffbai@aosc.xyz>, 2015.
# Mingye Wang (Arthur2e5) <arthur200126@gmail.com>, 2015, 2016.
-# Boyuan Yang <073plan@gmail.com>, 2019, 2023, 2024.
+# Boyuan Yang <073plan@gmail.com>, 2019, 2023-2025.
# Zixing Zhou <zixingzhou@foxmail.com>, 2023.
# Zhanhaoxiang Zhang <zzhx2006@outlook.com>, 2024.
#
@@ -33,11 +33,11 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: gcc 14.2.0\n"
+"Project-Id-Version: gcc 15.1.0\n"
"Report-Msgid-Bugs-To: https://gcc.gnu.org/bugs/\n"
"POT-Creation-Date: 2025-04-23 19:27+0000\n"
-"PO-Revision-Date: 2025-01-09 15:04+0800\n"
-"Last-Translator: Zhanhaoxiang Zhang <zzhx2006@outlook.com>\n"
+"PO-Revision-Date: 2025-05-15 13:53-0400\n"
+"Last-Translator: Boyuan Yang <073plan@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
@@ -45,7 +45,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 3.5\n"
+"X-Generator: Poedit 3.6\n"
#: cif-code.def:39
msgid "function not considered for inlining"
@@ -317,10 +317,8 @@ msgid "-E or -x required when input is from standard input"
msgstr "当输入来自标准输入设备时,需要 -E 或 -x"
#: config/darwin.h:153
-#, fuzzy
-#| msgid " conflicting code gen style switches are used"
msgid "conflicting code generation switches"
-msgstr "使用了相互冲突的代码生成风格"
+msgstr "使用了相互冲突的代码生成开关"
#: config/darwin.h:158
msgid "-bundle_loader not allowed with -dynamiclib"
@@ -831,10 +829,9 @@ msgid "Issue debug information for compiler-generated auxiliary variables."
msgstr ""
#: fortran/lang.opt:486
-#, fuzzy, no-c-format
-#| msgid "Enable Plan 9 language extensions"
+#, no-c-format
msgid "Enable all DEC language extensions."
-msgstr "启用九号计划语言扩展"
+msgstr "启用所有 DEC 语言扩展。"
#: fortran/lang.opt:490
#, fuzzy, no-c-format
@@ -868,9 +865,9 @@ msgid "Enable legacy math intrinsics for compatibility."
msgstr ""
#: fortran/lang.opt:515
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Enable support for DEC STRUCTURE/RECORD."
-msgstr "启用对巨型对象的支持"
+msgstr "启用对 DEC STRUCTURE/RECORD 的支持。"
#: fortran/lang.opt:519
#, no-c-format
@@ -1257,10 +1254,9 @@ msgid "Does nothing. Preserved for backward compatibility."
msgstr "不起作用。为向前兼容保留的选项。"
#: fortran/lang.opt:911
-#, fuzzy, no-c-format
-#| msgid "Statically link the GNU Fortran helper library (libgfortran)"
+#, no-c-format
msgid "Statically link the GNU Fortran helper library (libgfortran)."
-msgstr "静态链接 GNU Fortran 助手库(libgfortran)"
+msgstr "静态链接 GNU Fortran 助手库(libgfortran)。"
#: fortran/lang.opt:915
#, fuzzy, no-c-format
@@ -1296,7 +1292,7 @@ msgstr "遵循 ISO Fortran 2023 标准。"
#: fortran/lang.opt:939
#, no-c-format
msgid "Enable experimental Fortran 202y features."
-msgstr ""
+msgstr "启用实验性的 Fortuan 202y 特性。"
#: fortran/lang.opt:943
#, no-c-format
@@ -1670,7 +1666,7 @@ msgstr "当把函数转换为不兼容类型时给出警告"
#: c-family/c.opt:410
#, no-c-format
msgid "-Wbidi-chars=[none|unpaired|any|ucn] Warn about UTF-8 bidirectional control characters."
-msgstr ""
+msgstr "-Wbidi-chars=[none|unpaired|any|ucn] 对 UTF-8 双向控制字符给出警告。"
#: c-family/c.opt:433
#, no-c-format
@@ -1703,10 +1699,9 @@ msgid "Deprecated in favor of -Wc11-c23-compat."
msgstr "已弃用,请改用 -Wc11-c23-compat。"
#: c-family/c.opt:457
-#, fuzzy, no-c-format
-#| msgid "Warn about features not present in ISO C11, but present in ISO C23."
+#, no-c-format
msgid "Warn about features not present in ISO C23, but present in ISO C2Y."
-msgstr "对 ISO C11 中不存在但 ISO C23 中存在的特性给出警告。"
+msgstr "对 ISO C23 中不存在但 ISO C2Y 中存在的特性给出警告。"
#: c-family/c.opt:461
#, no-c-format
@@ -1869,10 +1864,9 @@ msgid "Warn for implicit type conversions that may change a value."
msgstr "当隐式类型转换可能改变值时给出警告"
#: c-family/c.opt:590
-#, fuzzy, no-c-format
-#| msgid "Warn for converting NULL from/to a non-pointer type"
+#, no-c-format
msgid "Warn for converting NULL from/to a non-pointer type."
-msgstr "将 NULL 转换为非指针类型时给出警告"
+msgstr "对 NULL 和非指针类型之间的转换给出警告。"
#: c-family/c.opt:598
#, fuzzy, no-c-format
@@ -1880,10 +1874,9 @@ msgid "Warn when performing class template argument deduction on a type with no
msgstr "%qE不是类型%qT的有效模板实参,因为对象%qD没有外部链接"
#: c-family/c.opt:603
-#, fuzzy, no-c-format
-#| msgid "Warn when all constructors and destructors are private"
+#, no-c-format
msgid "Warn when all constructors and destructors are private."
-msgstr "当所有构造函数和析构函数都是私有时给出警告"
+msgstr "当所有构造函数和析构函数都是私有时给出警告。"
#: c-family/c.opt:607
#, no-c-format
@@ -1893,7 +1886,7 @@ msgstr "对悬空的 else 给出警告。"
#: c-family/c.opt:611 c-family/c.opt:615
#, no-c-format
msgid "Warn for uses of pointers to auto variables whose lifetime has ended."
-msgstr ""
+msgstr "对使用了指向生命周期已结束的 auto 变量的指针给出警告。"
#: c-family/c.opt:619
#, no-c-format
@@ -1993,16 +1986,14 @@ msgid "Warn about implicit conversions from \"float\" to \"double\"."
msgstr "对从“float”到“double”的隐式转换给出警告。"
#: c-family/c.opt:702
-#, fuzzy, no-c-format
-#| msgid "Warn when a declaration does not specify a type"
+#, no-c-format
msgid "Warn when a declaration has duplicate const, volatile, restrict or _Atomic specifier."
-msgstr "当声明未指定类型时给出警告"
+msgstr "当声明中含有重复的 const, volatile, restrict 或 _Atomic 说明符时给出警告。"
#: c-family/c.opt:706
-#, fuzzy, no-c-format
-#| msgid "Warn about an empty body in an if or else statement"
+#, no-c-format
msgid "Warn about duplicated branches in if-else statements."
-msgstr "当 if 或 else 语句体为空时给出警告"
+msgstr "对 if-else 语句中重复的分支给出警告。"
#: c-family/c.opt:710
#, no-c-format
@@ -2263,10 +2254,9 @@ msgid "Warn when a function never produces a constant expression."
msgstr "数字常量表达式下溢时警告"
#: c-family/c.opt:930
-#, fuzzy, no-c-format
-#| msgid "Warn about invalid uses of the \"offsetof\" macro"
+#, no-c-format
msgid "Warn about invalid uses of the \"offsetof\" macro."
-msgstr "对“offsetof”宏无效的使用给出警告"
+msgstr "对“offsetof”宏无效的使用给出警告。"
#: c-family/c.opt:934
#, fuzzy, no-c-format
@@ -2432,7 +2422,7 @@ msgstr ""
#: c-family/c.opt:1083
#, no-c-format
msgid "Warn on namespace definition."
-msgstr ""
+msgstr "对命名空间的定义给出警告。"
#: c-family/c.opt:1087
#, fuzzy, no-c-format
@@ -2556,10 +2546,9 @@ msgid "Warn when fields in a struct with the packed attribute are misaligned."
msgstr ""
#: c-family/c.opt:1211
-#, fuzzy, no-c-format
-#| msgid "Warn about possibly missing parentheses"
+#, no-c-format
msgid "Warn about possibly missing parentheses."
-msgstr "可能缺少括号的情况下给出警告"
+msgstr "在可能缺少括号的情况下给出警告。"
#: c-family/c.opt:1219
#, no-c-format
@@ -2978,9 +2967,9 @@ msgid "Warn about useless casts."
msgstr "对无用的类型转换给出警告。"
#: c-family/c.opt:1599
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Warn about using variadic macros."
-msgstr "当定义在主文件中的宏未被使用时给出警告"
+msgstr "在使用了变长参数宏时给出警告。"
#: c-family/c.opt:1603
#, no-c-format
@@ -3131,10 +3120,9 @@ msgid "Enable support for C++ concepts."
msgstr "启用对 C++ concepts 的支持。"
#: c-family/c.opt:1819
-#, fuzzy, no-c-format
-#| msgid "Removed in GCC 10. This switch has no effect."
+#, no-c-format
msgid "Removed in GCC 15. This switch has no effect."
-msgstr "已在 GCC 10 中移除。此开关不起作用。"
+msgstr "已在 GCC 15 中移除。此开关不起作用。"
#: c-family/c.opt:1823
#, no-c-format
@@ -3383,10 +3371,9 @@ msgid "Allow implicit conversions between vectors with differing numbers of subp
msgstr "允许具有不同元素数量和/或元素类型的向量间的转换。"
#: c-family/c.opt:2059
-#, fuzzy, no-c-format
-#| msgid "Enable C++ modules-ts (experimental)."
+#, no-c-format
msgid "Enable C++20 Modules (experimental)."
-msgstr "启用 C++ modules-ts(实验性)。"
+msgstr "启用 C++20 模块 实验性)。"
#: c-family/c.opt:2067
#, no-c-format
@@ -3900,10 +3887,9 @@ msgid "Conform to the ISO 2020 C++ standard (experimental and incomplete support
msgstr "遵循 ISO 2020 C++ 标准(试验性质的不完全支持)。"
#: c-family/c.opt:2589 c-family/c.opt:2593
-#, fuzzy, no-c-format
-#| msgid "Conform to the ISO 2020 C++ standard (experimental and incomplete support)."
+#, no-c-format
msgid "Conform to the ISO 2023 C++ standard (published in 2024; experimental and incomplete support)."
-msgstr "遵循 ISO 2020 C++ 标准(试验性质的不完全支持)。"
+msgstr "遵循 ISO 2023 C++ 标准(于2024年发布;试验性质的不完全支持)。"
#: c-family/c.opt:2597 c-family/c.opt:2601
#, no-c-format
@@ -3927,10 +3913,9 @@ msgid "Conform to the ISO 2017 C standard (published in 2018)."
msgstr "遵循 ISO 2017 C 标准(于2018年发布)。"
#: c-family/c.opt:2621 c-family/c.opt:2779
-#, fuzzy, no-c-format
-#| msgid "Conform to the ISO 2017 C standard (published in 2018)."
+#, no-c-format
msgid "Conform to the ISO 2023 C standard (published in 2024)."
-msgstr "遵循 ISO 2017 C 标准(于2018年发布)。"
+msgstr "遵循 ISO 2023 C 标准(于2014年发布)。"
#: c-family/c.opt:2625
#, no-c-format
@@ -3938,10 +3923,9 @@ msgid "Deprecated in favor of -std=c23."
msgstr "已弃用,请改用 -std=c23。"
#: c-family/c.opt:2629
-#, fuzzy, no-c-format
-#| msgid "Conform to the ISO 2020 C++ standard (experimental and incomplete support)."
+#, no-c-format
msgid "Conform to the ISO 202Y C standard draft (experimental and incomplete support)."
-msgstr "遵循 ISO 2020 C++ 标准(试验性质的不完全支持)。"
+msgstr "遵循 ISO 202Y C 标准草案(试验性质的不完全支持)。"
#: c-family/c.opt:2633 c-family/c.opt:2637 c-family/c.opt:2751
#, no-c-format
@@ -4136,10 +4120,9 @@ msgid "Enable Cobol parser debugging"
msgstr "启用后端调试."
#: cobol/lang.opt:102
-#, fuzzy, no-c-format
-#| msgid "Enable backend debugging."
+#, no-c-format
msgid "Enable Cobol yacc debugging"
-msgstr "启用后端调试."
+msgstr "启用 Cobol yacc 调试"
#: cobol/lang.opt:106
#, no-c-format
@@ -4182,9 +4165,9 @@ msgid "Select the runtime."
msgstr "选择运行时。"
#: ada/gcc-interface/lang.opt:93
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Catch typos."
-msgstr "进入了 catch 块"
+msgstr "捕获打字错误。"
#: ada/gcc-interface/lang.opt:97
#, fuzzy, no-c-format
@@ -4236,10 +4219,9 @@ msgid "Generate JSON file."
msgstr "生成 JSON 文件。"
#: d/lang.opt:167
-#, fuzzy, no-c-format
-#| msgid "-MF <file>\tWrite dependency output to the given file"
+#, no-c-format
msgid "-Xf <file>\tWrite JSON output to the given <file>."
-msgstr "-MF <文件>\t将依赖项输出到给定文件"
+msgstr "-Xf <文件>\t将 JSON 输出到给定<文件>。"
#: d/lang.opt:171
#, no-c-format
@@ -4440,10 +4422,9 @@ msgid "Implement 'in' contracts of overridden methods to be a superset of parent
msgstr ""
#: d/lang.opt:408
-#, fuzzy, no-c-format
-#| msgid "Consider access to byte sized memory slow."
+#, no-c-format
msgid "Disable access to shared memory objects."
-msgstr "认为按字节访问内存速度较慢。"
+msgstr "禁用对共享内存对象的访问。"
#: d/lang.opt:412
#, no-c-format
@@ -9265,7 +9246,7 @@ msgstr "指定目标架构的名称"
#: config/nvptx/nvptx.opt:64
#, no-c-format
msgid "Alias:"
-msgstr ""
+msgstr "别名:"
#: config/nvptx/nvptx.opt:125
#, fuzzy, no-c-format
@@ -9274,9 +9255,9 @@ msgid "Known PTX ISA versions (for use with the -mptx= option):"
msgstr "已知 MIPS ISA 等级 (用于 -mips 选项):"
#: config/nvptx/nvptx.opt:156
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Specify the PTX ISA version to use."
-msgstr "ELF 文件 ABI 版本无效"
+msgstr "指定要使用的 PTX ISA 版本。"
#: config/nvptx/nvptx.opt:160
#, no-c-format
@@ -12154,10 +12135,9 @@ msgid "Always align function entry, jump target and return address."
msgstr ""
#: config/nds32/nds32.opt:85
-#, fuzzy, no-c-format
-#| msgid "Align code and data to 32 bits"
+#, no-c-format
msgid "Align function entry to 4 byte."
-msgstr "将代码和数据对齐到 32 位边界上"
+msgstr "将函数入口对齐到 4 字节。"
#: config/nds32/nds32.opt:97
#, no-c-format
@@ -12206,9 +12186,9 @@ msgid "Generate string extension instructions."
msgstr "生成加载/存储乘法指令"
#: config/nds32/nds32.opt:139
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Generate DSP extension instructions."
-msgstr "生成加载/存储乘法指令"
+msgstr "生成 DSP 扩展指令。"
#: config/nds32/nds32.opt:143
#, fuzzy, no-c-format
@@ -12355,10 +12335,9 @@ msgid "Known IQ2000 CPUs (for use with the -mcpu= option):"
msgstr "已知 IQ2000 处理器 (用于 -mcpu= 选项):"
#: config/iq2000/iq2000.opt:61 config/mips/mips.opt:142
-#, fuzzy, no-c-format
-#| msgid "Use ROM instead of RAM"
+#, no-c-format
msgid "Use ROM instead of RAM."
-msgstr "使用 ROM 而不是 RAM"
+msgstr "使用 ROM 而不是 RAM。"
#: config/iq2000/iq2000.opt:70
#, fuzzy, no-c-format
@@ -12373,15 +12352,14 @@ msgid "Put uninitialized constants in ROM (needs -membedded-data)."
msgstr "将未初始化的常量放在 ROM 中(需要 -membedded-data)"
#: config/csky/csky.opt:34
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Specify the target architecture."
-msgstr "指定目标架构的名称"
+msgstr "指定目标架构的名称。"
#: config/csky/csky.opt:38
-#, fuzzy, no-c-format
-#| msgid "Specify the target CPU"
+#, no-c-format
msgid "Specify the target processor."
-msgstr "选择目标 CPU"
+msgstr "指定目标处理器。"
#: config/csky/csky.opt:90
#, fuzzy, no-c-format
@@ -12426,10 +12404,9 @@ msgid "Enable coprocessor instructions."
msgstr "启用 clip 指令"
#: config/csky/csky.opt:122
-#, fuzzy, no-c-format
-#| msgid "Enable average instructions"
+#, no-c-format
msgid "Enable cache prefetch instructions."
-msgstr "启用均值指令"
+msgstr "启用缓存预取指令。"
#: config/csky/csky.opt:126
#, fuzzy, no-c-format
@@ -12546,12 +12523,12 @@ msgstr "已知 C6X ISA (用于 -march= 选项):"
#: config/c6x/c6x.opt:30 config/mips/mips.opt:134
#, no-c-format
msgid "Use big-endian byte order."
-msgstr "令大端在前。"
+msgstr "使用大端字节序。"
#: config/c6x/c6x.opt:34 config/mips/mips.opt:138
#, no-c-format
msgid "Use little-endian byte order."
-msgstr "令小端在前。"
+msgstr "使用小端字节序。"
#: config/c6x/c6x.opt:42
#, fuzzy, no-c-format
@@ -12958,10 +12935,9 @@ msgid "Annotate assembler instructions with estimated addresses."
msgstr "使用估算的地址评注汇编指令"
#: config/sh/sh.opt:247
-#, fuzzy, no-c-format
-#| msgid "Generate code in little endian mode"
+#, no-c-format
msgid "Generate code in little endian mode."
-msgstr "生成小端在前的代码"
+msgstr "在小端序模式下生成代码。"
#: config/sh/sh.opt:251
#, fuzzy, no-c-format
@@ -13014,27 +12990,24 @@ msgid "Pretend a branch-around-a-move is a conditional move."
msgstr "将数据传输周围的跳转认为是条件转移。"
#: config/sh/sh.opt:295
-#, fuzzy, no-c-format
-#| msgid "Enable the use of the fsca instruction"
+#, no-c-format
msgid "Enable the use of the fsca instruction."
-msgstr "启用对 fsca 指令的使用"
+msgstr "启用对 fsca 指令的使用。"
#: config/sh/sh.opt:299
-#, fuzzy, no-c-format
-#| msgid "Enable the use of the fsrra instruction"
+#, no-c-format
msgid "Enable the use of the fsrra instruction."
-msgstr "启用 fsrra 指令的使用"
+msgstr "启用 fsrra 指令的使用。"
#: config/gcn/gcn-tables.opt:25
#, no-c-format
msgid "GCN GPU type to use:"
-msgstr ""
+msgstr "要使用的 GCN GPU 类型:"
#: config/gcn/gcn.opt:26 config/gcn/gcn.opt:30
-#, fuzzy, no-c-format
-#| msgid "Specify the name of the target CPU"
+#, no-c-format
msgid "Specify the name of the target GPU."
-msgstr "指定目标 CPU 的名称"
+msgstr "指定目标 CPU 的名称。"
#: config/gcn/gcn.opt:34
#, no-c-format
@@ -13093,10 +13066,9 @@ msgid "Assume small address space."
msgstr "假定小地址空间"
#: config/bpf/bpf.opt:28
-#, fuzzy, no-c-format
-#| msgid "Generate LP64 code"
+#, no-c-format
msgid "Generate xBPF."
-msgstr "生成 LP64 代码"
+msgstr "生成 xBPF。"
#: config/bpf/bpf.opt:34
#, fuzzy, no-c-format
@@ -13127,10 +13099,9 @@ msgid "Enable extra conditional-branch instructions j(s)lt and j(s)le."
msgstr "启用条件移动指令。"
#: config/bpf/bpf.opt:56
-#, fuzzy, no-c-format
-#| msgid "Enable 32-bit divide instructions"
+#, no-c-format
msgid "Enable 32-bit ALU instructions."
-msgstr "启用 32 位除法指令"
+msgstr "启用 32 位 ALU 指令。"
#: config/bpf/bpf.opt:60
#, fuzzy, no-c-format
@@ -13351,10 +13322,9 @@ msgid "FP exceptions are enabled."
msgstr "FP 异常已启用"
#: config/mips/mips.opt:223
-#, fuzzy, no-c-format
-#| msgid "Use 32-bit floating-point registers"
+#, no-c-format
msgid "Use 32-bit floating-point registers."
-msgstr "使用 32 位浮点寄存器"
+msgstr "使用 32 位浮点寄存器。"
#: config/mips/mips.opt:227
#, no-c-format
@@ -13456,22 +13426,19 @@ msgid "Use -G for object-local data."
msgstr "为对象局部数据使用 -G"
#: config/mips/mips.opt:305
-#, fuzzy, no-c-format
-#| msgid "Use indirect calls"
+#, no-c-format
msgid "Use indirect calls."
-msgstr "使用间接调用"
+msgstr "使用间接调用。"
#: config/mips/mips.opt:309
-#, fuzzy, no-c-format
-#| msgid "Use a 32-bit long type"
+#, no-c-format
msgid "Use a 32-bit long type."
-msgstr "使用 32 位 long 类型"
+msgstr "使用 32 位 long 类型。"
#: config/mips/mips.opt:313
-#, fuzzy, no-c-format
-#| msgid "Use a 64-bit long type"
+#, no-c-format
msgid "Use a 64-bit long type."
-msgstr "使用 64 位 long 类型"
+msgstr "使用 64 位 long 类型。"
#: config/mips/mips.opt:317
#, fuzzy, no-c-format
@@ -13486,9 +13453,9 @@ msgid "Don't optimize block moves."
msgstr "不优化块移动"
#: config/mips/mips.opt:325
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Use microMIPS instructions."
-msgstr "使用浮点双精度指令"
+msgstr "使用 microMIPS 指令。"
#: config/mips/mips.opt:329
#, fuzzy, no-c-format
@@ -13497,10 +13464,9 @@ msgid "Use MIPS MSA Extension instructions."
msgstr "使用 MIPS-DSP 指令"
#: config/mips/mips.opt:333
-#, fuzzy, no-c-format
-#| msgid "Allow the use of MT instructions"
+#, no-c-format
msgid "Allow the use of MT instructions."
-msgstr "允许使用 MT 指令"
+msgstr "允许使用 MT 指令。"
#: config/mips/mips.opt:337
#, fuzzy, no-c-format
@@ -13509,10 +13475,9 @@ msgid "Prevent the use of all floating-point operations."
msgstr "不允许使用任何浮点操作"
#: config/mips/mips.opt:341
-#, fuzzy, no-c-format
-#| msgid "Use MCU instructions"
+#, no-c-format
msgid "Use MCU instructions."
-msgstr "使用 MCU 指令"
+msgstr "使用 MCU 指令。"
#: config/mips/mips.opt:345
#, fuzzy, no-c-format
@@ -30236,14 +30201,14 @@ msgid "if this code is reached, the program will abort"
msgstr "如果执行到这段代码,程序将中止"
#: godump.cc:1434
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "could not close Go dump file: %m"
-msgstr "无法打开用零填充的指令转储文件%qs:%s"
+msgstr "无法关闭 Go 转储文件:%m"
#: godump.cc:1446
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "could not open Go dump file %qs: %m"
-msgstr "无法打开最终指令转储文件%qs:%s"
+msgstr "无法打开 Go 转储文件 %qs:%m"
#: graphite.cc:529
#, fuzzy, gcc-internal-format
@@ -30399,9 +30364,9 @@ msgid "array types have different bounds"
msgstr "?: 的操作数类型不一致,分别为%qT和%qT"
#: ipa-devirt.cc:1139
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "return value type mismatch"
-msgstr "<返回值>"
+msgstr "返回值类型不匹配"
#: ipa-devirt.cc:1154
#, gcc-internal-format
@@ -30610,10 +30575,9 @@ msgid "name %qs is defined to different value in another translation unit"
msgstr "%qE未声明(不在函数内)"
#: ipa-devirt.cc:4325
-#, fuzzy, gcc-internal-format
-#| msgid "missing definition"
+#, gcc-internal-format
msgid "mismatching definition"
-msgstr "定义缺失"
+msgstr "不匹配的定义"
#: ipa-fnsummary.cc:4845
#, fuzzy, gcc-internal-format
@@ -30867,13 +30831,12 @@ msgstr "需要 %<,%> 或 %<)%>"
#: lazy-diagnostic-path.cc:179
#, gcc-internal-format
msgid "this warning should be skipped"
-msgstr ""
+msgstr "该警告信息应当被跳过"
#: lazy-diagnostic-path.cc:194
-#, fuzzy, gcc-internal-format
-#| msgid "this is the insn:"
+#, gcc-internal-format
msgid "this is a test"
-msgstr "这是指令:"
+msgstr "这是一个测试"
#: lra-assigns.cc:1694
#, fuzzy, gcc-internal-format, gfc-internal-format
@@ -31002,7 +30965,7 @@ msgstr ""
#: lto-compress.cc:165
#, gcc-internal-format
msgid "original size unknown"
-msgstr ""
+msgstr "原始大小未知"
#: lto-compress.cc:171
#, fuzzy, gcc-internal-format, gfc-internal-format
@@ -31145,19 +31108,19 @@ msgid "problem with building target image for %s"
msgstr "组建目标平台:%s\n"
#: lto-wrapper.cc:1083
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "reading input file"
-msgstr "读取输入历史文件…\n"
+msgstr "正在读取输入文件"
#: lto-wrapper.cc:1088
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "writing output file"
-msgstr "写入到输出文件 '%s' 时出错\n"
+msgstr "正在写入输出文件"
#: lto-wrapper.cc:1127
#, gcc-internal-format
msgid "installation error, cannot find %<crtoffloadtable%s.o%>"
-msgstr ""
+msgstr "安装错误,无法找到 %<crtoffloadtable%s.o%>"
#: lto-wrapper.cc:1380
#, fuzzy
@@ -31178,10 +31141,9 @@ msgid "environment variable %<COLLECT_GCC_OPTIONS%> must be set"
msgstr "环境变量 COLLECT_GCC_OPTIONS 必须被设置"
#: lto-wrapper.cc:1575
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "missing argument to %qs"
+#, gcc-internal-format, gfc-internal-format
msgid "missing directory: %s"
-msgstr "%qs缺少参数"
+msgstr "缺失目录:%s"
#: lto-wrapper.cc:1768 lto-wrapper.cc:1828 c-family/c-pch.cc:215
#: c-family/c-pch.cc:250 c-family/c-pch.cc:288 c-family/c-pch.cc:366
@@ -31217,10 +31179,9 @@ msgid "using ltrans cache without file locking support, do not use in parallel"
msgstr ""
#: lto-wrapper.cc:2315 config/gcn/mkoffload.cc:954
-#, fuzzy, gcc-internal-format
-#| msgid "atexit failed"
+#, gcc-internal-format
msgid "%<atexit%> failed"
-msgstr "atexit 失败"
+msgstr "%<atexit%> 失败"
#: multiple_target.cc:72
#, fuzzy, gcc-internal-format
@@ -31744,9 +31705,9 @@ msgid "location of OpenACC %<kernels%>"
msgstr ""
#: omp-oacc-kernels-decompose.cc:1295
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qs not yet supported"
-msgstr "%P%F:不支持 -shared\n"
+msgstr "%qs 尚未被支持"
#: omp-oacc-neuter-broadcast.cc:1764
#, gcc-internal-format
@@ -32525,14 +32486,9 @@ msgid "fail to initialize plugin %s"
msgstr "无法初始化插件 %s"
#: plugin.cc:708
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid ""
-#| "cannot load plugin %s\n"
-#| "%s"
+#, gcc-internal-format, gfc-internal-format
msgid "cannot load plugin %s: %s"
-msgstr ""
-"无法加载插件 %s\n"
-"%s"
+msgstr "无法加载插件 %s:%s"
#: plugin.cc:718
#, fuzzy, gcc-internal-format, gfc-internal-format
@@ -32555,10 +32511,9 @@ msgstr ""
"%3$s"
#: plugin.cc:737
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "fail to initialize plugin %s"
+#, gcc-internal-format, gfc-internal-format
msgid "failed to initialize plugin %s"
-msgstr "无法初始化插件 %s"
+msgstr "初始化插件 %s 失败"
#: plugin.cc:1049
#, fuzzy, gcc-internal-format
@@ -32831,9 +32786,9 @@ msgid "register of %qD used for multiple global register variables"
msgstr "嵌套函数中使用了全局寄存器变量%qD"
#: reginfo.cc:760 config/rs6000/rs6000-logue.cc:5577
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "conflicts with %qD"
-msgstr "%qD与已用的函数冲突"
+msgstr "与 %qD 冲突"
#: reginfo.cc:765
#, gcc-internal-format
@@ -33125,9 +33080,9 @@ msgid "variable symbol is not variable"
msgstr "%L处的符号不是一个 DUMMY 变量"
#: symtab.cc:1130
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "node has unknown type"
-msgstr "未知类型的输入行"
+msgstr "节点类型未知"
#: symtab.cc:1135
#, fuzzy, gcc-internal-format, gfc-internal-format
@@ -45675,10 +45630,9 @@ msgid "mips16 function profiling"
msgstr "mips16 函数取样"
#: config/mmix/mmix.cc:318
-#, fuzzy, gcc-internal-format
-#| msgid "-f%s not supported: ignored"
+#, gcc-internal-format
msgid "%<-f%s%> not supported: ignored"
-msgstr "-f%s 不受支持:已忽略"
+msgstr "%<-f%s%> 不受支持:已忽略"
#: config/mmix/mmix.cc:783
#, gcc-internal-format
@@ -45818,7 +45772,7 @@ msgstr ""
#: config/msp430/msp430-devices.cc:488
#, gcc-internal-format
msgid "could not locate MCU data file %<devices.csv%>"
-msgstr ""
+msgstr "无法定位 MCU 数据文件 %<devices.csv%>"
#: config/msp430/msp430.cc:181
#, gcc-internal-format
@@ -45861,10 +45815,9 @@ msgid "unrecognized MCU name %qs, assuming that it just supports the MSP430X ISA
msgstr ""
#: config/msp430/msp430.cc:250
-#, fuzzy, gcc-internal-format
-#| msgid "unrecognized register name %qs"
+#, gcc-internal-format
msgid "Unrecognized MCU name %qs."
-msgstr "不可识别的寄存名%qs"
+msgstr "无法识别的 MCU 名称 %qs。"
#: config/msp430/msp430.cc:255
#, fuzzy, gcc-internal-format
@@ -46152,9 +46105,9 @@ msgid "%<-mabi=2fp+%> option only support when FPU available, must be enable %<-
msgstr ""
#: config/nvptx/mkoffload.cc:94
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "deleting file %s: %m"
-msgstr "删除临时 exp 文件 %s"
+msgstr "正在删除文件 %s: %m"
#: config/nvptx/mkoffload.cc:119
#, gcc-internal-format
@@ -46203,9 +46156,9 @@ msgid "cannot open '%s'"
msgstr "无法打开“%s”"
#: config/nvptx/mkoffload.cc:860
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "cannot open intermediate ptx file"
-msgstr "无法打开输入文件“%s”"
+msgstr "无法打开中间的 ptx 文件"
#: config/nvptx/nvptx.cc:206
#, fuzzy, gcc-internal-format
@@ -46355,15 +46308,14 @@ msgid "%<CTABLE_ENTRY%> index %wd is not valid"
msgstr ""
#: config/pru/pru-pragma.cc:63
-#, fuzzy, gcc-internal-format
-#| msgid "redefinition of %q#T"
+#, gcc-internal-format
msgid "redefinition of %<CTABLE_ENTRY %wd%>"
-msgstr "%q#T重定义"
+msgstr "%<CTABLE_ENTRY %wd%> 的重定义"
#: config/pru/pru-pragma.cc:67
#, gcc-internal-format
msgid "%<CTABLE_ENTRY%> base address is not a multiple of 256"
-msgstr ""
+msgstr "%<CTABLE_ENTRY%> 基地址不是 256 的倍数"
#: config/pru/pru-pragma.cc:75
#, fuzzy, gcc-internal-format
@@ -46754,10 +46706,9 @@ msgid "rv32e requires ilp32e ABI"
msgstr "rv32e 需要 ilp32e ABI"
#: config/riscv/riscv.cc:10723
-#, fuzzy, gcc-internal-format
-#| msgid "rv32e requires ilp32e ABI"
+#, gcc-internal-format
msgid "rv64e requires lp64e ABI"
-msgstr "rv32e 需要 ilp32e ABI"
+msgstr "rv64e 需要 lp64e ABI"
#: config/riscv/riscv.cc:10728
#, fuzzy, gcc-internal-format
@@ -47252,10 +47203,9 @@ msgstr "%qs必须与%qs一起使用"
#: config/rs6000/rs6000.cc:4222 config/rs6000/rs6000.cc:4231
#: config/rs6000/rs6000.cc:4369 config/rs6000/rs6000.cc:4382
#: config/rs6000/rs6000.cc:4404
-#, fuzzy, gcc-internal-format
-#| msgid "%qT referred to as %qs"
+#, gcc-internal-format
msgid "%qs requires %qs"
-msgstr "%qT作为%qs被引用"
+msgstr "%qs 需要 %qs"
#: config/rs6000/rs6000.cc:4118
#, fuzzy, gcc-internal-format
@@ -47517,10 +47467,9 @@ msgid "%qF requires z15 or higher"
msgstr "%qF 需要 z15 或更高"
#: config/s390/s390-c.cc:965
-#, fuzzy, gcc-internal-format
-#| msgid "%qF requires z14 or higher"
+#, gcc-internal-format
msgid "%qF requires z17 or higher"
-msgstr "%qF 需要 z14 或更高"
+msgstr "%qF 需要 z17 或更高"
#: config/s390/s390-c.cc:979
#, gcc-internal-format
@@ -80823,9 +80772,9 @@ msgid "Extension: Unary operator following arithmetic operator (use parentheses)
msgstr "扩展:%C处单目运算符出现在算术运算符之后"
#: fortran/matchexp.cc:666
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "match_level_4(): Bad operator"
-msgstr "错误的运算符"
+msgstr "match_level_4():错误的运算符"
#: fortran/misc.cc:116
#, gcc-internal-format
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index da60a95..c8b0bad 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,138 @@
+2025-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ Backported from master:
+ 2025-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/120049
+ * gfortran.dg/pr120049_a.f90: New test.
+ * gfortran.dg/pr120049_b.f90: New test.
+
+2025-05-16 Maciej W. Rozycki <macro@orcam.me.uk>
+
+ Backported from master:
+ 2025-04-19 Maciej W. Rozycki <macro@orcam.me.uk>
+
+ * gcc.target/alpha/memcpy-nested-offset-long.c: New file.
+ * gcc.target/alpha/memcpy-nested-offset-quad.c: New file.
+
+2025-05-15 Patrick Palka <ppalka@redhat.com>
+
+ Backported from master:
+ 2025-05-15 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/120161
+ * g++.dg/template/unify13.C: New test.
+
+2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ Backported from master:
+ 2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/120125
+ * g++.dg/modules/clone-4_a.C: New test.
+ * g++.dg/modules/clone-4_b.C: New test.
+
+2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ Backported from master:
+ 2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/119864
+ * g++.dg/modules/openmp-1.C: New test.
+
+2025-05-13 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/120163
+ * gfortran.dg/interface_61.f90: New test.
+
+2025-05-13 Gaius Mulley <gaiusmod2@gmail.com>
+
+ Backported from master:
+ 2025-05-05 Gaius Mulley <gaiusmod2@gmail.com>
+
+ PR modula2/120117
+ * gm2/pim/pass/highbit.mod: New test.
+ * gm2/pim/pass/highbit2.mod: New test.
+
+2025-05-13 Gaius Mulley <gaiusmod2@gmail.com>
+
+ Backported from master:
+ 2025-04-24 Gaius Mulley <gaiusmod2@gmail.com>
+
+ PR modula2/119915
+ * gm2/pimlib/run/pass/format2.mod: New test.
+
+2025-05-13 Gaius Mulley <gaiusmod2@gmail.com>
+
+ Backported from master:
+ 2025-04-24 Gaius Mulley <gaiusmod2@gmail.com>
+
+ PR modula2/119914
+ * gm2/pim/fail/constintarraybyte.mod: New test.
+
+2025-05-13 Gaius Mulley <gaiusmod2@gmail.com>
+
+ Backported from master:
+ 2025-05-13 Gaius Mulley <gaiusmod2@gmail.com>
+
+ PR modula2/120188
+ * gm2.dg/doc/examples/plugin/fail/doc-examples-plugin-fail.exp:
+ Remove call to gm2-dg-frontend-configure-check and replace with
+ tests for whether plugin variables exist.
+
+2025-05-13 Gaius Mulley <gaiusmod2@gmail.com>
+
+ Backported from master:
+ 2025-05-12 Gaius Mulley <gaiusmod2@gmail.com>
+
+ PR modula2/120188
+ * lib/gm2-dg.exp (gm2-dg-frontend-configure-check): New function.
+ (gm2-dg-runtest): Add -O2 to the option_list.
+ * gm2.dg/doc/examples/plugin/fail/assignvalue.mod: New test.
+ * gm2.dg/doc/examples/plugin/fail/doc-examples-plugin-fail.exp: New test.
+
+2025-05-13 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-05-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR libfortran/120196
+ * gfortran.dg/pr120196.f90: New test.
+
+2025-05-13 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-05-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/120191
+ * gfortran.dg/pr120191_3.f90: New test.
+
+2025-05-13 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-05-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/120191
+ * gfortran.dg/pr120191_2.f90: New test.
+
+2025-05-13 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-05-13 Jakub Jelinek <jakub@redhat.com>
+ Daniil Kochergin <daniil2472s@gmail.com>
+ Tobias Burnus <tburnus@baylibre.com>
+
+ PR fortran/120191
+ * gfortran.dg/pr120191_1.f90: New test.
+
+2025-05-12 Jason Merrill <jason@redhat.com>
+
+ Backported from master:
+ 2025-05-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/120012
+ * g++.dg/abi/base-defaulted2.C: New test.
+
2025-05-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/120211
diff --git a/gcc/testsuite/g++.dg/abi/base-defaulted2.C b/gcc/testsuite/g++.dg/abi/base-defaulted2.C
new file mode 100644
index 0000000..9652ae6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/base-defaulted2.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fabi-version=20 -Wabi" }
+
+struct Base {
+protected:
+ Base() = default;
+ ~Base() = default;
+};
+
+struct Derived : Base {
+ void* ptr; // { dg-bogus "offset" }
+};
diff --git a/gcc/testsuite/g++.dg/modules/clone-4_a.C b/gcc/testsuite/g++.dg/modules/clone-4_a.C
new file mode 100644
index 0000000..3ee6109
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/clone-4_a.C
@@ -0,0 +1,12 @@
+// PR c++/120125
+// { dg-additional-options "-fmodules -fdeclone-ctor-dtor" }
+// { dg-module-cmi M }
+
+export module M;
+
+void foo();
+export template <typename _Tp> struct __shared_ptr {
+ inline __shared_ptr() { foo(); }
+};
+
+template class __shared_ptr<int>;
diff --git a/gcc/testsuite/g++.dg/modules/clone-4_b.C b/gcc/testsuite/g++.dg/modules/clone-4_b.C
new file mode 100644
index 0000000..1b36cb4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/clone-4_b.C
@@ -0,0 +1,12 @@
+// PR c++/120125
+// { dg-additional-options "-fmodules -fdeclone-ctor-dtor" }
+
+import M;
+
+int main() {
+ __shared_ptr<int> s1;
+ __shared_ptr<double> s2;
+}
+
+// { dg-final { scan-assembler-not {_ZNW1M12__shared_ptrIiEC[1-4]Ev:} } }
+// { dg-final { scan-assembler {_ZNW1M12__shared_ptrIdEC2Ev:} } }
diff --git a/gcc/testsuite/g++.dg/modules/openmp-1.C b/gcc/testsuite/g++.dg/modules/openmp-1.C
new file mode 100644
index 0000000..b5a30ad
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/openmp-1.C
@@ -0,0 +1,9 @@
+// PR c++/119864
+// { dg-do assemble }
+// { dg-additional-options "-fmodules -fopenmp" }
+// { dg-require-effective-target "fopenmp" }
+
+export module M;
+
+int foo();
+int x = foo();
diff --git a/gcc/testsuite/g++.dg/modules/partial-8.h b/gcc/testsuite/g++.dg/modules/partial-8.h
new file mode 100644
index 0000000..d9a83a8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/partial-8.h
@@ -0,0 +1,8 @@
+// PR c++/120013
+
+template <typename> struct tuple_element;
+template <typename T> tuple_element<T*> get(T);
+
+// This case wasn't an issue for the PR, but worth double-checking
+template <typename> constexpr int var = 123;
+template <typename T> void foo(T, int = var<T*>);
diff --git a/gcc/testsuite/g++.dg/modules/partial-8_a.C b/gcc/testsuite/g++.dg/modules/partial-8_a.C
new file mode 100644
index 0000000..d6848c7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/partial-8_a.C
@@ -0,0 +1,10 @@
+// PR c++/120013
+// { dg-additional-options "-fmodules -Wno-global-module" }
+// { dg-module-cmi m:a }
+
+module;
+#include "partial-8.h"
+template <typename T> struct tuple_element<T*>;
+template <typename T> constexpr int var<T*> = 456;
+module m:a;
+template <typename T> void a(T t) { ::get(t); foo(t); }
diff --git a/gcc/testsuite/g++.dg/modules/partial-8_b.C b/gcc/testsuite/g++.dg/modules/partial-8_b.C
new file mode 100644
index 0000000..ce5cd09
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/partial-8_b.C
@@ -0,0 +1,8 @@
+// PR c++/120013
+// { dg-additional-options "-fmodules -Wno-global-module" }
+// { dg-module-cmi m:b }
+
+module;
+#include "partial-8.h"
+module m:b;
+template <typename T> void b(T t) { ::get(t); foo(t); }
diff --git a/gcc/testsuite/g++.dg/modules/partial-8_c.C b/gcc/testsuite/g++.dg/modules/partial-8_c.C
new file mode 100644
index 0000000..eadd282
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/partial-8_c.C
@@ -0,0 +1,7 @@
+// PR c++/120013
+// { dg-additional-options "-fmodules" }
+// { dg-module-cmi m }
+
+export module m;
+import :a;
+import :b;
diff --git a/gcc/testsuite/g++.dg/modules/partial-8_d.C b/gcc/testsuite/g++.dg/modules/partial-8_d.C
new file mode 100644
index 0000000..2aedb39
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/partial-8_d.C
@@ -0,0 +1,9 @@
+// PR c++/120013
+// { dg-additional-options "-fmodules" }
+// { dg-module-cmi m }
+// Same as partial-8_c.C but in the other order, to ensure
+// that loading a partial spec over an instantiation works
+
+export module m;
+import :b;
+import :a;
diff --git a/gcc/testsuite/g++.dg/modules/tinfo-3_a.H b/gcc/testsuite/g++.dg/modules/tinfo-3_a.H
new file mode 100644
index 0000000..8b53e98
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/tinfo-3_a.H
@@ -0,0 +1,7 @@
+// PR c++/120350
+// { dg-additional-options "-fmodule-header" }
+// { dg-module-cmi {} }
+
+#include <typeinfo>
+struct S {};
+inline const std::type_info& tinfo = typeid(S);
diff --git a/gcc/testsuite/g++.dg/modules/tinfo-3_b.C b/gcc/testsuite/g++.dg/modules/tinfo-3_b.C
new file mode 100644
index 0000000..95e02ab
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/tinfo-3_b.C
@@ -0,0 +1,8 @@
+// PR c++/120350
+// { dg-additional-options "-fmodules" }
+
+import "tinfo-3_a.H";
+
+int main() {
+ return tinfo == typeid(int);
+}
diff --git a/gcc/testsuite/g++.dg/template/unify13.C b/gcc/testsuite/g++.dg/template/unify13.C
new file mode 100644
index 0000000..ec7ca9d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/unify13.C
@@ -0,0 +1,18 @@
+// PR c++/120161
+
+template<class T, class U>
+struct mp_list { };
+
+template<class T>
+struct Wrap { struct type { }; };
+
+struct A : mp_list<Wrap<int>::type, void>
+ , mp_list<Wrap<long>::type, void> { };
+
+template<class U>
+void f(mp_list<Wrap<int>::type, U>*);
+
+int main() {
+ A a;
+ f(&a);
+}
diff --git a/gcc/testsuite/gcc.target/alpha/memcpy-nested-offset-long.c b/gcc/testsuite/gcc.target/alpha/memcpy-nested-offset-long.c
new file mode 100644
index 0000000..631d14f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/alpha/memcpy-nested-offset-long.c
@@ -0,0 +1,76 @@
+/* { dg-do compile } */
+/* { dg-options "" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
+
+typedef unsigned int __attribute__ ((mode (DI))) int64_t;
+typedef unsigned int __attribute__ ((mode (SI))) int32_t;
+
+typedef union
+ {
+ int32_t l[8];
+ }
+val;
+
+typedef struct
+ {
+ int32_t l[2];
+ val v;
+ }
+tre;
+
+typedef struct
+ {
+ int32_t l[3];
+ tre t;
+ }
+due;
+
+typedef struct
+ {
+ val v;
+ int64_t q;
+ int32_t l[2];
+ due d;
+ }
+uno;
+
+void
+memcpy_nested_offset_long (uno *u)
+{
+ u->d.t.v = u->v;
+}
+
+/* Expect assembly such as:
+
+ ldq $4,0($16)
+ ldq $3,8($16)
+ ldq $2,16($16)
+ srl $4,32,$7
+ ldq $1,24($16)
+ srl $3,32,$6
+ stl $4,68($16)
+ srl $2,32,$5
+ stl $7,72($16)
+ srl $1,32,$4
+ stl $3,76($16)
+ stl $6,80($16)
+ stl $2,84($16)
+ stl $5,88($16)
+ stl $1,92($16)
+ stl $4,96($16)
+
+ that is with four quadword loads at offsets 0, 8, 16, 24 each and
+ eight longword stores at offsets 68, 72, 76, 80, 84, 88, 92, 96 each. */
+
+/* { dg-final { scan-assembler-times "\\sldq\\s\\\$\[0-9\]+,0\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sldq\\s\\\$\[0-9\]+,8\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sldq\\s\\\$\[0-9\]+,16\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sldq\\s\\\$\[0-9\]+,24\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sstl\\s\\\$\[0-9\]+,68\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sstl\\s\\\$\[0-9\]+,72\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sstl\\s\\\$\[0-9\]+,76\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sstl\\s\\\$\[0-9\]+,80\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sstl\\s\\\$\[0-9\]+,84\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sstl\\s\\\$\[0-9\]+,88\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sstl\\s\\\$\[0-9\]+,92\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sstl\\s\\\$\[0-9\]+,96\\\(\\\$16\\\)\\s" 1 } } */
diff --git a/gcc/testsuite/gcc.target/alpha/memcpy-nested-offset-quad.c b/gcc/testsuite/gcc.target/alpha/memcpy-nested-offset-quad.c
new file mode 100644
index 0000000..1d2227e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/alpha/memcpy-nested-offset-quad.c
@@ -0,0 +1,64 @@
+/* { dg-do compile } */
+/* { dg-options "" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
+
+typedef unsigned int __attribute__ ((mode (DI))) int64_t;
+typedef unsigned int __attribute__ ((mode (SI))) int32_t;
+
+typedef union
+ {
+ int32_t l[8];
+ }
+val;
+
+typedef struct
+ {
+ int32_t l[2];
+ val v;
+ }
+tre;
+
+typedef struct
+ {
+ int32_t l[3];
+ tre t;
+ }
+due;
+
+typedef struct
+ {
+ val v;
+ int64_t q;
+ int32_t l[3];
+ due d;
+ }
+uno;
+
+void
+memcpy_nested_offset_quad (uno *u)
+{
+ u->d.t.v = u->v;
+}
+
+/* Expect assembly such as:
+
+ ldq $4,0($16)
+ ldq $3,8($16)
+ ldq $2,16($16)
+ ldq $1,24($16)
+ stq $4,72($16)
+ stq $3,80($16)
+ stq $2,88($16)
+ stq $1,96($16)
+
+ that is with four quadword loads at offsets 0, 8, 16, 24 each
+ and four quadword stores at offsets 72, 80, 88, 96 each. */
+
+/* { dg-final { scan-assembler-times "\\sldq\\s\\\$\[0-9\]+,0\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sldq\\s\\\$\[0-9\]+,8\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sldq\\s\\\$\[0-9\]+,16\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sldq\\s\\\$\[0-9\]+,24\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sstq\\s\\\$\[0-9\]+,72\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sstq\\s\\\$\[0-9\]+,80\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sstq\\s\\\$\[0-9\]+,88\\\(\\\$16\\\)\\s" 1 } } */
+/* { dg-final { scan-assembler-times "\\sstq\\s\\\$\[0-9\]+,96\\\(\\\$16\\\)\\s" 1 } } */
diff --git a/gcc/testsuite/gfortran.dg/interface_61.f90 b/gcc/testsuite/gfortran.dg/interface_61.f90
new file mode 100644
index 0000000..15db3b8a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/interface_61.f90
@@ -0,0 +1,27 @@
+! { dg-do compile }
+! { dg-options -Wexternal-argument-mismatch }
+! PR fortran/120163 - this used to cause an error.
+! Original test case by Bálint Aradi
+module mod1
+ implicit none
+
+ abstract interface
+ pure subroutine callback_interface(a)
+ real, intent(in) :: a
+ end subroutine callback_interface
+ end interface
+
+contains
+
+ subroutine caller(callback)
+ procedure(callback_interface) :: callback
+ real :: a
+ call callback(a)
+ end subroutine caller
+
+end module mod1
+
+
+module mod2
+ use mod1
+end module mod2
diff --git a/gcc/testsuite/gfortran.dg/pr120049_a.f90 b/gcc/testsuite/gfortran.dg/pr120049_a.f90
new file mode 100644
index 0000000..c404a4d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr120049_a.f90
@@ -0,0 +1,15 @@
+! { dg-do preprocess }
+! { dg-additional-options "-cpp" }
+!
+! Test the fix for PR86248
+program tests_gtk_sup
+ use gtk_sup
+ implicit none
+ type(c_ptr), target :: val
+ if (c_associated(val, c_loc(val))) then
+ stop 1
+ endif
+ if (c_associated(c_loc(val), val)) then
+ stop 2
+ endif
+end program tests_gtk_sup
diff --git a/gcc/testsuite/gfortran.dg/pr120049_b.f90 b/gcc/testsuite/gfortran.dg/pr120049_b.f90
new file mode 100644
index 0000000..127db98
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr120049_b.f90
@@ -0,0 +1,8 @@
+! { dg-do run }
+! { dg-additional-sources pr120049_a.f90 }
+!
+! Module for pr120049.f90
+!
+module gtk_sup
+ use, intrinsic :: iso_c_binding
+end module gtk_sup
diff --git a/gcc/testsuite/gfortran.dg/pr120191_1.f90 b/gcc/testsuite/gfortran.dg/pr120191_1.f90
new file mode 100644
index 0000000..13a787d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr120191_1.f90
@@ -0,0 +1,614 @@
+! PR fortran/120191
+! { dg-do run }
+
+ integer(kind=1) :: a1(10, 10, 10), b1(10)
+ integer(kind=2) :: a2(10, 10, 10), b2(10)
+ integer(kind=4) :: a4(10, 10, 10), b4(10)
+ integer(kind=8) :: a8(10, 10, 10), b8(10)
+ real(kind=4) :: r4(10, 10, 10), s4(10)
+ real(kind=8) :: r8(10, 10, 10), s8(10)
+ logical :: l1(10, 10, 10), l2(10), l3
+ l1 = .true.
+ l2 = .true.
+ l3 = .true.
+ a1 = 0
+ if (any (maxloc (a1) .ne. 1)) stop 1
+ if (any (maxloc (a1, back=.false.) .ne. 1)) stop 2
+ if (any (maxloc (a1, back=.true.) .ne. 10)) stop 3
+ if (any (maxloc (a1, kind=2) .ne. 1)) stop 4
+ if (any (maxloc (a1, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (maxloc (a1, kind=8, back=.true.) .ne. 10)) stop 6
+ if (any (maxloc (a1, 1) .ne. 1)) stop 7
+ if (any (maxloc (a1, 1, back=.false.) .ne. 1)) stop 8
+ if (any (maxloc (a1, 1, back=.true.) .ne. 10)) stop 9
+ if (any (maxloc (a1, 1, kind=1) .ne. 1)) stop 10
+ if (any (maxloc (a1, 1, kind=2, back=.false.) .ne. 1)) stop 11
+ if (any (maxloc (a1, 1, kind=4, back=.true.) .ne. 10)) stop 12
+ if (any (maxloc (a1, 1, l1) .ne. 1)) stop 13
+ if (any (maxloc (a1, 1, l1, back=.false.) .ne. 1)) stop 14
+ if (any (maxloc (a1, 1, l1, back=.true.) .ne. 10)) stop 15
+ if (any (maxloc (a1, 1, l1, kind=8) .ne. 1)) stop 16
+ if (any (maxloc (a1, 1, l1, 4, .false.) .ne. 1)) stop 17
+ if (any (maxloc (a1, 1, l1, 2, .true.) .ne. 10)) stop 18
+ if (any (maxloc (a1, 1, l3) .ne. 1)) stop 19
+ if (any (maxloc (a1, 1, l3, back=.false.) .ne. 1)) stop 20
+ if (any (maxloc (a1, 1, l3, back=.true.) .ne. 10)) stop 21
+ if (any (maxloc (a1, 1, l3, kind=8) .ne. 1)) stop 22
+ if (any (maxloc (a1, 1, l3, 4, .false.) .ne. 1)) stop 23
+ if (any (maxloc (a1, 1, l3, 2, .true.) .ne. 10)) stop 24
+ b1 = 0
+ if (any (maxloc (b1) .ne. 1)) stop 1
+ if (any (maxloc (b1, back=.false.) .ne. 1)) stop 2
+ if (any (maxloc (b1, back=.true.) .ne. 10)) stop 3
+ if (any (maxloc (b1, kind=2) .ne. 1)) stop 4
+ if (any (maxloc (b1, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (maxloc (b1, kind=8, back=.true.) .ne. 10)) stop 6
+ if (maxloc (b1, 1) .ne. 1) stop 7
+ if (maxloc (b1, 1, back=.false.) .ne. 1) stop 8
+ if (maxloc (b1, 1, back=.true.) .ne. 10) stop 9
+ if (maxloc (b1, 1, kind=1) .ne. 1) stop 10
+ if (maxloc (b1, 1, kind=2, back=.false.) .ne. 1) stop 11
+ if (maxloc (b1, 1, kind=4, back=.true.) .ne. 10) stop 12
+ if (maxloc (b1, 1, l2) .ne. 1) stop 13
+ if (maxloc (b1, 1, l2, back=.false.) .ne. 1) stop 14
+ if (maxloc (b1, 1, l2, back=.true.) .ne. 10) stop 15
+ if (maxloc (b1, 1, l2, kind=8) .ne. 1) stop 16
+ if (maxloc (b1, 1, l2, 4, .false.) .ne. 1) stop 17
+ if (maxloc (b1, 1, l2, 2, .true.) .ne. 10) stop 18
+ if (maxloc (b1, 1, l3) .ne. 1) stop 19
+ if (maxloc (b1, 1, l3, back=.false.) .ne. 1) stop 20
+ if (maxloc (b1, 1, l3, back=.true.) .ne. 10) stop 21
+ if (maxloc (b1, 1, l3, kind=8) .ne. 1) stop 22
+ if (maxloc (b1, 1, l3, 4, .false.) .ne. 1) stop 23
+ if (maxloc (b1, 1, l3, 2, .true.) .ne. 10) stop 24
+ a2 = 0
+ if (any (maxloc (a2) .ne. 1)) stop 1
+ if (any (maxloc (a2, back=.false.) .ne. 1)) stop 2
+ if (any (maxloc (a2, back=.true.) .ne. 10)) stop 3
+ if (any (maxloc (a2, kind=2) .ne. 1)) stop 4
+ if (any (maxloc (a2, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (maxloc (a2, kind=8, back=.true.) .ne. 10)) stop 6
+ if (any (maxloc (a2, 1) .ne. 1)) stop 7
+ if (any (maxloc (a2, 1, back=.false.) .ne. 1)) stop 8
+ if (any (maxloc (a2, 1, back=.true.) .ne. 10)) stop 9
+ if (any (maxloc (a2, 1, kind=1) .ne. 1)) stop 10
+ if (any (maxloc (a2, 1, kind=2, back=.false.) .ne. 1)) stop 11
+ if (any (maxloc (a2, 1, kind=4, back=.true.) .ne. 10)) stop 12
+ if (any (maxloc (a2, 1, l1) .ne. 1)) stop 13
+ if (any (maxloc (a2, 1, l1, back=.false.) .ne. 1)) stop 14
+ if (any (maxloc (a2, 1, l1, back=.true.) .ne. 10)) stop 15
+ if (any (maxloc (a2, 1, l1, kind=8) .ne. 1)) stop 16
+ if (any (maxloc (a2, 1, l1, 4, .false.) .ne. 1)) stop 17
+ if (any (maxloc (a2, 1, l1, 2, .true.) .ne. 10)) stop 18
+ if (any (maxloc (a2, 1, l3) .ne. 1)) stop 19
+ if (any (maxloc (a2, 1, l3, back=.false.) .ne. 1)) stop 20
+ if (any (maxloc (a2, 1, l3, back=.true.) .ne. 10)) stop 21
+ if (any (maxloc (a2, 1, l3, kind=8) .ne. 1)) stop 22
+ if (any (maxloc (a2, 1, l3, 4, .false.) .ne. 1)) stop 23
+ if (any (maxloc (a2, 1, l3, 2, .true.) .ne. 10)) stop 24
+ b2 = 0
+ if (any (maxloc (b2) .ne. 1)) stop 1
+ if (any (maxloc (b2, back=.false.) .ne. 1)) stop 2
+ if (any (maxloc (b2, back=.true.) .ne. 10)) stop 3
+ if (any (maxloc (b2, kind=2) .ne. 1)) stop 4
+ if (any (maxloc (b2, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (maxloc (b2, kind=8, back=.true.) .ne. 10)) stop 6
+ if (maxloc (b2, 1) .ne. 1) stop 7
+ if (maxloc (b2, 1, back=.false.) .ne. 1) stop 8
+ if (maxloc (b2, 1, back=.true.) .ne. 10) stop 9
+ if (maxloc (b2, 1, kind=1) .ne. 1) stop 10
+ if (maxloc (b2, 1, kind=2, back=.false.) .ne. 1) stop 11
+ if (maxloc (b2, 1, kind=4, back=.true.) .ne. 10) stop 12
+ if (maxloc (b2, 1, l2) .ne. 1) stop 13
+ if (maxloc (b2, 1, l2, back=.false.) .ne. 1) stop 14
+ if (maxloc (b2, 1, l2, back=.true.) .ne. 10) stop 15
+ if (maxloc (b2, 1, l2, kind=8) .ne. 1) stop 16
+ if (maxloc (b2, 1, l2, 4, .false.) .ne. 1) stop 17
+ if (maxloc (b2, 1, l2, 2, .true.) .ne. 10) stop 18
+ if (maxloc (b2, 1, l3) .ne. 1) stop 19
+ if (maxloc (b2, 1, l3, back=.false.) .ne. 1) stop 20
+ if (maxloc (b2, 1, l3, back=.true.) .ne. 10) stop 21
+ if (maxloc (b2, 1, l3, kind=8) .ne. 1) stop 22
+ if (maxloc (b2, 1, l3, 4, .false.) .ne. 1) stop 23
+ if (maxloc (b2, 1, l3, 2, .true.) .ne. 10) stop 24
+ a4 = 0
+ if (any (maxloc (a4) .ne. 1)) stop 1
+ if (any (maxloc (a4, back=.false.) .ne. 1)) stop 2
+ if (any (maxloc (a4, back=.true.) .ne. 10)) stop 3
+ if (any (maxloc (a4, kind=2) .ne. 1)) stop 4
+ if (any (maxloc (a4, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (maxloc (a4, kind=8, back=.true.) .ne. 10)) stop 6
+ if (any (maxloc (a4, 1) .ne. 1)) stop 7
+ if (any (maxloc (a4, 1, back=.false.) .ne. 1)) stop 8
+ if (any (maxloc (a4, 1, back=.true.) .ne. 10)) stop 9
+ if (any (maxloc (a4, 1, kind=1) .ne. 1)) stop 10
+ if (any (maxloc (a4, 1, kind=2, back=.false.) .ne. 1)) stop 11
+ if (any (maxloc (a4, 1, kind=4, back=.true.) .ne. 10)) stop 12
+ if (any (maxloc (a4, 1, l1) .ne. 1)) stop 13
+ if (any (maxloc (a4, 1, l1, back=.false.) .ne. 1)) stop 14
+ if (any (maxloc (a4, 1, l1, back=.true.) .ne. 10)) stop 15
+ if (any (maxloc (a4, 1, l1, kind=8) .ne. 1)) stop 16
+ if (any (maxloc (a4, 1, l1, 4, .false.) .ne. 1)) stop 17
+ if (any (maxloc (a4, 1, l1, 2, .true.) .ne. 10)) stop 18
+ if (any (maxloc (a4, 1, l3) .ne. 1)) stop 19
+ if (any (maxloc (a4, 1, l3, back=.false.) .ne. 1)) stop 20
+ if (any (maxloc (a4, 1, l3, back=.true.) .ne. 10)) stop 21
+ if (any (maxloc (a4, 1, l3, kind=8) .ne. 1)) stop 22
+ if (any (maxloc (a4, 1, l3, 4, .false.) .ne. 1)) stop 23
+ if (any (maxloc (a4, 1, l3, 2, .true.) .ne. 10)) stop 24
+ b4 = 0
+ if (any (maxloc (b4) .ne. 1)) stop 1
+ if (any (maxloc (b4, back=.false.) .ne. 1)) stop 2
+ if (any (maxloc (b4, back=.true.) .ne. 10)) stop 3
+ if (any (maxloc (b4, kind=2) .ne. 1)) stop 4
+ if (any (maxloc (b4, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (maxloc (b4, kind=8, back=.true.) .ne. 10)) stop 6
+ if (maxloc (b4, 1) .ne. 1) stop 7
+ if (maxloc (b4, 1, back=.false.) .ne. 1) stop 8
+ if (maxloc (b4, 1, back=.true.) .ne. 10) stop 9
+ if (maxloc (b4, 1, kind=1) .ne. 1) stop 10
+ if (maxloc (b4, 1, kind=2, back=.false.) .ne. 1) stop 11
+ if (maxloc (b4, 1, kind=4, back=.true.) .ne. 10) stop 12
+ if (maxloc (b4, 1, l2) .ne. 1) stop 13
+ if (maxloc (b4, 1, l2, back=.false.) .ne. 1) stop 14
+ if (maxloc (b4, 1, l2, back=.true.) .ne. 10) stop 15
+ if (maxloc (b4, 1, l2, kind=8) .ne. 1) stop 16
+ if (maxloc (b4, 1, l2, 4, .false.) .ne. 1) stop 17
+ if (maxloc (b4, 1, l2, 2, .true.) .ne. 10) stop 18
+ if (maxloc (b4, 1, l3) .ne. 1) stop 19
+ if (maxloc (b4, 1, l3, back=.false.) .ne. 1) stop 20
+ if (maxloc (b4, 1, l3, back=.true.) .ne. 10) stop 21
+ if (maxloc (b4, 1, l3, kind=8) .ne. 1) stop 22
+ if (maxloc (b4, 1, l3, 4, .false.) .ne. 1) stop 23
+ if (maxloc (b4, 1, l3, 2, .true.) .ne. 10) stop 24
+ a8 = 0
+ if (any (maxloc (a8) .ne. 1)) stop 1
+ if (any (maxloc (a8, back=.false.) .ne. 1)) stop 2
+ if (any (maxloc (a8, back=.true.) .ne. 10)) stop 3
+ if (any (maxloc (a8, kind=2) .ne. 1)) stop 4
+ if (any (maxloc (a8, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (maxloc (a8, kind=8, back=.true.) .ne. 10)) stop 6
+ if (any (maxloc (a8, 1) .ne. 1)) stop 7
+ if (any (maxloc (a8, 1, back=.false.) .ne. 1)) stop 8
+ if (any (maxloc (a8, 1, back=.true.) .ne. 10)) stop 9
+ if (any (maxloc (a8, 1, kind=1) .ne. 1)) stop 10
+ if (any (maxloc (a8, 1, kind=2, back=.false.) .ne. 1)) stop 11
+ if (any (maxloc (a8, 1, kind=4, back=.true.) .ne. 10)) stop 12
+ if (any (maxloc (a8, 1, l1) .ne. 1)) stop 13
+ if (any (maxloc (a8, 1, l1, back=.false.) .ne. 1)) stop 14
+ if (any (maxloc (a8, 1, l1, back=.true.) .ne. 10)) stop 15
+ if (any (maxloc (a8, 1, l1, kind=8) .ne. 1)) stop 16
+ if (any (maxloc (a8, 1, l1, 4, .false.) .ne. 1)) stop 17
+ if (any (maxloc (a8, 1, l1, 2, .true.) .ne. 10)) stop 18
+ if (any (maxloc (a8, 1, l3) .ne. 1)) stop 19
+ if (any (maxloc (a8, 1, l3, back=.false.) .ne. 1)) stop 20
+ if (any (maxloc (a8, 1, l3, back=.true.) .ne. 10)) stop 21
+ if (any (maxloc (a8, 1, l3, kind=8) .ne. 1)) stop 22
+ if (any (maxloc (a8, 1, l3, 4, .false.) .ne. 1)) stop 23
+ if (any (maxloc (a8, 1, l3, 2, .true.) .ne. 10)) stop 24
+ b8 = 0
+ if (any (maxloc (b8) .ne. 1)) stop 1
+ if (any (maxloc (b8, back=.false.) .ne. 1)) stop 2
+ if (any (maxloc (b8, back=.true.) .ne. 10)) stop 3
+ if (any (maxloc (b8, kind=2) .ne. 1)) stop 4
+ if (any (maxloc (b8, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (maxloc (b8, kind=8, back=.true.) .ne. 10)) stop 6
+ if (maxloc (b8, 1) .ne. 1) stop 7
+ if (maxloc (b8, 1, back=.false.) .ne. 1) stop 8
+ if (maxloc (b8, 1, back=.true.) .ne. 10) stop 9
+ if (maxloc (b8, 1, kind=1) .ne. 1) stop 10
+ if (maxloc (b8, 1, kind=2, back=.false.) .ne. 1) stop 11
+ if (maxloc (b8, 1, kind=4, back=.true.) .ne. 10) stop 12
+ if (maxloc (b8, 1, l2) .ne. 1) stop 13
+ if (maxloc (b8, 1, l2, back=.false.) .ne. 1) stop 14
+ if (maxloc (b8, 1, l2, back=.true.) .ne. 10) stop 15
+ if (maxloc (b8, 1, l2, kind=8) .ne. 1) stop 16
+ if (maxloc (b8, 1, l2, 4, .false.) .ne. 1) stop 17
+ if (maxloc (b8, 1, l2, 2, .true.) .ne. 10) stop 18
+ if (maxloc (b8, 1, l3) .ne. 1) stop 19
+ if (maxloc (b8, 1, l3, back=.false.) .ne. 1) stop 20
+ if (maxloc (b8, 1, l3, back=.true.) .ne. 10) stop 21
+ if (maxloc (b8, 1, l3, kind=8) .ne. 1) stop 22
+ if (maxloc (b8, 1, l3, 4, .false.) .ne. 1) stop 23
+ if (maxloc (b8, 1, l3, 2, .true.) .ne. 10) stop 24
+ r4 = 0.0
+ if (any (maxloc (r4) .ne. 1)) stop 1
+ if (any (maxloc (r4, back=.false.) .ne. 1)) stop 2
+ if (any (maxloc (r4, back=.true.) .ne. 10)) stop 3
+ if (any (maxloc (r4, kind=2) .ne. 1)) stop 4
+ if (any (maxloc (r4, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (maxloc (r4, kind=8, back=.true.) .ne. 10)) stop 6
+ if (any (maxloc (r4, 1) .ne. 1)) stop 7
+ if (any (maxloc (r4, 1, back=.false.) .ne. 1)) stop 8
+ if (any (maxloc (r4, 1, back=.true.) .ne. 10)) stop 9
+ if (any (maxloc (r4, 1, kind=1) .ne. 1)) stop 10
+ if (any (maxloc (r4, 1, kind=2, back=.false.) .ne. 1)) stop 11
+ if (any (maxloc (r4, 1, kind=4, back=.true.) .ne. 10)) stop 12
+ if (any (maxloc (r4, 1, l1) .ne. 1)) stop 13
+ if (any (maxloc (r4, 1, l1, back=.false.) .ne. 1)) stop 14
+ if (any (maxloc (r4, 1, l1, back=.true.) .ne. 10)) stop 15
+ if (any (maxloc (r4, 1, l1, kind=8) .ne. 1)) stop 16
+ if (any (maxloc (r4, 1, l1, 4, .false.) .ne. 1)) stop 17
+ if (any (maxloc (r4, 1, l1, 2, .true.) .ne. 10)) stop 18
+ if (any (maxloc (r4, 1, l3) .ne. 1)) stop 19
+ if (any (maxloc (r4, 1, l3, back=.false.) .ne. 1)) stop 20
+ if (any (maxloc (r4, 1, l3, back=.true.) .ne. 10)) stop 21
+ if (any (maxloc (r4, 1, l3, kind=8) .ne. 1)) stop 22
+ if (any (maxloc (r4, 1, l3, 4, .false.) .ne. 1)) stop 23
+ if (any (maxloc (r4, 1, l3, 2, .true.) .ne. 10)) stop 24
+ s4 = 0.0
+ if (any (maxloc (s4) .ne. 1)) stop 1
+ if (any (maxloc (s4, back=.false.) .ne. 1)) stop 2
+ if (any (maxloc (s4, back=.true.) .ne. 10)) stop 3
+ if (any (maxloc (s4, kind=2) .ne. 1)) stop 4
+ if (any (maxloc (s4, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (maxloc (s4, kind=8, back=.true.) .ne. 10)) stop 6
+ if (maxloc (s4, 1) .ne. 1) stop 7
+ if (maxloc (s4, 1, back=.false.) .ne. 1) stop 8
+ if (maxloc (s4, 1, back=.true.) .ne. 10) stop 9
+ if (maxloc (s4, 1, kind=1) .ne. 1) stop 10
+ if (maxloc (s4, 1, kind=2, back=.false.) .ne. 1) stop 11
+ if (maxloc (s4, 1, kind=4, back=.true.) .ne. 10) stop 12
+ if (maxloc (s4, 1, l2) .ne. 1) stop 13
+ if (maxloc (s4, 1, l2, back=.false.) .ne. 1) stop 14
+ if (maxloc (s4, 1, l2, back=.true.) .ne. 10) stop 15
+ if (maxloc (s4, 1, l2, kind=8) .ne. 1) stop 16
+ if (maxloc (s4, 1, l2, 4, .false.) .ne. 1) stop 17
+ if (maxloc (s4, 1, l2, 2, .true.) .ne. 10) stop 18
+ if (maxloc (s4, 1, l3) .ne. 1) stop 19
+ if (maxloc (s4, 1, l3, back=.false.) .ne. 1) stop 20
+ if (maxloc (s4, 1, l3, back=.true.) .ne. 10) stop 21
+ if (maxloc (s4, 1, l3, kind=8) .ne. 1) stop 22
+ if (maxloc (s4, 1, l3, 4, .false.) .ne. 1) stop 23
+ if (maxloc (s4, 1, l3, 2, .true.) .ne. 10) stop 24
+ r8 = 0.0
+ if (any (maxloc (r8) .ne. 1)) stop 1
+ if (any (maxloc (r8, back=.false.) .ne. 1)) stop 2
+ if (any (maxloc (r8, back=.true.) .ne. 10)) stop 3
+ if (any (maxloc (r8, kind=2) .ne. 1)) stop 4
+ if (any (maxloc (r8, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (maxloc (r8, kind=8, back=.true.) .ne. 10)) stop 6
+ if (any (maxloc (r8, 1) .ne. 1)) stop 7
+ if (any (maxloc (r8, 1, back=.false.) .ne. 1)) stop 8
+ if (any (maxloc (r8, 1, back=.true.) .ne. 10)) stop 9
+ if (any (maxloc (r8, 1, kind=1) .ne. 1)) stop 10
+ if (any (maxloc (r8, 1, kind=2, back=.false.) .ne. 1)) stop 11
+ if (any (maxloc (r8, 1, kind=4, back=.true.) .ne. 10)) stop 12
+ if (any (maxloc (r8, 1, l1) .ne. 1)) stop 13
+ if (any (maxloc (r8, 1, l1, back=.false.) .ne. 1)) stop 14
+ if (any (maxloc (r8, 1, l1, back=.true.) .ne. 10)) stop 15
+ if (any (maxloc (r8, 1, l1, kind=8) .ne. 1)) stop 16
+ if (any (maxloc (r8, 1, l1, 4, .false.) .ne. 1)) stop 17
+ if (any (maxloc (r8, 1, l1, 2, .true.) .ne. 10)) stop 18
+ if (any (maxloc (r8, 1, l3) .ne. 1)) stop 19
+ if (any (maxloc (r8, 1, l3, back=.false.) .ne. 1)) stop 20
+ if (any (maxloc (r8, 1, l3, back=.true.) .ne. 10)) stop 21
+ if (any (maxloc (r8, 1, l3, kind=8) .ne. 1)) stop 22
+ if (any (maxloc (r8, 1, l3, 4, .false.) .ne. 1)) stop 23
+ if (any (maxloc (r8, 1, l3, 2, .true.) .ne. 10)) stop 24
+ s8 = 0.0
+ if (any (maxloc (s8) .ne. 1)) stop 1
+ if (any (maxloc (s8, back=.false.) .ne. 1)) stop 2
+ if (any (maxloc (s8, back=.true.) .ne. 10)) stop 3
+ if (any (maxloc (s8, kind=2) .ne. 1)) stop 4
+ if (any (maxloc (s8, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (maxloc (s8, kind=8, back=.true.) .ne. 10)) stop 6
+ if (maxloc (s8, 1) .ne. 1) stop 7
+ if (maxloc (s8, 1, back=.false.) .ne. 1) stop 8
+ if (maxloc (s8, 1, back=.true.) .ne. 10) stop 9
+ if (maxloc (s8, 1, kind=1) .ne. 1) stop 10
+ if (maxloc (s8, 1, kind=2, back=.false.) .ne. 1) stop 11
+ if (maxloc (s8, 1, kind=4, back=.true.) .ne. 10) stop 12
+ if (maxloc (s8, 1, l2) .ne. 1) stop 13
+ if (maxloc (s8, 1, l2, back=.false.) .ne. 1) stop 14
+ if (maxloc (s8, 1, l2, back=.true.) .ne. 10) stop 15
+ if (maxloc (s8, 1, l2, kind=8) .ne. 1) stop 16
+ if (maxloc (s8, 1, l2, 4, .false.) .ne. 1) stop 17
+ if (maxloc (s8, 1, l2, 2, .true.) .ne. 10) stop 18
+ if (maxloc (s8, 1, l3) .ne. 1) stop 19
+ if (maxloc (s8, 1, l3, back=.false.) .ne. 1) stop 20
+ if (maxloc (s8, 1, l3, back=.true.) .ne. 10) stop 21
+ if (maxloc (s8, 1, l3, kind=8) .ne. 1) stop 22
+ if (maxloc (s8, 1, l3, 4, .false.) .ne. 1) stop 23
+ if (maxloc (s8, 1, l3, 2, .true.) .ne. 10) stop 24
+ a1 = 0
+ if (any (minloc (a1) .ne. 1)) stop 1
+ if (any (minloc (a1, back=.false.) .ne. 1)) stop 2
+ if (any (minloc (a1, back=.true.) .ne. 10)) stop 3
+ if (any (minloc (a1, kind=2) .ne. 1)) stop 4
+ if (any (minloc (a1, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (minloc (a1, kind=8, back=.true.) .ne. 10)) stop 6
+ if (any (minloc (a1, 1) .ne. 1)) stop 7
+ if (any (minloc (a1, 1, back=.false.) .ne. 1)) stop 8
+ if (any (minloc (a1, 1, back=.true.) .ne. 10)) stop 9
+ if (any (minloc (a1, 1, kind=1) .ne. 1)) stop 10
+ if (any (minloc (a1, 1, kind=2, back=.false.) .ne. 1)) stop 11
+ if (any (minloc (a1, 1, kind=4, back=.true.) .ne. 10)) stop 12
+ if (any (minloc (a1, 1, l1) .ne. 1)) stop 13
+ if (any (minloc (a1, 1, l1, back=.false.) .ne. 1)) stop 14
+ if (any (minloc (a1, 1, l1, back=.true.) .ne. 10)) stop 15
+ if (any (minloc (a1, 1, l1, kind=8) .ne. 1)) stop 16
+ if (any (minloc (a1, 1, l1, 4, .false.) .ne. 1)) stop 17
+ if (any (minloc (a1, 1, l1, 2, .true.) .ne. 10)) stop 18
+ if (any (minloc (a1, 1, l3) .ne. 1)) stop 19
+ if (any (minloc (a1, 1, l3, back=.false.) .ne. 1)) stop 20
+ if (any (minloc (a1, 1, l3, back=.true.) .ne. 10)) stop 21
+ if (any (minloc (a1, 1, l3, kind=8) .ne. 1)) stop 22
+ if (any (minloc (a1, 1, l3, 4, .false.) .ne. 1)) stop 23
+ if (any (minloc (a1, 1, l3, 2, .true.) .ne. 10)) stop 24
+ b1 = 0
+ if (any (minloc (b1) .ne. 1)) stop 1
+ if (any (minloc (b1, back=.false.) .ne. 1)) stop 2
+ if (any (minloc (b1, back=.true.) .ne. 10)) stop 3
+ if (any (minloc (b1, kind=2) .ne. 1)) stop 4
+ if (any (minloc (b1, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (minloc (b1, kind=8, back=.true.) .ne. 10)) stop 6
+ if (minloc (b1, 1) .ne. 1) stop 7
+ if (minloc (b1, 1, back=.false.) .ne. 1) stop 8
+ if (minloc (b1, 1, back=.true.) .ne. 10) stop 9
+ if (minloc (b1, 1, kind=1) .ne. 1) stop 10
+ if (minloc (b1, 1, kind=2, back=.false.) .ne. 1) stop 11
+ if (minloc (b1, 1, kind=4, back=.true.) .ne. 10) stop 12
+ if (minloc (b1, 1, l2) .ne. 1) stop 13
+ if (minloc (b1, 1, l2, back=.false.) .ne. 1) stop 14
+ if (minloc (b1, 1, l2, back=.true.) .ne. 10) stop 15
+ if (minloc (b1, 1, l2, kind=8) .ne. 1) stop 16
+ if (minloc (b1, 1, l2, 4, .false.) .ne. 1) stop 17
+ if (minloc (b1, 1, l2, 2, .true.) .ne. 10) stop 18
+ if (minloc (b1, 1, l3) .ne. 1) stop 19
+ if (minloc (b1, 1, l3, back=.false.) .ne. 1) stop 20
+ if (minloc (b1, 1, l3, back=.true.) .ne. 10) stop 21
+ if (minloc (b1, 1, l3, kind=8) .ne. 1) stop 22
+ if (minloc (b1, 1, l3, 4, .false.) .ne. 1) stop 23
+ if (minloc (b1, 1, l3, 2, .true.) .ne. 10) stop 24
+ a2 = 0
+ if (any (minloc (a2) .ne. 1)) stop 1
+ if (any (minloc (a2, back=.false.) .ne. 1)) stop 2
+ if (any (minloc (a2, back=.true.) .ne. 10)) stop 3
+ if (any (minloc (a2, kind=2) .ne. 1)) stop 4
+ if (any (minloc (a2, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (minloc (a2, kind=8, back=.true.) .ne. 10)) stop 6
+ if (any (minloc (a2, 1) .ne. 1)) stop 7
+ if (any (minloc (a2, 1, back=.false.) .ne. 1)) stop 8
+ if (any (minloc (a2, 1, back=.true.) .ne. 10)) stop 9
+ if (any (minloc (a2, 1, kind=1) .ne. 1)) stop 10
+ if (any (minloc (a2, 1, kind=2, back=.false.) .ne. 1)) stop 11
+ if (any (minloc (a2, 1, kind=4, back=.true.) .ne. 10)) stop 12
+ if (any (minloc (a2, 1, l1) .ne. 1)) stop 13
+ if (any (minloc (a2, 1, l1, back=.false.) .ne. 1)) stop 14
+ if (any (minloc (a2, 1, l1, back=.true.) .ne. 10)) stop 15
+ if (any (minloc (a2, 1, l1, kind=8) .ne. 1)) stop 16
+ if (any (minloc (a2, 1, l1, 4, .false.) .ne. 1)) stop 17
+ if (any (minloc (a2, 1, l1, 2, .true.) .ne. 10)) stop 18
+ if (any (minloc (a2, 1, l3) .ne. 1)) stop 19
+ if (any (minloc (a2, 1, l3, back=.false.) .ne. 1)) stop 20
+ if (any (minloc (a2, 1, l3, back=.true.) .ne. 10)) stop 21
+ if (any (minloc (a2, 1, l3, kind=8) .ne. 1)) stop 22
+ if (any (minloc (a2, 1, l3, 4, .false.) .ne. 1)) stop 23
+ if (any (minloc (a2, 1, l3, 2, .true.) .ne. 10)) stop 24
+ b2 = 0
+ if (any (minloc (b2) .ne. 1)) stop 1
+ if (any (minloc (b2, back=.false.) .ne. 1)) stop 2
+ if (any (minloc (b2, back=.true.) .ne. 10)) stop 3
+ if (any (minloc (b2, kind=2) .ne. 1)) stop 4
+ if (any (minloc (b2, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (minloc (b2, kind=8, back=.true.) .ne. 10)) stop 6
+ if (minloc (b2, 1) .ne. 1) stop 7
+ if (minloc (b2, 1, back=.false.) .ne. 1) stop 8
+ if (minloc (b2, 1, back=.true.) .ne. 10) stop 9
+ if (minloc (b2, 1, kind=1) .ne. 1) stop 10
+ if (minloc (b2, 1, kind=2, back=.false.) .ne. 1) stop 11
+ if (minloc (b2, 1, kind=4, back=.true.) .ne. 10) stop 12
+ if (minloc (b2, 1, l2) .ne. 1) stop 13
+ if (minloc (b2, 1, l2, back=.false.) .ne. 1) stop 14
+ if (minloc (b2, 1, l2, back=.true.) .ne. 10) stop 15
+ if (minloc (b2, 1, l2, kind=8) .ne. 1) stop 16
+ if (minloc (b2, 1, l2, 4, .false.) .ne. 1) stop 17
+ if (minloc (b2, 1, l2, 2, .true.) .ne. 10) stop 18
+ if (minloc (b2, 1, l3) .ne. 1) stop 19
+ if (minloc (b2, 1, l3, back=.false.) .ne. 1) stop 20
+ if (minloc (b2, 1, l3, back=.true.) .ne. 10) stop 21
+ if (minloc (b2, 1, l3, kind=8) .ne. 1) stop 22
+ if (minloc (b2, 1, l3, 4, .false.) .ne. 1) stop 23
+ if (minloc (b2, 1, l3, 2, .true.) .ne. 10) stop 24
+ a4 = 0
+ if (any (minloc (a4) .ne. 1)) stop 1
+ if (any (minloc (a4, back=.false.) .ne. 1)) stop 2
+ if (any (minloc (a4, back=.true.) .ne. 10)) stop 3
+ if (any (minloc (a4, kind=2) .ne. 1)) stop 4
+ if (any (minloc (a4, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (minloc (a4, kind=8, back=.true.) .ne. 10)) stop 6
+ if (any (minloc (a4, 1) .ne. 1)) stop 7
+ if (any (minloc (a4, 1, back=.false.) .ne. 1)) stop 8
+ if (any (minloc (a4, 1, back=.true.) .ne. 10)) stop 9
+ if (any (minloc (a4, 1, kind=1) .ne. 1)) stop 10
+ if (any (minloc (a4, 1, kind=2, back=.false.) .ne. 1)) stop 11
+ if (any (minloc (a4, 1, kind=4, back=.true.) .ne. 10)) stop 12
+ if (any (minloc (a4, 1, l1) .ne. 1)) stop 13
+ if (any (minloc (a4, 1, l1, back=.false.) .ne. 1)) stop 14
+ if (any (minloc (a4, 1, l1, back=.true.) .ne. 10)) stop 15
+ if (any (minloc (a4, 1, l1, kind=8) .ne. 1)) stop 16
+ if (any (minloc (a4, 1, l1, 4, .false.) .ne. 1)) stop 17
+ if (any (minloc (a4, 1, l1, 2, .true.) .ne. 10)) stop 18
+ if (any (minloc (a4, 1, l3) .ne. 1)) stop 19
+ if (any (minloc (a4, 1, l3, back=.false.) .ne. 1)) stop 20
+ if (any (minloc (a4, 1, l3, back=.true.) .ne. 10)) stop 21
+ if (any (minloc (a4, 1, l3, kind=8) .ne. 1)) stop 22
+ if (any (minloc (a4, 1, l3, 4, .false.) .ne. 1)) stop 23
+ if (any (minloc (a4, 1, l3, 2, .true.) .ne. 10)) stop 24
+ b4 = 0
+ if (any (minloc (b4) .ne. 1)) stop 1
+ if (any (minloc (b4, back=.false.) .ne. 1)) stop 2
+ if (any (minloc (b4, back=.true.) .ne. 10)) stop 3
+ if (any (minloc (b4, kind=2) .ne. 1)) stop 4
+ if (any (minloc (b4, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (minloc (b4, kind=8, back=.true.) .ne. 10)) stop 6
+ if (minloc (b4, 1) .ne. 1) stop 7
+ if (minloc (b4, 1, back=.false.) .ne. 1) stop 8
+ if (minloc (b4, 1, back=.true.) .ne. 10) stop 9
+ if (minloc (b4, 1, kind=1) .ne. 1) stop 10
+ if (minloc (b4, 1, kind=2, back=.false.) .ne. 1) stop 11
+ if (minloc (b4, 1, kind=4, back=.true.) .ne. 10) stop 12
+ if (minloc (b4, 1, l2) .ne. 1) stop 13
+ if (minloc (b4, 1, l2, back=.false.) .ne. 1) stop 14
+ if (minloc (b4, 1, l2, back=.true.) .ne. 10) stop 15
+ if (minloc (b4, 1, l2, kind=8) .ne. 1) stop 16
+ if (minloc (b4, 1, l2, 4, .false.) .ne. 1) stop 17
+ if (minloc (b4, 1, l2, 2, .true.) .ne. 10) stop 18
+ if (minloc (b4, 1, l3) .ne. 1) stop 19
+ if (minloc (b4, 1, l3, back=.false.) .ne. 1) stop 20
+ if (minloc (b4, 1, l3, back=.true.) .ne. 10) stop 21
+ if (minloc (b4, 1, l3, kind=8) .ne. 1) stop 22
+ if (minloc (b4, 1, l3, 4, .false.) .ne. 1) stop 23
+ if (minloc (b4, 1, l3, 2, .true.) .ne. 10) stop 24
+ a8 = 0
+ if (any (minloc (a8) .ne. 1)) stop 1
+ if (any (minloc (a8, back=.false.) .ne. 1)) stop 2
+ if (any (minloc (a8, back=.true.) .ne. 10)) stop 3
+ if (any (minloc (a8, kind=2) .ne. 1)) stop 4
+ if (any (minloc (a8, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (minloc (a8, kind=8, back=.true.) .ne. 10)) stop 6
+ if (any (minloc (a8, 1) .ne. 1)) stop 7
+ if (any (minloc (a8, 1, back=.false.) .ne. 1)) stop 8
+ if (any (minloc (a8, 1, back=.true.) .ne. 10)) stop 9
+ if (any (minloc (a8, 1, kind=1) .ne. 1)) stop 10
+ if (any (minloc (a8, 1, kind=2, back=.false.) .ne. 1)) stop 11
+ if (any (minloc (a8, 1, kind=4, back=.true.) .ne. 10)) stop 12
+ if (any (minloc (a8, 1, l1) .ne. 1)) stop 13
+ if (any (minloc (a8, 1, l1, back=.false.) .ne. 1)) stop 14
+ if (any (minloc (a8, 1, l1, back=.true.) .ne. 10)) stop 15
+ if (any (minloc (a8, 1, l1, kind=8) .ne. 1)) stop 16
+ if (any (minloc (a8, 1, l1, 4, .false.) .ne. 1)) stop 17
+ if (any (minloc (a8, 1, l1, 2, .true.) .ne. 10)) stop 18
+ if (any (minloc (a8, 1, l3) .ne. 1)) stop 19
+ if (any (minloc (a8, 1, l3, back=.false.) .ne. 1)) stop 20
+ if (any (minloc (a8, 1, l3, back=.true.) .ne. 10)) stop 21
+ if (any (minloc (a8, 1, l3, kind=8) .ne. 1)) stop 22
+ if (any (minloc (a8, 1, l3, 4, .false.) .ne. 1)) stop 23
+ if (any (minloc (a8, 1, l3, 2, .true.) .ne. 10)) stop 24
+ b8 = 0
+ if (any (minloc (b8) .ne. 1)) stop 1
+ if (any (minloc (b8, back=.false.) .ne. 1)) stop 2
+ if (any (minloc (b8, back=.true.) .ne. 10)) stop 3
+ if (any (minloc (b8, kind=2) .ne. 1)) stop 4
+ if (any (minloc (b8, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (minloc (b8, kind=8, back=.true.) .ne. 10)) stop 6
+ if (minloc (b8, 1) .ne. 1) stop 7
+ if (minloc (b8, 1, back=.false.) .ne. 1) stop 8
+ if (minloc (b8, 1, back=.true.) .ne. 10) stop 9
+ if (minloc (b8, 1, kind=1) .ne. 1) stop 10
+ if (minloc (b8, 1, kind=2, back=.false.) .ne. 1) stop 11
+ if (minloc (b8, 1, kind=4, back=.true.) .ne. 10) stop 12
+ if (minloc (b8, 1, l2) .ne. 1) stop 13
+ if (minloc (b8, 1, l2, back=.false.) .ne. 1) stop 14
+ if (minloc (b8, 1, l2, back=.true.) .ne. 10) stop 15
+ if (minloc (b8, 1, l2, kind=8) .ne. 1) stop 16
+ if (minloc (b8, 1, l2, 4, .false.) .ne. 1) stop 17
+ if (minloc (b8, 1, l2, 2, .true.) .ne. 10) stop 18
+ if (minloc (b8, 1, l3) .ne. 1) stop 19
+ if (minloc (b8, 1, l3, back=.false.) .ne. 1) stop 20
+ if (minloc (b8, 1, l3, back=.true.) .ne. 10) stop 21
+ if (minloc (b8, 1, l3, kind=8) .ne. 1) stop 22
+ if (minloc (b8, 1, l3, 4, .false.) .ne. 1) stop 23
+ if (minloc (b8, 1, l3, 2, .true.) .ne. 10) stop 24
+ r4 = 0.0
+ if (any (minloc (r4) .ne. 1)) stop 1
+ if (any (minloc (r4, back=.false.) .ne. 1)) stop 2
+ if (any (minloc (r4, back=.true.) .ne. 10)) stop 3
+ if (any (minloc (r4, kind=2) .ne. 1)) stop 4
+ if (any (minloc (r4, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (minloc (r4, kind=8, back=.true.) .ne. 10)) stop 6
+ if (any (minloc (r4, 1) .ne. 1)) stop 7
+ if (any (minloc (r4, 1, back=.false.) .ne. 1)) stop 8
+ if (any (minloc (r4, 1, back=.true.) .ne. 10)) stop 9
+ if (any (minloc (r4, 1, kind=1) .ne. 1)) stop 10
+ if (any (minloc (r4, 1, kind=2, back=.false.) .ne. 1)) stop 11
+ if (any (minloc (r4, 1, kind=4, back=.true.) .ne. 10)) stop 12
+ if (any (minloc (r4, 1, l1) .ne. 1)) stop 13
+ if (any (minloc (r4, 1, l1, back=.false.) .ne. 1)) stop 14
+ if (any (minloc (r4, 1, l1, back=.true.) .ne. 10)) stop 15
+ if (any (minloc (r4, 1, l1, kind=8) .ne. 1)) stop 16
+ if (any (minloc (r4, 1, l1, 4, .false.) .ne. 1)) stop 17
+ if (any (minloc (r4, 1, l1, 2, .true.) .ne. 10)) stop 18
+ if (any (minloc (r4, 1, l3) .ne. 1)) stop 19
+ if (any (minloc (r4, 1, l3, back=.false.) .ne. 1)) stop 20
+ if (any (minloc (r4, 1, l3, back=.true.) .ne. 10)) stop 21
+ if (any (minloc (r4, 1, l3, kind=8) .ne. 1)) stop 22
+ if (any (minloc (r4, 1, l3, 4, .false.) .ne. 1)) stop 23
+ if (any (minloc (r4, 1, l3, 2, .true.) .ne. 10)) stop 24
+ s4 = 0.0
+ if (any (minloc (s4) .ne. 1)) stop 1
+ if (any (minloc (s4, back=.false.) .ne. 1)) stop 2
+ if (any (minloc (s4, back=.true.) .ne. 10)) stop 3
+ if (any (minloc (s4, kind=2) .ne. 1)) stop 4
+ if (any (minloc (s4, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (minloc (s4, kind=8, back=.true.) .ne. 10)) stop 6
+ if (minloc (s4, 1) .ne. 1) stop 7
+ if (minloc (s4, 1, back=.false.) .ne. 1) stop 8
+ if (minloc (s4, 1, back=.true.) .ne. 10) stop 9
+ if (minloc (s4, 1, kind=1) .ne. 1) stop 10
+ if (minloc (s4, 1, kind=2, back=.false.) .ne. 1) stop 11
+ if (minloc (s4, 1, kind=4, back=.true.) .ne. 10) stop 12
+ if (minloc (s4, 1, l2) .ne. 1) stop 13
+ if (minloc (s4, 1, l2, back=.false.) .ne. 1) stop 14
+ if (minloc (s4, 1, l2, back=.true.) .ne. 10) stop 15
+ if (minloc (s4, 1, l2, kind=8) .ne. 1) stop 16
+ if (minloc (s4, 1, l2, 4, .false.) .ne. 1) stop 17
+ if (minloc (s4, 1, l2, 2, .true.) .ne. 10) stop 18
+ if (minloc (s4, 1, l3) .ne. 1) stop 19
+ if (minloc (s4, 1, l3, back=.false.) .ne. 1) stop 20
+ if (minloc (s4, 1, l3, back=.true.) .ne. 10) stop 21
+ if (minloc (s4, 1, l3, kind=8) .ne. 1) stop 22
+ if (minloc (s4, 1, l3, 4, .false.) .ne. 1) stop 23
+ if (minloc (s4, 1, l3, 2, .true.) .ne. 10) stop 24
+ r8 = 0.0
+ if (any (minloc (r8) .ne. 1)) stop 1
+ if (any (minloc (r8, back=.false.) .ne. 1)) stop 2
+ if (any (minloc (r8, back=.true.) .ne. 10)) stop 3
+ if (any (minloc (r8, kind=2) .ne. 1)) stop 4
+ if (any (minloc (r8, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (minloc (r8, kind=8, back=.true.) .ne. 10)) stop 6
+ if (any (minloc (r8, 1) .ne. 1)) stop 7
+ if (any (minloc (r8, 1, back=.false.) .ne. 1)) stop 8
+ if (any (minloc (r8, 1, back=.true.) .ne. 10)) stop 9
+ if (any (minloc (r8, 1, kind=1) .ne. 1)) stop 10
+ if (any (minloc (r8, 1, kind=2, back=.false.) .ne. 1)) stop 11
+ if (any (minloc (r8, 1, kind=4, back=.true.) .ne. 10)) stop 12
+ if (any (minloc (r8, 1, l1) .ne. 1)) stop 13
+ if (any (minloc (r8, 1, l1, back=.false.) .ne. 1)) stop 14
+ if (any (minloc (r8, 1, l1, back=.true.) .ne. 10)) stop 15
+ if (any (minloc (r8, 1, l1, kind=8) .ne. 1)) stop 16
+ if (any (minloc (r8, 1, l1, 4, .false.) .ne. 1)) stop 17
+ if (any (minloc (r8, 1, l1, 2, .true.) .ne. 10)) stop 18
+ if (any (minloc (r8, 1, l3) .ne. 1)) stop 19
+ if (any (minloc (r8, 1, l3, back=.false.) .ne. 1)) stop 20
+ if (any (minloc (r8, 1, l3, back=.true.) .ne. 10)) stop 21
+ if (any (minloc (r8, 1, l3, kind=8) .ne. 1)) stop 22
+ if (any (minloc (r8, 1, l3, 4, .false.) .ne. 1)) stop 23
+ if (any (minloc (r8, 1, l3, 2, .true.) .ne. 10)) stop 24
+ s8 = 0.0
+ if (any (minloc (s8) .ne. 1)) stop 1
+ if (any (minloc (s8, back=.false.) .ne. 1)) stop 2
+ if (any (minloc (s8, back=.true.) .ne. 10)) stop 3
+ if (any (minloc (s8, kind=2) .ne. 1)) stop 4
+ if (any (minloc (s8, kind=4, back=.false.) .ne. 1)) stop 5
+ if (any (minloc (s8, kind=8, back=.true.) .ne. 10)) stop 6
+ if (minloc (s8, 1) .ne. 1) stop 7
+ if (minloc (s8, 1, back=.false.) .ne. 1) stop 8
+ if (minloc (s8, 1, back=.true.) .ne. 10) stop 9
+ if (minloc (s8, 1, kind=1) .ne. 1) stop 10
+ if (minloc (s8, 1, kind=2, back=.false.) .ne. 1) stop 11
+ if (minloc (s8, 1, kind=4, back=.true.) .ne. 10) stop 12
+ if (minloc (s8, 1, l2) .ne. 1) stop 13
+ if (minloc (s8, 1, l2, back=.false.) .ne. 1) stop 14
+ if (minloc (s8, 1, l2, back=.true.) .ne. 10) stop 15
+ if (minloc (s8, 1, l2, kind=8) .ne. 1) stop 16
+ if (minloc (s8, 1, l2, 4, .false.) .ne. 1) stop 17
+ if (minloc (s8, 1, l2, 2, .true.) .ne. 10) stop 18
+ if (minloc (s8, 1, l3) .ne. 1) stop 19
+ if (minloc (s8, 1, l3, back=.false.) .ne. 1) stop 20
+ if (minloc (s8, 1, l3, back=.true.) .ne. 10) stop 21
+ if (minloc (s8, 1, l3, kind=8) .ne. 1) stop 22
+ if (minloc (s8, 1, l3, 4, .false.) .ne. 1) stop 23
+ if (minloc (s8, 1, l3, 2, .true.) .ne. 10) stop 24
+end
diff --git a/gcc/testsuite/gfortran.dg/pr120191_2.f90 b/gcc/testsuite/gfortran.dg/pr120191_2.f90
new file mode 100644
index 0000000..6334286
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr120191_2.f90
@@ -0,0 +1,84 @@
+! PR fortran/120191
+! { dg-do run }
+
+ character(kind=1, len=2) :: a(4, 4, 4), b(4)
+ logical :: l(4, 4, 4), m, n(4)
+ a = 'aa'
+ b = 'aa'
+ l = .true.
+ m = .true.
+ n = .true.
+ if (any (maxloc (a) .ne. 1)) stop 1
+ if (any (maxloc (a, dim=1) .ne. 1)) stop 2
+ if (any (maxloc (a, 1) .ne. 1)) stop 3
+ if (any (maxloc (a, dim=1, mask=l, kind=4, back=.false.) .ne. 1)) stop 4
+ if (any (maxloc (a, 1, l, 4, .false.) .ne. 1)) stop 5
+ if (any (maxloc (a, dim=1, mask=m, kind=4, back=.false.) .ne. 1)) stop 6
+ if (any (maxloc (a, 1, m, 4, .false.) .ne. 1)) stop 7
+ if (any (maxloc (a, dim=1, mask=l, kind=4, back=.true.) .ne. 4)) stop 8
+ if (any (maxloc (a, 1, l, 4, .true.) .ne. 4)) stop 9
+ if (any (maxloc (a, dim=1, mask=m, kind=4, back=.true.) .ne. 4)) stop 10
+ if (any (maxloc (a, 1, m, 4, .true.) .ne. 4)) stop 11
+ if (any (maxloc (b) .ne. 1)) stop 12
+ if (maxloc (b, dim=1) .ne. 1) stop 13
+ if (maxloc (b, 1) .ne. 1) stop 14
+ if (maxloc (b, dim=1, mask=n, kind=4, back=.false.) .ne. 1) stop 15
+ if (maxloc (b, 1, n, 4, .false.) .ne. 1) stop 16
+ if (maxloc (b, dim=1, mask=m, kind=4, back=.false.) .ne. 1) stop 17
+ if (maxloc (b, 1, m, 4, .false.) .ne. 1) stop 18
+ if (maxloc (b, dim=1, mask=n, kind=4, back=.true.) .ne. 4) stop 19
+ if (maxloc (b, 1, n, 4, .true.) .ne. 4) stop 20
+ if (maxloc (b, dim=1, mask=m, kind=4, back=.true.) .ne. 4) stop 21
+ if (maxloc (b, 1, m, 4, .true.) .ne. 4) stop 22
+ l = .false.
+ m = .false.
+ n = .false.
+ if (any (maxloc (a, dim=1, mask=l, kind=4, back=.false.) .ne. 0)) stop 23
+ if (any (maxloc (a, 1, l, 4, .false.) .ne. 0)) stop 24
+ if (maxloc (b, dim=1, mask=n, kind=4, back=.false.) .ne. 0) stop 25
+ if (maxloc (b, 1, n, 4, .false.) .ne. 0) stop 26
+ if (maxloc (b, dim=1, mask=m, kind=4, back=.false.) .ne. 0) stop 27
+ if (maxloc (b, 1, m, 4, .false.) .ne. 0) stop 28
+ if (maxloc (b, dim=1, mask=n, kind=4, back=.true.) .ne. 0) stop 29
+ if (maxloc (b, 1, n, 4, .true.) .ne. 0) stop 30
+ if (maxloc (b, dim=1, mask=m, kind=4, back=.true.) .ne. 0) stop 31
+ if (maxloc (b, 1, m, 4, .true.) .ne. 0) stop 32
+ l = .true.
+ m = .true.
+ n = .true.
+ if (any (minloc (a) .ne. 1)) stop 1
+ if (any (minloc (a, dim=1) .ne. 1)) stop 2
+ if (any (minloc (a, 1) .ne. 1)) stop 3
+ if (any (minloc (a, dim=1, mask=l, kind=4, back=.false.) .ne. 1)) stop 4
+ if (any (minloc (a, 1, l, 4, .false.) .ne. 1)) stop 5
+ if (any (minloc (a, dim=1, mask=m, kind=4, back=.false.) .ne. 1)) stop 6
+ if (any (minloc (a, 1, m, 4, .false.) .ne. 1)) stop 7
+ if (any (minloc (a, dim=1, mask=l, kind=4, back=.true.) .ne. 4)) stop 8
+ if (any (minloc (a, 1, l, 4, .true.) .ne. 4)) stop 9
+ if (any (minloc (a, dim=1, mask=m, kind=4, back=.true.) .ne. 4)) stop 10
+ if (any (minloc (a, 1, m, 4, .true.) .ne. 4)) stop 11
+ if (any (minloc (b) .ne. 1)) stop 12
+ if (minloc (b, dim=1) .ne. 1) stop 13
+ if (minloc (b, 1) .ne. 1) stop 14
+ if (minloc (b, dim=1, mask=n, kind=4, back=.false.) .ne. 1) stop 15
+ if (minloc (b, 1, n, 4, .false.) .ne. 1) stop 16
+ if (minloc (b, dim=1, mask=m, kind=4, back=.false.) .ne. 1) stop 17
+ if (minloc (b, 1, m, 4, .false.) .ne. 1) stop 18
+ if (minloc (b, dim=1, mask=n, kind=4, back=.true.) .ne. 4) stop 19
+ if (minloc (b, 1, n, 4, .true.) .ne. 4) stop 20
+ if (minloc (b, dim=1, mask=m, kind=4, back=.true.) .ne. 4) stop 21
+ if (minloc (b, 1, m, 4, .true.) .ne. 4) stop 22
+ l = .false.
+ m = .false.
+ n = .false.
+ if (any (minloc (a, dim=1, mask=l, kind=4, back=.false.) .ne. 0)) stop 23
+ if (any (minloc (a, 1, l, 4, .false.) .ne. 0)) stop 24
+ if (minloc (b, dim=1, mask=n, kind=4, back=.false.) .ne. 0) stop 25
+ if (minloc (b, 1, n, 4, .false.) .ne. 0) stop 26
+ if (minloc (b, dim=1, mask=m, kind=4, back=.false.) .ne. 0) stop 27
+ if (minloc (b, 1, m, 4, .false.) .ne. 0) stop 28
+ if (minloc (b, dim=1, mask=n, kind=4, back=.true.) .ne. 0) stop 29
+ if (minloc (b, 1, n, 4, .true.) .ne. 0) stop 30
+ if (minloc (b, dim=1, mask=m, kind=4, back=.true.) .ne. 0) stop 31
+ if (minloc (b, 1, m, 4, .true.) .ne. 0) stop 32
+end
diff --git a/gcc/testsuite/gfortran.dg/pr120191_3.f90 b/gcc/testsuite/gfortran.dg/pr120191_3.f90
new file mode 100644
index 0000000..26e4095
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr120191_3.f90
@@ -0,0 +1,23 @@
+! PR fortran/120191
+! { dg-do run }
+
+ character(kind=1, len=2) :: a(4, 4, 4), b(4)
+ logical :: l(4, 4, 4), m, n(4)
+ a = 'aa'
+ b = 'aa'
+ l = .false.
+ m = .false.
+ n = .false.
+ if (any (maxloc (a, dim=1, mask=m, kind=4, back=.false.) .ne. 0)) stop 1
+ if (any (maxloc (a, 1, m, 4, .false.) .ne. 0)) stop 2
+ if (any (maxloc (a, dim=1, mask=l, kind=4, back=.true.) .ne. 0)) stop 3
+ if (any (maxloc (a, 1, l, 4, .true.) .ne. 0)) stop 4
+ if (any (maxloc (a, dim=1, mask=m, kind=4, back=.true.) .ne. 0)) stop 5
+ if (any (maxloc (a, 1, m, 4, .true.) .ne. 0)) stop 6
+ if (any (minloc (a, dim=1, mask=m, kind=4, back=.false.) .ne. 0)) stop 7
+ if (any (minloc (a, 1, m, 4, .false.) .ne. 0)) stop 8
+ if (any (minloc (a, dim=1, mask=l, kind=4, back=.true.) .ne. 0)) stop 9
+ if (any (minloc (a, 1, l, 4, .true.) .ne. 0)) stop 10
+ if (any (minloc (a, dim=1, mask=m, kind=4, back=.true.) .ne. 0)) stop 11
+ if (any (minloc (a, 1, m, 4, .true.) .ne. 0)) stop 12
+end
diff --git a/gcc/testsuite/gfortran.dg/pr120196.f90 b/gcc/testsuite/gfortran.dg/pr120196.f90
new file mode 100644
index 0000000..368c43a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr120196.f90
@@ -0,0 +1,26 @@
+! PR libfortran/120196
+! { dg-do run }
+
+program pr120196
+ character(len=:, kind=1), allocatable :: a(:), s
+ character(len=:, kind=4), allocatable :: b(:), t
+ logical, allocatable :: l(:)
+ logical :: m
+ allocate (character(len=16, kind=1) :: a(10), s)
+ allocate (l(10))
+ a(:) = ""
+ s = "*"
+ l = .true.
+ m = .true.
+ if (findloc (a, s, dim=1, back=.true.) .ne. 0) stop 1
+ if (findloc (a, s, mask=l, dim=1, back=.true.) .ne. 0) stop 2
+ if (findloc (a, s, mask=m, dim=1, back=.true.) .ne. 0) stop 3
+ deallocate (a, s)
+ allocate (character(len=16, kind=4) :: b(10), t)
+ b(:) = ""
+ t = "*"
+ if (findloc (b, t, dim=1, back=.true.) .ne. 0) stop 4
+ if (findloc (b, t, mask=l, dim=1, back=.true.) .ne. 0) stop 5
+ if (findloc (b, t, mask=m, dim=1, back=.true.) .ne. 0) stop 6
+ deallocate (b, t, l)
+end program pr120196
diff --git a/gcc/testsuite/gm2.dg/doc/examples/plugin/fail/assignvalue.mod b/gcc/testsuite/gm2.dg/doc/examples/plugin/fail/assignvalue.mod
new file mode 100644
index 0000000..56eb0bb
--- /dev/null
+++ b/gcc/testsuite/gm2.dg/doc/examples/plugin/fail/assignvalue.mod
@@ -0,0 +1,25 @@
+(* { dg-do compile } *)
+(* { dg-options "-fsoft-check-all -fm2-plugin" } *)
+(* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } *)
+
+MODULE assignvalue ; (*!m2iso+gm2*)
+
+PROCEDURE bad () : INTEGER ;
+VAR
+ i: INTEGER ;
+BEGIN
+ i := -1 ;
+ RETURN i
+END bad ;
+
+VAR
+ foo: CARDINAL ;
+BEGIN
+ (* The m2rte plugin will detect this as an error, post
+ optimization. *)
+ foo := bad () (* { dg-error "error: In program module assignvalue" } *)
+ (* { dg-begin-multiline-output "" }
+runtime error will occur, assignment will cause a range error, as the runtime instance value of 'CARDINAL' does not overlap with the type 'INTEGER'
+ { dg-end-multiline-output "" } *)
+
+END assignvalue.
diff --git a/gcc/testsuite/gm2.dg/doc/examples/plugin/fail/doc-examples-plugin-fail.exp b/gcc/testsuite/gm2.dg/doc/examples/plugin/fail/doc-examples-plugin-fail.exp
new file mode 100644
index 0000000..6ddf2d5
--- /dev/null
+++ b/gcc/testsuite/gm2.dg/doc/examples/plugin/fail/doc-examples-plugin-fail.exp
@@ -0,0 +1,25 @@
+# Compile tests, no torture testing.
+#
+# These tests should all generate errors if the plugin is available.
+
+# Load support procs.
+load_lib gm2-dg.exp
+
+gm2_init_pim4 $srcdir/$subdir
+
+# Initialize `dg'.
+dg-init
+
+# If the --enable-plugin has not been enabled during configure, bail.
+if { ![info exists TESTING_IN_BUILD_TREE] || ![info exists ENABLE_PLUGIN] } {
+ return
+}
+
+# Main loop.
+
+set tests [lsort [glob -nocomplain $srcdir/$subdir/*.mod]]
+
+gm2-dg-runtest $tests "" ""
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gm2/pim/fail/constintarraybyte.mod b/gcc/testsuite/gm2/pim/fail/constintarraybyte.mod
new file mode 100644
index 0000000..cbcc804
--- /dev/null
+++ b/gcc/testsuite/gm2/pim/fail/constintarraybyte.mod
@@ -0,0 +1,10 @@
+MODULE constintarraybyte ;
+
+FROM FormatStrings IMPORT Sprintf1 ;
+FROM DynamicStrings IMPORT String, InitString ;
+
+VAR
+ s: String ;
+BEGIN
+ s := Sprintf1 (InitString("abc%x\n"), 42)
+END constintarraybyte.
diff --git a/gcc/testsuite/gm2/pim/pass/highbit.mod b/gcc/testsuite/gm2/pim/pass/highbit.mod
new file mode 100644
index 0000000..c9c872a
--- /dev/null
+++ b/gcc/testsuite/gm2/pim/pass/highbit.mod
@@ -0,0 +1,13 @@
+MODULE highbit ;
+
+FROM libc IMPORT printf ;
+
+TYPE
+ set = BITSET ;
+
+CONST
+ HighBit = MAX (set) ;
+
+BEGIN
+ printf ("the MAX (set) = %d\n", HighBit)
+END highbit.
diff --git a/gcc/testsuite/gm2/pim/pass/highbit2.mod b/gcc/testsuite/gm2/pim/pass/highbit2.mod
new file mode 100644
index 0000000..940556d
--- /dev/null
+++ b/gcc/testsuite/gm2/pim/pass/highbit2.mod
@@ -0,0 +1,13 @@
+MODULE highbit2 ;
+
+FROM libc IMPORT printf ;
+
+TYPE
+ set = BITSET ;
+
+CONST
+ HighBit = MAX (BITSET) ;
+
+BEGIN
+ printf ("the MAX (BITSET) = %d\n", HighBit)
+END highbit2.
diff --git a/gcc/testsuite/gm2/pimlib/run/pass/format2.mod b/gcc/testsuite/gm2/pimlib/run/pass/format2.mod
new file mode 100644
index 0000000..2ad6a8c
--- /dev/null
+++ b/gcc/testsuite/gm2/pimlib/run/pass/format2.mod
@@ -0,0 +1,63 @@
+MODULE format2;
+
+FROM libc IMPORT exit, printf ;
+FROM Terminal IMPORT Write, WriteLn;
+FROM NumberIO IMPORT WriteCard;
+FROM DynamicStrings IMPORT String, Length, char, InitString;
+FROM FormatStrings IMPORT Sprintf1;
+
+PROCEDURE WriteString (s: String);
+VAR
+ l, i: CARDINAL;
+BEGIN
+ l := Length (s) ;
+ i := 0 ;
+ WHILE i < l DO
+ Write (char (s, i)) ;
+ INC (i)
+ END
+END WriteString;
+
+
+(*
+ assert -
+*)
+
+PROCEDURE assert (cond: BOOLEAN; line: CARDINAL; file: ARRAY OF CHAR) ;
+BEGIN
+ IF NOT cond
+ THEN
+ printf ("%s:%d assertion failed\n", file, line);
+ exit (1)
+ END
+END assert ;
+
+
+VAR
+ n: CARDINAL;
+ r, s: String;
+BEGIN
+ n := 2;
+ r := InitString("%u pieces of cake") ;
+ WriteString (r) ; WriteLn ;
+ assert (Length (r) = 17, __LINE__, __FILE__) ;
+ s := Sprintf1 (r, n) ;
+ WriteCard (Length (s), 4) ; WriteLn ;
+ assert (Length (s) = 16, __LINE__, __FILE__) ;
+
+ r := InitString("%d pieces of cake") ;
+ WriteString (r) ; WriteLn ;
+ assert (Length (r) = 17, __LINE__, __FILE__) ;
+ s := Sprintf1 (r, n) ;
+ WriteCard (Length (s), 4) ; WriteLn ;
+ assert (Length (s) = 16, __LINE__, __FILE__) ;
+
+ r := InitString("%x pieces of cake") ;
+ WriteString (r) ; WriteLn ;
+ assert (Length (r) = 17, __LINE__, __FILE__) ;
+ s := Sprintf1 (r, n) ;
+ WriteCard (Length (s), 4) ; WriteLn ;
+ assert (Length (s) = 16, __LINE__, __FILE__) ;
+
+ WriteString (InitString ('all tests pass')) ; WriteLn ;
+END format2.
diff --git a/gcc/testsuite/lib/gm2-dg.exp b/gcc/testsuite/lib/gm2-dg.exp
index eaed554..5a36507 100644
--- a/gcc/testsuite/lib/gm2-dg.exp
+++ b/gcc/testsuite/lib/gm2-dg.exp
@@ -65,7 +65,7 @@ proc gm2-dg-runtest { testcases flags default-extra-flags } {
if [expr [search_for $test "dg-do run"]] {
set option_list $TORTURE_OPTIONS
} else {
- set option_list [list { -O } ]
+ set option_list [list { -O -O2 } ]
}
set nshort [file tail [file dirname $test]]/[file tail $test]
@@ -77,3 +77,38 @@ proc gm2-dg-runtest { testcases flags default-extra-flags } {
}
}
+
+# Check if frontend has been configured with option.
+# This checks a configure build option was used and not
+# the availability of a compiler command line option.
+
+proc gm2-dg-frontend-configure-check { option } {
+ global GCC_UNDER_TEST
+
+ # ignore any arguments after the command
+ set compiler [lindex $GCC_UNDER_TEST 0]
+
+ if ![is_remote host] {
+ set compiler_name [which $compiler]
+ } else {
+ set compiler_name $compiler
+ }
+
+ # verify that the compiler exists
+ if { $compiler_name != 0 } then {
+ set tmp [remote_exec host "$compiler -v"]
+ set status [lindex $tmp 0]
+ set output [lindex $tmp 1]
+ regexp "Configured with.*\[\n\r\]" $output config
+ set option "*${option}*"
+ if { [string match $option $config] } {
+ return 1
+ } else {
+ return 0
+ }
+ } else {
+ # compiler does not exist (this should have already been detected)
+ warning "$compiler does not exist"
+ return 0
+ }
+}