This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PPC Linux Bugs, and a perplexing problem


On Sat, 26 Aug 2000, Brian Gough wrote:

> 3) Regarding BLAS and the corrupted arguments -- hopefully someone can
> explain that, it looks like a compiler problem. If so, a simple
> function like void foo (int a, int b, int c, ...) might show the same
> behavior for a sufficiently large number of arguments.

Okay, turns out to be a gcc compiler bug, fixed in later versions of gcc.
If anyone's interested, the following code tests for it...

Frank

=============================================================================
dnl Early versions of gcc-2.95.2 for PPC have a bug when passing lots
dnl of arguments; test for this...
dnl (This test assumes cross-compiling is okay: ...? )

if test x"$ac_cv_prog_gcc" = xyes; then
 AC_MSG_CHECKING([for PPC gcc bug])

 AC_TRY_RUN([
  #include<stdlib.h>
  int test4bug (void* v1,void* v2,void* v3,void* v4,void* v5,void* v6,void* v7,
                double* ptr_1,void* v8,double d,double* ptr_2)
  { return ((ptr_1 == ptr_2) ? 0 : 1); }
  int main ()
  { double ptr[] = {0}; exit (test4bug (0,0,0,0,0,0,0,ptr,0,0.0,ptr)); }
 ],
 ac_ppc_gcc_bug=no,
 ac_ppc_gcc_bug=yes,
 ac_ppc_gcc_bug=no)

 if test $ac_ppc_gcc_bug = yes; then
  AC_MSG_RESULT(yes)
  AC_MSG_ERROR([gsl will not compile correctly; please update your compiler])
 else
  AC_MSG_RESULT(no)
 fi
fi
=============================================================================
Francis James Franklin
<fjf@alinameridon.com>

Diodorus the professor of logic died of shame because he could not at once 
solve a problem put to him in jest by Stilpo.
                                                       --- Pliny the Elder


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]