On Fri, Sep 24, 2021 at 3:45 AM Eugene Rozenfeld via Gcc
<gcc@gcc.gnu.org> wrote:
>
> I ran into a bug with lto: no line number info gets emitted when building my 
> project with -flto and -g (with gcc 8.2). I'd like to provide a repro in the 
> bug report but I don't know if there is an easy way to collect everything.
> The instructions at https://gcc.gnu.org/bugs/ seem to cover non-lto 
> compilations.
> For MSVC there is an easy way to collect linker repro files for ltcg: 
> https://docs.microsoft.com/en-us/cpp/overview/how-to-report-a-problem-with-the-visual-cpp-toolset?view=msvc-160#link-repros
> Is there something similar for GCC?

We generally prefer preprocessed sources here as with other bugs - for
LTO that might mean including
quite a bunch of files but there's instructions on the wiki on how to
reduce LTO testcases:
https://gcc.gnu.org/wiki/A_guide_to_testcase_reduction#Reducing_LTO_bugs

Note that for mingw and cygwin you likely run into the issue that LTO
does not support -g there (sic),
see a similar issue for darwin (PR82005), there must be a bug for
mingw/cygwin as well but I can't
find it right now.

Richard.

> Thanks,
>
> Eugene

Reply via email to