public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/17591] New: Ada bootstrap SEGV in stage2 on osint.adb, no SEGV when -fno-ivopts
@ 2004-09-21 18:44 laurent at guerby dot net
  2004-09-21 18:49 ` [Bug bootstrap/17591] " pinskia at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: laurent at guerby dot net @ 2004-09-21 18:44 UTC (permalink / raw)
  To: gcc-bugs

Somewhere between:
LAST_UPDATED: Mon Sep 20 17:27:11 UTC 2004
LAST_UPDATED: Tue Sep 21 07:01:37 UTC 2004

Ada bootstrap started failing on x86 (fine on x86_64) with:

stage1/xgcc -Bstage1/
-B/home/guerby/work/gcc/install/install-20040921T124859/i686-pc-linux-gnu/bin/
-c -O2 -g -fomit-frame-pointer      -gnatpg -gnata -I- -I. -Iada
-I/home/guerby/work/gcc/version-head/gcc/ada
/home/guerby/work/gcc/version-head/gcc/ada/osint.adb -o ada/osint.o

Execution terminated by unhandled exception
Exception name: STORAGE_ERROR
Message: stack overflow (or erroneous memory access)
Call stack traceback locations:
0x80a9816
make[2]: *** [ada/osint.o] Error 1
make[2]: Leaving directory `/home/guerby/work/gcc/build/build-20040921T124859/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/home/guerby/work/gcc/build/build-20040921T124859/gcc'
make: *** [bootstrap] Error 2

Here is a gdb session:

(gdb) r -I- -I. -Iada -I/home/guerby/work/gcc/version-head/gcc/ada -quiet
-dumpbase osint.adb -O2 -fomit-frame-pointer -g -gnatpg -gnata -mtune=pentiumpro
-gnatO ada/osint.o /home/guerby/work/gcc/version-head/gcc/ada/osint.adb -o
/tmp/ccTN4cek.s
Starting program:
/home/guerby/work/gcc/build/build-20040921T124859/gcc/stage1/gnat1 -I- -I. -Iada
-I/home/guerby/work/gcc/version-head/gcc/ada -quiet -dumpbase osint.adb -O2
-fomit-frame-pointer -g -gnatpg -gnata -mtune=pentiumpro -gnatO ada/osint.o
/home/guerby/work/gcc/version-head/gcc/ada/osint.adb -o /tmp/ccTN4cek.s

Program received signal SIGSEGV, Segmentation fault.
0x08480d93 in operand_equal_p (arg0=0x4071b15c, arg1=0x40a98d98, flags=0) at
/home/guerby/work/gcc/version-head/gcc/fold-const.c:2335
2335      if (TYPE_UNSIGNED (TREE_TYPE (arg0)) != TYPE_UNSIGNED (TREE_TYPE (arg1)))
(gdb) bt
#0  0x08480d93 in operand_equal_p (arg0=0x4071b15c, arg1=0x40a98d98, flags=0) at
/home/guerby/work/gcc/version-head/gcc/fold-const.c:2335
During symbol reading, Incomplete CFI data; unspecified registers at 0x084816c8.
During symbol reading, Incomplete CFI data; unspecified registers at 0x084816c8.
During symbol reading, Incomplete CFI data; unspecified registers at 0x084816c8.
During symbol reading, Incomplete CFI data; unspecified registers at 0x084816c8.
During symbol reading, Incomplete CFI data; unspecified registers at 0x084816c8.
During symbol reading, Incomplete CFI data; unspecified registers at 0x084816c8.
During symbol reading, Incomplete CFI data; unspecified registers at 0x084816c8.
#1  0x084a1c40 in fold (expr=0x406e2804) at
/home/guerby/work/gcc/version-head/gcc/fold-const.c:6955
During symbol reading, Incomplete CFI data; unspecified registers at 0x084a1cf9.
During symbol reading, Incomplete CFI data; unspecified registers at 0x084a1cf9.
During symbol reading, Incomplete CFI data; unspecified registers at 0x084a1cf9.
During symbol reading, Incomplete CFI data; unspecified registers at 0x084a1cf9.
During symbol reading, Incomplete CFI data; unspecified registers at 0x084a1cf9.
#2  0x0842b190 in set_mem_attributes_minus_bitpos (ref=0x40abb6e4, t=0x40ac416c,
objectp=0, bitpos=0)
    at /home/guerby/work/gcc/version-head/gcc/emit-rtl.c:1636
