Parhaps no problem, but for safety.

gcc/ChangeLog:

        * config/xtensa/xtensa.cc (xtensa_expand_prologue): Fix to check
        DF availability before use of DF_* macros.
---
 gcc/config/xtensa/xtensa.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc
index 66e25349521..e726a115029 100644
--- a/gcc/config/xtensa/xtensa.cc
+++ b/gcc/config/xtensa/xtensa.cc
@@ -3322,7 +3322,7 @@ xtensa_expand_prologue (void)
                                  || crtl->calls_eh_return;
 
       /* Check if the function body really needs the stack pointer.  */
-      if (!stack_pointer_needed)
+      if (!stack_pointer_needed && df)
        for (ref = DF_REG_USE_CHAIN (A1_REG);
             ref; ref = DF_REF_NEXT_REG (ref))
          if (DF_REF_CLASS (ref) == DF_REF_REGULAR
-- 
2.30.2
  • [PATCH] xtensa: Check DF avai... Takayuki 'January June' Suwa via Gcc-patches

Reply via email to