This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/26440] ICE in expand_copysign, at optabs.c:2930 with using -ff2c



------- Comment #2 from rguenth at gcc dot gnu dot org  2006-02-23 12:48 -------
We are trying to expand

#3  0x0816828b in expand_builtin (exp=0x401f8258, target=0x401f3e30,
subtarget=0x401f3e30, mode=SFmode, ignore=0)
    at /space/rguenther/src/svn/gcc-4_1-branch/gcc/builtins.c:5651
5651          target = expand_builtin_copysign (arglist, target, subtarget);
(gdb) call debug_tree(exp)
 <call_expr 0x401f8258
    type <real_type 0x401cd958 real4 SF
        size <integer_cst 0x401bf3f0 constant invariant 32>
        unit size <integer_cst 0x401bf180 constant invariant 4>
        align 32 symtab 0 alias set -1 precision 32
        pointer_to_this <pointer_type 0x401cda6c>>

    arg 0 <addr_expr 0x40209e60
        type <pointer_type 0x4020e33c type <function_type 0x401f66d4>
            unsigned SI size <integer_cst 0x401bf3f0 32> unit size <integer_cst
0x401bf180 4>
            align 32 symtab 0 alias set -1>
        readonly constant invariant
        arg 0 <function_decl 0x401fe780 __builtin_copysignf type <function_type
0x401f66d4>
            readonly addressable public external built-in QI file t.f line 0
            built-in BUILT_IN_NORMAL:BUILT_IN_COPYSIGNF
            (mem:QI (symbol_ref:SI ("copysignf") [flags 0x41] <function_decl
0x401fe780 __builtin_copysignf>) [0 S1 A8]) chain <function_decl 0x401fe700
__builtin_copysign>>>
    arg 1 <tree_list 0x4020c360
        value <var_decl 0x401ca370 __result_gvftor type <real_type 0x401cd9b4
real8>
            used DF file t.f line 31
            size <integer_cst 0x401bf528 constant invariant 64>
            unit size <integer_cst 0x401bf540 constant invariant 8>
            align 32 context <function_decl 0x40206e80 gvftor>
            (mem/c/i:DF (plus:SI (reg/f:SI 54 virtual-stack-vars)
        (const_int -8 [0xfffffff8])) [0 __result_gvftor+0 S8 A32])>
        chain <tree_list 0x4020c3a8 value <var_decl 0x401ca580 D.609>>>
    t.f:37>

where we later call 

#2  0x08166042 in expand_builtin_copysign (arglist=0x4020c360,
target=0x401f3e30, subtarget=0x401f3e30)
    at /space/rguenther/src/svn/gcc-4_1-branch/gcc/builtins.c:4818
4818      return expand_copysign (op0, op1, target);

with

(gdb) call debug_rtx(op0)
(mem/c/i:DF (plus:SI (reg/f:SI 54 virtual-stack-vars)
        (const_int -8 [0xfffffff8])) [0 __result_gvftor+0 S8 A32])
(gdb) call debug_rtx(op1)
(reg:SF 60 [ D.609 ])

(note the wrong mode, which comes from a real*4 arg)


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]