During symbol reading, Incomplete CFI data; unspecified registers at 0x0842b1ab.
During symbol reading, Incomplete CFI data; unspecified registers at 0x0842b1ab.
During symbol reading, Incomplete CFI data; unspecified registers at 0x0842b1ab.
During symbol reading, Incomplete CFI data; unspecified registers at 0x0842b1ab.
During symbol reading, Incomplete CFI data; unspecified registers at 0x0842b1ab.
During symbol reading, Incomplete CFI data; unspecified registers at 0x0842b1ab.
#3  0x0842b6fe in set_mem_attributes (ref=0x40abb6e4, t=0x40ac416c, objectp=0)
at /home/guerby/work/gcc/version-head/gcc/emit-rtl.c:1723
During symbol reading, Incomplete CFI data; unspecified registers at 0x0842b6f9.
During symbol reading, Incomplete CFI data; unspecified registers at 0x0842b6f9.
#4  0x0845eca8 in expand_expr_real_1 (exp=0x4065a300, target=0x40ab0620,
tmode=QImode, modifier=EXPAND_NORMAL, alt_rtl=0xbfffe910)
    at /home/guerby/work/gcc/version-head/gcc/expr.c:6769
#5  0x0845c533 in expand_expr_real (exp=0x4065a300, target=0x40ab0620,
tmode=QImode, modifier=EXPAND_NORMAL, alt_rtl=0xbfffe910)
    at /home/guerby/work/gcc/version-head/gcc/expr.c:6313
#6  0x084530bc in store_expr (exp=0x4065a300, target=0x40ab0620, want_value=0)
at /home/guerby/work/gcc/version-head/gcc/expr.c:3933
#7  0x084522c6 in expand_assignment (to=0x40ac7074, from=0x4065a300,
want_value=0) at /home/guerby/work/gcc/version-head/gcc/expr.c:3746
#8  0x0846a08f in expand_expr_real_1 (exp=0x40719558, target=0x0,
tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
    at /home/guerby/work/gcc/version-head/gcc/expr.c:8087
#9  0x0845c503 in expand_expr_real (exp=0x40719558, target=0x4001b210,
tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
    at /home/guerby/work/gcc/version-head/gcc/expr.c:6307
