public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/35608]  New: gcc.c-torture/compile/limits-structnest.c fails -O2 -Os
@ 2008-03-16 15:05 jrp at dial dot pipex dot com
  2008-03-16 15:56 ` [Bug c/35608] " rguenth at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jrp at dial dot pipex dot com @ 2008-03-16 15:05 UTC (permalink / raw)
  To: gcc-bugs

The gcc.c-torture/compile/limits-structnest.c started to fail at revision
133270. It was OK at 133177.


Native configuration is i686-pc-linux-gnu

                === gcc tests ===


Running target unix
FAIL: gcc.c-torture/compile/limits-structnest.c  -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/limits-structnest.c  -Os  (test for excess errors)
XPASS: gcc.dg/cpp/cmdlne-dI-M.c scan-file
(^|\\\\n)cmdlne-dI-M.*:[^\\\\n]*cmdlne-dI-M.c
XPASS: gcc.dg/cpp/cmdlne-dM-M.c scan-file
(^|\\\\n)cmdlne-dM-M[^\\\\n]*:[^\\\\n]*cmdlne-dM-M.c

                === gcc Summary ===

# of expected passes            49125
# of unexpected failures        2
# of unexpected successes       2
# of expected failures          166
# of untested testcases         35
# of unsupported tests          269

:

Compiler version: 4.4.020080316(experimental)(GCC) 
Platform: i686-pc-linux-gnu
configure flags: -v --enable-languages=c,c++,fortran --enable-shared
--with-syst
em-zlib --without-included-gettext --enable-threads=posix --enable-nls
--enable-
__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr
--enabl
e-checking=release --with-arch=core2


-- 
           Summary: gcc.c-torture/compile/limits-structnest.c fails -O2 -Os
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jrp at dial dot pipex dot com
 GCC build triplet: 4.4.0 20080316 (experimental) (GCC)
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c/35608] gcc.c-torture/compile/limits-structnest.c fails -O2 -Os
  2008-03-16 15:05 [Bug c/35608] New: gcc.c-torture/compile/limits-structnest.c fails -O2 -Os jrp at dial dot pipex dot com
@ 2008-03-16 15:56 ` rguenth at gcc dot gnu dot org
  2008-03-16 16:08 ` jrp at dial dot pipex dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-16 15:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-03-16 15:55 -------
What is the excess error (look in the gcc/testsuite/gcc/gcc.log file)?  usually
this test blows memory/stack, so possibly just gets killed by the kernel.


-- 


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


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

* [Bug c/35608] gcc.c-torture/compile/limits-structnest.c fails -O2 -Os
  2008-03-16 15:05 [Bug c/35608] New: gcc.c-torture/compile/limits-structnest.c fails -O2 -Os jrp at dial dot pipex dot com
  2008-03-16 15:56 ` [Bug c/35608] " rguenth at gcc dot gnu dot org
