gimple-ssa-warn-access.cc is part of the compiler itself and is
compiled by the host compiler.  The host compiler need not provide
__builtin_unreachable.  Use gcc_unreachable instead, as elsewhere
in GCC.

Bootstrapped and regression-tested on x86_64-pc-linux-gnu
(default languages, --disable-multilib), with no new regressions
relative to the unmodified baseline.

Also tested with a non-GCC, EDG-based host compiler (GNU extensions
disabled) on a non-glibc platform, where the patch resolves a build
failure.

gcc/ChangeLog:

        * gimple-ssa-warn-access.cc (pass_waccess::set_pass_param): Use
        gcc_unreachable instead of __builtin_unreachable.

Signed-off-by: Shiva <[email protected]>
---
 gcc/gimple-ssa-warn-access.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/gimple-ssa-warn-access.cc b/gcc/gimple-ssa-warn-access.cc
index 2906ee7320f..98bbfd019ef 100644
--- a/gcc/gimple-ssa-warn-access.cc
+++ b/gcc/gimple-ssa-warn-access.cc
@@ -2261,7 +2261,7 @@ pass_waccess::set_pass_param (unsigned int n, bool param)
   else if (n == 1)
     m_check_dangling_p = param;
   else
-    __builtin_unreachable ();
+    gcc_unreachable ();
 }
 
 /* Return true when any checks performed by the pass are enabled.  */

Reply via email to