On 7/6/07 11:48 AM, FX Coudert wrote:

> Depends what is your current version,

$ rpm -q gmp
gmp-4.1.4-12


> I guess. Can you get us a backtrace?

Well, it seems to be a mis-compilation of f951.  The stage3 f951 binary
dies trying to fold an INDIRECT_REF with a NULL type (suspicious).  The
stage1 f951 binary works like a charm.

On IRC, David Edelsohn mentioned that Steve Kargl was looking to debug
this problem but didn't have access to ppc hardware.  Steve, I could
give you an account on my machine if you wanted.

In the meantime I will try upgrading gmp/mpfr but I'm not quite sure
that this is related.

(gdb) run
Starting program: /home/dnovillo/perf/sbox/gcc/local.ppc64/bld/gcc/f951
/home/dnovillo/perf/sbox/gcc/local.ppc64/src/libgfortran/intrinsics/selected_int_kind.f90
-quiet -dumpbase selected_int_kind.f90 -auxbase-strip
.libs/selected_int_kind.o -g -O2 -Wall -version -fno-repack-arrays
-fno-underscoring -fallow-leading-underscore -fPIC -I .
-fintrinsic-modules-path finclude -o selected_int_kind.s
GNU F95 version 4.3.0 20070706 (experimental) (powerpc64-unknown-linux-gnu)
        compiled by GNU C version 4.3.0 20070706 (experimental), GMP
version 4.1.4, MPFR version 2.2.0.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

Program received signal SIGSEGV, Segmentation fault.
0x000000001018e96c in fold_comparison (code=LE_EXPR, type=0x400000af480,
    op0=0x40000163040, op1=0x40000094870)
    at /home/dnovillo/perf/sbox/gcc/local.ppc64/src/gcc/fold-const.c:8470
8470      if (POINTER_TYPE_P (TREE_TYPE (arg0))
(gdb) pt arg0
 <indirect_ref 0x40000163040
    arg 0 <parm_decl 0x40000095320 r
        type <integer_type 0x4000009d540 int4 asm_written public SI
            size <integer_cst 0x4000008e8d0 constant invariant 32>
            unit size <integer_cst 0x4000008e540 constant invariant 4>
            align 32 symtab 1024 alias set -1 canonical type
0x4000009d540 precision 32 min <integer_cst 0x4000008e840 -2147483648>
max <integer_cst 0x4000008e870 2147483647>
            pointer_to_this <pointer_type 0x400000a9840>
reference_to_this <reference_type 0x4000015f240>>
        readonly used unsigned SI file
/home/dnovillo/perf/sbox/gcc/local.ppc64/src/libgfortran/intrinsics/selected_int_kind.f90
line 22
        size <integer_cst 0x4000008e9c0 constant invariant 64>
        unit size <integer_cst 0x4000008e9f0 constant invariant 8>
        align 64 context <function_decl 0x4000015ee00
_gfortran_selected_int_kind> initial <integer_type 0x4000009d540 int4>
arg-type <integer_type 0x4000009d540 int4>>>
(gdb) p arg0.common.type
$1 = (tree) 0x0


(gdb) bt
#0  0x000000001018e96c in fold_comparison (code=LE_EXPR,
type=0x400000af480,
    op0=0x40000163040, op1=0x40000094870)
    at /home/dnovillo/perf/sbox/gcc/local.ppc64/src/gcc/fold-const.c:8470
#1  0x0000000010192b84 in fold_binary (code=LE_EXPR, type=0x400000af480,
    op0=0x40000163040, op1=0x40000094870)
    at /home/dnovillo/perf/sbox/gcc/local.ppc64/src/gcc/fold-const.c:11866
#2  0x44020444ffbe3370 in ?? ()
#3  0x000000001018e94c in fold_comparison (code=LE_EXPR, type=0x2,
    op0=0xfffffbe3730, op1=0x108c5190)
    at /home/dnovillo/perf/sbox/gcc/local.ppc64/src/gcc/fold-const.c:8400
#4  0x0000000010604af0 in __FUNCTION__.32310 ()
#5  0x000000001018e94c in fold_comparison (code=ERROR_MARK, type=0x0,
op0=0x0,
    op1=0x0)
    at /home/dnovillo/perf/sbox/gcc/local.ppc64/src/gcc/fold-const.c:8400
#6  0x00000fffffbe3620 in ?? ()
#7  0x000000001018e94c in fold_comparison (code=4290655880,
    type=0xfffffbe3688, op0=0x4000009d540, op1=0x40000160060)
    at /home/dnovillo/perf/sbox/gcc/local.ppc64/src/gcc/fold-const.c:8400
#8  0x0000000000000005 in ?? ()
#9  0x000000001018e94c in fold_comparison (code=4290656032, type=0x0,
    op0=0x107710b0, op1=0x4c2e320000000001)
    at /home/dnovillo/perf/sbox/gcc/local.ppc64/src/gcc/fold-const.c:8400
#10 0x0000000000000000 in ?? ()

Reply via email to