Bug 24437 - OBJ_TYPE_REF handling in fold_stmt should be moved to fold
OBJ_TYPE_REF handling in fold_stmt should be moved to fold
Status: RESOLVED WONTFIX
Product: gcc
Classification: Unclassified
Component: middle-end
4.1.0
: P2 enhancement
: ---
Assigned To: Not yet assigned to anyone
http://gcc.gnu.org/ml/gcc-patches/200...
: FIXME, patch
Depends on:
Blocks: 26022
  Show dependency treegraph
 
Reported: 2005-10-18 20:25 UTC by Andrew Pinski
Modified: 2014-11-22 21:48 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-07-15 23:06:56


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2005-10-18 20:25:56 UTC
Comment in tree-ssa-ccp.c:
          /* ??? Should perhaps do this in fold proper.  However, doing it
             there requires that we create a new CALL_EXPR, and that requires
             copying EH region info to the new node.  Easier to just do it
             here where we can just smash the call operand.  */

We have to copy the EH region info for other stuff already, there was a bug about this which caused an ICE with Honza's new testing and was fixed.
Comment 1 Andrew Pinski 2005-10-23 23:44:24 UTC
I will do this for 4.2.0.
Comment 2 Andrew Pinski 2005-11-30 16:06:49 UTC
Testing the patch right now
Comment 3 Andrew Pinski 2005-12-01 03:07:31 UTC
Patch posted:
http://gcc.gnu.org/ml/gcc-patches/2005-12/msg00010.html
Comment 4 Andrew Pinski 2006-01-23 14:56:52 UTC
Subject: Bug 24437

Author: pinskia
Date: Mon Jan 23 14:56:45 2006
New Revision: 110116

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110116
Log:
2006-01-23  Andrew Pinski  <pinskia@physics.uc.edu>

        PR middle-end/24437
        * tree-ssa-ccp.c (fold_stmt): Move folding of OBJ_TYPE_REF
        with a call expr to ...
        * fold-const.c (fold_ternary) <case CALL_EXPR>: Here.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/tree-ssa-ccp.c

Comment 5 Andrew Pinski 2006-01-23 14:57:12 UTC
Fixed.
Comment 6 Andrew Pinski 2006-02-28 17:54:05 UTC
Reopening since the patch does not work really, see PR 26022.
Comment 7 Andrew Pinski 2006-02-28 17:55:19 UTC
And unassigning since once the testing finishes on reversal I am no longer working on this  (I might add another comment about the issue to tree-ssa-ccp so the next person does not forget about this issue).
Comment 8 Andrew Pinski 2006-03-01 15:15:47 UTC
Subject: Bug 24437

Author: pinskia
Date: Wed Mar  1 15:15:38 2006
New Revision: 111602

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111602
Log:
2006-01-23  Andrew Pinski  <pinskia@physics.uc.edu>

	PR middle-end/26022
	Revert:
	PR middle-end/24437
	* tree-ssa-ccp.c (fold_stmt): Move folding of OBJ_TYPE_REF
	with a call expr to ...
	* fold-const.c (fold_ternary) <case CALL_EXPR>: Here.

2006-02-28  Andrew Pinski  <pinskia@physics.uc.edu>

	PR middle-end/26022
	* g++.dg/opt/return-slot1.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/opt/return-slot1.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-ccp.c

Comment 9 Steven Bosscher 2010-07-15 23:02:35 UTC
Wasn't this done (at least partially) by Martin?
Comment 10 Andrew Pinski 2010-07-15 23:06:56 UTC
Martin just removed the language hook. The comment in the source about fold is invalid now as we have tuples.  Though it looks like there a new comment about "fold_stmt_inplace".
Comment 11 Andrew Pinski 2014-11-22 21:48:00 UTC
The folding for OBJ_TYPE_REF is now more complex so closing as won't fix.