@ 2008-03-16 16:08 ` jrp at dial dot pipex dot com
  2008-03-27 22:29 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jrp at dial dot pipex dot com @ 2008-03-16 16:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jrp at dial dot pipex dot com  2008-03-16 16:07 -------
PASS: gcc.c-torture/compile/limits-structnest.c  -O1  (test for excess errors)
Executing on host: /home/jrp/build/gcc/xgcc -B/home/jrp/build/gcc/   -O2  -w
-fn
o-show-column -c  -o limits-structnest.o
/home/jrp/gcc/gcc/testsuite/gcc.c-tortu
re/compile/limits-structnest.c    (timeout = 300)
xgcc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
compiler exited with status 1
output is:
xgcc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 


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


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

* [Bug c/35608] gcc.c-torture/compile/limits-structnest.c fails -O2 -Os
  2008-03-16 15:05 [Bug c/35608] New: gcc.c-torture/compile/limits-structnest.c fails -O2 -Os jrp at dial dot pipex dot com
  2008-03-16 15:56 ` [Bug c/35608] " rguenth at gcc dot gnu dot org
  2008-03-16 16:08 ` jrp at dial dot pipex dot com
@ 2008-03-27 22:29 ` rguenth at gcc dot gnu dot org
  2008-03-27 23:08 ` hjl dot tools at gmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-27 22:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-03-27 22:28 -------
*** Bug 35717 has been marked as a duplicate of this bug. ***


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl dot tools at gmail dot
                   |                            |com


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


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

* [Bug c/35608] gcc.c-torture/compile/limits-structnest.c fails -O2 -Os
  2008-03-16 15:05 [Bug c/35608] New: gcc.c-torture/compile/limits-structnest.c fails -O2 -Os jrp at dial dot pipex dot com
                   ` (2 preceding siblings ...)
  2008-03-27 22:29 ` rguenth at gcc dot gnu dot org
@ 2008-03-27 23:08 ` hjl dot tools at gmail dot com
  2008-03-28 14:05 ` hjl dot tools at gmail dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-03-27 23:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from hjl dot tools at gmail dot com  2008-03-27 23:08 -------
This test needs more than 8MB stack. I have

stacksize       8MB

Some kernel doesn't enforce it. When I set stack to unlimited,
it compiles fine.


-- 


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


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

* [Bug c/35608] gcc.c-torture/compile/limits-structnest.c fails -O2 -Os
  2008-03-16 15:05 [Bug c/35608] New: gcc.c-torture/compile/limits-structnest.c fails -O2 -Os jrp at dial dot pipex dot com
                   ` (3 preceding siblings ...)
  2008-03-27 23:08 ` hjl dot tools at gmail dot com
@ 2008-03-28 14:05 ` hjl dot tools at gmail dot com
  2008-12-07  6:44 ` dirtyepic at gentoo dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-03-28 14:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hjl dot tools at gmail dot com  2008-03-28 14:04 -------
The testcase has 10001 nested (), which is processed with recursive calls.
My default stack limit is 8MB. 10001 recursive calls need around 8MB stack.
Any changes in my setup will push it over the limit. I think we should do
one of the followings:

1. Mark it XFAIL.
2. Lower the number of ().
3. Call setrlimit to raise stack limit.


-- 


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


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

* [Bug c/35608] gcc.c-torture/compile/limits-structnest.c fails -O2 -Os
  2008-03-16 15:05 [Bug c/35608] New: gcc.c-torture/compile/limits-structnest.c fails -O2 -Os jrp at dial dot pipex dot com
                   ` (4 preceding siblings ...)
  2008-03-28 14:05 ` hjl dot tools at gmail dot com
@ 2008-12-07  6:44 ` dirtyepic at gentoo dot org
  2009-01-12  4:24 ` rob1weld at aol dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dirtyepic at gentoo dot org @ 2008-12-07  6:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dirtyepic at gentoo dot org  2008-12-07 06:42 -------
This is up to four failures now:

FAIL: gcc.c-torture/compile/limits-structnest.c  -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/limits-structnest.c  -O3 -fomit-frame-pointer 
(test for excess errors)
FAIL: gcc.c-torture/compile/limits-structnest.c  -O3 -g  (test for excess
errors)
FAIL: gcc.c-torture/compile/limits-structnest.c  -Os  (test for excess errors)

(rev 142383)


-- 

dirtyepic at gentoo dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dirtyepic at gentoo dot org


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


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

* [Bug c/35608] gcc.c-torture/compile/limits-structnest.c fails -O2 -Os
  2008-03-16 15:05 [Bug c/35608] New: gcc.c-torture/compile/limits-structnest.c fails -O2 -Os jrp at dial dot pipex dot com
                   ` (5 preceding siblings ...)
  2008-12-07  6:44 ` dirtyepic at gentoo dot org
@ 2009-01-12  4:24 ` rob1weld at aol dot com
  2009-11-03 12:18 ` [Bug c/35608] imit-structnest.c fails due to O(n^2) memory usage in record_component_alias bonzini at gnu dot org
  2009-11-03 12:21 ` rguenther at suse dot de
  8 siblings, 0 replies; 10+ messages in thread
From: rob1weld at aol dot com @ 2009-01-12  4:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rob1weld at aol dot com  2009-01-12 04:24 -------
On i386-pc-solaris2.11 (OpenSolaris 2008.11) compiling gcc 4.4.0 20090104
I did NOT get this failure:
http://gcc.gnu.org/ml/gcc-testresults/2009-01/msg00488.html


Now when I compile: gcc version 4.4.0 20090111 (experimental) [trunk 
revision 143259] I get this error:

Running
/usr/share/src/gcc_trunk/gcc/testsuite/gcc.c-torture/compile/compile.exp ...
WARNING: program timed out.
FAIL: gcc.c-torture/compile/limits-structnest.c  -O2  (test for excess errors)
WARNING: program timed out.
FAIL: gcc.c-torture/compile/limits-structnest.c  -O3 -fomit-frame-pointer 
(test for excess errors)
WARNING: program timed out.
FAIL: gcc.c-torture/compile/limits-structnest.c  -O3 -g  (test for excess
errors)
WARNING: program timed out.
FAIL: gcc.c-torture/compile/limits-structnest.c  -Os  (test for excess errors)
Running
/usr/share/src/gcc_trunk/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
...


