https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61886
Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2014-07-23 Assignee|unassigned at gcc dot gnu.org |hubicka at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> --- This is a difficult problem. In early cgraph days GCC code was converted to assume that there are never duplicated declarations of a given symbol. This is precisely what glibc does to keep these duplicates flow through the compilation. It is a long standing bug that we have such duplicate declarations and that we do not reject these as an error or fix internaly. A clear fix would be to make alias from glibc SO for fread_chk and fread_chk_warn that can be used for those two different calls. But without changling glibc's API we need to work out how to introduce the alias internally. We support similar bookeeping for wearkrefs that are "syntactic" aliases resulting in the same assembler name as their target. I suppose we can do the same here, but it is ugly - I would much preffer those hacks to not exist at all. I will try to prepare patch and see how contained it is. Honza