lto_get_builtin_tree uses built_in_decls but that is only for the built_in_class of BUILT_IN_NORMAL. The back-ends have their own array with the builtins in them for the class of BUILT_IN_MD. So currently we translate all of the back-end builtins into "normal" builtins.
This is why gcc.dg/vmx/3a-03.c currently fails; Most likely all of the vmx testsuite in fact. In that example __builtin_altivec_vrefp is changed when reading back the file into __builtin_lgammal. -- Summary: Back-end builtins are mishandled Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: wrong-code, ice-on-valid-code, link-failure Severity: normal Priority: P3 Component: lto AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41638