In infrun.c's resume_1 function, move the definition of the local
variable PC down to its first use.  This is useful if the thread we want
to resume is already gone with a pending exit event, because we avoid
the error we would see otherwise when trying to read the PC.
gdb/ChangeLog:
2020-05-14  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
	* infrun.c (resume_1): Move a 'regcache_read_pc' call down to first
	use.
+2020-05-14  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
+
+       * infrun.c (resume_1): Move a 'regcache_read_pc' call down to first
+       use.
+
 2020-05-14  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
 
        * regcache.c (regcache_read_pc_protected): New function
 
   struct regcache *regcache = get_current_regcache ();
   struct gdbarch *gdbarch = regcache->arch ();
   struct thread_info *tp = inferior_thread ();
-  CORE_ADDR pc = regcache_read_pc (regcache);
   const address_space *aspace = regcache->aspace ();
   ptid_t resume_ptid;
   /* This represents the user's step vs continue request.  When
       step = 0;
     }
 
+  CORE_ADDR pc = regcache_read_pc (regcache);
+
   if (debug_infrun)
     fprintf_unfiltered (gdb_stdlog,
                        "infrun: resume (step=%d, signal=%s), "