|
From: | GNU bug Tracking System |
Subject: | [debbugs-tracker] bug#13386: closed (Fwd: bug#13342: Errors trying to build Guile 2.0.7) |
Date: | Wed, 30 Jan 2013 21:38:03 +0000 |
Your message dated Wed, 30 Jan 2013 22:37:07 +0100 with message-id <address@hidden> and subject line Re: bug#13342: Errors trying to build Guile 2.0.7 has caused the debbugs.gnu.org bug report #13342, regarding Fwd: bug#13342: Errors trying to build Guile 2.0.7 to be marked as done. (If you believe you have received this mail in error, please contact address@hidden) -- 13342: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13342 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---Subject: Fwd: bug#13342: Errors trying to build Guile 2.0.7 Date: Tue, 08 Jan 2013 11:08:22 -0500
Begin forwarded message:From: Peter Teeson <address@hidden>Subject: Re: bug#13342: Errors trying to build Guile 2.0.7Date: 7 January, 2013 8:21:59 PM ESTTo: Ludovic Courtès <address@hidden>Here is the result of my investigation - do you agree?Hi Ludo:On 2013-01-04, at 12:23 PM, Ludovic Courtès wrote:bad return from _expression_ `(f-sum -1 2000 -30000 40000000000)': expected 39999971999; got 39999972255FAIL: test-ffiThis is a known issue when building Guile with LLVM/Clang:http://bugs.gnu.org/10015http://bugs.gnu.org/10681It would be great if you could investigate.My hypothesis is that the scheme interpreter is not calculating the sum correctly based on the following:(0) First observe this"In Apple's version of GCC, both cc and gcc are actually symbolic links to the llvm-gcc compiler. Similarly, c++ and g++ are links to llvm-g++."(1) Also we note that 39999972255 - 39999971999 = 256!(2) This program//// main.c// testffi//// Created by Peter Teeson on 13-01-07.// Copyright (c) 2013 PHT Software. All rights reserved.//#include <stdio.h>#include <inttypes.h>int64_t test_ffi_sum (int8_t a, int16_t b,int32_t c, int64_t d);int64_t test_ffi_sum (int8_t a, int16_t b,int32_t c, int64_t d){printf("int64 d %" PRId64 " %#llX \n", d,d);printf("int32 c %" PRId32 " %#X \n", c,c);printf("int16 b %" PRId16 " %#X \n", b,b);printf("int08 a %" PRId8 " %#X \n", a,a);int64_t sum = d + c + b + a;printf("int64 sum %" PRId64 " %#llX \n", sum,sum);return sum;}int main(int argc, const char * argv[]){test_ffi_sum(-1, 2000, -30000, 40000000000);return 0;}(3) produces this outputint64 d 40000000000 0X9502F9000int32 c -30000 0XFFFF8AD0int16 b 2000 0X7D0int08 a -1 0XFFFFFFFFint64 sum 39999971999 0X9502F229F(4) This function in /guile-2.0.7/test-suite/standalone/test-ffi(+ -1 2000 -30000 40000000000);;;; Multiple int args of differing types;;(define f-sum(pointer->procedure int64 (dynamic-func "test_ffi_sum" lib)(list int8 int16 int32 int64)))(test (f-sum -1 2000 -30000 40000000000)(+ -1 2000 -30000 40000000000))might be the culprit and I am guessing that it is this _expression_which the scheme interpreter is calculating incorrectly. Probably related to -1;Since I am not familiar with the scheme/guile language I can't go any further than this without help.Let me know if I can do more.respect…..Peter
--- End Message ---
--- Begin Message ---Subject: Re: bug#13342: Errors trying to build Guile 2.0.7 Date: Wed, 30 Jan 2013 22:37:07 +0100 User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) tags 13342 notabug thanks Hello! Mark H Weaver <address@hidden> skribis: > FYI, I've posted about this to the libffi-discuss mailing list. > > http://sourceware.org/ml/libffi-discuss/2013/msg00012.html Thanks! So, according to <http://gcc.gnu.org/ml/gcc/2013-01/msg00449.html>, this is an LLVM bug. Peter: would you like to report it over at LLVM? Anyway, closing this bug now. Thanks! Ludo’.
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |