Add an assert to leaf_function_p to ensure it is not called from a
commit6e0eb5c3537ca9a28f5580e5ef1f3d772f98d64e
authorwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 May 2017 15:58:33 +0000 (18 15:58 +0000)
committerwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 May 2017 15:58:33 +0000 (18 15:58 +0000)
tree8f1c7987efcffcb6c2d403a3ea483a1fdd783b71
parent6f3e4f4c018c26460427b45dbf8036dd43811d16
Add an assert to leaf_function_p to ensure it is not called from a
prolog or epilog sequence (which would incorrectly return true in a
non-leaf function).  There are several targets which still call
leaf_function_p, and while most appear safe or appear aware of the
issue, it is likely not all such calls are safe.  This check enables
any such latent bugs to be found.

    gcc/
* final.c (leaf_function_p): Check we are not in a sequence.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248240 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/final.c