https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93874
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:2473c81cb2d4627f2d72310f4eca951c6084b596 commit r10-6837-g2473c81cb2d4627f2d72310f4eca951c6084b596 Author: Jakub Jelinek <ja...@redhat.com> Date: Tue Feb 25 10:21:34 2020 +0100 pass_manager: Fix ICE with -fdump-passes -fdisable-tree-* [PR93874] dump_passes pushes a dummy function for which it evaluates the gates and checks whether the pass is enabled or disabled. Unfortunately, if any -fdisable-*-*/-fenable-*-* options were seen, we ICE during is_pass_explicitly_enabled_or_disabled because slot is non-NULL then and the code will do: cgraph_uid = func ? cgraph_node::get (func)->get_uid () : 0; but the dummy function doesn't have a cgraph node. So, either we need to create and then remove a cgraph node for the dummy function like the following patch, or function.c would need to export the in_dummy_function flag (or have some way to query that flag from other TUs) and we'd need to check it in is_pass_explicitly_enabled_or_disabled. 2020-02-25 Jakub Jelinek <ja...@redhat.com> PR middle-end/93874 * passes.c (pass_manager::dump_passes): Create a cgraph node for the dummy function and remove it at the end. * gcc.dg/pr93874.c: New test.