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] |
- From: "Richard Guenther"
- To: "Kaveh R. GHAZI"
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 24 Feb 2007 16:42:32 +0100
- Subject: Re: [PATCH]: add folding of builtin modf
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=hhBapA0Dm6b0FXtRNQqv8y30+X5wPIGRpG19dAay1bZ4rbEpkZNDcRvZ+Oc4db/KdBdNyLnjWVYAlqdmChMJa0uFeY34oO/OsqPyvsZw1fCKI0opfF2qeen1KxGa+DS69E0DAOFtK07NkGL7wdMOx/6LWO3w9hm+tfSXtAQXC3c=
- References: <Pine.GSO.4.58.0702241034001.29187@caipclassic.rutgers.edu>
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?
- /* Proceed if a valid pointer type was passed in. */
- if (TYPE_MAIN_VARIANT (TREE_TYPE (arg1)) == TYPE_MAIN_VARIANT (rettype))
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.
- Follow-Ups:
- Re: [PATCH]: add folding of builtin modf
* From: Kaveh R. GHAZI
- Re: [PATCH]: add folding of builtin modf
- References:
- [PATCH]: add folding of builtin modf
* From: Kaveh R. GHAZI
- [PATCH]: add folding of builtin modf
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |