Could someone please clarify this for me?

Comments in gcc/testsuite/gfortran.dg/round_4.f90 imply that the test in
its existing form will not work for IBM long double, and it is disabled for
powerpc*-*-linux.
This should apply to macOS just as well, however superficially it does not:
for powerpc*-apple-darwin the test is not excluded, and moreover, it
actually reports as passing on 32-bit powerpc.

This looks wrong, and indeed IBM long double does not support rounding
modes aside of to_nearest. See also:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59666

Furthermore, the test is supposed to use IEEE arithmetic module, which
presently does not even exist for macOS on PowerPC. How come it reports
itself as passing?

The context of my query is that I am adding support for IEEE arithmetic for
macOS, and with it being enabled, round_4.f90 test fails at Stop 4 (that
is, for 16-byte values), which looks correct to me.

Assuming the test should fail by design for IBM long double, perhaps it
should rather use 16-byte part conditionally?
If that is not possible or not desirable for w/e reason, the test perhaps
should be skipped for powerpc*-apple-darwin as it is done for Linux.

I.e., it should have:

{ dg-skip-if "IBM long double 31 bits of precision, test requires 38" {
powerpc*-*-darwin* powerpc*-*-linux* } }

Reply via email to