Confirmed (intermittent).


Rob


-- 


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


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

* [Bug c/35608] imit-structnest.c fails due to O(n^2) memory usage in record_component_alias
  2008-03-16 15:05 [Bug c/35608] New: gcc.c-torture/compile/limits-structnest.c fails -O2 -Os jrp at dial dot pipex dot com
                   ` (6 preceding siblings ...)
  2009-01-12  4:24 ` rob1weld at aol dot com
@ 2009-11-03 12:18 ` bonzini at gnu dot org
  2009-11-03 12:21 ` rguenther at suse dot de
  8 siblings, 0 replies; 10+ messages in thread
From: bonzini at gnu dot org @ 2009-11-03 12:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from bonzini at gnu dot org  2009-11-03 12:18 -------
Memory allocation is O(n^2) in the nesting of the structures: when changing
LIM4 from 6 to 7 invocations of the lower-level, memory goes from 583976 KB to
798116 KB (which is 1.366 times more, almost exactly a factor of (7/6)^2).

The culprit is record_component_aliases which creates a subset relationship
from each structure to each containing structure.  Maybe we could reuse the
et-forest here since these subset relationships form a forest (do all of them
have this property? would we pessimize a lot by enforcing that even when it is
conservative?)

I suppose the bug has always been there since alias.c was introduced, it's just
that previously an unused struct did not call record_component_aliases.


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |compile-time-hog, memory-hog
   Last reconfirmed|0000-00-00 00:00:00         |2009-11-03 12:18:41
               date|                            |
            Summary|gcc.c-                      |imit-structnest.c fails due
                   |torture/compile/limits-     |to O(n^2) memory usage in
                   |structnest.c fails -O2 -Os  |record_component_alias


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


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

* [Bug c/35608] imit-structnest.c fails due to O(n^2) memory usage in record_component_alias
  2008-03-16 15:05 [Bug c/35608] New: gcc.c-torture/compile/limits-structnest.c fails -O2 -Os jrp at dial dot pipex dot com
                   ` (7 preceding siblings ...)
  2009-11-03 12:18 ` [Bug c/35608] imit-structnest.c fails due to O(n^2) memory usage in record_component_alias bonzini at gnu dot org
@ 2009-11-03 12:21 ` rguenther at suse dot de
  8 siblings, 0 replies; 10+ messages in thread
From: rguenther at suse dot de @ 2009-11-03 12:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenther at suse dot de  2009-11-03 12:21 -------
Subject: Re:  imit-structnest.c fails due to O(n^2) memory usage
 in record_component_alias

On Tue, 3 Nov 2009, bonzini at gnu dot org wrote:

> ------- Comment #8 from bonzini at gnu dot org  2009-11-03 12:18 -------
> Memory allocation is O(n^2) in the nesting of the structures: when changing
> LIM4 from 6 to 7 invocations of the lower-level, memory goes from 583976 KB to
> 798116 KB (which is 1.366 times more, almost exactly a factor of (7/6)^2).
> 
> The culprit is record_component_aliases which creates a subset relationship
> from each structure to each containing structure.  Maybe we could reuse the
> et-forest here since these subset relationships form a forest (do all of them
> have this property? would we pessimize a lot by enforcing that even when it is
> conservative?)

Yes, they all form a forest.  It shouldn't pessimize anything to enforce
this.

> I suppose the bug has always been there since alias.c was introduced, it's just
> that previously an unused struct did not call record_component_aliases.

Right.

Richard.


-- 


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


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

end of thread, other threads:[~2009-11-03 12:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-16 15:05 [Bug c/35608] New: gcc.c-torture/compile/limits-structnest.c fails -O2 -Os jrp at dial dot pipex dot com
2008-03-16 15:56 ` [Bug c/35608] " rguenth at gcc dot gnu dot org
2008-03-16 16:08 ` jrp at dial dot pipex dot com
2008-03-27 22:29 ` rguenth at gcc dot gnu dot org
2008-03-27 23:08 ` hjl dot tools at gmail dot com
2008-03-28 14:05 ` hjl dot tools at gmail dot com
2008-12-07  6:44 ` dirtyepic at gentoo dot org
2009-01-12  4:24 ` rob1weld at aol dot com
2009-11-03 12:18 ` [Bug c/35608] imit-structnest.c fails due to O(n^2) memory usage in record_component_alias bonzini at gnu dot org
2009-11-03 12:21 ` rguenther at suse dot de

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).