On Tue, 24 Jan 2017, Maxim Ostapenko wrote:

> Hi,
> 
> as Richard pointed out in previous mail, v1 patch regresses compile-time by
> 100% on some fortran cases (PR 79165).
> Doing the linemap operation in build_translation_unit_decl confuses the
> linemap code too much, thus we propagate main_input_filename through DECL_NAME
> of TRANSLATION_UNIT_DECL instead of creating new source location.
> OK to install if regtest and bootstrap complete successfully? I've also
> checked that new patch doesn't introduce compile-time regression on aermod.f90
> testcase.

+      const_tree translation_unit_decl = get_translation_unit_decl 
(decl);
+      if (translation_unit_decl)
+       filename = IDENTIFIER_POINTER (DECL_NAME (translation_unit_decl));

please also check DECL_NAME is not NULL.

Ok with that change.

Thanks,
Richard.
 
> Thanks,
> -Maxim
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 
21284 (AG Nuernberg)

Reply via email to