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/36578] cast to long double not taken into account when result stored to a double



------- Comment #4 from jsm28 at gcc dot gnu dot org  2008-10-29 17:06 -------
Subject: Bug 36578

Author: jsm28
Date: Wed Oct 29 17:05:42 2008
New Revision: 141432

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141432
Log:
        PR middle-end/36578
        * convert.c (convert_to_real): Do not optimize conversions of
        binary arithmetic operations between binary and decimal
        floating-point types.  Consider mode of target type in determining
        decimal type for arithmetic.  Unless
        flag_unsafe_math_optimizations, do not optimize binary conversions
        where this may change rounding behavior.
        * real.c (real_can_shorten_arithmetic): New.
        * real.h (real_can_shorten_arithmetic): Declare.

testsuite:
        * gcc.dg/dfp/convert-bfp-13.c, gcc.dg/dfp/convert-bfp-14.c,
        gcc.dg/dfp/convert-dfp-fold-2.c, gcc.target/i386/pr36578-1.c,
        gcc.target/i386/pr36578-2.c: New tests.

Added:
    trunk/gcc/testsuite/gcc.dg/dfp/convert-bfp-13.c
    trunk/gcc/testsuite/gcc.dg/dfp/convert-bfp-14.c
    trunk/gcc/testsuite/gcc.dg/dfp/convert-dfp-fold-2.c
    trunk/gcc/testsuite/gcc.target/i386/pr36578-1.c
    trunk/gcc/testsuite/gcc.target/i386/pr36578-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/convert.c
    trunk/gcc/real.c
    trunk/gcc/real.h
    trunk/gcc/testsuite/ChangeLog


-- 


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


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