Command line:
gcc -g testcase.c

----- testcase.c -----
void foo (int __attribute__ ((__mode__ (vector_size (8)))) x) {}
void bar (int x[i()]) {}
----------------------
(reduced from testsuite/gcc.dg/parm-impl-decl-1.c)

Tested revisions:
r157675 - crash
r157460 - crash
r157122 - crash
r153685 - crash
4.4 r153695 - crash
4.4.3 (gentoo) - crash
4.3.4, 4.2.4 (gentoo) - OK

Output:
$ /mnt/svn/gcc-trunk/binary-157675-lto/bin/gcc -g testcase.c
testcase.c:1:1: warning: '__mode__' attribute ignored
gcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

GDB backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff636df3a in vfprintf () from /lib/libc.so.6
(gdb) bt
#0  0x00007ffff636df3a in vfprintf () from /lib/libc.so.6
#1  0x00007ffff6392e19 in vsprintf () from /lib/libc.so.6
#2  0x00007ffff6378f38 in sprintf () from /lib/libc.so.6
#3  0x00000000005ceb36 in gen_subprogram_die (decl=0x7ffff5a80d00,
context_die=0x7ffff5a855d8) at /mnt/svn/gcc-trunk/gcc/dwarf2out.c:17886
#4  0x00000000005d510c in gen_decl_die (decl=0x7ffff5a80d00, origin=<value
optimized out>, context_die=0x7ffff5a855d8) at
/mnt/svn/gcc-trunk/gcc/dwarf2out.c:19521
#5  0x00000000005cd460 in decls_for_scope (stmt=0x7ffff5a850b0,
context_die=0x7ffff5a855d8, depth=0) at
/mnt/svn/gcc-trunk/gcc/dwarf2out.c:19200
#6  0x00000000005cd9b9 in gen_subprogram_die (decl=0x7ffff5a80d00,
context_die=<value optimized out>) at /mnt/svn/gcc-trunk/gcc/dwarf2out.c:18060
#7  0x00000000005d510c in gen_decl_die (decl=0x7ffff5a80d00, origin=<value
optimized out>, context_die=0x7ffff5a855d8) at
/mnt/svn/gcc-trunk/gcc/dwarf2out.c:19521
#8  0x00000000005cd460 in decls_for_scope (stmt=0x7ffff5a850b0,
context_die=0x7ffff5a855d8, depth=0) at
/mnt/svn/gcc-trunk/gcc/dwarf2out.c:19200
#9  0x00000000005cd9b9 in gen_subprogram_die (decl=0x7ffff5a80d00,
context_die=<value optimized out>) at /mnt/svn/gcc-trunk/gcc/dwarf2out.c:18060
#10 0x00000000005d510c in gen_decl_die (decl=0x7ffff5a80d00, origin=<value
optimized out>, context_die=0x7ffff5a855d8) at
/mnt/svn/gcc-trunk/gcc/dwarf2out.c:19521
#11 0x00000000005cd460 in decls_for_scope (stmt=0x7ffff5a850b0,
context_die=0x7ffff5a855d8, depth=0) at
/mnt/svn/gcc-trunk/gcc/dwarf2out.c:19200
#12 0x00000000005cd9b9 in gen_subprogram_die (decl=0x7ffff5a80d00,
context_die=<value optimized out>) at /mnt/svn/gcc-trunk/gcc/dwarf2out.c:18060

...

#17850 0x00000000005cd9b9 in gen_subprogram_die (decl=0x7ffff5a80d00,
context_die=<value optimized out>) at /mnt/svn/gcc-trunk/gcc/dwarf2out.c:18060
#17851 0x00000000005d510c in gen_decl_die (decl=0x7ffff5a80d00, origin=<value
optimized out>, context_die=0x7ffff5a855d8) at
/mnt/svn/gcc-trunk/gcc/dwarf2out.c:19521
#17852 0x00000000005cd460 in decls_for_scope (stmt=0x7ffff5a850b0,
context_die=0x7ffff5a855d8, depth=0) at
/mnt/svn/gcc-trunk/gcc/dwarf2out.c:19200
#17853 0x00000000005cd9b9 in gen_subprogram_die (decl=0x7ffff5a80d00,
context_die=<value optimized out>) at /mnt/svn/gcc-trunk/gcc/dwarf2out.c:18060
#17854 0x00000000005d510c in gen_decl_die (decl=0x7ffff5a80d00, origin=<value
optimized out>, context_die=0x7ffff5a855d8) at
/mnt/svn/gcc-trunk/gcc/dwarf2out.c:19521
#17855 0x00000000005cd460 in decls_for_scope (stmt=0x7ffff5a850b0,
context_die=0x7ffff5a855d8, depth=0) at
/mnt/svn/gcc-trunk/gcc/dwarf2out.c:19200
#17856 0x00000000005cd9b9 in gen_subprogram_die (decl=0x7ffff5a80d00,
context_die=<value optimized out>) at /mnt/svn/gcc-trunk/gcc/dwarf2out.c:18060
#17857 0x00000000005d510c in gen_decl_die (decl=0x7ffff5a80d00, origin=<value
optimized out>, context_die=0x7ffff5a85000) at
/mnt/svn/gcc-trunk/gcc/dwarf2out.c:19521
#17858 0x000000000061c78d in rest_of_handle_final () at
/mnt/svn/gcc-trunk/gcc/final.c:4287
#17859 0x0000000000725e0b in execute_one_pass (pass=0x116d400) at
/mnt/svn/gcc-trunk/gcc/passes.c:1567
#17860 0x0000000000726095 in execute_pass_list (pass=0x116d400) at
/mnt/svn/gcc-trunk/gcc/passes.c:1622
#17861 0x00000000007260a7 in execute_pass_list (pass=0x11faaa0) at
/mnt/svn/gcc-trunk/gcc/passes.c:1623
#17862 0x00000000007260a7 in execute_pass_list (pass=0x11faa40) at
/mnt/svn/gcc-trunk/gcc/passes.c:1623
#17863 0x000000000081c4c5 in tree_rest_of_compilation (fndecl=0x7ffff5a80d00)
at /mnt/svn/gcc-trunk/gcc/tree-optimize.c:413
#17864 0x00000000009a0441 in cgraph_expand_function (node=0x7ffff7ed8750) at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1548
#17865 0x00000000009a11c0 in cgraph_output_in_order () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1724
#17866 0x00000000009a31ef in cgraph_optimize () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1872
#17867 0x00000000009a33c5 in cgraph_finalize_compilation_unit () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1096
#17868 0x00000000004b0753 in c_write_global_declarations () at
/mnt/svn/gcc-trunk/gcc/c-decl.c:9512
#17869 0x00000000007cb010 in compile_file (argc=13, argv=0x7fffffffdbd8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:1065
#17870 do_compile (argc=13, argv=0x7fffffffdbd8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:2409
#17871 toplev_main (argc=13, argv=0x7fffffffdbd8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:2451
#17872 0x00007ffff6347bbd in __libc_start_main () from /lib/libc.so.6
#17873 0x0000000000494be9 in _start ()


-- 
           Summary: [4.4/4.5 Regression] ICE: Segmentation fault with -g due
                    to too deep recursion
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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

Reply via email to