https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108426

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Simple fix until we figure out if the go front-end should be initializing these
builtins are not:
diff --git a/gcc/tree-ssa-loop-niter.cc b/gcc/tree-ssa-loop-niter.cc
index 65b960461ae..0a0873bb572 100644
--- a/gcc/tree-ssa-loop-niter.cc
+++ b/gcc/tree-ssa-loop-niter.cc
@@ -2246,6 +2246,9 @@ build_cltz_expr (tree src, bool leading, bool
define_at_zero)
   else
     return NULL_TREE;

+  if (!use_ifn && !fn)
+    return NULL_TREE;
+
   tree call;
   if (use_ifn)
     {

Reply via email to