[Bug middle-end/27529] Does not fold (char *)(size_t)char_ptr or (size_t)(char *)size_t_var

2006-05-15 Thread patchapp at dberlin dot org


--- Comment #4 from patchapp at dberlin dot org  2006-05-15 19:39 ---
Subject: Bug number PR27529

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-05/msg00415.html


-- 


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



[Bug middle-end/27529] Does not fold (char *)(size_t)char_ptr or (size_t)(char *)size_t_var

2006-05-11 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2006-05-11 08:30 ---
Subject: Bug 27529

Author: rguenth
Date: Thu May 11 08:29:40 2006
New Revision: 113692

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=113692
Log:
2006-05-11  Richard Guenther  [EMAIL PROTECTED]

PR middle-end/27529
* fold-const.c (fold_unary): Handle intermediate conversion
to a pointer type like intermediate conversion to an integer
type in folding of (T1)(T2)var to var.
Match the code to the comment in the final conversion for
(T1)(T2)var to (T1)var regarding to type precision.  Rather
than disallow T1 being of pointer type, assert that both T1
and var are of pointer type or not.  Make sure not to fall
over the frontends lazyness wrt array to pointer decay though.

* gcc.dg/tree-ssa/foldcast-1.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/foldcast-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug middle-end/27529] Does not fold (char *)(size_t)char_ptr or (size_t)(char *)size_t_var

2006-05-11 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2006-05-11 08:30 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.2.0


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



[Bug middle-end/27529] Does not fold (char *)(size_t)char_ptr or (size_t)(char *)size_t_var

2006-05-10 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2006-05-10 15:47 ---
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-05-10 15:47:38
   date||


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