On Thu, 7 Nov 2013, Uros Bizjak wrote: > [uros@localhost test]$ gcc -lm -g fpex.c > [uros@localhost test]$ ./a.out > Floating point exception (core dumped) > [uros@localhost test]$ gcc -lm -g -m32 fpex.c > [uros@localhost test]$ ./a.out > [uros@localhost test]$
I see code of the form (testing compilation rather than execution): flds 4(%esp) flds 8(%esp) fmulp %st, %st(1) fstps 12(%esp) where the fstps should result in the exception, and glibc uses volatile in several places, conditional on __FLT_EVAL_METHOD__ != 0, to force a conversion to the semantic type (whether for correct results, or to ensure exceptions). -- Joseph S. Myers jos...@codesourcery.com