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 middle-end/24820] [3.4/4.0/4.1 regression] SEGV in integer_valued_real_p at gcc/builtins.c:6711



------- Comment #3 from pinskia at gcc dot gnu dot org  2005-11-12 17:03 -------
This is a latent bug from 2003 (3.4 time frame):
* builtins.c (integer_valued_real_p): New function to test if
        a floating point expression has an integer valued result.
        (fold_trunc_transparent_mathfn): Optimize foo(foo(x)) as
        foo(x) where foo is an integer rounding function.  Similarly,
        optimize foo(bar(x)) as bar(x), and foo((double)(int)x) as
        (double)(int)x when both foo and bar are integer rounding
        functions and we don't need to honor errno.
        (fold_builtin_trunc, fold_builtin_floor, fold_builtin_ceil):
        New functions to fold trunc, floor and ceil.
        (fold_builtin): Use fold_builtin_trunc to fold BUILT_IN_TRUNC*,
        fold_builtin_floor to fold BUILT_IN_FLOOR* and fold_builtin_ceil
        to fold BUILT_IN_CEIL*.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sayle at gcc dot gnu dot org
      Known to work|                            |3.3.3
            Summary|[4.1 regression] SEGV in    |[3.4/4.0/4.1 regression]
                   |integer_valued_real_p at    |SEGV in
                   |gcc/builtins.c:6711         |integer_valued_real_p at
                   |                            |gcc/builtins.c:6711
   Target Milestone|4.1.0                       |4.0.3


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


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