[Bug tree-optimization/113054] [14 regressions] ODR warnings when building new SCCP pass
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 18 16:36:14 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113054
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:
https://gcc.gnu.org/g:4554a151d0ec62332c332175ec1017f853006b60
commit r14-6663-g4554a151d0ec62332c332175ec1017f853006b60
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date: Mon Dec 18 08:18:13 2023 -0800
SCCP: Fix ODR issues when compiling with LTO [PR 113054}
The problem here is that in C++ structs and classes have a
linkage too so the type vertex is not considered local to
the TU but will conflict with the globally defined one
in graphds.h. The simple way to fix this is to wrap the ones
defined locally in gimple-ssa-sccopy.cc inside an anonymous namespace
and they are now considered locally to that TU.
Committed as obvious after a bootstrap/test on x86_64.
gcc/ChangeLog:
PR tree-optimization/113054
* gimple-ssa-sccopy.cc: Wrap the local types
with an anonymous namespace.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
More information about the Gcc-bugs
mailing list