[PATCH v2][PR lto/79061] Fix LTO plus ASAN fails with "AddressSanitizer: initialization-order-fiasco".

Richard Biener rguenther@suse.de
Tue Jan 24 10:24:00 GMT 2017


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 <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)



More information about the Gcc-patches mailing list