Bug 40150 - ICE in cgraph_estimate_size_after_inlining, at ipa-inline.c:188 with -combine
Summary: ICE in cgraph_estimate_size_after_inlining, at ipa-inline.c:188 with -combine
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.3.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-14 17:59 UTC by Josh Triplett
Modified: 2010-09-17 09:06 UTC (History)
2 users (show)

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


Attachments
Tarball of preprocessed source files to reproduce ICE. (108.01 KB, application/x-gzip)
2009-05-14 18:00 UTC, Josh Triplett
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Triplett 2009-05-14 17:59:09 UTC
$ cc -std=gnu99 -O3 -fwhole-program -combine lv2log.i sim-common.i flight-computer.i physics.i pressure_sensor.i sensors.i resample-optimal.i coord.i mat.i vec.i isaac.i random.i normal.i normal_tab.i polynomial.i polynomial_tab.i -lm -o lv2log
ziggurat/polynomial_tab.c: In function ‘main_chute’:
ziggurat/polynomial_tab.c:776: internal compiler error: in cgraph_estimate_size_after_inlining, at ipa-inline.c:188
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.3/README.Bugs> for instructions.

$ cc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.3-8' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.3 (Debian 4.3.3-8)

Tarball of preprocessed source attached.  (Since the bug involves
--combine -fwhole-program, it requires multiple source files, but I used
-save-temps to turn them all into corresponding .i files.)

- Josh Triplett
Comment 1 Josh Triplett 2009-05-14 18:00:45 UTC
Created attachment 17868 [details]
Tarball of preprocessed source files to reproduce ICE.
Comment 2 Richard Biener 2009-05-15 11:03:17 UTC
Confirmed with

gcc -c -std=gnu99 -O -combine lv2log.i sim-common.i
sim-common.c: In function ‘main_chute’:
sim-common.c:88: internal compiler error: in cgraph_estimate_size_after_inlining, at ipa-inline.c:188
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.

;; Function main_chute (main_chute)

Considering inline candidate trace_printf.

void trace_printf(const char *fmt, ...) __attribute__((format(printf,1,2)));

void trace_printf(const char *fmt, ...)
{
# 41 "sim-common.c"
}

---

void trace_printf(const char *fmt, ...) __attribute__((format(printf,1,2)));

void main_chute(_Bool go)
{
 if(go)
  trace_printf("FC deployed main chute\n");
 else
  trace_printf("FC stopped deploying main chute\n");
}

but this small example does not reproduce it.
Comment 3 Kamaraju Kusumanchi 2010-09-12 12:51:28 UTC
When I tried with 4.6.0 20100828, I get the ICE at a different place.

/usr/lib/gcc-snapshot/bin/gcc -std=gnu99 -O3 -fwhole-program -combine lv2log.i sim-common.i flight-computer.i physics.i pressure_sensor.i sensors.i resample-optimal.i coord.i mat.i vec.i isaac.i random.i normal.i normal_tab.i polynomial.i polynomial_tab.i -lm -o lv2log
physics.c: In function 'gravity_force':
physics.c:23:6: error: invalid conversion in return statement
union vec3

union vec3

return <retval>;

physics.c:23:6: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions.


/usr/lib/gcc-snapshot/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/lib/gcc-snapshot/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-snapshot/libexec/gcc/i486-linux-gnu/4.6.0/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 20100828-1' --with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs --enable-languages=c,ada,c++,fortran,objc,obj-c++ --prefix=/usr/lib/gcc-snapshot --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --disable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --with-plugin-ld=ld.gold --enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic --disable-werror --enable-checking=yes --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.6.0 20100828 (experimental) [trunk revision 163616] (Debian 20100828-1) 


However, the reduced test case by Richard Guenther in comment #2

/usr/lib/gcc-snapshot/bin/gcc -c -std=gnu99 -O -combine lv2log.i sim-common.i

compiles with no errors.
Comment 4 Richard Biener 2010-09-17 09:06:46 UTC
-combine has been removed from GCC 4.6 in favor of LTO, closing as WONTFIX.