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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |middle-end

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
  /* Avoid diagnosing an apparently infinitely recursive function that
     doesn't return where the infinite recursion might be avoided by
     a call to another noreturn function.  */
  noreturn_p = lookup_attribute ("noreturn", DECL_ATTRIBUTES (m_func->decl));


This is the wrong check. It should use "flags_from_decl_or_type (m_func->decl)
& ECF_NOTHROW" instead or even just TREE_THIS_VOLATILE here.

Reply via email to