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 rtl-optimization/16223] [3.4 Regression] Optimiser bug in gcc-3.4.0 (also in 3.4.1 20040625 prerelease)


------- Additional Comments From belyshev at lubercy dot com  2004-06-27 11:18 -------
There are bugs in your code:

  input_index += 1.0 / src_ratio ;
  filter->b_current = (filter->b_current + lrint (floor (input_index))) %
filter->b_len ;
                                                  ^^^^^ this should be 'round'
  input_index -= floor (input_index) ;
                 ^^^^^ same here.

Suppose src_ratio = 0.1 then floor (1.0 / src_ratio) can be either 9.0 or 10.0
depending on internal precision.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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