Occurred on the following version of tree-ssa: gcc (GCC) 3.5-tree-ssa 20031105 (merged 20031026) Configure options given to GCC: --prefix=/notnfs/bbooth/ia64/inst --srcdir=/notnfs/bbooth/gcc --disable-multilib Command line that fails and compiler output: /notnfs/bbooth/tree-ssa/ia64/gcc/cc1 -fpreprocessed tracepoint.i -qui rith -Wuninitialized -version -ftime-report -o tracepoint.s cc1: warning: -Wuninitialized is not supported without -O GNU C version 3.5-tree-ssa 20031105 (merged 20031026) (ia64-unknown-linux-gnu) compiled by GNU C version 3.2.3 20030422 (Red Hat Linux 3.2.3-12). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 /notnfs/bbooth/tree-ssa/GDB/gdb-6.0/gdb/tracepoint.c: In function `stringify_colle /notnfs/bbooth/tree-ssa/GDB/gdb-6.0/gdb/tracepoint.c:1387: internal compiler error Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. ================ .i file to come.
Created attachment 5069 [details] Associated .i file
Created attachment 5070 [details] Debugger Output
Confirmed on alpha-linux 3.5-tree-ssa 20031105. Smaller test case: void stringify_collection_list(char *(*str_list)[]) { (*str_list)[0] = 0; }
backtrace on 3.5-tree-ssa 20031112 alpha-linux: Starting program: /src/gcc-tree-ssa-2003.11.12/build/gcc/cc1 /tmp/test.c stringify_collection_list Breakpoint 1, fancy_abort (file=0x120454fe8 "../../gcc/stor-layout.c", line=290, function=0x120454dd9 "int_mode_for_mode") at ../../gcc/diagnostic.c:584 584 internal_error ("in %s, at %s:%d", function, trim_filename (file), line); (gdb) bt #0 fancy_abort (file=0x120454fe8 "../../gcc/stor-layout.c", line=290, function=0x120454dd9 "int_mode_for_mode") at ../../gcc/diagnostic.c:584 #1 0x0000000120302b08 in int_mode_for_mode (mode=BLKmode) at ../../gcc/stor-layout.c:290 #2 0x00000001201a0504 in store_bit_field (str_rtx=0x20000297038, bitsize=64, bitnum=0, fieldmode=DImode, value=0x200001ea400, total_size=-1) at ../../gcc/expmed.c:376 #3 0x00000001201c5dc0 in store_field (target=0x20000297038, bitsize=64, bitpos=0, mode=DImode, exp=0x200001ed800, value_mode=VOIDmode, unsignedp=1, type=0x200002f97a0, alias_set=0) at ../../gcc/expr.c:5258 #4 0x00000001201c6538 in expand_assignment (to=0x200001f0be0, from=0x200001ed800, want_value=3119008) at ../../gcc/expr.c:3843 #5 0x00000001201b0d24 in expand_expr_1 (exp=0x200001f0c30, target=0x200001ea400, tmode=VOIDmode, modifier=EXPAND_NORMAL) at ../../gcc/expr.c:8907 #6 0x00000001201c2014 in expand_expr (exp=0x200001f0c30, target=0x200001ea400, tmode=VOIDmode, modifier=EXPAND_NORMAL) at ../../gcc/expr.c:6291 #7 0x00000001201b5310 in expand_expr_1 (exp=0x200001f0cd0, target=0x200001f0d10, tmode=VOIDmode, modifier=EXPAND_NORMAL) at ../../gcc/expr.c:6851 #8 0x00000001201c2054 in expand_expr (exp=0x200001f0cd0, target=0x200001ea400, tmode=VOIDmode, modifier=EXPAND_NORMAL) at ../../gcc/expr.c:6298 #9 0x00000001202f734c in expand_expr_stmt_value (exp=0x200001f0cd0, want_value=0, maybe_last=541412825) at ../../gcc/stmt.c:2222 #10 0x0000000120060084 in expand_stmt_toplev (t=0x120454fe8) at ../../gcc/c-semantics.c:920 #11 0x00000001200bd4dc in tree_rest_of_compilation (fndecl=0x200002f9b20, nested_p=false) at ../../gcc/tree-optimize.c:341 #12 0x0000000120021888 in c_expand_body_1 (fndecl=0x200002f9b20, nested_p=0) at ../../gcc/c-decl.c:6202 #13 0x000000012035f538 in cgraph_expand_function (node=0x200002fbc80) at ../../gcc/cgraphunit.c:497 #14 0x000000012035f6cc in cgraph_assemble_pending_functions () at ../../gcc/cgraphunit.c:142 #15 0x0000000120360a00 in cgraph_finalize_function (decl=0x200002f9b20, nested=false) at ../../gcc/cgraphunit.c:221 #16 0x0000000120021da0 in finish_function () at ../../gcc/c-decl.c:6158 #17 0x000000012000446c in yyparse () at c-parse.y:386 #18 0x000000012000bd28 in c_parse_file () at c-parse.y:3033 #19 0x0000000120059d90 in c_common_parse_file (set_yydebug=541413352) at ../../gcc/c-opts.c:1221 #20 0x0000000120311dd8 in toplev_main (argc=541832248, argv=0x11ffff665) at ../../gcc/toplev.c:1876 #21 0x0000000120093e38 in main (argc=541413352, argv=0x122) at ../../gcc/main.c:35 (gdb)
May be a 64 bit thing, I can't reproduce this on i686-pc-linux-gnu
I cannot reproduce this on powerpc-apple-darwin either.
Subject: Re: [tree-ssa] compiler fails to build gdb > May be a 64 bit thing, I can't reproduce this on i686-pc-linux-gnu I'll give it a whirl on ppc64 sometime this weekend.
Here is a case where it fails on powerpc (from an email from Fariborz Jahanian): float (*x)[]; void a_tether( ) { (*x)[20] = 3.0; }
This bug was introduced when the second conditional in routine build_array_ref was removed in the tree-ssa branch. Was this intentional or a merge mishap? Thanks, Fariborz if (TREE_CODE (TREE_TYPE (array)) == ARRAY_TYPE && TREE_CODE (array) != INDIRECT_REF) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ <- condition removed in tree-ssa
It was intentational removed: * builtins.c (fold_builtin): Use get_callee_fndecl. * attribs.c (decl_attributes): Rebuild the function pointer type after changing the target type. * tree.c (get_qualified_type): Also check that the attributes match. * c-typeck.c (build_array_ref): Also build ARRAY_REFs from INDIRECT_REFs of ARRAY_TYPE. * tree-ssa.c (tree_ssa_useless_type_conversion): Also strip conversions between pointer and reference types. * tree-dfa.c (get_stmt_operands): Just mark non-GIMPLE statements as unmodified. (find_referenced_vars): So we don't need to mark them here. * tree-inline.c (inline_data): Add retvar field. (declare_return_variable): Set it. (remap_decls): Use it. (expand_call_inline): Tweak. cp/ * typeck.c (build_array_ref): Also build ARRAY_REFs from INDIRECT_REFs of ARRAY_TYPE. * semantics.c (finish_id_expression): Unshare aliases.
Here is the patch <http://gcc.gnu.org/ml/gcc-patches/2003-08/msg01135.html>. The problem is really is in the Tree to RTL converters.
Jason could you look into this, your patch caused it.
Subject: Bug 12920 CVSROOT: /cvs/gcc Module name: gcc Branch: tree-ssa-20020619-branch Changes by: jason@gcc.gnu.org 2003-12-17 05:40:23 Modified files: gcc : ChangeLog.tree-ssa stor-layout.c c-decl.c gcc/cp : ChangeLog.tree-ssa decl.c Log message: PR middle-end/12920 * stor-layout.c (layout_type): Just return if type is error_mark_node. * c-decl.c (grokdeclarator): Immediately layout an ARRAY_TYPE used in a pointer-to-array declarator. * cp/decl.c (grokdeclarator): Immediately layout an ARRAY_TYPE used in a pointer-to-array declarator. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.1018&r2=1.1.2.1019 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/stor-layout.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.126.2.25&r2=1.126.2.26 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.334.2.72&r2=1.334.2.73 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.59&r2=1.1.2.60 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.911.2.57&r2=1.911.2.58
Fixed.