public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46401] New: [4.5/4.6 Regression] very slow compile time with -Wsequence-point
@ 2010-11-09 21:30 zsojka at seznam dot cz
  2010-11-10 12:08 ` [Bug c++/46401] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2010-11-09 21:30 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.5/4.6 Regression] very slow compile time with
                    -Wsequence-point
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 22356
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22356
reduced testcase

Compiler output - 4.4.5:
$ time gcc-4.4.5 -Wsequence-point -c testcase.C
real    0m0.514s
user    0m0.470s
sys     0m0.030s

Compiler output - 4.5.1: (disabled checking)
$ time gcc-4.5.1 -Wsequence-point -c testcase.C

real    4m22.328s
user    4m21.230s
sys     0m0.250s

Compiler output - r166492: (enabled checking)
$ time gcc -Wsequence-point -c testcase.C
real    6m2.734s
user    6m2.090s
sys     0m0.300s

Compiler output - r166492 without -Wsequence-point:
$ time gcc -c testcase.C
real    0m0.699s
user    0m0.520s
sys     0m0.050s

The time needed to analyze sequence points grew a lot in 4.5 for attached
testcase. The problem is more likely to appear since -Wsequence-point is
enabled by -Wall. The reduced testcase is from 'cantor', a KDE application.


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

* [Bug c++/46401] [4.5/4.6 Regression] very slow compile time with -Wsequence-point
  2010-11-09 21:30 [Bug c++/46401] New: [4.5/4.6 Regression] very slow compile time with -Wsequence-point zsojka at seznam dot cz
@ 2010-11-10 12:08 ` rguenth at gcc dot gnu.org
  2010-11-15 16:27 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-10 12:08 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.5.2


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

* [Bug c++/46401] [4.5/4.6 Regression] very slow compile time with -Wsequence-point
  2010-11-09 21:30 [Bug c++/46401] New: [4.5/4.6 Regression] very slow compile time with -Wsequence-point zsojka at seznam dot cz
  2010-11-10 12:08 ` [Bug c++/46401] " rguenth at gcc dot gnu.org
@ 2010-11-15 16:27 ` jakub at gcc dot gnu.org
  2010-11-16 21:11 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-15 16:27 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-15 16:21:11 UTC ---
Created attachment 22401
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22401
gcc46-pr46401.patch

Untested fix.

No point tracking CALL_EXPRs that aren't ECF_CONST (because then
operand_equal_p fails anyway) nor STRING_CSTs (which can't be written into).

That said, -Wsequence-point algorithm is still quadratic (certainly in used
memory, and at least quadratic in compilation time).


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

* [Bug c++/46401] [4.5/4.6 Regression] very slow compile time with -Wsequence-point
  2010-11-09 21:30 [Bug c++/46401] New: [4.5/4.6 Regression] very slow compile time with -Wsequence-point zsojka at seznam dot cz
  2010-11-10 12:08 ` [Bug c++/46401] " rguenth at gcc dot gnu.org
  2010-11-15 16:27 ` jakub at gcc dot gnu.org
@ 2010-11-16 21:11 ` jakub at gcc dot gnu.org
  2010-11-16 21:31 ` [Bug c++/46401] [4.5 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-16 21:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-16 20:50:04 UTC ---
Author: jakub
Date: Tue Nov 16 20:49:57 2010
New Revision: 166823

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166823
Log:
    PR c++/46401
    * c-common.c (warning_candidate_p): Don't track non-const calls
    or STRING_CSTs.

    * g++.dg/warn/Wsequence-point-3.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/warn/Wsequence-point-3.C
Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/46401] [4.5 Regression] very slow compile time with -Wsequence-point
  2010-11-09 21:30 [Bug c++/46401] New: [4.5/4.6 Regression] very slow compile time with -Wsequence-point zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2010-11-16 21:11 ` jakub at gcc dot gnu.org
@ 2010-11-16 21:31 ` jakub at gcc dot gnu.org
  2010-11-25 16:02 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-16 21:31 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2010.11.16 21:28:46
      Known to work|                            |4.6.0
            Summary|[4.5/4.6 Regression] very   |[4.5 Regression] very slow
                   |slow compile time with      |compile time with
                   |-Wsequence-point            |-Wsequence-point
     Ever Confirmed|0                           |1
      Known to fail|4.6.0                       |

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-16 21:28:46 UTC ---
Fixed for 4.6 so far.


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

* [Bug c++/46401] [4.5 Regression] very slow compile time with -Wsequence-point
  2010-11-09 21:30 [Bug c++/46401] New: [4.5/4.6 Regression] very slow compile time with -Wsequence-point zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2010-11-16 21:31 ` [Bug c++/46401] [4.5 " jakub at gcc dot gnu.org
@ 2010-11-25 16:02 ` rguenth at gcc dot gnu.org
  2010-12-07 15:06 ` jakub at gcc dot gnu.org
  2010-12-07 15:40 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-25 16:02 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

* [Bug c++/46401] [4.5 Regression] very slow compile time with -Wsequence-point
  2010-11-09 21:30 [Bug c++/46401] New: [4.5/4.6 Regression] very slow compile time with -Wsequence-point zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2010-11-25 16:02 ` rguenth at gcc dot gnu.org
@ 2010-12-07 15:06 ` jakub at gcc dot gnu.org
  2010-12-07 15:40 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-07 15:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-07 15:06:31 UTC ---
Author: jakub
Date: Tue Dec  7 15:06:27 2010
New Revision: 167538

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167538
Log:
    Backport from mainline
    2010-11-16  Jakub Jelinek  <jakub@redhat.com>

    PR c++/46401
    * c-common.c (warning_candidate_p): Don't track non-const calls
    or STRING_CSTs.

    * g++.dg/warn/Wsequence-point-3.C: New test.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/g++.dg/warn/Wsequence-point-3.C
Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/c-common.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/46401] [4.5 Regression] very slow compile time with -Wsequence-point
  2010-11-09 21:30 [Bug c++/46401] New: [4.5/4.6 Regression] very slow compile time with -Wsequence-point zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2010-12-07 15:06 ` jakub at gcc dot gnu.org
@ 2010-12-07 15:40 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-07 15:40 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-07 15:40:42 UTC ---
Fixed.


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

end of thread, other threads:[~2010-12-07 15:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-09 21:30 [Bug c++/46401] New: [4.5/4.6 Regression] very slow compile time with -Wsequence-point zsojka at seznam dot cz
2010-11-10 12:08 ` [Bug c++/46401] " rguenth at gcc dot gnu.org
2010-11-15 16:27 ` jakub at gcc dot gnu.org
2010-11-16 21:11 ` jakub at gcc dot gnu.org
2010-11-16 21:31 ` [Bug c++/46401] [4.5 " jakub at gcc dot gnu.org
2010-11-25 16:02 ` rguenth at gcc dot gnu.org
2010-12-07 15:06 ` jakub at gcc dot gnu.org
2010-12-07 15:40 ` jakub at gcc dot gnu.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).