https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96383
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Eric Botcazou from comment #12) > > So with the attached 'updated patch' I see > > > > === gnat tests === > > > > > > Running target unix/ > > FAIL: gnat.dg/debug11_pkg.adb scan-assembler-not foreign_imported_func > > FAIL: gnat.dg/debug9.adb scan-assembler-times \\\\(DIE \\\\(0x[a-f0-9]*\\\\) > > DW_ > > TAG_type_unit\\\\) 0 > > > > where the first FAIL seems obvious from the name of 'foreign_imported_func' > > and the changed outcome is expected and OK? > > The annoying thing is the discrepancy with the variable case; in other > words, the patch is undercutting gnat_write_global_declarations > (utils.c:5913). So, for Ada, would you like to preserve current behavior rather than what Richard's patch does? If so, can't we have a langhook that decides that? I don't know much about Ada, but would think that having the prototypes even for functions defined in other shared libraries if they are called or referenced in the TU is useful even for Ada.