From 9044db88d634c631920eaa9f66c0275adf18fdf5 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sun, 20 Sep 2020 08:19:56 +0200 Subject: [PATCH] Fix ICE during dumping in ipa-modref. 2020-09-20 Jan Hubicka * ipa-modref.c (dump_lto_records): Fix ICE. --- gcc/ipa-modref.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c index f982ce94a75..af0b710333e 100644 --- a/gcc/ipa-modref.c +++ b/gcc/ipa-modref.c @@ -156,7 +156,7 @@ dump_lto_records (modref_records_lto *tt, FILE *out) fprintf (out, " Base %i:", (int)i); print_generic_expr (dump_file, n->base); fprintf (out, " (alias set %i)\n", - get_alias_set (n->base)); + n->base ? get_alias_set (n->base) : 0); if (n->every_ref) { fprintf (out, " Every ref\n"); @@ -169,7 +169,7 @@ dump_lto_records (modref_records_lto *tt, FILE *out) fprintf (out, " Ref %i:", (int)j); print_generic_expr (dump_file, r->ref); fprintf (out, " (alias set %i)\n", - get_alias_set (r->ref)); + r->ref ? get_alias_set (r->ref) : 0); } } } -- 2.30.2