#10 0x0866ed66 in expand_expr (exp=0x40719558, target=0x4001b210, mode=VOIDmode,
modifier=EXPAND_NORMAL) at expr.h:493
#11 0x08668d7e in expand_expr_stmt (exp=0x40719558) at
/home/guerby/work/gcc/version-head/gcc/stmt.c:1353
#12 0x086bd910 in expand_gimple_basic_block (bb=0x40ab5828, dump_file=0x0) at
/home/guerby/work/gcc/version-head/gcc/cfgexpand.c:1056
#13 0x086bdeff in tree_expand_cfg () at
/home/guerby/work/gcc/version-head/gcc/cfgexpand.c:1223
#14 0x082f8df9 in execute_one_pass (pass=0x8867460) at
/home/guerby/work/gcc/version-head/gcc/tree-optimize.c:501
#15 0x082f8ee5 in execute_pass_list (pass=0x8867460) at
/home/guerby/work/gcc/version-head/gcc/tree-optimize.c:536
#16 0x082f91a5 in tree_rest_of_compilation (fndecl=0x403ced24, nested_p=0 '\0')
at /home/guerby/work/gcc/version-head/gcc/tree-optimize.c:636
#17 0x0806f690 in gnat_expand_body (gnu_decl=0x403ced24) at
/home/guerby/work/gcc/version-head/gcc/ada/misc.c:652
#18 0x086e9dbc in cgraph_expand_function (node=0x4065fef4) at
/home/guerby/work/gcc/version-head/gcc/cgraphunit.c:1044
#19 0x086ede22 in cgraph_expand_all_functions () at
/home/guerby/work/gcc/version-head/gcc/cgraphunit.c:2710
#20 0x086ee202 in cgraph_optimize () at
/home/guerby/work/gcc/version-head/gcc/cgraphunit.c:2821
#21 0x0806dbb7 in gnat_parse_file (set_yydebug=0) at
/home/guerby/work/gcc/version-head/gcc/ada/misc.c:240
#22 0x0867a989 in compile_file () at
/home/guerby/work/gcc/version-head/gcc/toplev.c:991
#23 0x0867c326 in do_compile () at
/home/guerby/work/gcc/version-head/gcc/toplev.c:2079
#24 0x0867c38d in toplev_main (argc=19, argv=0xbfffefd4) at
/home/guerby/work/gcc/version-head/gcc/toplev.c:2111
#25 0x082cf00a in main (argc=19, argv=0xbfffefd4) at
/home/guerby/work/gcc/version-head/gcc/main.c:35
(gdb) l
35        return toplev_main (argc, (const char **) argv);
36      }
(gdb) f 0
#0  0x08480d93 in operand_equal_p (arg0=0x4071b15c, arg1=0x40a98d98, flags=0) at
/home/guerby/work/gcc/version-head/gcc/fold-const.c:2335
2335      if (TYPE_UNSIGNED (TREE_TYPE (arg0)) != TYPE_UNSIGNED (TREE_TYPE (arg1)))
(gdb) l
2330        return 0;
2331
2332      /* If both types don't have the same signedness, then we can't consider
2333         them equal.  We must check this before the STRIP_NOPS calls
2334         because they may change the signedness of the arguments.  */
2335      if (TYPE_UNSIGNED (TREE_TYPE (arg0)) != TYPE_UNSIGNED (TREE_TYPE (arg1)))
2336        return 0;
2337
2338      STRIP_NOPS (arg0);
2339      STRIP_NOPS (arg1);
(gdb) p arg0
$1 = 0x4071b15c
(gdb) p debug_tree(arg0)
 <var_decl 0x4071b15c upper_bound.313
    type <integer_type 0x40021488 integer asm_written public visited SI
        size <integer_cst 0x4001e408 constant invariant 32>
        unit size <integer_cst 0x4001e138 constant invariant 4>
        align 32 symtab 1073890112 alias set 119 precision 32 min <integer_cst
0x4001e3d8 -2147483648> max <integer_cst 0x4001e3f0 2147483647>
        pointer_to_this <pointer_type 0x40021e80>>
    used ignored SI file /home/guerby/work/gcc/version-head/gcc/ada/osint.adb
line 1148 size <integer_cst 0x4001e408 32> unit size <integer_cst 0x4001e138 4>
    align 32 context <function_decl 0x403ced24 osint__get_next_dir_in_path>
    (reg:SI 82 [ upper_bound.313 ]) chain <var_decl 0x4071b1d0>>
$2 = void
(gdb) p debug_tree(arg1)
 <ssa_name 0x40a98d98 nothrow var <var_decl 0x40717e80> def_stmt <ssa_name
0x40ab8cd0>
    version 34 in-free-list>
$3 = void
(gdb) call print_generic_stmt(stderr,exp,0)
No symbol "exp" in current context.
(gdb) up
#1  0x084a1c40 in fold (expr=0x406e2804) at
/home/guerby/work/gcc/version-head/gcc/fold-const.c:6955
6955          if ((! FLOAT_TYPE_P (type) || flag_unsafe_math_optimizations)
(gdb) p exp
No symbol "exp" in current context.
(gdb) up
#2  0x0842b190 in set_mem_attributes_minus_bitpos (ref=0x40abb6e4, t=0x40ac416c,
objectp=0, bitpos=0)
    at /home/guerby/work/gcc/version-head/gcc/emit-rtl.c:1636
