This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30406] ICE in LOGICAL(8) functions
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jan 2007 08:11:40 -0000
- Subject: [Bug fortran/30406] ICE in LOGICAL(8) functions
- References: <bug-30406-12313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #14 from fxcoudert at gcc dot gnu dot org 2007-01-10 08:11 -------
In emit_move_insn, the failing assert is:
(gdb) l 3275
3270 {
3271 enum machine_mode mode = GET_MODE (x);
3272 rtx y_cst = NULL_RTX;
3273 rtx last_insn, set;
3274
3275 gcc_assert (mode != BLKmode
3276 && (GET_MODE (y) == mode || GET_MODE (y) == VOIDmode));
3277
3278 if (CONSTANT_P (y))
3279 {
(gdb) p debug_rtx(x)
(reg:SI 122 [ <result> ])
$14 = void
(gdb) p debug_rtx(y)
(reg:DI 119 [ D.951 ])
$15 = void
Clearly, the modes are incompatible. When cgraph_finalize_function is called
(frame 14), decl is:
(gdb) p debug_tree(decl)
<function_decl 0x42e79200 f
type <function_type 0x42e77c40
type <boolean_type 0x42e218c0 logical8 public unsigned DI
size <integer_cst 0x42e0a8a0 constant invariant 64>
unit size <integer_cst 0x42e0a8c0 constant invariant 8>
align 64 symtab 0 alias set -1 canonical type 0x42e218c0 precision
1 min <integer_cst 0x42e23080 0> max <integer_cst 0x42e230c0 1>
reference_to_this <reference_type 0x42e77bd0>>
SI
size <integer_cst 0x42e0a700 constant invariant 32>
unit size <integer_cst 0x42e0a3c0 constant invariant 4>
align 32 symtab 0 alias set -1 structural equality
arg-types <tree_list 0x42e78400 value <reference_type 0x42e77bd0>
chain <tree_list 0x42e78420 value <void_type 0x42e199a0 void>>>>
public static SI file a.f90 line 1 initial <block 0x41d71480>
arguments <parm_decl 0x42e15120 l
type <reference_type 0x42e77bd0 type <boolean_type 0x42e218c0 logical8>
unsigned SI size <integer_cst 0x42e0a700 32> unit size <integer_cst
0x42e0a3c0 4>
align 32 symtab 0 alias set -1 canonical type 0x42e77bd0>
readonly used unsigned SI file a.f90 line 1 size <integer_cst
0x42e0a700 32> unit size <integer_cst 0x42e0a3c0 4>
align 32 context <function_decl 0x42e79200 f> initial <reference_type
0x42e77bd0>
(mem/f/c/i:SI (reg/f:SI 114 virtual-incoming-args) [0 l+0 S4 A32])
arg-type <reference_type 0x42e77bd0>
incoming-rtl (reg:SI 3 r3 [ l ])>
result <result_decl 0x42e150c0 D.946 type <boolean_type 0x42e218c0
logical8>
unsigned ignored regdecl DI file a.f90 line 1 size <integer_cst
0x42e0a8a0 64> unit size <integer_cst 0x42e0a8c0 8>
align 64 context <function_decl 0x42e79200 f>
(reg:SI 122 [ <result> ])>
(mem:SI (symbol_ref:SI ("f_") [flags 0x403] <function_decl 0x42e79200 f>)
[0 S4 A8])
saved-insns 0x42e14240 chain <function_decl 0x42e79180
_gfortran_st_set_nml_var_dim>>
I think the problem might be related to "(reg:SI 120 [ <result> ])" in the
result section, but I'm not a tree expert enough to be positive.
PS: the same testcase works when compiled with -m64. It can also be reduced to:
function f()
logical(8) :: f
f=.false._8
end function f
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2007-01-10 06:43:58 |2007-01-10 08:11:39
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30406