It looks like the original message was dropped, resending. Doug ________________________________________ From: Doug Gilmore Sent: Tuesday, September 20, 2016 2:12 PM To: gcc-patches@gcc.gnu.org; rgue...@gcc.gnu.org Subject: [PATCH] Fix PR tree-optimization/77654
From: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77654 Richard Biener wrote: > Looks good though addr_base should always be a pointer but it might > not be an SSA name so better check that... I took a look at other situations where duplicate_ssa_name_ptr_info() is called and found that there are no checks for the SSA name since that check is done in duplicate_ssa_name_ptr_info(). Do you still want the additional check added? Also does it make sense to make a test case for this? I was thinking of making the following change to: diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 8051a66..b799c43 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -296,7 +296,16 @@ ptr_derefs_may_alias_p (tree ptr1, tree ptr2) pi1 = SSA_NAME_PTR_INFO (ptr1); pi2 = SSA_NAME_PTR_INFO (ptr2); if (!pi1 || !pi2) - return true; + { + if (dump_file) + { + if (! pi1) + fprintf (dump_file, "%s pi1 is NULL\n", __FUNCTION__); + if (! pi2) + fprintf (dump_file, "%s pi2 is NULL\n", __FUNCTION__); + } + return true; + } Then when compiling the test case, we could scan for the RE "pi. is NULL" in the dump file created by compiling with -fdump-rtl-sched2. I attached the original patch. Thanks, Doug gcc/ PR tree-optimization/77654 * tree-ssa-alias.c (issue_prefetch_ref): Add call to duplicate_ssa_name_ptr_info.