aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/ChangeLog5
-rw-r--r--gcc/ChangeLog343
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/analyzer/ChangeLog38
-rw-r--r--gcc/auto-profile.cc228
-rw-r--r--gcc/c-family/ChangeLog10
-rw-r--r--gcc/cobol/ChangeLog9
-rw-r--r--gcc/config/i386/mmx.md11
-rw-r--r--gcc/cp/ChangeLog38
-rw-r--r--gcc/fortran/ChangeLog27
-rw-r--r--gcc/fortran/invoke.texi4
-rw-r--r--gcc/fortran/openmp.cc30
-rw-r--r--gcc/fortran/trans-openmp.cc13
-rw-r--r--gcc/lra-constraints.cc19
-rw-r--r--gcc/testsuite/ChangeLog111
-rw-r--r--gcc/testsuite/gcc.dg/pr87600-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr87600-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr87600.h3
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/parameter-3.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/parameter-4.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/parameter.f9527
-rw-r--r--libstdc++-v3/ChangeLog53
22 files changed, 878 insertions, 139 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index a4f8bb3..d883133 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,8 @@
+2025-07-11 Richard Biener <rguenther@suse.de>
+
+ * gcc-changelog/git_update_version.py: Stop updating gcc-12
+ branch.
+
2025-07-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
* prepare-commit-msg: Force default git prefixes.
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9f241a2..76fd227 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,346 @@
+2025-07-11 David Malcolm <dmalcolm@redhat.com>
+
+ * diagnostic-format-html.cc: Include "diagnostic-format-sarif.h",
+ Replace include of "diagnostic-state.h" with includes of
+ "diagnostic-digraphs.h" and "diagnostic-state-graphs.h".
+ (html_generation_options::html_generation_options): Update for
+ field renaming.
+ (html_builder::m_body_element): New field.
+ (html_builder::html_builder): Initialize m_body_element.
+ (html_builder::maybe_make_state_diagram): Port from XML
+ implementation to state graph implementation.
+ (html_builder::make_element_for_diagnostic): Add any
+ per-diagnostic graphs.
+ (html_builder::add_graph): New.
+ (html_builder::emit_global_graph): New.
+ (html_output_format::report_global_digraph): New.
+ * diagnostic-format-html.h
+ (html_generation_options::m_show_state_diagram_xml): Replace
+ with...
+ (html_generation_options::m_show_state_diagrams_sarif): ...this.
+ (html_generation_options::m_show_state_diagram_dot_src): Rename
+ to...
+ (html_generation_options::m_show_state_diagrams_dot_src): ...this.
+ * diagnostic-format-sarif.cc: Include "diagnostic-digraphs.h" and
+ "diagnostic-state-graphs.h".
+ (sarif_builder::m_run_graphs): New field.
+ (sarif_result::on_nested_diagnostic): Update call to
+ make_location_object to pass arg by pointer.
+ (sarif_builder::sarif_builder): Initialize m_run_graphs.
+ (sarif_builder::report_global_digraph): New.
+ (sarif_builder::make_result_object): Add any graphs to
+ the result object.
+ (sarif_builder::make_locations_arr): Update call to
+ make_location_object to pass arg by pointer.
+ (sarif_builder::make_location_object): Pass param "loc_mgr" by
+ pointer rather than by reference so that it can be null, and
+ handle this case.
+ (copy_any_property_bag): New.
+ (make_sarif_graph): New.
+ (make_sarif_node): New.
+ (make_sarif_edge): New.
+ (sarif_property_bag::set_graph): New.
+ (populate_thread_flow_location_object): Port from XML
+ implementation to state graph implementation.
+ (make_run_object): Store any graphs.
+ (sarif_output_format::report_global_digraph): New.
+ (sarif_generation_options::sarif_generation_options): Rename
+ m_xml_state to m_state_graph.
+ (selftest::test_make_location_object): Update for change to
+ make_location_object.
+ * diagnostic-format-sarif.h:
+ (sarif_generation_options::m_xml_state): Replace with...
+ (sarif_generation_options::m_state_graph): ...this.
+ (class sarif_location_manager): Add forward decl.
+ (diagnostics::digraphs::digraph): New forward decl.
+ (diagnostics::digraphs::node): New forward decl.
+ (diagnostics::digraphs::edge): New forward decl.
+ (sarif_property_bag::set_graph): New decl.
+ (class sarif_graph): New.
+ (class sarif_node): New.
+ (class sarif_edge): New.
+ (make_sarif_graph): New decl.
+ (make_sarif_node): New decl.
+ (make_sarif_edge): New decl.
+ * diagnostic-format-text.h
+ (diagnostic_text_output_format::report_global_digraph): New.
+ * diagnostic-format.h
+ (diagnostic_output_format::report_global_digraph): New vfunc.
+ * diagnostic-digraphs.cc: New file.
+ * diagnostic-digraphs.h: New file.
+ * diagnostic-metadata.h (diagnostics::digraphs::lazy_digraphs):
+ New forward decl.
+ (diagnostic_metadata::diagnostic_metadata): Initialize
+ m_lazy_digraphs.
+ (diagnostic_metadata::set_lazy_digraphs): New.
+ (diagnostic_metadata::get_lazy_digraphs): New.
+ (diagnostic_metadata::m_lazy_digraphs): New field.
+ * diagnostic-output-spec.cc (sarif_scheme_handler::make_sink):
+ Update for XML to state graph changes.
+ (sarif_scheme_handler::make_sarif_gen_opts): Likewise.
+ (html_scheme_handler::make_sink): Rename "show-state-diagram-xml"
+ to "show-state-diagrams-sarif" and use pluralization consistently.
+ * diagnostic-path.cc: Replace include of "xml.h" with
+ "diagnostic-state-graphs.h".
+ (diagnostic_event::maybe_make_xml_state): Replace with...
+ (diagnostic_event::maybe_make_diagnostic_state_graph): ...this.
+ * diagnostic-path.h (diagnostics::digraphs::digraph): New forward
+ decl.
+ (diagnostic_event::maybe_make_xml_state): Replace with...
+ (diagnostic_event::maybe_make_diagnostic_state_graph): ...this.
+ * diagnostic-state-graphs.cc: New file.
+ * diagnostic-state-graphs.h: New file.
+ * diagnostic-state-to-dot.cc: Port implementation from XML to
+ state graphs.
+ * diagnostic-state.h: Deleted file.
+ * diagnostic.cc (diagnostic_context::report_global_digraph): New.
+ * diagnostic.h (diagnostics::digraphs::lazy_digraph): New forward
+ decl.
+ (diagnostic_context::report_global_digraph): New decl.
+ * doc/analyzer.texi (Debugging the Analyzer): Update to reflect
+ change from XML to state graphs.
+ * doc/invoke.texi ("sarif" diagnostics sink): Replace "xml-state"
+ with "state-graphs".
+ ("experimental-html" diagnostics sink): Replace
+ "show-state-diagrams-xml" with "show-state-diagrams-sarif"
+ * doc/libgdiagnostics/topics/compatibility.rst
+ (LIBGDIAGNOSTICS_ABI_3): New.
+ * doc/libgdiagnostics/topics/graphs.rst: New file.
+ * doc/libgdiagnostics/topics/index.rst: Add graphs.rst.
+ * graphviz.h (node_id::operator=): New.
+ * json.h (json::value::dyn_cast_string): New.
+ (json::object::get_num_keys): New accessor.
+ (json::object::get_key): New accessor.
+ (json::string::dyn_cast_string): New.
+ * libgdiagnostics++.h (class libgdiagnostics::graph): New.
+ (class libgdiagnostics::node): New.
+ (class libgdiagnostics::edge): New.
+ (class libgdiagnostics::diagnostic::take_graph): New.
+ (class libgdiagnostics::manager::take_global_graph): New.
+ (class libgdiagnostics::graph::set_description): New.
+ (class libgdiagnostics::graph::get_node_by_id): New.
+ (class libgdiagnostics::graph::get_edge_by_id): New.
+ (class libgdiagnostics::graph::add_edge): New.
+ (class libgdiagnostics::node::set_label): New.
+ (class libgdiagnostics::node::set_location): New.
+ (class libgdiagnostics::node::set_logical_location): New.
+ * libgdiagnostics-private.h: New file.
+ * libgdiagnostics.cc: Define INCLUDE_STRING. Include
+ "diagnostic-digraphs.h", "diagnostic-state-graphs.h", and
+ "libgdiagnostics-private.h".
+ (struct diagnostic_graph): New.
+ (struct diagnostic_node): New.
+ (struct diagnostic_edge): New.
+ (libgdiagnostics_path_event::libgdiagnostics_path_event): Add
+ state_graph param.
+ (libgdiagnostics_path_event::maybe_make_diagnostic_state_graph):
+ New.
+ (libgdiagnostics_path_event::m_state_graph): New field.
+ (diagnostic_execution_path::add_event_va): Add state_graph param.
+ (class prebuilt_digraphs): New.
+ (diagnostic::diagnostic): Use m_graphs in m_metadata.
+ (diagnostic::take_graph): New.
+ (diagnostic::get_graphs): New accessor.
+ (diagnostic::m_graphs): New field.
+ (diagnostic_manager::take_global_graph): New.
+ (diagnostic_execution_path_add_event): Update for new param to
+ add_event_va.
+ (diagnostic_execution_path_add_event_va): Likewise.
+ (diagnostic_graph::add_node_with_id): New public entrypoint.
+ (diagnostic_graph::add_edge_with_label): New public entrypoint.
+ (diagnostic_manager_new_graph): New public entrypoint.
+ (diagnostic_manager_take_global_graph): New public entrypoint.
+ (diagnostic_take_graph): New public entrypoint.
+ (diagnostic_graph_release): New public entrypoint.
+ (diagnostic_graph_set_description): New public entrypoint.
+ (diagnostic_graph_add_node): New public entrypoint.
+ (diagnostic_graph_add_edge): New public entrypoint.
+ (diagnostic_graph_get_node_by_id): New public entrypoint.
+ (diagnostic_graph_get_edge_by_id): New public entrypoint.
+ (diagnostic_node_set_location): New public entrypoint.
+ (diagnostic_node_set_label): New public entrypoint.
+ (diagnostic_node_set_logical_location): New public entrypoint.
+ (private_diagnostic_execution_path_add_event_2): New private
+ entrypoint.
+ (private_diagnostic_graph_set_property_bag): New private
+ entrypoint.
+ (private_diagnostic_node_set_property_bag): New private
+ entrypoint.
+ (private_diagnostic_edge_set_property_bag): New private
+ entrypoint.
+ * libgdiagnostics.h (diagnostic_graph): New typedef.
+ (diagnostic_node): New typedef.
+ (diagnostic_edge): New typedef.
+ (diagnostic_manager_new_graph): New decl.
+ (diagnostic_manager_take_global_graph): New decl.
+ (diagnostic_take_graph): New decl.
+ (diagnostic_graph_release): New decl.
+ (diagnostic_graph_set_description): New decl.
+ (diagnostic_graph_add_node): New decl.
+ (diagnostic_graph_add_edge): New decl.
+ (diagnostic_graph_get_node_by_id): New decl.
+ (diagnostic_graph_get_edge_by_id): New decl.
+ (diagnostic_node_set_label): New decl.
+ (diagnostic_node_set_location): New decl.
+ (diagnostic_node_set_logical_location): New decl.
+ * libgdiagnostics.map (LIBGDIAGNOSTICS_ABI_3): New.
+ * libsarifreplay.cc: Include "libgdiagnostics-private.h".
+ (id_map): New "using".
+ (sarif_replayer::report_invalid_sarif): Update for change to
+ report_problem params.
+ (sarif_replayer::report_unhandled_sarif): Likewise.
+ (sarif_replayer::report_note): New.
+ (sarif_replayer::report_problem): Pass param "ref" by
+ pointer rather than reference and handle it being null.
+ (sarif_replayer::maybe_get_property_bag): New.
+ (sarif_replayer::maybe_get_property_bag_value): New.
+ (sarif_replayer::handle_run_obj): Handle run-level "graphs" as per
+ §3.14.20.
+ (sarif_replayer::handle_result_obj): Handle result-level "graphs"
+ as per §3.27.19.
+ (handle_thread_flow_location_object): Optionally handle graphs
+ stored in property "gcc/diagnostic_event/state_graph" as state
+ graphs.
+ (sarif_replayer::handle_graph_object): New.
+ (sarif_replayer::handle_node_object): New.
+ (sarif_replayer::handle_edge_object): New.
+ (sarif_replayer::get_graph_node_by_id_property): New.
+ * selftest-run-tests.cc (selftest::run_tests): Call
+ selftest::diagnostic_graph_cc_tests and
+ selftest::diagnostic_state_graph_cc_tests.
+ * selftest.h (selftest::diagnostic_graph_cc_tests): New decl.
+ (selftest::diagnostic_state_graph_cc_tests): New decl.
+
+2025-07-11 David Malcolm <dmalcolm@redhat.com>
+
+ * Makefile.in (OBJS-libcommon): Add diagnostic-digraphs.o and
+ diagnostic-state-graphs.o.
+
+2025-07-11 David Malcolm <dmalcolm@redhat.com>
+
+ * json.cc (json::object::clone): New.
+ (json::object::clone_as_object): New.
+ (json::array::clone): New.
+ (json::float_number::clone): New.
+ (json::integer_number::clone): New.
+ (json::string::clone): New.
+ (json::literal::clone): New.
+ (selftest::test_cloning): New test.
+ (selftest::json_cc_tests): Call it.
+ * json.h (json::value::clone): New vfunc.
+ (json::object::clone): New decl.
+ (json::object::clone_as_object): New decl.
+ (json::array::clone): New decl.
+ (json::float_number::clone): New decl.
+ (json::integer_number::clone): New decl.
+ (json::string::clone): New decl.
+ (json::literal::clone): New decl.
+
+2025-07-11 David Malcolm <dmalcolm@redhat.com>
+
+ * json.cc (string::string): When constructing from pointer and
+ length, ensure the new buffer is null-terminated.
+ (selftest::test_strcmp): New.
+ (selftest::json_cc_tests): Likewise.
+
+2025-07-11 David Malcolm <dmalcolm@redhat.com>
+
+ * doc/libgdiagnostics/topics/compatibility.rst
+ (_LIBGDIAGNOSTICS_ABI_2): Add missing anchor.
+ * doc/libgdiagnostics/topics/diagnostic-manager.rst
+ (diagnostic_manager_add_sink_from_spec): Add links to GCC's
+ documentation of "-fdiagnostics-add-output=". Fix parameter
+ markup.
+ (diagnostic_manager_set_analysis_target): Fix parameter markup.
+ Add link to SARIF spec.
+ * doc/libgdiagnostics/topics/logical-locations.rst: Markup fix.
+ * doc/libgdiagnostics/tutorial/02-physical-locations.rst: Clarify
+ wording of what "the source file" means, and that a range can't
+ have multiple files.
+
+2025-07-11 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ * lra-constraints.cc (process_address_1): When changing base reg
+ on a reg of the base class, fall back to reload of whole inner address.
+ (process_address): Constrain the iteration number.
+
+2025-07-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/119064
+ * doc/invoke.texi (Wc++26-compat): Document.
+
+2025-07-11 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR target/121027
+ * config/aarch64/aarch64.cc (aarch64_evpc_sve_tbl): Punt on 2-input
+ operations that can be handled by vec_perm.
+
+2025-07-11 Kyrylo Tkachov <ktkachov@nvidia.com>
+
+ * config/aarch64/aarch64-simd.md (*eor3qdi4): New
+ define_insn_and_split.
+
+2025-07-11 Kyrylo Tkachov <ktkachov@nvidia.com>
+
+ * config/aarch64/aarch64-simd.md (*bcaxqdi4): New
+ define_insn_and_split.
+
+2025-07-11 Kyrylo Tkachov <ktkachov@nvidia.com>
+
+ * config/aarch64/aarch64-simd.md (eor3q<mode>4): Use VDQ_I mode
+ iterator.
+
+2025-07-11 Kyrylo Tkachov <ktkachov@nvidia.com>
+
+ * config/aarch64/aarch64-simd.md (bcaxq<mode>4): Use VDQ_I mode
+ iterator.
+
+2025-07-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/121034
+ * tree-vect-loop.cc (vectorizable_reduction): Cleanup
+ reduction chain following code.
+
+2025-07-11 Jan Hubicka <hubicka@ucw.cz>
+
+ * opts.cc (finish_options): Enable debug_nonbind_markers_p for
+ auto-profile.
+ * tree-cfg.cc (struct locus_discrim_map): Remove.
+ (struct locus_discrim_hasher): Remove.
+ (locus_discrim_hasher::hash): Remove.
+ (locus_discrim_hasher::equal): Remove.
+ (first_non_label_nondebug_stmt): Remove.
+ (build_gimple_cfg): Do not allocate discriminator tables.
+ (next_discriminator_for_locus): Remove.
+ (same_line_p): Remove.
+ (struct discrim_entry): New structure.
+ (assign_discriminator): Rewrite.
+ (assign_discriminators): Rewrite.
+
+2025-07-11 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/114790
+ * cgraph.cc (cgraph_update_edges_for_call_stmt_node): Resolve devirtualization
+ if call statement was optimized out or turned to direct call.
+
+2025-07-11 Jakub Jelinek <jakub@redhat.com>
+ Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/121023
+ * ipa-fnsummary.cc (compute_fn_summary): Disallow signature changes
+ on cfun->has_musttail functions.
+
+2025-07-11 Hu, Lin1 <lin1.hu@intel.com>
+
+ PR target/91384
+ * config/i386/i386.md: Add new peeophole2 for optimize *negsi_1
+ followed by *cmpsi_ccno_1 with APX_F.
+
+2025-07-11 Richard Biener <rguenther@suse.de>
+
+ * config/i386/i386.cc (ix86_vector_costs::add_stmt_cost): Use
+ the LHS of a scalar stmt to determine mode and whether it is FP.
+
2025-07-10 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/aarch64.cc (aarch64_vector_costs::add_stmt_cost):
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 26b40b2..e177aad 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20250711
+20250712
diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog
index d31cbbc..a34fa13 100644
--- a/gcc/analyzer/ChangeLog
+++ b/gcc/analyzer/ChangeLog
@@ -1,3 +1,41 @@
+2025-07-11 David Malcolm <dmalcolm@redhat.com>
+
+ * ana-state-to-diagnostic-state.cc: Reimplement, replacing
+ XML-based implementation with one based on state graphs.
+ * ana-state-to-diagnostic-state.h: Likewise.
+ * checker-event.cc: Replace include of "xml.h" with include of
+ "diagnostic-state-graphs.h".
+ (checker_event::maybe_make_xml_state): Replace with...
+ (checker_event::maybe_make_diagnostic_state_graph): ...this.
+ * checker-event.h: Add include of "diagnostic-digraphs.h".
+ (checker_event::maybe_make_xml_state): Replace decl with...
+ (checker_event::maybe_make_diagnostic_state_graph): ...this.
+ * engine.cc (exploded_node::on_stmt_pre): Replace
+ "_analyzer_dump_xml" with "__analyzer_dump_sarif".
+ * program-state.cc: Replace include of "diagnostic-state.h" with
+ "diagnostic-state-graphs.h".
+ (program_state::dump_dot): Port from XML to state graphs.
+ * program-state.h: Drop reduntant forward decl of xml::document.
+ (program_state::make_xml): Replace decl with...
+ (program_state::make_diagnostic_state_graph): ...this.
+ (program_state::dump_xml_to_pp): Drop decl.
+ (program_state::dump_xml_to_file): Drop decl.
+ (program_state::dump_xml): Drop decl.
+ (program_state::dump_dump_sarif): New decl.
+ * sm-malloc.cc (get_dynalloc_state_for_state): New.
+ (malloc_state_machine::add_state_to_xml): Replace with...
+ (malloc_state_machine::add_state_to_state_graph): ...this.
+ * sm.cc (state_machine::add_state_to_xml): Replace with...
+ (state_machine::add_state_to_state_graph): ...this.
+ (state_machine::add_global_state_to_xml): Replace with...
+ (state_machine::add_global_state_to_state_graph): ...this.
+ * sm.h (class xml_state): Drop forward decl.
+ (class analyzer_state_graph): New forward decl.
+ (state_machine::add_state_to_xml): Replace decl with...
+ (state_machine::add_state_to_state_graph): ...this.
+ (state_machine::add_global_state_to_xml): Replace decl with...
+ (state_machine::add_global_state_to_state_graph): ...this.
+
2025-06-30 David Malcolm <dmalcolm@redhat.com>
* access-diagram.cc: Use nullptr rather than NULL where
diff --git a/gcc/auto-profile.cc b/gcc/auto-profile.cc
index 5226e455..d1954b4 100644
--- a/gcc/auto-profile.cc
+++ b/gcc/auto-profile.cc
@@ -240,6 +240,8 @@ public:
/* Add new name and return its index. */
int add_name (char *);
+ /* Return cgraph node corresponding to given name index. */
+ cgraph_node *get_cgraph_node (int);
private:
typedef std::map<const char *, unsigned, string_compare> string_index_map;
string_vector vector_;
@@ -445,7 +447,6 @@ public:
/* Lookup count and warn about duplicates. */
count_info *lookup_count (location_t loc, inline_stack &stack,
cgraph_node *node);
-
private:
/* Callsite, represented as (decl_lineno, callee_function_name_index). */
typedef std::pair<unsigned, unsigned> callsite;
@@ -888,21 +889,13 @@ string_table::read ()
return true;
}
-/* Member functions for function_instance. */
-
-function_instance::~function_instance ()
-{
- gcc_assert (!in_worklist_p ());
- for (callsite_map::iterator iter = callsites.begin ();
- iter != callsites.end (); ++iter)
- delete iter->second;
-}
-
-/* Return corresponding cgraph node, NULL if unavailable. */
+/* Return cgraph node corresponding to given NAME_INDEX,
+ NULL if unavailable. */
cgraph_node *
-function_instance::get_cgraph_node ()
+string_table::get_cgraph_node (int name_index)
{
- const char *sname = afdo_string_table->get_name (name ());
+ const char *sname = get_name (name_index);
+
symtab_node *n = cgraph_node::get_for_asmname (get_identifier (sname));
for (;n; n = n->next_sharing_asm_name)
if (cgraph_node *cn = dyn_cast <cgraph_node *> (n))
@@ -911,6 +904,24 @@ function_instance::get_cgraph_node ()
return NULL;
}
+/* Return corresponding cgraph node. */
+
+cgraph_node *
+function_instance::get_cgraph_node ()
+{
+ return afdo_string_table->get_cgraph_node (name ());
+}
+
+/* Member functions for function_instance. */
+
+function_instance::~function_instance ()
+{
+ gcc_assert (!in_worklist_p ());
+ for (callsite_map::iterator iter = callsites.begin ();
+ iter != callsites.end (); ++iter)
+ delete iter->second;
+}
+
/* Traverse callsites of the current function_instance to find one at the
location of LINENO and callee name represented in DECL. */
@@ -1169,7 +1180,7 @@ match_with_target (cgraph_node *n,
}
/* Accept dwarf names and stripped suffixes. */
if (!strcmp (lang_hooks.dwarf_name (callee->decl, 0),
- afdo_string_table->get_name (inlined_fn->name ()))
+ afdo_string_table->get_name (inlined_fn->name ()))
|| (!name[i] && symbol_name[i] == '.')
|| in_suffix)
{
@@ -1183,8 +1194,8 @@ match_with_target (cgraph_node *n,
inlined_fn->set_name (index);
return 2;
}
- /* Only warn about declarations. It is possible that the function is
- declared as alias in other module and we inlined cross-module. */
+ /* Only warn about declarations. It is possible that the function
+ is declared as alias in other module and we inlined cross-module. */
if (callee->definition
&& warning (OPT_Wauto_profile,
"auto-profile of %q+F contains inlined "
@@ -1491,8 +1502,8 @@ function_instance::match (cgraph_node *node,
== inlined_fn);
callsite key2 = {stack[0].afdo_loc,
inlined_fn->name ()};
- callsites[key2] = inlined_fn;
callsites.erase (iter);
+ callsites[key2] = inlined_fn;
}
if (r)
functions.add (inlined_fn);
@@ -1554,10 +1565,10 @@ function_instance::match (cgraph_node *node,
callsite key2 = {stack[0].afdo_loc,
newn ? *newn
: inlined_fn->name ()};
+ callsites.erase (iter);
callsites[key2] = inlined_fn;
inlined_fn->set_name (newn ? *newn
: inlined_fn->name ());
- callsites.erase (iter);
}
functions.add (inlined_fn);
}
@@ -1690,7 +1701,6 @@ function_instance::match (cgraph_node *node,
f->dump_inline_stack (dump_file);
fprintf (dump_file, "\n");
}
- warned = true;
callsites.erase (iter);
offline (f, new_functions);
iter = callsites.begin ();
@@ -1752,9 +1762,9 @@ function_instance::remove_external_functions
auto iter = callsites.find (key);
callsite key2 = key;
key2.second = *to_symbol_name.get (key.second);
- callsites[key2] = iter->second;
iter->second->set_name (key2.second);
callsites.erase (iter);
+ callsites[key2] = iter->second;
}
auto_vec <int, 20> target_to_rename;
for (auto &iter : pos_counts)
@@ -1951,6 +1961,7 @@ autofdo_source_profile::offline_external_functions ()
cgraph_node *node;
name_index_set seen;
name_index_map to_symbol_name;
+ size_t last_name;
/* Add renames erasing suffixes produced by late clones, such as
.isra, .ipcp. */
@@ -1986,10 +1997,10 @@ autofdo_source_profile::offline_external_functions ()
index = afdo_string_table->add_name (n2);
to_symbol_name.put (i, index);
}
+ last_name = afdo_string_table->num_entries ();
FOR_EACH_DEFINED_FUNCTION (node)
{
- const char *name
- = raw_symbol_name (node->decl);
+ const char *name = raw_symbol_name (node->decl);
const char *dwarf_name = lang_hooks.dwarf_name (node->decl, 0);
int index = afdo_string_table->get_index (name);
@@ -2026,11 +2037,17 @@ autofdo_source_profile::offline_external_functions ()
{
if (dump_file)
{
- fprintf (dump_file,
- "Node %s not in auto profile (%s neither %s)\n",
- node->dump_name (),
- name,
- dwarf_name);
+ if (dwarf_name && strcmp (dwarf_name, name))
+ fprintf (dump_file,
+ "Node %s not in auto profile (%s neither %s)\n",
+ node->dump_name (),
+ name,
+ dwarf_name);
+ else
+ fprintf (dump_file,
+ "Node %s (symbol %s) not in auto profile\n",
+ node->dump_name (),
+ name);
}
}
}
@@ -2074,72 +2091,87 @@ autofdo_source_profile::offline_external_functions ()
should be done on unmodified profile and merging works better if
mismatches are already resolved both in source and destination. */
while (fns.length () || fns2.length ())
- if (fns.length ())
- {
- function_instance *f = fns.pop ();
- if (f->get_location () == UNKNOWN_LOCATION)
- {
- int index = f->name ();
- int *newn = to_symbol_name.get (index);
- if (newn)
- {
- f->set_name (*newn);
- if (map_.count (index)
- && map_[index] == f)
- map_.erase (index);
- if (!map_.count (*newn))
- map_[*newn] = f;
- }
- if (cgraph_node *n = f->get_cgraph_node ())
- {
- gcc_checking_assert (seen.contains (f->name ()));
- f->match (n, fns, to_symbol_name);
- }
- }
- fns2.safe_push (f);
- }
- else
- {
- function_instance *f = fns2.pop ();
- int index = f->name ();
- gcc_checking_assert (f->in_worklist_p ());
+ {
+ /* In case renaming introduced new name, keep seen up to date. */
+ for (; last_name < afdo_string_table->num_entries (); last_name++)
+ {
+ const char *name = afdo_string_table->get_name (last_name);
+ symtab_node *n
+ = afdo_string_table->get_cgraph_node (last_name);
+ if (dump_file)
+ fprintf (dump_file, "New name %s %s\n", name,
+ n ? "wth corresponding definition"
+ : "with no corresponding definition");
+ if (n)
+ seen.add (last_name);
+ }
+ if (fns.length ())
+ {
+ function_instance *f = fns.pop ();
+ if (f->get_location () == UNKNOWN_LOCATION)
+ {
+ int index = f->name ();
+ int *newn = to_symbol_name.get (index);
+ if (newn)
+ {
+ f->set_name (*newn);
+ if (map_.count (index)
+ && map_[index] == f)
+ map_.erase (index);
+ if (!map_.count (*newn))
+ map_[*newn] = f;
+ }
+ if (cgraph_node *n = f->get_cgraph_node ())
+ {
+ gcc_checking_assert (seen.contains (f->name ()));
+ f->match (n, fns, to_symbol_name);
+ }
+ }
+ fns2.safe_push (f);
+ }
+ else
+ {
+ function_instance *f = fns2.pop ();
+ int index = f->name ();
+ gcc_checking_assert (f->in_worklist_p ());
- /* If map has different function_instance of same name, then
- this is a duplicated entry which needs to be merged. */
- if (map_.count (index) && map_[index] != f)
- {
- if (dump_file)
- {
- fprintf (dump_file, "Merging duplicate instance: ");
- f->dump_inline_stack (dump_file);
- fprintf (dump_file, "\n");
- }
- map_[index]->merge (f, fns);
- gcc_checking_assert (!f->inlined_to ());
- f->clear_in_worklist ();
- delete f;
- }
- /* If name was not seen in the symbol table, remove it. */
- else if (!seen.contains (index))
- {
- f->offline_if_in_set (seen, fns);
- f->clear_in_worklist ();
- if (dump_file)
- fprintf (dump_file, "Removing external %s\n",
- afdo_string_table->get_name (f->name ()));
- if (map_.count (index) && map_[index] == f)
- map_.erase (f->name ());
- delete f;
- }
- /* If this is offline function instance seen in this
- translation unit offline external inlines and possibly
- rename from dwarf name. */
- else
- {
- f->remove_external_functions (seen, to_symbol_name, fns);
- f->clear_in_worklist ();
- }
- }
+ /* If map has different function_instance of same name, then
+ this is a duplicated entry which needs to be merged. */
+ if (map_.count (index) && map_[index] != f)
+ {
+ if (dump_file)
+ {
+ fprintf (dump_file, "Merging duplicate instance: ");
+ f->dump_inline_stack (dump_file);
+ fprintf (dump_file, "\n");
+ }
+ map_[index]->merge (f, fns);
+ gcc_checking_assert (!f->inlined_to ());
+ f->clear_in_worklist ();
+ delete f;
+ }
+ /* If name was not seen in the symbol table, remove it. */
+ else if (!seen.contains (index))
+ {
+ f->offline_if_in_set (seen, fns);
+ f->clear_in_worklist ();
+ if (dump_file)
+ fprintf (dump_file, "Removing external %s\n",
+ afdo_string_table->get_name (f->name ()));
+ if (map_.count (index) && map_[index] == f)
+ map_.erase (f->name ());
+ delete f;
+ }
+ /* If this is offline function instance seen in this
+ translation unit offline external inlines and possibly
+ rename from dwarf name. */
+ else
+ {
+ f->remove_external_functions (seen, to_symbol_name, fns);
+ f->clear_in_worklist ();
+ }
+ }
+ }
if (dump_file)
for (auto const &iter : map_)
{
@@ -2288,7 +2320,7 @@ autofdo_source_profile::offline_unrealized_inlines ()
function_instance *
function_instance::read_function_instance (function_instance_stack *stack,
- gcov_type head_count)
+ gcov_type head_count)
{
unsigned name = gcov_read_unsigned ();
unsigned num_pos_counts = gcov_read_unsigned ();
@@ -2311,10 +2343,10 @@ function_instance::read_function_instance (function_instance_stack *stack,
(*stack)[j]->total_count_ += count;
for (unsigned j = 0; j < num_targets; j++)
{
- /* Only indirect call target histogram is supported now. */
- gcov_read_unsigned ();
- gcov_type target_idx = gcov_read_counter ();
- s->pos_counts[offset].targets[target_idx] = gcov_read_counter ();
+ /* Only indirect call target histogram is supported now. */
+ gcov_read_unsigned ();
+ gcov_type target_idx = gcov_read_counter ();
+ s->pos_counts[offset].targets[target_idx] = gcov_read_counter ();
}
}
for (unsigned i = 0; i < num_callsites; i++)
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index a95cc34..ed79d36 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,13 @@
+2025-07-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/119064
+ * c.opt (Wc++26-compat): New option.
+ * c.opt.urls: Regenerate.
+ * c-opts.cc (c_common_post_options): Clear warn_cxx26_compat for
+ C++26 or later.
+ * c-cppbuiltin.cc (c_cpp_builtins): For C++26 predefine
+ __cpp_trivial_relocatability=202502L.
+
2025-07-10 Jakub Jelinek <jakub@redhat.com>
PR c++/117785
diff --git a/gcc/cobol/ChangeLog b/gcc/cobol/ChangeLog
index 5affc84..5555b8e 100644
--- a/gcc/cobol/ChangeLog
+++ b/gcc/cobol/ChangeLog
@@ -1,3 +1,12 @@
+2025-07-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR cobol/120621
+ * lexio.cc (parse_replace_pairs): Cast mfile.lineno() to fmt_size_t.
+ * parse.y (intrinsic): Print ptrdiff_t using %ld, cast arg to long.
+ * scan_ante.h (numstr_of): Print nx using %ld, cast arg to long.
+ * util.cc (cbl_field_t::report_invalid_initial_value): Print
+ ptrdiff_t using %ld, cast arg to long.
+
2025-07-10 James K. Lowden <jklowden@cobolworx.com>
PR cobol/120765
diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index 7920232..29a8cb5 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -329,7 +329,7 @@
(define_expand "mov<mode>"
[(set (match_operand:V_32 0 "nonimmediate_operand")
- (match_operand:V_32 1 "nonimmediate_operand"))]
+ (match_operand:V_32 1 "nonimm_or_0_operand"))]
""
{
ix86_expand_vector_move (<MODE>mode, operands);
@@ -339,7 +339,7 @@
(define_insn "*mov<mode>_internal"
[(set (match_operand:V_32 0 "nonimmediate_operand"
"=r ,m ,v,v,v,m,r,v")
- (match_operand:V_32 1 "general_operand"
+ (match_operand:V_32 1 "nonimm_or_0_operand"
"rmC,rC,C,v,m,v,v,r"))]
"!(MEM_P (operands[0]) && MEM_P (operands[1]))
&& ix86_hardreg_mov_ok (operands[0], operands[1])"
@@ -457,7 +457,7 @@
(define_expand "movv2qi"
[(set (match_operand:V2QI 0 "nonimmediate_operand")
- (match_operand:V2QI 1 "nonimmediate_operand"))]
+ (match_operand:V2QI 1 "nonimm_or_0_operand"))]
""
{
ix86_expand_vector_move (V2QImode, operands);
@@ -467,9 +467,10 @@
(define_insn "*movv2qi_internal"
[(set (match_operand:V2QI 0 "nonimmediate_operand"
"=r,r,r,m ,v,v,v,jm,m,r,v")
- (match_operand:V2QI 1 "general_operand"
+ (match_operand:V2QI 1 "nonimm_or_0_operand"
"r ,C,m,rC,C,v,m,x,v,v,r"))]
- "!(MEM_P (operands[0]) && MEM_P (operands[1]))"
+ "!(MEM_P (operands[0]) && MEM_P (operands[1]))
+ && ix86_hardreg_mov_ok (operands[0], operands[1])"
{
switch (get_attr_type (insn))
{
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2944f22..b0928d0 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,41 @@
+2025-07-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/119064
+ * cp-tree.h: Implement C++26 P2786R13 - Trivial Relocatability.
+ (struct lang_type): Add trivially_relocatable,
+ trivially_relocatable_computed, replaceable and replaceable_computed
+ bitfields. Change width of dummy from 2 to 30.
+ (CLASSTYPE_TRIVIALLY_RELOCATABLE_BIT,
+ CLASSTYPE_TRIVIALLY_RELOCATABLE_COMPUTED, CLASSTYPE_REPLACEABLE_BIT,
+ CLASSTYPE_REPLACEABLE_COMPUTED): Define.
+ (enum virt_specifier): Add VIRT_SPEC_TRIVIALLY_RELOCATABLE_IF_ELIGIBLE
+ and VIRT_SPEC_REPLACEABLE_IF_ELIGIBLE enumerators.
+ (trivially_relocatable_type_p, replaceable_type_p): Declare.
+ * cp-trait.def (IS_NOTHROW_RELOCATABLE, IS_REPLACEABLE,
+ IS_TRIVIALLY_RELOCATABLE): New traits.
+ * parser.cc (cp_parser_class_property_specifier_seq_opt): Handle
+ trivially_relocatable_if_eligible,
+ __trivially_relocatable_if_eligible, replaceable_if_eligible and
+ __replaceable_if_eligible.
+ (cp_parser_class_head): Set CLASSTYPE_REPLACEABLE_BIT
+ and/or CLASSTYPE_TRIVIALLY_RELOCATABLE_BIT if corresponding
+ conditional keywords were parsed and assert corresponding *_COMPUTED
+ macro is false.
+ * pt.cc (instantiate_class_template): Copy over also
+ CLASSTYPE_TRIVIALLY_RELOCATABLE_{BIT,COMPUTED} and
+ CLASSTYPE_REPLACEABLE_{BIT,COMPUTED} bits.
+ * semantics.cc (referenceable_type_p): Move definition earlier.
+ (trait_expr_value): Handle CPTK_IS_NOTHROW_RELOCATABLE,
+ CPTK_IS_REPLACEABLE and CPTK_IS_TRIVIALLY_RELOCATABLE.
+ (finish_trait_expr): Likewise.
+ * tree.cc (default_movable_type_p): New function.
+ (union_with_no_declared_special_member_fns): Likewise.
+ (trivially_relocatable_type_p): Likewise.
+ (replaceable_type_p): Likewise.
+ * constraint.cc (diagnose_trait_expr): Handle
+ CPTK_IS_NOTHROW_RELOCATABLE, CPTK_IS_REPLACEABLE and
+ CPTK_IS_TRIVIALLY_RELOCATABLE.
+
2025-07-10 Jakub Jelinek <jakub@redhat.com>
* cp-tree.h (struct lang_type): Add comment before key_method.
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 168c475..b4fadac 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,30 @@
+2025-07-11 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/106135
+ * decl.cc (build_sym): Emit an error if a symbol associated by
+ an IMPORT, ONLY or IMPORT, all statement is being redeclared.
+ (gfc_match_import): Parse and check the F2018 versions of the
+ IMPORT statement. For scopes other than and interface body, if
+ the symbol cannot be found in the host scope, generate it and
+ set it up such that gfc_fixup_sibling_symbols can transfer its
+ 'imported attribute' if it turnes out to be a not yet parsed
+ procedure. Test for violations of C897-8100.
+ * gfortran.h : Add 'import_only' to the gfc_symtree structure.
+ Add the enum, 'importstate', which is used for values the new
+ field 'import_state' in gfc_namespace.
+ * parse.cc (gfc_fixup_sibling_symbols): Transfer the attribute
+ 'imported' to the new symbol.
+ * resolve.cc (check_sym_import_status, check_import_status):
+ New functions to test symbols and expressions for violations of
+ F2018:C8102.
+ (resolve_call): Test the 'resolved_sym' against C8102 by a call
+ to 'check_sym_import_status'.
+ (gfc_resolve_expr): If the expression is OK and an IMPORT
+ statement has been registered in the current scope, test C102
+ by calling 'check_import_status'.
+ (resolve_select_type): Test the declared derived type in TYPE
+ IS and CLASS IS statements.
+
2025-07-08 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/120637
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index da085d1..0b893e8 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -1170,6 +1170,10 @@ A @code{CHARACTER} variable is declared with negative length.
With @option{-fopenmp}, for fixed-form source code, when an @code{omx}
vendor-extension sentinel is encountered. (The equivalent @code{ompx},
used in free-form source code, is diagnosed by default.)
+
+@item
+With @option{-fopenacc}, when using named constances with clauses that
+take a variable as doing so has no effect.
@end itemize
@opindex Wtabs
diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc
index fe0a47a..f1acc00 100644
--- a/gcc/fortran/openmp.cc
+++ b/gcc/fortran/openmp.cc
@@ -8895,15 +8895,21 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses,
if (list == OMP_LIST_MAP
&& n->sym->attr.flavor == FL_PARAMETER)
{
+ /* OpenACC since 3.4 permits for Fortran named constants, but
+ permits removing then as optimization is not needed and such
+ ignore them. Likewise below for FIRSTPRIVATE. */
if (openacc)
- gfc_error ("Object %qs is not a variable at %L; parameters"
- " cannot be and need not be copied", n->sym->name,
- &n->where);
+ gfc_warning (OPT_Wsurprising, "Clause for object %qs at %L is "
+ "ignored as parameters need not be copied",
+ n->sym->name, &n->where);
else
gfc_error ("Object %qs is not a variable at %L; parameters"
" cannot be and need not be mapped", n->sym->name,
&n->where);
}
+ else if (openacc && n->sym->attr.flavor == FL_PARAMETER)
+ gfc_warning (OPT_Wsurprising, "Clause for object %qs at %L is ignored"
+ " as it is a parameter", n->sym->name, &n->where);
else if (list != OMP_LIST_USES_ALLOCATORS)
gfc_error ("Object %qs is not a variable at %L", n->sym->name,
&n->where);
@@ -12756,9 +12762,21 @@ gfc_resolve_oacc_declare (gfc_namespace *ns)
&& (n->sym->attr.flavor != FL_PROCEDURE
|| n->sym->result != n->sym))
{
- gfc_error ("Object %qs is not a variable at %L",
- n->sym->name, &oc->loc);
- continue;
+ if (n->sym->attr.flavor != FL_PARAMETER)
+ {
+ gfc_error ("Object %qs is not a variable at %L",
+ n->sym->name, &oc->loc);
+ continue;
+ }
+ /* Note that OpenACC 3.4 permits name constants, but the
+ implementation is permitted to ignore the clause;
+ as semantically, device_resident kind of makes sense
+ (and the wording with it is a bit odd), the warning
+ is suppressed. */
+ if (list != OMP_LIST_DEVICE_RESIDENT)
+ gfc_warning (OPT_Wsurprising, "Object %qs at %L is ignored as"
+ " parameters need not be copied", n->sym->name,
+ &oc->loc);
}
if (n->expr && n->expr->ref->type == REF_ARRAY)
diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc
index a2e70fc..f3d7cd4 100644
--- a/gcc/fortran/trans-openmp.cc
+++ b/gcc/fortran/trans-openmp.cc
@@ -2792,8 +2792,13 @@ gfc_trans_omp_variable_list (enum omp_clause_code code,
gfc_omp_namelist *namelist, tree list,
bool declare_simd)
{
+ /* PARAMETER (named constants) are excluded as OpenACC 3.4 permits them now
+ as 'var' but permits compilers to ignore them. In expressions, it should
+ have been replaced by the value (and this function should not be called
+ anyway) and for var-using clauses, they should just be skipped. */
for (; namelist != NULL; namelist = namelist->next)
- if (namelist->sym->attr.referenced || declare_simd)
+ if ((namelist->sym->attr.referenced || declare_simd)
+ && namelist->sym->attr.flavor != FL_PARAMETER)
{
tree t = gfc_trans_omp_variable (namelist->sym, declare_simd);
if (t != error_mark_node)
@@ -4029,7 +4034,8 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
case OMP_LIST_MAP:
for (; n != NULL; n = n->next)
{
- if (!n->sym->attr.referenced)
+ if (!n->sym->attr.referenced
+ || n->sym->attr.flavor == FL_PARAMETER)
continue;
location_t map_loc = gfc_get_location (&n->where);
@@ -4986,7 +4992,8 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
case OMP_LIST_CACHE:
for (; n != NULL; n = n->next)
{
- if (!n->sym->attr.referenced)
+ if (!n->sym->attr.referenced
+ && n->sym->attr.flavor != FL_PARAMETER)
continue;
switch (list)
diff --git a/gcc/lra-constraints.cc b/gcc/lra-constraints.cc
index 274b52cd..c941d2f 100644
--- a/gcc/lra-constraints.cc
+++ b/gcc/lra-constraints.cc
@@ -2416,14 +2416,15 @@ process_alt_operands (int only_alternative)
if (curr_static_id->operand[nop].type == OP_INOUT
|| curr_static_id->operand[m].type == OP_INOUT)
break;
- /* Operands don't match. If the operands are
- different user defined explicit hard
+ /* Operands don't match. For asm if the operands
+ are different user defined explicit hard
registers, then we cannot make them match
when one is early clobber operand. */
if ((REG_P (*curr_id->operand_loc[nop])
|| SUBREG_P (*curr_id->operand_loc[nop]))
&& (REG_P (*curr_id->operand_loc[m])
- || SUBREG_P (*curr_id->operand_loc[m])))
+ || SUBREG_P (*curr_id->operand_loc[m]))
+ && INSN_CODE (curr_insn) < 0)
{
rtx nop_reg = *curr_id->operand_loc[nop];
if (SUBREG_P (nop_reg))
@@ -3328,19 +3329,15 @@ process_alt_operands (int only_alternative)
first_conflict_j = j;
last_conflict_j = j;
/* Both the earlyclobber operand and conflicting operand
- cannot both be user defined hard registers. */
+ cannot both be user defined hard registers for asm.
+ Let curr_insn_transform diagnose it. */
if (HARD_REGISTER_P (operand_reg[i])
&& REG_USERVAR_P (operand_reg[i])
&& operand_reg[j] != NULL_RTX
&& HARD_REGISTER_P (operand_reg[j])
- && REG_USERVAR_P (operand_reg[j]))
- {
- /* For asm, let curr_insn_transform diagnose it. */
- if (INSN_CODE (curr_insn) < 0)
+ && REG_USERVAR_P (operand_reg[j])
+ && INSN_CODE (curr_insn) < 0)
return false;
- fatal_insn ("unable to generate reloads for "
- "impossible constraints:", curr_insn);
- }
}
if (last_conflict_j < 0)
continue;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4aceccb..4f1b932 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,114 @@
+2025-07-11 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/state-diagram-1-sarif.py (test_xml_state):
+ Rename to...
+ (test_state_graph): ...this. Port from XML to SARIF graphs.
+ * gcc.dg/analyzer/state-diagram-1.c: Update sink option
+ from "sarif:xml-state=yes" to "sarif:state-graphs=yes".
+ * gcc.dg/analyzer/state-diagram-5-sarif.c: Likewise.
+ * gcc.dg/analyzer/state-diagram-5-sarif.py: Drop import of ET.
+ (test_nested_types_in_xml_state): Rename to...
+ (test_nested_types_in_state_graph): ...this. Port from XML to
+ SARIF graphs.
+ * gcc.dg/plugin/diagnostic-test-graphs-html.c: New test.
+ * gcc.dg/plugin/diagnostic-test-graphs-html.py: New test script.
+ * gcc.dg/plugin/diagnostic-test-graphs-sarif.c: New test.
+ * gcc.dg/plugin/diagnostic-test-graphs-sarif.py: New test script.
+ * gcc.dg/plugin/diagnostic-test-graphs.c: New test.
+ * gcc.dg/plugin/diagnostic_plugin_test_graphs.cc: New test plugin.
+ * gcc.dg/plugin/plugin.exp (plugin_test_list): Add the above.
+ * lib/sarif.py (get_xml_state): Delete.
+ (get_state_graph): New.
+ (def get_state_node_attr): New.
+ (get_state_node_kind): New.
+ (get_state_node_name): New.
+ (get_state_node_type): New.
+ (get_state_node_value): New.
+ * sarif-replay.dg/2.1.0-invalid/3.40.2-duplicate-node-id.sarif:
+ New test.
+ * sarif-replay.dg/2.1.0-invalid/3.41.4-unrecognized-node-id.sarif:
+ New test.
+ * sarif-replay.dg/2.1.0-valid/graphs-check-html.py: New test
+ script.
+ * sarif-replay.dg/2.1.0-valid/graphs-check-sarif-roundtrip.py: New
+ test script.
+ * sarif-replay.dg/2.1.0-valid/graphs.sarif: New test.
+
+2025-07-11 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ * gcc.target/powerpc/pr121007.c: New.
+
+2025-07-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/119064
+ * g++.dg/cpp26/feat-cxx26.C: Add test for
+ __cpp_trivial_relocatability.
+ * g++.dg/cpp26/trivially-relocatable1.C: New test.
+ * g++.dg/cpp26/trivially-relocatable2.C: New test.
+ * g++.dg/cpp26/trivially-relocatable3.C: New test.
+ * g++.dg/cpp26/trivially-relocatable4.C: New test.
+ * g++.dg/cpp26/trivially-relocatable5.C: New test.
+ * g++.dg/cpp26/trivially-relocatable6.C: New test.
+ * g++.dg/cpp26/trivially-relocatable7.C: New test.
+ * g++.dg/cpp26/trivially-relocatable8.C: New test.
+ * g++.dg/cpp26/trivially-relocatable9.C: New test.
+ * g++.dg/cpp26/trivially-relocatable10.C: New test.
+ * g++.dg/cpp26/trivially-relocatable11.C: New test.
+
+2025-07-11 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR target/121027
+ * gcc.target/aarch64/sve/acle/general/perm_1.c: New test.
+
+2025-07-11 Kyrylo Tkachov <ktkachov@nvidia.com>
+
+ * gcc.target/aarch64/simd/eor3_d.c: Add tests for DImode operands.
+
+2025-07-11 Kyrylo Tkachov <ktkachov@nvidia.com>
+
+ * gcc.target/aarch64/simd/bcax_d.c: Add tests for DImode arguments.
+
+2025-07-11 Kyrylo Tkachov <ktkachov@nvidia.com>
+
+ * gcc.target/aarch64/simd/eor3_d.c: New test.
+
+2025-07-11 Kyrylo Tkachov <ktkachov@nvidia.com>
+
+ * gcc.target/aarch64/simd/bcax_d.c: New test.
+
+2025-07-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/121034
+ * gcc.dg/vect/pr121034.c: New testcase.
+
+2025-07-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/120954
+ * c-c++-common/Warray-bounds-11.c: New test.
+
+2025-07-11 Jan Hubicka <hubicka@ucw.cz>
+
+ * g++.dg/lto/pr114790_0.C: New test.
+ * g++.dg/lto/pr114790_1.C: New test.
+
+2025-07-11 Jakub Jelinek <jakub@redhat.com>
+ Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/121023
+ * c-c++-common/musttail32.c: New test.
+
+2025-07-11 Hu, Lin1 <lin1.hu@intel.com>
+
+ PR target/91384
+ * gcc.target/i386/pr91384-1.c: New test.
+
+2025-07-11 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/106135
+ * gfortran.dg/import3.f90: Use -std=f2008 and comment on change
+ in error message texts with f2018.
+ * gfortran.dg/import12.f90: New test.
+
2025-07-10 Jakub Jelinek <jakub@redhat.com>
PR c++/120628
diff --git a/gcc/testsuite/gcc.dg/pr87600-1.c b/gcc/testsuite/gcc.dg/pr87600-1.c
index 3517957..9d74cad 100644
--- a/gcc/testsuite/gcc.dg/pr87600-1.c
+++ b/gcc/testsuite/gcc.dg/pr87600-1.c
@@ -1,5 +1,5 @@
/* PR rtl-optimization/87600 */
-/* { dg-do compile { target aarch64*-*-* arm*-*-* i?86-*-* powerpc*-*-* s390*-*-* x86_64-*-* } } */
+/* { dg-do compile { target aarch64*-*-* arm*-*-* i?86-*-* loongarch*-*-* powerpc*-*-* s390*-*-* x86_64-*-* } } */
/* { dg-options "-O2" } */
#include "pr87600.h"
diff --git a/gcc/testsuite/gcc.dg/pr87600-2.c b/gcc/testsuite/gcc.dg/pr87600-2.c
index e8a9f19..808ebe1 100644
--- a/gcc/testsuite/gcc.dg/pr87600-2.c
+++ b/gcc/testsuite/gcc.dg/pr87600-2.c
@@ -1,5 +1,5 @@
/* PR rtl-optimization/87600 */
-/* { dg-do compile { target aarch64*-*-* arm*-*-* i?86-*-* powerpc*-*-* s390*-*-* x86_64-*-* } } */
+/* { dg-do compile { target aarch64*-*-* arm*-*-* i?86-*-* loongarch*-*-* powerpc*-*-* s390*-*-* x86_64-*-* } } */
/* { dg-options "-O2" } */
#include "pr87600.h"
diff --git a/gcc/testsuite/gcc.dg/pr87600.h b/gcc/testsuite/gcc.dg/pr87600.h
index c89071eb..29f065e 100644
--- a/gcc/testsuite/gcc.dg/pr87600.h
+++ b/gcc/testsuite/gcc.dg/pr87600.h
@@ -7,6 +7,9 @@
#elif defined (__i386__)
# define REG1 "%eax"
# define REG2 "%edx"
+#elif defined (__loongarch__)
+# define REG1 "$t0"
+# define REG2 "$t1"
#elif defined (__powerpc__) || defined (__POWERPC__) || defined (__PPC__)
# define REG1 "r3"
# define REG2 "r4"
diff --git a/gcc/testsuite/gfortran.dg/goacc/parameter-3.f90 b/gcc/testsuite/gfortran.dg/goacc/parameter-3.f90
new file mode 100644
index 0000000..2c8aa61
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goacc/parameter-3.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+
+subroutine x
+ integer :: var
+ integer, parameter :: ilog = 0
+ integer, parameter :: array(*) = [11,22,33]
+ !$ACC DECLARE COPYIN(ilog, array, var, array) ! { dg-error "Symbol 'array' present on multiple clauses" }
+end subroutine x
+
+integer :: a
+integer, parameter :: b = 4
+integer, parameter :: c(*) = [1,2,3]
+
+!$acc parallel copy(a,c,b,c) ! { dg-error "Symbol 'c' present on multiple clauses" }
+!$acc end parallel
+end
diff --git a/gcc/testsuite/gfortran.dg/goacc/parameter-4.f90 b/gcc/testsuite/gfortran.dg/goacc/parameter-4.f90
new file mode 100644
index 0000000..aadd7cf
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goacc/parameter-4.f90
@@ -0,0 +1,26 @@
+! { dg-do compile }
+! { dg-additional-options "-fdump-tree-original" }
+
+subroutine x
+ integer :: var
+ integer, parameter :: ilog = 0
+ integer, parameter :: array(*) = [11,22,33]
+ !$ACC DECLARE COPYIN(ilog, array, var)
+end subroutine x
+
+integer :: a
+integer, parameter :: b = 4
+integer, parameter :: c(*) = [1,2,3]
+
+!$acc parallel copy(a,c,b)
+ a = c(2) + b
+!$acc end parallel
+
+!$acc parallel firstprivate(a,c,b)
+ a = c(2) + b
+!$acc end parallel
+end
+
+! { dg-final { scan-tree-dump-times "#pragma acc data map\\(to:var\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma acc parallel map\\(tofrom:a\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma acc parallel firstprivate\\(a\\)" 1 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/goacc/parameter.f95 b/gcc/testsuite/gfortran.dg/goacc/parameter.f95
index b581338..a9bde4a 100644
--- a/gcc/testsuite/gfortran.dg/goacc/parameter.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/parameter.f95
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-additional-options "-Wsurprising" }
module test
contains
@@ -6,37 +7,37 @@ contains
implicit none
integer :: i
integer, parameter :: a = 1
- !$acc declare device_resident (a) ! { dg-error "is not a variable" }
- !$acc data copy (a) ! { dg-error "not a variable" }
+ !$acc declare device_resident (a) ! (no warning here - for semi-good reasons)
+ !$acc data copy (a) ! { dg-warning "Clause for object 'a' at .1. is ignored as parameters need not be copied \\\[-Wsurprising\\\]" }
!$acc end data
- !$acc data deviceptr (a) ! { dg-error "not a variable" }
+ !$acc data deviceptr (a) ! { dg-warning "Clause for object 'a' at .1. is ignored as parameters need not be copied \\\[-Wsurprising\\\]" }
!$acc end data
- !$acc parallel private (a) ! { dg-error "not a variable" }
+ !$acc parallel private (a) ! { dg-warning "Clause for object 'a' at .1. is ignored as it is a parameter \\\[-Wsurprising\\\]" }
!$acc end parallel
- !$acc serial private (a) ! { dg-error "not a variable" }
+ !$acc serial private (a) ! { dg-warning "Clause for object 'a' at .1. is ignored as it is a parameter \\\[-Wsurprising\\\]" }
!$acc end serial
- !$acc host_data use_device (a) ! { dg-error "not a variable" }
+ !$acc host_data use_device (a) ! { dg-warning "Clause for object 'a' at .1. is ignored as it is a parameter \\\[-Wsurprising\\\]" }
!$acc end host_data
- !$acc parallel loop reduction(+:a) ! { dg-error "not a variable" }
+ !$acc parallel loop reduction(+:a) ! { dg-warning "Clause for object 'a' at .1. is ignored as it is a parameter \\\[-Wsurprising\\\]" }
do i = 1,5
enddo
!$acc end parallel loop
- !$acc serial loop reduction(+:a) ! { dg-error "not a variable" }
+ !$acc serial loop reduction(+:a) ! { dg-warning "Clause for object 'a' at .1. is ignored as it is a parameter \\\[-Wsurprising\\\]" }
do i = 1,5
enddo
!$acc end serial loop
!$acc parallel loop
do i = 1,5
- !$acc cache (a) ! { dg-error "not a variable" }
+ !$acc cache (a) ! { dg-warning "Clause for object 'a' at .1. is ignored as it is a parameter \\\[-Wsurprising\\\]" }
enddo
!$acc end parallel loop
!$acc serial loop
do i = 1,5
- !$acc cache (a) ! { dg-error "not a variable" }
+ !$acc cache (a) ! { dg-warning "Clause for object 'a' at .1. is ignored as it is a parameter \\\[-Wsurprising\\\]" }
enddo
!$acc end serial loop
- !$acc update device (a) ! { dg-error "not a variable" }
- !$acc update host (a) ! { dg-error "not a variable" }
- !$acc update self (a) ! { dg-error "not a variable" }
+ !$acc update device (a) ! { dg-warning "Clause for object 'a' at .1. is ignored as parameters need not be copied \\\[-Wsurprising\\\]" }
+ !$acc update host (a) ! { dg-warning "Clause for object 'a' at .1. is ignored as parameters need not be copied \\\[-Wsurprising\\\]" }
+ !$acc update self (a) ! { dg-warning "Clause for object 'a' at .1. is ignored as parameters need not be copied \\\[-Wsurprising\\\]" }
end subroutine oacc1
end module test
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 635778a..716a516 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,56 @@
+2025-07-11 Jakub Jelinek <jakub@redhat.com>
+
+ * libsupc++/exception_ptr.h: Implement C++26 P3748R0 - Inspecting
+ exception_ptr should be constexpr.
+ (std::exception_ptr_cast): Make constexpr, remove inline keyword. Add
+ static_asserts for Mandates. For if consteval use std::rethrow_exception,
+ catch it and return its address or nullptr.
+ * testsuite/18_support/exception_ptr/exception_ptr_cast.cc (E::~E): Add
+ constexpr.
+ (G::G): Likewise.
+ (test01): Likewise. Return bool and take bool argument, throw if the
+ argument is true. Add static_assert(test01(false)).
+ (main): Call test01(true) in try.
+
+2025-07-11 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/cpp_type_traits.h (__is_floating<__float128>):
+ Do not depend on __STRICT_ANSI__.
+ * include/bits/stl_algobase.h (__size_to_integer(__float128)):
+ Likewise.
+ * include/std/type_traits (__is_floating_point_helper<__float128>):
+ Likewise.
+
+2025-07-11 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/96710
+ * include/bits/cpp_type_traits.h (__is_integer): Define explicit
+ specializations for __int128.
+ (__memcpyable_integer): Remove explicit specializations for
+ __int128.
+ * include/bits/iterator_concepts.h (incrementable_traits):
+ Likewise.
+ (__is_signed_int128, __is_unsigned_int128, __is_int128): Remove.
+ (__is_integer_like, __is_signed_integer_like): Remove check for
+ __int128.
+ * include/bits/max_size_type.h: Remove all uses of __is_int128
+ in constraints.
+ * include/bits/ranges_base.h (__to_unsigned_like): Remove
+ overloads for __int128.
+ (ranges::ssize): Remove special case for __int128.
+ * include/bits/stl_algobase.h (__size_to_integer): Define
+ __int128 overloads for strict modes.
+ * include/ext/numeric_traits.h (__is_integer_nonstrict): Remove
+ explicit specializations for __int128.
+ * include/std/charconv (to_chars): Define overloads for
+ __int128.
+ * include/std/format (__format::make_unsigned_t): Remove.
+ (__format::to_chars): Remove.
+ * include/std/limits (numeric_limits): Define explicit
+ specializations for __int128.
+ * include/std/type_traits (__is_integral_helper): Likewise.
+ (__make_unsigned, __make_signed): Likewise.
+
2025-07-10 Jakub Jelinek <jakub@redhat.com>
PR c++/117785