1636                    index = fold (build2 (MINUS_EXPR, TREE_TYPE (index),
(gdb) p exp
No symbol "exp" in current context.
(gdb) up
#3  0x0842b6fe in set_mem_attributes (ref=0x40abb6e4, t=0x40ac416c, objectp=0)
at /home/guerby/work/gcc/version-head/gcc/emit-rtl.c:1723
1723      set_mem_attributes_minus_bitpos (ref, t, objectp, 0);
(gdb) p exp
No symbol "exp" in current context.
(gdb) up
#4  0x0845eca8 in expand_expr_real_1 (exp=0x4065a300, target=0x40ab0620,
tmode=QImode, modifier=EXPAND_NORMAL, alt_rtl=0xbfffe910)
    at /home/guerby/work/gcc/version-head/gcc/expr.c:6769
6769            set_mem_attributes (temp, orig, 0);
(gdb) p exp
$4 = 0x4065a300
(gdb) call print_generic_stmt(stderr,exp,0)
*(&(*D.3846)[D.7937]{lb: temp.808 sz: 1} + (character *) ivtmp.789);

(gdb) r -I- -I. -Iada -I/home/guerby/work/gcc/version-head/gcc/ada -quiet
-dumpbase osint.adb -O2 -fomit-frame-pointer -g -gnatpg -gnata -mtune=pentiumpro
-fno-ivopts -gnatO ada/osint.o
/home/guerby/work/gcc/version-head/gcc/ada/osint.adb -o /tmp/ccTN4cek.s
Starting program:
/home/guerby/work/gcc/build/build-20040921T124859/gcc/stage1/gnat1 -I- -I. -Iada
-I/home/guerby/work/gcc/version-head/gcc/ada -quiet -dumpbase osint.adb -O2
-fomit-frame-pointer -g -gnatpg -gnata -mtune=pentiumpro -fno-ivopts -gnatO
ada/osint.o /home/guerby/work/gcc/version-head/gcc/ada/osint.adb -o /tmp/ccTN4cek.s

Program exited normally.

I'll try a full bootstrap with -fno-ivopts.

Laurent

-- 
           Summary: Ada bootstrap SEGV in stage2 on osint.adb, no SEGV when
                    -fno-ivopts
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: laurent at guerby dot net
                CC: gcc-bugs at gcc dot gnu dot org,rakdver at atrey dot
                    karlin dot mff dot cuni dot cz
  GCC host triplet: i686-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-09-26 13:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-21 18:44 [Bug bootstrap/17591] New: Ada bootstrap SEGV in stage2 on osint.adb, no SEGV when -fno-ivopts laurent at guerby dot net
2004-09-21 18:49 ` [Bug bootstrap/17591] " pinskia at gcc dot gnu dot org
2004-09-21 19:02 ` laurent at guerby dot net
2004-09-21 19:06 ` pinskia at gcc dot gnu dot org
2004-09-21 19:09 ` [Bug tree-optimization/17591] " pinskia at gcc dot gnu dot org
2004-09-22 21:24 ` [Bug bootstrap/17591] " laurent at guerby dot net
2004-09-22 22:11 ` [Bug tree-optimization/17591] " pinskia at gcc dot gnu dot org
2004-09-23 12:12 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2004-09-24 22:31 ` [Bug bootstrap/17591] " laurent at guerby dot net
2004-09-24 22:40 ` [Bug tree-optimization/17591] " pinskia at gcc dot gnu dot org
2004-09-25 11:12 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2004-09-25 15:18 ` pinskia at gcc dot gnu dot org
2004-09-26  8:32 ` cvs-commit at gcc dot gnu dot org
2004-09-26 13:44 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).