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]
Other format: [Raw text]

[Bug c/34841] 'make check' of libsndfile-1.0.17 fails with gcc-4.2.2 -O2 optimization, OK with -O1 one



------- Comment #9 from ismail at pardus dot org dot tr  2008-01-18 02:45 -------
File  lossy_comp_test.c starting line 761 :

sum_abs = abs (sum_abs + abs (abs (data [k]) - 256)) ;

if (sum_abs < 1.0)
        {       
printf ("\n\nLine %d: Signal is all zeros (%d, 0x%X).\n", __LINE__, sum_abs,
sum_abs) ;
exit (1) ;
} ;

sum_abs gets a value of -27260928 . Making sum_abs unsigned fixes the problem.


-- 


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


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