Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#879 closed defect (invalid)

Tests: Assert failure in library-test.scm on MinGW

Reported by: Leonardo Valeri Manera Owned by:
Priority: minor Milestone: 4.9.0
Component: unknown Version: 4.7.x
Keywords: Cc:
Estimated difficulty:

Description

"gcc" "a.c" -o "a.o" -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -march=native -O2 -IC:/Dev/MinGW32/include -IC:/Dev/GnuWin32/include -I.. -I"C:/Dev/Chicken/include/chicken"
rm a.c
"gcc" "a.o" -o "a.out" -Wl,--enable-auto-import -LC:/Dev/MinGW32/lib -LC:/Dev/GnuWin32/lib -L.. -L"C:/Dev/Chicken/lib" -lchicken -lm -lws2_32
rm a.o

Error: (library-tests.scm:204) assertion failed: (= (atan 42. 1.2) (fpatan2 42. 1.2))

Some naive testing of the above in csi and csc yields identical numbers from both functions. MinGW is lastest stable.

Attachments (2)

check.log (18.3 KB) - added by Leonardo Valeri Manera 10 years ago.
Log of entire make check run.
a.zip (67.3 KB) - added by Leonardo Valeri Manera 10 years ago.
As requested, .c output attached

Download all attachments as: .zip

Change History (10)

Changed 10 years ago by Leonardo Valeri Manera

Attachment: check.log added

Log of entire make check run.

comment:1 Changed 10 years ago by Leonardo Valeri Manera

Since I was unclear in description, this is core @ ac0a3d132f772da5c543288af6d0d33f66c8fecb from Sat, June 30.

Changed 10 years ago by Leonardo Valeri Manera

Attachment: a.zip added

As requested, .c output attached

comment:2 Changed 10 years ago by sjamaan

This C output, when compiled with gcc on a BSD box and linked against master's libchicken runs and exits with exit code 0, without printing anything. This is the expected behavior, so the code generation is fine.

comment:3 Changed 10 years ago by Leonardo Valeri Manera

I added

printf("%lf, %lf\n",  C_flonum_magnitude(t3), C_flonum_magnitude(t4));

to the else branch as per your request, and manually compiled using the gcc calls from the log:

c:\Dev\_src\chicken\trunk\tests>a.exe
-0.000000, 0.000000

Something seems off here ...

comment:4 Changed 10 years ago by sjamaan

Strangely, the value printed by (print (atan 42. 1.2)) is 1.5422326689561365 in both interpreted and compiled mode...

comment:5 Changed 10 years ago by Leonardo Valeri Manera

Problem caused by -O2, close?

comment:6 in reply to:  5 Changed 10 years ago by sjamaan

Replying to Taverius:

Problem caused by -O2, close?

Unsure. Felix?

comment:7 Changed 10 years ago by sjamaan

Resolution: invalid
Status: newclosed

Never mind, we just discussed this and it turns out the -O2 is due to local tweaks to the MingW system that cause it to build with -O2; Chicken doesn't do that by default.

comment:8 Changed 10 years ago by felix winkelmann

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.