public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/34146] [4.1/4.2/4.3 Regression] Inefficient code with compound literals inside a CONSTRUCTO
  2007-11-19  4:57 [Bug c/34146] New: [4.1/4.2/4.3 Regression] Inefficient code with compound literals inside a CONSTRUCTO pinskia at gcc dot gnu dot org
@ 2007-11-19  4:57 ` pinskia at gcc dot gnu dot org
  2007-11-19 14:58 ` jakub at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-11-19  4:57 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |33723
   Target Milestone|---                         |4.2.3


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


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

* [Bug c/34146]  New: [4.1/4.2/4.3 Regression] Inefficient code with compound literals inside a CONSTRUCTO
@ 2007-11-19  4:57 pinskia at gcc dot gnu dot org
  2007-11-19  4:57 ` [Bug c/34146] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-11-19  4:57 UTC (permalink / raw)
  To: gcc-bugs

Exactly like PR 33723 except the compound literal is inside a CONSTRUCTOR (you
can combine compound literals and normal constructors to make this worse).
Testcase:
typedef  struct
  {
    int f1, f2, f3, f4, f5, f6, f7, f8;
    long int f9, f10;
    int f11;
  } f;
typedef union
{
  f f;
  char s[56];
  long int a;
} T;

void
foo (void)
{
  T t =  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
  test (&t);
}

void
bar (void)
{
  T t = { (f){ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
  test (&t);
}

----
Basically the fix for PR 33723 was not complete.  I have a more complete fix
but it does not fix the case where you include more compound literals inside
another one.


-- 
           Summary: [4.1/4.2/4.3 Regression] Inefficient code with compound
                    literals inside a CONSTRUCTO
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


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

* [Bug c/34146] [4.1/4.2/4.3 Regression] Inefficient code with compound literals inside a CONSTRUCTO
  2007-11-19  4:57 [Bug c/34146] New: [4.1/4.2/4.3 Regression] Inefficient code with compound literals inside a CONSTRUCTO pinskia at gcc dot gnu dot org
  2007-11-19  4:57 ` [Bug c/34146] " pinskia at gcc dot gnu dot org
@ 2007-11-19 14:58 ` jakub at gcc dot gnu dot org
  2007-11-20 10:36 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-19 14:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jakub at gcc dot gnu dot org  2007-11-19 14:58 -------
Testing a fix.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-11-19 14:58:04
               date|                            |


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


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

* [Bug c/34146] [4.1/4.2/4.3 Regression] Inefficient code with compound literals inside a CONSTRUCTO
  2007-11-19  4:57 [Bug c/34146] New: [4.1/4.2/4.3 Regression] Inefficient code with compound literals inside a CONSTRUCTO pinskia at gcc dot gnu dot org
  2007-11-19  4:57 ` [Bug c/34146] " pinskia at gcc dot gnu dot org
  2007-11-19 14:58 ` jakub at gcc dot gnu dot org
@ 2007-11-20 10:36 ` jakub at gcc dot gnu dot org
  2007-11-20 11:00 ` [Bug c/34146] [4.1/4.2 " jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-20 10:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2007-11-20 10:36 -------
Subject: Bug 34146

Author: jakub
Date: Tue Nov 20 10:36:03 2007
New Revision: 130311

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130311
Log:
        PR c/34146
        * c-gimplify.c (optimize_compound_literals_in_ctor): New function.
        (c_gimplify_expr): Use it.

        PR c/34146
        * gcc.dg/tree-ssa/pr34146.c: New test.

        PR testsuite/33978
        * gcc.dg/tree-ssa/pr33723.c: Adjust scan pattern to make it less
        dependent on target settings like move_by_pieces etc.

Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr34146.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-gimplify.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr33723.c


-- 


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


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

* [Bug c/34146] [4.1/4.2 Regression] Inefficient code with compound literals inside a CONSTRUCTO
  2007-11-19  4:57 [Bug c/34146] New: [4.1/4.2/4.3 Regression] Inefficient code with compound literals inside a CONSTRUCTO pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-11-20 10:36 ` jakub at gcc dot gnu dot org
@ 2007-11-20 11:00 ` jakub at gcc dot gnu dot org
  2008-02-01 17:02 ` jsm28 at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-20 11:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2007-11-20 11:00 -------
