------- Comment #10 from hjl dot tools at gmail dot com  2009-07-21 02:48 
-------
[...@gnu-6 tmp]$ vi v.c
[...@gnu-6 tmp]$ cat v.c
#include <stdlib.h>
#define N 4
void
cvt_u4_f4(int n, unsigned int* u4, float* f4)
{
  int j;
  for (j=0; j<n; j++)
    f4[j]=u4[j];
}
unsigned int u4[N] =
  { 4000000000, 4000000000, 4000000000, 4000000000 };
float f4[N];

int main()
{
  int j;

  cvt_u4_f4(N, u4, f4);

  for (j=0; j<N; j++)
    if (f4[j] != 4000000000.0)
      abort ();
  return 0;
}
[...@gnu-6 tmp]$ gcc -O3 v.c
[...@gnu-6 tmp]$ ./a.out
Aborted
[...@gnu-6 tmp]$


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
      Known to fail|                            |4.3.4 4.4.0
      Known to work|                            |4.2.5 4.5.0
         Resolution|FIXED                       |
            Summary|[4.5 Regression] Failed SPEC|[4.3/4.4/4.5 Regression]
                   |CPU 2000                    |wrong conversion from
                   |                            |unsigned int to float
   Target Milestone|4.5.0                       |4.3.5
            Version|4.5.0                       |4.3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39943

Reply via email to