https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125187

--- Comment #2 from Oliver Schönrock <oschonrock at gmail dot com> ---
(In reply to Drea Pinski from comment #1)
> >triggered by {fmt}
> 
> Which version?

As per the CMakeLists.txt above. fmt version=12.1 
But I have also tested it for fmt trunk, and it's the same. 

The reason for including a CMakeLists.txt, and to make a repo, was to ensure
that the situation is reproducible. 

> Can you attached the preprocessed source?

I did read that in the guideleines, but to be honest, I wasn't sure what that
means in this case. This is a linktime/LTO issue. 

So if you used the provided repo, and passed `-v` to `cmake --build`  you would
see that there are multiple TUs being compiled into .o files for fmt which are
linked together into a `.a`. 

Then there is the trivial 4 line `ub.cpp` which is also compiled as a separate
TU into a .o. 

And only then is the linker invoked, on the fmt.a and the ub.o and LTO kicks in
(which is necessary to reproduce this issue), and then the warning occurs. 

So which "precompiled source" would you like me to include? Let me know, and I
am happy to attach it.

Reply via email to