Bug 39142 - Compilation fails with specialised optimisations.
Summary: Compilation fails with specialised optimisations.
Status: RESOLVED DUPLICATE of bug 12245
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.3.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: memory-hog
Depends on:
Blocks:
 
Reported: 2009-02-09 18:07 UTC by Brendan MacDonell
Modified: 2009-02-10 10:21 UTC (History)
9 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan MacDonell 2009-02-09 18:07:47 UTC
Command line:

gcc -I../include -I. -O2 -mtune=generic -march=i686 -Wall -W -Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv -fmodulo-sched -freschedule-modulo-scheduled-loops -fomit-frame-pointer -fPIC -fno-common -mieee-fp -DHAVE_CONFIG_H -D___GAMBCDIR="\"/usr\"" -D___GAMBCDIR_BIN="\"/usr/bin\"" -D___GAMBCDIR_INCLUDE="\"/usr/include\"" -D___GAMBCDIR_LIB="\"/usr/lib\"" -D___SYS_TYPE_CPU="\"i686\"" -D___SYS_TYPE_VENDOR="\"pc\"" -D___SYS_TYPE_OS="\"linux-gnu\"" -D___PRIMAL -D___LIBRARY -v -save-temps -c _io.c


Output:

Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr --enable-shared --enable-languages=c,c++,fortran,objc,obj-c++,treelang --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch --with-tune=generic
Thread model: posix
gcc version 4.3.3 (GCC) 
COLLECT_GCC_OPTIONS='-I../include' '-I.' '-O2' '-mtune=generic' '-march=i686' '-Wall' '-W' '-Wno-unused' '-O1' '-fno-math-errno' '-fschedule-insns2' '-fno-trapping-math' '-fno-strict-aliasing' '-fwrapv' '-fmodulo-sched' '-freschedule-modulo-scheduled-loops' '-fomit-frame-pointer' '-fPIC' '-fno-common' '-mieee-fp' '-DHAVE_CONFIG_H' '-D___GAMBCDIR="/usr"' '-D___GAMBCDIR_BIN="/usr/bin"' '-D___GAMBCDIR_INCLUDE="/usr/include"' '-D___GAMBCDIR_LIB="/usr/lib"' '-D___SYS_TYPE_CPU="i686"' '-D___SYS_TYPE_VENDOR="pc"' '-D___SYS_TYPE_OS="linux-gnu"' '-D___PRIMAL' '-D___LIBRARY' '-v' '-save-temps' '-c'
 /usr/lib/gcc/i686-pc-linux-gnu/4.3.3/cc1 -E -quiet -v -I../include -I. -DHAVE_CONFIG_H -D___GAMBCDIR="/usr" -D___GAMBCDIR_BIN="/usr/bin" -D___GAMBCDIR_INCLUDE="/usr/include" -D___GAMBCDIR_LIB="/usr/lib" -D___SYS_TYPE_CPU="i686" -D___SYS_TYPE_VENDOR="pc" -D___SYS_TYPE_OS="linux-gnu" -D___PRIMAL -D___LIBRARY _io.c -mtune=generic -march=i686 -mieee-fp -Wall -W -Wno-unused -fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv -fmodulo-sched -freschedule-modulo-scheduled-loops -fomit-frame-pointer -fPIC -fno-common -O2 -O1 -fpch-preprocess -o _io.i
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/4.3.3/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 ../include
 .
 /usr/local/include
 /usr/lib/gcc/i686-pc-linux-gnu/4.3.3/include
 /usr/lib/gcc/i686-pc-linux-gnu/4.3.3/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-I../include' '-I.' '-O2' '-mtune=generic' '-march=i686' '-Wall' '-W' '-Wno-unused' '-O1' '-fno-math-errno' '-fschedule-insns2' '-fno-trapping-math' '-fno-strict-aliasing' '-fwrapv' '-fmodulo-sched' '-freschedule-modulo-scheduled-loops' '-fomit-frame-pointer' '-fPIC' '-fno-common' '-mieee-fp' '-DHAVE_CONFIG_H' '-D___GAMBCDIR="/usr"' '-D___GAMBCDIR_BIN="/usr/bin"' '-D___GAMBCDIR_INCLUDE="/usr/include"' '-D___GAMBCDIR_LIB="/usr/lib"' '-D___SYS_TYPE_CPU="i686"' '-D___SYS_TYPE_VENDOR="pc"' '-D___SYS_TYPE_OS="linux-gnu"' '-D___PRIMAL' '-D___LIBRARY' '-v' '-save-temps' '-c'
 /usr/lib/gcc/i686-pc-linux-gnu/4.3.3/cc1 -fpreprocessed _io.i -quiet -dumpbase _io.c -mtune=generic -march=i686 -mieee-fp -auxbase _io -O2 -O1 -Wall -W -Wno-unused -version -fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv -fmodulo-sched -freschedule-modulo-scheduled-loops -fomit-frame-pointer -fPIC -fno-common -o _io.s
GNU C (GCC) version 4.3.3 (i686-pc-linux-gnu)
	compiled by GNU C version 4.3.3, GMP version 4.2.4, MPFR version 2.3.2.
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64360
Compiler executable checksum: a9280a9b830968ecc06cd749b0fe5f7f
gcc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Paolo Carlini 2009-02-09 18:10:21 UTC
Please follow the bug-reporting instructions, in particular, please provide a pre-processed reproducer:

  http://gcc.gnu.org/bugs.html
Comment 2 Brendan MacDonell 2009-02-09 18:13:24 UTC
Paolo Carlini:
I was unable to attach the reproducer, as the bugzilla would not accept it due to it's size. In the meantime, I have uploading it to http://macdonellba.googlepages.com/_io.i .
Comment 3 Paolo Carlini 2009-02-09 18:15:13 UTC
Please reduce it to a manageable size. For example, try 'delta', if you don't have other ways.
Comment 4 Brendan MacDonell 2009-02-09 22:54:23 UTC
I'm not really sure that this is worth pursuing for me, since I'm a touch uncertain whether I should expect to have problems with OOM (using over 800MB of RAM once buffers are cleared) on an macro-laden 79KLOC generated C file, albeit with most of the preprocessor directives expanding fairly flatly. If not, I can find another machine to attack the problem of shrinking it with delta, because it's not exactly a task that will be completed within a day.
Comment 5 Paolo Carlini 2009-02-10 00:35:38 UTC
Take your time. Please, understand that if a PR is not filed in the proper form, the chances that a knowledgeable person seriously look into it, sharply decreases. You can probably find this also useful:

  http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
Comment 6 Richard Biener 2009-02-10 10:12:22 UTC
gcc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Which means that your kernel killed the compiler, likely due to memory
usage issues.  On x86_64 the testcase uses 1.4GB.

Note that the issue is likely the large static initializer of ___lbl_tbl.
See PRs 14179 and 12245.  Removing that initializer the file needs 67MB to build.

*** This bug has been marked as a duplicate of 12245 ***
Comment 7 Paolo Carlini 2009-02-10 10:21:45 UTC
Thanks Richard, noticed the Killed too late...