# Test that cc -ffast-math disables denormals
# (fails due to PR 50940)

from bracket import make_sh_test_op

def op():
    return make_sh_test_op('denormal',
'''
cat <<\END >test.c
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char **argv) {
    float f = (float)atof(argv[1]) * (float)atof(argv[2]);
    printf("%g\n", f);
    printf("denormals are %sabled\n", (f == 0) ? "dis" : "en");
    return !(f == 0);
}
END
cc -O3 -ffast-math test.c -o test
./test 1e-20 1e-20
''')
