This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

GCC 2.95.2 bug with float parameters


The following program exhibits a bug when compiled with gcc 2.95.2 on
a SPARC running Solaris 2.6:

#ifdef BUG
sub(a, b, c, d, e, f, g)
     int a, b, c, d, e, f;
     float g;
{
  printf("hello\n");
}
#else
sub(int a, int b, int c, int d, int e, int f, float g)
{
  printf("hello\n");
}
#endif

main()
{
  sub(0, 1, 2, 3, 4, 5, (float) 6.0);
}


If compiled with "-DBUG", the resulting program core dumps.  I've only
seen it happen with GCC version 2.95.2 (not 2.95.1), and only on SPARC.
It happens with or without -O.

The real-life program from which this was extracted was xfig-3.2.2.
When that program is compiled, the error occurs in pw_vector() which
is in the file w_drawprim.c.

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