Subject: port-sparc64/14101: assign 'double variable' to 'size_t variable' fails
To: None <gnats-bugs@gnats.netbsd.org>
From: None <taya@ba2.so-net.ne.jp>
List: netbsd-bugs
Date: 09/30/2001 10:56:55
>Number:         14101
>Category:       port-sparc64
>Synopsis:       assign 'double variable' to 'size_t variable' fails
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 29 18:57:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Shin'ichiro TAYA
>Release:        2001/09/29
>Organization:
	
>Environment:
	
System: NetBSD turtle13.m2g.org 1.5Y NetBSD 1.5Y (BLADE100) #1: Sun Sep 30 19:32:07 JST 2001 taya@turtle13.m2g.org:/export/NetBSD/NetBSD-current/src/sys/arch/sparc64/compile/BLADE100 sparc64
Architecture: sparc64
Machine: sparc64
>Description:
	Assign 'double variable' to 'size_t variable' fails with or 
	without -msoft-quad-float.
	Because of this bug, awk doesn't work correctly.
        And this leads build failure of libedit and etc.
	
>How-To-Repeat:
	root@turtle13# cat c.c
	#include        <stdio.h>

	main()
	{
		double  u;
		size_t  s;

		u = 3;
		s = u;

		printf("u = %g\n", u);
		printf("s = %ld\n", s);
	}
	root@turtle13# cc c.c
	root@turtle13# ./a.out 
	u = 3
	s = 4613937818241073152
	root@turtle13# cc -msoft-quad-float c.c
	root@turtle13# ./a.out 
	u = 3
	s = 0
	
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted: