public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/58957] New: compilation hangs at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes)
@ 2013-11-01  5:25 su at cs dot ucdavis.edu
  2013-11-04 14:36 ` [Bug tree-optimization/58957] [4.8 Regression] compilation slow " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: su at cs dot ucdavis.edu @ 2013-11-01  5:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58957
           Summary: compilation hangs at -O3 on x86_64-linux-gnu (both
                    32-bit and 64-bit modes)
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu

The following code causes gcc 4.8.2 (as well as gcc 4.8.0 and gcc 4.8.1) to
hang at -O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes. 

It doesn't affect gcc trunk, 4.7.x, and 4.6.x. 


$ gcc-trunk -O3 small.c  
$ gcc-4.6 -O3 small.c
$ gcc-4.7 -O3 small.c
$ 
$ gcc-4.8 -O3 small.c
^C
$
$ gcc-4.8 -v
Using built-in specs.
COLLECT_GCC=gcc-4.8
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.8.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.8.2/configure
--enable-languages=c,c++,objc,obj-c++,fortran,lto --enable-checking=release
--with-gmp=/home/su/software/local/gcc-4.8.2
--with-mpfr=/home/su/software/local/gcc-4.8.2
--with-mpc=/home/su/software/local/gcc-4.8.2
--with-cloog=/home/su/software/local/gcc-4.8.2
--prefix=/home/su/software/local/gcc-4.8.2
Thread model: posix
gcc version 4.8.2 (GCC) 
$ 


----------------------------------


void __assert_fail () __attribute__ ((__noreturn__));

int a[10], b, c, d, *e, **f = &e, g, i, *j; 
unsigned int h;

int *
foo ()
{
  for (c = 0; c < 10; c++)
    for (i = 1; i >= 0; i--)
      for (d = 0; d < 10; d++)
    {
      j = &a[d];
      j >= &a[0] && j <= &a[9] ? (void) 0 : __assert_fail ();
    }
  return &b;
}

int
main ()
{
  for (g = 3; g < 10; g++)
    for (; h < 10; h++)
      *f = foo ();
  return 0;
}


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

* [Bug tree-optimization/58957] [4.8 Regression] compilation slow at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes)
  2013-11-01  5:25 [Bug tree-optimization/58957] New: compilation hangs at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes) su at cs dot ucdavis.edu
@ 2013-11-04 14:36 ` rguenth at gcc dot gnu.org
  2013-11-04 23:21 ` su at cs dot ucdavis.edu
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-04 14:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |compile-time-hog
      Known to work|                            |4.7.3, 4.9.0
            Summary|[4.8 Regression]            |[4.8 Regression]
                   |compilation hangs at -O3 on |compilation slow at -O3 on
                   |x86_64-linux-gnu (both      |x86_64-linux-gnu (both
                   |32-bit and 64-bit modes)    |32-bit and 64-bit modes)
      Known to fail|                            |4.8.0, 4.8.2

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think it's just awfully slow (deep loop nest, possible to unroll completely).
It terminates for me on the branch and for 4.8.2 and 4.8.1.

 tree CFG cleanup        :   8.49 (88%) usr   0.00 ( 0%) sys   8.52 (87%) wall 
   783 kB ( 2%) ggc
 TOTAL                 :   9.70             0.06             9.80             
51528 kB

on trunk and 4.7.3:

 TOTAL                 :   0.09             0.00             0.10              
1865 kB


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

* [Bug tree-optimization/58957] [4.8 Regression] compilation slow at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes)
  2013-11-01  5:25 [Bug tree-optimization/58957] New: compilation hangs at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes) su at cs dot ucdavis.edu
  2013-11-04 14:36 ` [Bug tree-optimization/58957] [4.8 Regression] compilation slow " rguenth at gcc dot gnu.org
@ 2013-11-04 23:21 ` su at cs dot ucdavis.edu
  2014-12-10 12:48 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: su at cs dot ucdavis.edu @ 2013-11-04 23:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Zhendong Su <su at cs dot ucdavis.edu> ---
(In reply to Richard Biener from comment #2)
> I think it's just awfully slow (deep loop nest, possible to unroll
> completely).
> It terminates for me on the branch and for 4.8.2 and 4.8.1.
> 
>  tree CFG cleanup        :   8.49 (88%) usr   0.00 ( 0%) sys   8.52 (87%)
> wall     783 kB ( 2%) ggc
>  TOTAL                 :   9.70             0.06             9.80           
> 51528 kB
> 
> on trunk and 4.7.3:
> 
>  TOTAL                 :   0.09             0.00             0.10           
> 1865 kB

You are right Richard --- I didn't wait long enough.


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

* [Bug tree-optimization/58957] [4.8 Regression] compilation slow at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes)
  2013-11-01  5:25 [Bug tree-optimization/58957] New: compilation hangs at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes) su at cs dot ucdavis.edu
  2013-11-04 14:36 ` [Bug tree-optimization/58957] [4.8 Regression] compilation slow " rguenth at gcc dot gnu.org
  2013-11-04 23:21 ` su at cs dot ucdavis.edu
@ 2014-12-10 12:48 ` rguenth at gcc dot gnu.org
  2014-12-19 13:42 ` jakub at gcc dot gnu.org
  2015-06-23  8:46 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-10 12:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug tree-optimization/58957] [4.8 Regression] compilation slow at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes)
  2013-11-01  5:25 [Bug tree-optimization/58957] New: compilation hangs at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes) su at cs dot ucdavis.edu
                   ` (2 preceding siblings ...)
  2014-12-10 12:48 ` rguenth at gcc dot gnu.org
@ 2014-12-19 13:42 ` jakub at gcc dot gnu.org
  2015-06-23  8:46 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 13:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.4                       |4.8.5

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.4 has been released.


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

* [Bug tree-optimization/58957] [4.8 Regression] compilation slow at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes)
  2013-11-01  5:25 [Bug tree-optimization/58957] New: compilation hangs at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes) su at cs dot ucdavis.edu
                   ` (3 preceding siblings ...)
  2014-12-19 13:42 ` jakub at gcc dot gnu.org
@ 2015-06-23  8:46 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-23  8:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|4.8.5                       |4.9.0
      Known to fail|                            |4.8.5

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for 4.9.0.


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

end of thread, other threads:[~2015-06-23  8:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-01  5:25 [Bug tree-optimization/58957] New: compilation hangs at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes) su at cs dot ucdavis.edu
2013-11-04 14:36 ` [Bug tree-optimization/58957] [4.8 Regression] compilation slow " rguenth at gcc dot gnu.org
2013-11-04 23:21 ` su at cs dot ucdavis.edu
2014-12-10 12:48 ` rguenth at gcc dot gnu.org
2014-12-19 13:42 ` jakub at gcc dot gnu.org
2015-06-23  8:46 ` rguenth 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).