Thanks for the bug report, and please try the attached patch, which I've installed into Gnulib on Savannah.
From 67f60dc421f491d4dbc6674af0691ecac3751edc Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email protected]>
Date: Mon, 13 Apr 2026 14:01:36 -0700
Subject: [PATCH] error-h: port to Intel OneAPI icx 2026.0.0

Problem reported by Harmen Stoppels in:
https://lists.gnu.org/r/bug-gnulib/2026-04/msg00085.html
* m4/error_h.m4 (gl_ERROR_H): Plant an alarm in case error infloops.
---
 ChangeLog     |  5 +++++
 m4/error_h.m4 | 12 +++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 98ad290692..4d1ae29513 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2026-04-13  Paul Eggert  <[email protected]>
 
+	error-h: port to Intel OneAPI icx 2026.0.0
+	Problem reported by Harmen Stoppels in:
+	https://lists.gnu.org/r/bug-gnulib/2026-04/msg00085.html
+	* m4/error_h.m4 (gl_ERROR_H): Plant an alarm in case error infloops.
+
 	regex: omit unnecessary check_halt_state_context
 	* lib/regexec.c (prune_impossible_nodes):
 	Avoid unnecessary call to check_halt_state_context.
diff --git a/m4/error_h.m4 b/m4/error_h.m4
index 73e969430d..78cb57385c 100644
--- a/m4/error_h.m4
+++ b/m4/error_h.m4
@@ -1,5 +1,5 @@
 # error_h.m4
-# serial 5
+# serial 6
 dnl Copyright (C) 1996-2026 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -64,8 +64,18 @@ AC_DEFUN_ONCE([gl_ERROR_H]
          AC_LINK_IFELSE(
            [AC_LANG_PROGRAM([[
               #include <error.h>
+              #include <signal.h>
+              #ifdef SIGALRM
+              # include <unistd.h> /* for alarm */
+              #endif
               static void print_no_progname (void) {}
             ]], [[
+              /* error (0, 0, ...) infloops on Intel OneAPI icx 2026.0.0.  */
+              #ifdef SIGALRM
+                signal (SIGALRM, SIG_DFL);
+                alarm (2);
+              #endif
+
               error_print_progname = print_no_progname;
               error (0, 0, "foo");
             ]])
-- 
2.53.0

Reply via email to