GNAT will expect the body of a separate unit by default to be in files with such names, but that has nothing to do with the language. Ada requires that separate units have unique names, regardless of where or how they are stored, and what compiler you use.
That is a common misinterpretation that file names have to be like they are used with GNAT. And even GNAT can deviate from this scheme.
Ada as the language has nothing to say about how compilation units are stored!
If you aren’t worried about the two functions being in the same separated file, then you can also do something like this
fu.ads
package fu_functions is
function fu1 return Integer;
function fu1 return Float;
end package fu_functions ;
fu.adb
package body fu is
package fu_functions is
function fu1 return Integer;
function fu1 return Float;
end package fu_functions ;
package body fu_functions is separate;
function fu1 return Integer renames fu_functions.fu1;
function fu1 return Float renames fu_functions.fu1;
end fu;
fu-fu_functions.adb
separate
(fu)
package body fu_functions is
function fu1 return Integer is (0);
function fu1 return Float is (0.0)
end package fu_functions ;
If you truly want each fu1 in a completely separate file then I do like Nordic_Dogsledding suggested
fu.ads
package fu_functions is
function fu1 return Integer;
function fu1 return Float;
end package fu_functions ;
fu.adb
package body fu is
function fu1_integer return Integer is separate;
function fu1_float return Float is separate;
function fu1 return Integer renames fu1_Integer;
function fu1 return Float renames fu1_float;
end fu;
fu-fu1_integer.adb
separate
(fu1)
function fu1_integer return Integer is (0);
fu-fu1_float.adb
separate
(fu1)
function fu1_float return Float is (0.0);