From c78feaa2173effd36467b7bad0458aadaf8b45b3 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Thu, 7 Apr 2016 05:29:27 -0400 Subject: [PATCH 23/91] FIXME: don't fixup UID 0 --- gcc/read-rtl.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index e56bf42..beec35c 100644 --- a/gcc/read-rtl.c +++ b/gcc/read-rtl.c @@ -1318,17 +1318,20 @@ read_rtx_code (const char *code_name) XEXP (return_rtx, i) = read_nested_rtx (); #else { - /* The RTL file recorded the ID of an insn; we must store this - as a pointer, but the insn might not have been loaded yet. - Store this away for now. */ + /* The RTL file recorded the ID of an insn (or 0 for NULL); we + must store this as a pointer, but the insn might not have + been loaded yet. Store the ID away for now. */ read_name (&name); int insn_id = atoi (name.string); - fprintf (stderr, - "FIXME: would store insn %i into field %i of %s %p\n", - insn_id, i, code_name, (void *)return_rtx); - file_location loc = rtx_reader_ptr->get_current_location (); - fixup f (loc, return_rtx, i, insn_id); - fixups.safe_push (f); + if (insn_id) + { + fprintf (stderr, + "FIXME: would store insn %i into field %i of %s %p\n", + insn_id, i, code_name, (void *)return_rtx); + file_location loc = rtx_reader_ptr->get_current_location (); + fixup f (loc, return_rtx, i, insn_id); + fixups.safe_push (f); + } } #endif break; -- 1.8.5.3