https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100468
--- Comment #3 from rguenther at suse dot de <rguenther at suse dot de> --- On Fri, 7 May 2021, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100468 > > Jakub Jelinek <jakub at gcc dot gnu.org> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |jakub at gcc dot gnu.org > > --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- > What I fear is that we have some temporary with a const initializer, extend > its > lifetime by taking a reference, have another temporary with the same const > initializer, extend its lifetime by taking a reference and compare the > addresses of those two references. As those are different temporaries, their > addresses should be different, shouldn't they? If you're thinking of a specific case maybe you can come up with a testcase we can add? The testsuite comes out clean with the suggested change.