public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/17217] not removing removal of nested structs
       [not found] <bug-17217-4@http.gcc.gnu.org/bugzilla/>
@ 2021-09-03  6:13 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-03  6:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17217

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|2005-01-25 03:37:17         |2021-09-03
     Ever confirmed|0                           |1

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So where is a better testcase (which is not depedent on how gimplifier works):
int h(int *a);
int f(int i, int j)
{
  int t = i;
  int t1 = j;
  int g()
  {
    int t11 = t1;
    int t2 = h(&t);
    return t2 + t11;
  }
  int t3 = g();
  return t3 + t1;
}

---- CUT ---
On the gimple level we get:
  _3 = __builtin_dwarf_cfa (0);
  FRAME.1.FRAME_BASE.PARENT = _3;
  FRAME.1.t = i_5(D);
  FRAME.1.t1 = j_7(D);
  t2_11 = h (&FRAME.1.t);
  _12 = j_7(D) + t2_11;
  _9 = FRAME.1.t1;
  _10 = _9 + _12;

We should know that FRAME.1 is special in that h can only escape t field of
FRAME.1 and not the other fields of FRAME.1 too.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/17217] not removing removal of nested structs
       [not found] <bug-17217-6528@http.gcc.gnu.org/bugzilla/>
@ 2008-09-16  1:05 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-16  1:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2008-09-16 01:03 -------
Actually the code to fix this was disabled as you can do pointer tricks to get
back to the original struct (well not in the nested case though).


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
   Target Milestone|4.1.0                       |---


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/17217] not removing removal of nested structs
  2004-08-27 18:56 [Bug tree-optimization/17217] New: " pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-08-31  5:26 ` pinskia at gcc dot gnu dot org
@ 2005-04-16 17:37 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-16 17:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-16 17:37 -------
Fixed in 4.1.0 and above by Daniel's aliasing improvements.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.0


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/17217] not removing removal of nested structs
  2004-08-27 18:56 [Bug tree-optimization/17217] New: " pinskia at gcc dot gnu dot org
  2004-08-27 19:42 ` [Bug tree-optimization/17217] " pinskia at gcc dot gnu dot org
  2004-08-27 22:13 ` pinskia at gcc dot gnu dot org
@ 2004-08-31  5:26 ` pinskia at gcc dot gnu dot org
  2005-04-16 17:37 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-31  5:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-31 05:26 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-31 05:26:12
               date|                            |


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/17217] not removing removal of nested structs
  2004-08-27 18:56 [Bug tree-optimization/17217] New: " pinskia at gcc dot gnu dot org
  2004-08-27 19:42 ` [Bug tree-optimization/17217] " pinskia at gcc dot gnu dot org
@ 2004-08-27 22:13 ` pinskia at gcc dot gnu dot org
  2004-08-31  5:26 ` pinskia at gcc dot gnu dot org
  2005-04-16 17:37 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-27 22:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-27 22:13 -------
Daniel is this related to the aliasing stuff you are working on, I assume, if you get some time could you 
look to see if what you do actually fixes this?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dberlin at gcc dot gnu dot
                   |                            |org


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/17217] not removing removal of nested structs
  2004-08-27 18:56 [Bug tree-optimization/17217] New: " pinskia at gcc dot gnu dot org
@ 2004-08-27 19:42 ` pinskia at gcc dot gnu dot org
  2004-08-27 22:13 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-27 19:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-27 19:42 -------
Here is the unnested version:
int h(int *a);
struct G
{
int t;
int t1;
};
int g1(struct G*);
int f1(int i, int j)
{
  struct G nestedf1={i,j};
  return g1(&nestedf1)+nestedf1.t1;
}
static int g1(struct G *nestedf1)
{
  return h(&nestedf1->t)+ nestedf1->t1;
}

-- 


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-03  6:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-17217-4@http.gcc.gnu.org/bugzilla/>
2021-09-03  6:13 ` [Bug tree-optimization/17217] not removing removal of nested structs pinskia at gcc dot gnu.org
     [not found] <bug-17217-6528@http.gcc.gnu.org/bugzilla/>
2008-09-16  1:05 ` pinskia at gcc dot gnu dot org
2004-08-27 18:56 [Bug tree-optimization/17217] New: " pinskia at gcc dot gnu dot org
2004-08-27 19:42 ` [Bug tree-optimization/17217] " pinskia at gcc dot gnu dot org
2004-08-27 22:13 ` pinskia at gcc dot gnu dot org
2004-08-31  5:26 ` pinskia at gcc dot gnu dot org
2005-04-16 17:37 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).