Message ID | orr0wlea1j.fsf@lxoliva.fsfla.org |
---|---|
State | New |
Headers | show |
Series | [01/13] scoped tables: insert before further lookups | expand |
On 12/26/22 21:38, Alexandre Oliva via Gcc-patches wrote: > > When decl is NULL, don't record its mapping in the > decl_to_instance_map. > > Regstrapped on x86_64-linux-gnu. Ok to install? > > > for gcc/ada/ChangeLog > > * gcc-interface/trans.cc (Sloc_to_locus): Don't map NULL decl. OK assuming that a NULL "decl" is valid -- you're in a much better position than me to assess validity of a NULL "decl" here. jeff
>> When decl is NULL, don't record its mapping in the >> decl_to_instance_map. >> Regstrapped on x86_64-linux-gnu. Ok to install? >> for gcc/ada/ChangeLog >> * gcc-interface/trans.cc (Sloc_to_locus): Don't map NULL decl. > OK assuming that a NULL "decl" is valid -- you're in a much better position than me to assess validity of a NULL "decl" here. I confirm that this is OK and expected. Arno
diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc index 59332f93614a9..6579ad11cc284 100644 --- a/gcc/ada/gcc-interface/trans.cc +++ b/gcc/ada/gcc-interface/trans.cc @@ -10564,7 +10564,7 @@ Sloc_to_locus (Source_Ptr Sloc, location_t *locus, bool clear_column, *locus = linemap_position_for_line_and_column (line_table, map, line, column); - if (file_map && file_map[file - 1].Instance) + if (decl && file_map && file_map[file - 1].Instance) decl_to_instance_map->put (decl, file_map[file - 1].Instance); return true;