public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Reporting lto bugs
@ 2021-09-24  1:43 Eugene Rozenfeld
  2021-09-24  7:35 ` Richard Biener
  0 siblings, 1 reply; 3+ messages in thread
From: Eugene Rozenfeld @ 2021-09-24  1:43 UTC (permalink / raw)
  To: gcc

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?

Thanks,

Eugene

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Reporting lto bugs
  2021-09-24  1:43 Reporting lto bugs Eugene Rozenfeld
@ 2021-09-24  7:35 ` Richard Biener
  2021-09-25  2:00   ` [EXTERNAL] " Eugene Rozenfeld
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2021-09-24  7:35 UTC (permalink / raw)
  To: Eugene Rozenfeld; +Cc: gcc

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [EXTERNAL] Re: Reporting lto bugs
  2021-09-24  7:35 ` Richard Biener
@ 2021-09-25  2:00   ` Eugene Rozenfeld
  0 siblings, 0 replies; 3+ messages in thread
From: Eugene Rozenfeld @ 2021-09-25  2:00 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc

My scenario is not cygwin. It's linux cross-compile x86_64 to aarch64 in an Ubuntu vm so I believe this should produce line info with -flto -g yet I see "No Line Number Statements" after Directory Table and File Name Table in the output of objdump -g.
DWARF Version is 4.
I verified that I get line numbers if I don't specify -flto.
I have all the lto1 commands and I'd like to try to debug this myself first. Do you have any tips on how to debug this?

Thanks,

Eugene

-----Original Message-----
From: Richard Biener <richard.guenther@gmail.com> 
Sent: Friday, September 24, 2021 12:36 AM
To: Eugene Rozenfeld <Eugene.Rozenfeld@microsoft.com>
Cc: gcc@gcc.gnu.org
Subject: [EXTERNAL] Re: Reporting lto bugs

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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fbugs%2F&amp;data=04%7C01%7CEugene.Rozenfeld%40microsoft.com%7Cb7b3ef43536943c30e3108d97f2df355%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637680657602091864%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=yGG5QtNDKjD0z4Q%2FcNmuwx5CZV8cElqGetmfmYzAwjA%3D&amp;reserved=0 seem to cover non-lto compilations.
> For MSVC there is an easy way to collect linker repro files for ltcg: 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs
> .microsoft.com%2Fen-us%2Fcpp%2Foverview%2Fhow-to-report-a-problem-with
> -the-visual-cpp-toolset%3Fview%3Dmsvc-160%23link-repros&amp;data=04%7C
> 01%7CEugene.Rozenfeld%40microsoft.com%7Cb7b3ef43536943c30e3108d97f2df3
> 55%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637680657602101859%7CU
> nknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1ha
> WwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WhtAKrM1LoveH1Jbi3Ulhrp7hUdXJ46hgh1
> osT%2BB1nc%3D&amp;reserved=0
> 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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fwiki%2FA_guide_to_testcase_reduction%23Reducing_LTO_bugs&amp;data=04%7C01%7CEugene.Rozenfeld%40microsoft.com%7Cb7b3ef43536943c30e3108d97f2df355%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637680657602101859%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=GExhyUNJvSQgMPrSGccVj8woBTLahYVAjI%2FBvQ79QMo%3D&amp;reserved=0

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-25  2:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24  1:43 Reporting lto bugs Eugene Rozenfeld
2021-09-24  7:35 ` Richard Biener
2021-09-25  2:00   ` [EXTERNAL] " Eugene Rozenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).