This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
GCC 2.95.2 bug with float parameters
- To: bug-gcc at gnu dot org
- Subject: GCC 2.95.2 bug with float parameters
- From: Joe Weening <jweening at ccrwest dot org>
- Date: Wed, 19 Jan 2000 09:50:36 -0800 (PST)
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.