Preprocessed file supplied (bug.i) This would appear to be related to RESOLVED bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21188 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21227
As far as I can make out the fixes for those bugs have been checked in, I'm using gcc tip of CVS mainline as at Wed Jun 1 02:00 UTC 2005 and the bug is still present. ie. This is either a different bug manifesting in the same place or the old bug revived. This affects both the arm and the i686 backends, so I suspect it is before it hits the backend.) /usr/local/bin/arm-elf-gcc -v Using built-in specs. Target: arm-elf Configured with: ../combined/configure --target=arm-elf --enable-languages=c,c++ --with-gnu-as --with-gnu-ld --with-newlib Thread model: single gcc version 4.1.0 20050601 (experimental) Also... /opt/gcc4_1/bin/gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc/configure --enable-languages=c --prefix=/opt/gcc4_1 Thread model: posix gcc version 4.1.0 20050601 (experimental) Using gcc -v I can see what gcc is running when it crashes, and hence reproduce the bug like so... cd /home/johnc/tmp /opt/gcc4_1/libexec/gcc/i686-pc-linux-gnu/4.1.0/cc1 -fpreprocessed /home/johnc/tmp/bug.i -dumpbase bug.i -auxbase bug -Os -std=c9x -v -o /home/johnc/tmp/bug.s ignoring nonexistent directory "/opt/gcc4_1/lib/gcc/i686-pc-linux-gnu/4.1.0/../../../../i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /opt/gcc4_1/include /opt/gcc4_1/lib/gcc/i686-pc-linux-gnu/4.1.0/include /usr/include End of search list. strcoll dsdblm_CreateBlock /home/johnc/tmp/bug.i: In function 'dsdblm_CreateBlock': /home/johnc/tmp/bug.i:201: warning: comparison between pointer and integer dsdblm_WriteBlock Analyzing compilation unitPerforming intraprocedural optimizations Assembling functions: dsdblm_CreateBlock /home/johnc/tmp/bug.i: In function 'dsdblm_CreateBlock': /home/johnc/tmp/bug.i:196: internal compiler error: in compare_values, at tree-vrp.c:301 I can then use gdb on cc1 and put a breakpoint on fancy_abort and get a stack trace... where #0 fancy_abort (file=0x12d <Address 0x12d out of bounds>, line=0, function=0x12d <Address 0x12d out of bounds>) at ../../combined/gcc/diagnostic.c:588 #1 0x08382ab8 in compare_values (val1=0xb7fa8680, val2=0xb7ddfc30) at ../../combined/gcc/tree-vrp.c:410 #2 0x083848bd in compare_range_with_value (comp=LE_EXPR, vr=0xb7dc9840, val=0xb7ddfc30) at ../../combined/gcc/tree-vrp.c:1234 #3 0x08386e64 in vrp_evaluate_conditional (cond=0xb7d66798) at ../../combined/gcc/tree-vrp.c:1992 #4 0x08387025 in vrp_visit_cond_stmt (stmt=0xb7d6c168, taken_edge_p=0xbf9bec20) at ../../combined/gcc/tree-vrp.c:2044 #5 0x083874df in vrp_visit_stmt (stmt=0xb7d6c168, taken_edge_p=0x12d, output_p=0x12d) at ../../combined/gcc/tree-vrp.c:2089 #6 0x08163401 in simulate_stmt (stmt=0xb7d6c168) at ../../combined/gcc/tree-ssa-propagate.c:302 #7 0x08163896 in simulate_block (block=0xb7de2af8) at ../../combined/gcc/tree-ssa-propagate.c:425 #8 0x08164a7d in ssa_propagate (visit_stmt=0x12d, visit_phi=0x12d) at ../../combined/gcc/tree-ssa-propagate.c:667 #9 0x08388526 in execute_vrp () at ../../combined/gcc/tree-vrp.c:2383 #10 0x080d2c02 in execute_one_pass (pass=0x8507600) at ../../combined/gcc/tree-optimize.c:623 #11 0x080d2d28 in execute_pass_list (pass=0x8507600) at ../../combined/gcc/tree-optimize.c:660 #12 0x080d2d48 in execute_pass_list (pass=0x85053c0) at ../../combined/gcc/tree-optimize.c:661 #13 0x080d3008 in tree_rest_of_compilation (fndecl=0xb7de157c) at ../../combined/gcc/tree-optimize.c:793 #14 0x0805d44d in c_expand_body (fndecl=0xb7de157c) at ../../combined/gcc/c-decl.c:6593 #15 0x083adf7a in cgraph_expand_function (node=0xb7de1b64) at ../../combined/gcc/cgraphunit.c:949 #16 0x083ae14b in cgraph_expand_all_functions () at ../../combined/gcc/cgraphunit.c:1013 #17 0x083ae41a in cgraph_optimize () at ../../combined/gcc/cgraphunit.c:1115 #18 0x0834d136 in compile_file () at ../../combined/gcc/toplev.c:1008 #19 0x0834e78b in do_compile () at ../../combined/gcc/toplev.c:2123 #20 0x0834e805 in toplev_main (argc=301, argv=0xbf9bef34) at ../../combined/gcc/toplev.c:2155 #21 0x080b110b in main (argc=301, argv=0x12d) at ../../combined/gcc/main.c:35 -- Summary: ICE in compare_values, at tree-vrp.c:301 Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: john dot carter at tait dot co dot nz CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i486-elf-linux GCC target triplet: arm-elf && i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21858