GSoC 2019: POSIX Compliance - FENV Environment probably not working properly in RISCV

Vaibhav Gupta vaibhavgupta40 at gmail.com
Sun Aug 11 15:06:08 UTC 2019


My code of testsuite:
===============================================
  /* Test 'FE_DIVBYZERO' */
  puts( "\nDivide by zero and confirm fetestexcept()." );
  a = 0.0;
  b = 1.0;
  c = b/a;
  printf("\n%d",FE_DIVBYZERO);
  fegetexceptflag(&excepts,FE_ALL_EXCEPT);
  printf("\n%d",excepts);
  r = feraiseexcept(FE_DIVBYZERO);
  printf("\n%d\n",r);
  rtems_test_assert( fetestexcept( FE_DIVBYZERO ) );
==============================================
OUTPUT
==============================================
Divide by zero and confirm fetestexcept().

8
0
1
/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/psxtests/psxfenv01/init.c:
84 fetestexcept( FE_DIVBYZERO )
==============================================
EXPECTED OUTPUT
==============================================
Divide by zero and confirm fetestexcept().

8
8
0
==============================================
- fetestexcept( FE_DIVBYZERO ), should return a non-zero value as
division-by-zero was performed.
.
- feraiseexcept(FE_DIVBYZERO); is also not working. It should return zero
when successful
.
==============================================

Thank You
Vaibhav Gupta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190811/bd985a0b/attachment.html>


More information about the devel mailing list