https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124293
Bug ID: 124293
Summary: [caf_shmem] Some older systems do not have dprintf
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jvdelisle at gcc dot gnu.org
Target Milestone: ---
Iain S reports that on some of his older systems, dprintf used in
caf/shmem/supervisor.c do not have dprintf. An obvious fix is to replace these
with fprintf. It is not obvous why dprintf was used in three places.
Here is the obvious fix:
diff --git a/libgfortran/caf/shmem/supervisor.c
b/libgfortran/caf/shmem/supervisor.c
index 780ab4a45c0..50a00155334 100644
--- a/libgfortran/caf/shmem/supervisor.c
+++ b/libgfortran/caf/shmem/supervisor.c
@@ -441,7 +441,7 @@ supervisor_main_loop (int *argc __attribute__ ((unused)),
}
else
{
- dprintf (2,
+ fprintf (stderr,
"ERROR: Image %d(pid: %d) failed with signal %d, "
"exitstatus %d.\n",
j + 1, finished_pid, WTERMSIG (chstatus),
@@ -450,15 +450,14 @@ supervisor_main_loop (int *argc __attribute__ ((unused)),
{
if (finished_pid == getpid ())
{
- dprintf (
- 2,
+ fprintf (stderr,
"WARNING: Supervisor process got signal %d. Killing "
"childs and exiting.\n",
WTERMSIG (chstatus));
kill_all_images (m);
exit (1);
}
- dprintf (2,
+ fprintf (stderr,
"WARNING: Got signal %d for unknown process %d. "
"Ignoring and trying to continue.\n",
WTERMSIG (chstatus), finished_pid);