Richard Guenther - Re: [PATCH]: add folding of builtin modf (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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]

On 2/24/07, Kaveh R. GHAZI ghazi@caip.rutgers.edu wrote:

This patch adds folding of builtin modf when the first argument is a constant.

Tested on sparc-sun-solaris2.10, no regressions.Okay for mainline?

I wonder what happens for

double foo(double x) { const double y; return modf (x, &y); }

as the TYPE_MAIN_VARIANT is the same for double and const double, but you certainly cannot write to y.

Richard.


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