Fixed on the trunk.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2/4.3 Regression]    |[4.1/4.2 Regression]
                   |Inefficient code with       |Inefficient code with
                   |compound literals inside a  |compound literals inside a
                   |CONSTRUCTO                  |CONSTRUCTO


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


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

* [Bug c/34146] [4.1/4.2 Regression] Inefficient code with compound literals inside a CONSTRUCTO
  2007-11-19  4:57 [Bug c/34146] New: [4.1/4.2/4.3 Regression] Inefficient code with compound literals inside a CONSTRUCTO pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-11-20 11:00 ` [Bug c/34146] [4.1/4.2 " jakub at gcc dot gnu dot org
@ 2008-02-01 17:02 ` jsm28 at gcc dot gnu dot org
  2008-05-19 20:30 ` jsm28 at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-02-01 17:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jsm28 at gcc dot gnu dot org  2008-02-01 16:55 -------
4.2.3 is being released now, changing milestones of open bugs to 4.2.4.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.3                       |4.2.4


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


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

* [Bug c/34146] [4.1/4.2 Regression] Inefficient code with compound literals inside a CONSTRUCTO
  2007-11-19  4:57 [Bug c/34146] New: [4.1/4.2/4.3 Regression] Inefficient code with compound literals inside a CONSTRUCTO pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-02-01 17:02 ` jsm28 at gcc dot gnu dot org
@ 2008-05-19 20:30 ` jsm28 at gcc dot gnu dot org
  2008-07-04 22:54 ` [Bug c/34146] [4.2 " jsm28 at gcc dot gnu dot org
  2009-03-31  0:39 ` jsm28 at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-05-19 20:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jsm28 at gcc dot gnu dot org  2008-05-19 20:23 -------
4.2.4 is being released, changing milestones to 4.2.5.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.4                       |4.2.5


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


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

* [Bug c/34146] [4.2 Regression] Inefficient code with compound literals inside a CONSTRUCTO
  2007-11-19  4:57 [Bug c/34146] New: [4.1/4.2/4.3 Regression] Inefficient code with compound literals inside a CONSTRUCTO pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-05-19 20:30 ` jsm28 at gcc dot gnu dot org
@ 2008-07-04 22:54 ` jsm28 at gcc dot gnu dot org
  2009-03-31  0:39 ` jsm28 at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 22:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jsm28 at gcc dot gnu dot org  2008-07-04 22:53 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2 Regression]        |[4.2 Regression] Inefficient
                   |Inefficient code with       |code with compound literals
                   |compound literals inside a  |inside a CONSTRUCTO
                   |CONSTRUCTO                  |


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


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

* [Bug c/34146] [4.2 Regression] Inefficient code with compound literals inside a CONSTRUCTO
  2007-11-19  4:57 [Bug c/34146] New: [4.1/4.2/4.3 Regression] Inefficient code with compound literals inside a CONSTRUCTO pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-07-04 22:54 ` [Bug c/34146] [4.2 " jsm28 at gcc dot gnu dot org
@ 2009-03-31  0:39 ` jsm28 at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31  0:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jsm28 at gcc dot gnu dot org  2009-03-31 00:38 -------
Closing 4.2 branch, fixed in 4.3.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to fail|                            |4.2.5
      Known to work|                            |4.3.0
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.3.0


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


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

end of thread, other threads:[~2009-03-31  0:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-19  4:57 [Bug c/34146] New: [4.1/4.2/4.3 Regression] Inefficient code with compound literals inside a CONSTRUCTO pinskia at gcc dot gnu dot org
2007-11-19  4:57 ` [Bug c/34146] " pinskia at gcc dot gnu dot org
2007-11-19 14:58 ` jakub at gcc dot gnu dot org
2007-11-20 10:36 ` jakub at gcc dot gnu dot org
2007-11-20 11:00 ` [Bug c/34146] [4.1/4.2 " jakub at gcc dot gnu dot org
2008-02-01 17:02 ` jsm28 at gcc dot gnu dot org
2008-05-19 20:30 ` jsm28 at gcc dot gnu dot org
2008-07-04 22:54 ` [Bug c/34146] [4.2 " jsm28 at gcc dot gnu dot org
2009-03-31  0:39 ` jsm28 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).