This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Q about assignment expansion
- From: DJ Delorie <dj at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 25 Sep 2007 00:16:50 -0400
- Subject: Q about assignment expansion
I'm trying to get libfortran (all_l4.c) building for m32c, and it
complains (eventually) that it can't add PSI (pointer) and HI
(integer) types together. I've backtracked to the statement just
before it's lowered to rtl, see below. Note that pointers are PSI
mode (24 bits) for this chip. My question is: Who's responsible for
converting address types to pointer sizes?
sstride[n] = array->dim[n].stride;
<gimple_modify_stmt 0xb7dd6e54 side-effects asm_written visited
arg 0 <target_mem_ref 0xb7e36078
type <integer_type 0xb7eba3cc long int sizes-gimplified asm_written public SI
size <integer_cst 0xb7eac4d0 constant invariant 32>
unit size <integer_cst 0xb7eac24c constant invariant 4>
align 8 symtab -1208871140 alias set 3 canonical type 0xb7eba3cc precision 32 min <integer_cst 0xb7eac47c -2147483648> max <integer_cst 0xb7eac498 2147483647>
pointer_to_this <pointer_type 0xb7ec4438>>
arg 1 <plus_expr 0xb7e3957c type <integer_type 0xb7eba000 unsigned int>
arg 0 <var_decl 0xb7e38228 D.3720>
arg 1 <nop_expr 0xb7e37c60 type <integer_type 0xb7eba360 unsigned int>
invariant
arg 0 <addr_expr 0xb7e37c80 type <pointer_type 0xb7dd4dec>
invariant arg 0 <var_decl 0xb7f9eda8 sstride>>>>
arg 5 <array_ref 0xb7e345d8 type <integer_type 0xb7eba3cc long int>
arg 0 <var_decl 0xb7f9eda8 sstride> arg 1 <var_decl 0xb7dd70b8 n>>
arg 6 <var_decl 0xb7f9eda8 sstride type <array_type 0xb7dd42f4>
addressable used BLK file ../../../../gcc/libgfortran/generated/all_l4.c line 50
size <integer_cst 0xb7f24b7c constant invariant 224>
unit size <integer_cst 0xb7f246ac constant invariant 28>
align 16 context <function_decl 0xb7dcff80 all_l4>
(mem/s/c:BLK (plus:PSI (reg/f:PSI 21 virtual-stack-vars)
(const_int -84 [0xffffffac])) [12 sstride+0 S28 A16]) chain <var_decl 0xb7f9eebc dstride>>>
arg 1 <target_mem_ref 0xb7e3603c
type <integer_type 0xb7f963cc index_type sizes-gimplified asm_written public SI size <integer_cst 0xb7eac4d0 32> unit size <integer_cst 0xb7eac24c 4>
align 8 symtab -1208406160 alias set -1 canonical type 0xb7eba3cc precision 32 min <integer_cst 0xb7eac47c -2147483648> max <integer_cst 0xb7eac498 2147483647>
pointer_to_this <pointer_type 0xb7dd4360>>
arg 1 <var_decl 0xb7e38170 D.3718 type <integer_type 0xb7eba000 unsigned int>
used unsigned ignored HI file ../../../../gcc/libgfortran/generated/all_l4.c line 47
size <integer_cst 0xb7eac3b8 constant invariant 16>
unit size <integer_cst 0xb7eac3d4 constant invariant 2>
align 8 context <function_decl 0xb7dcff80 all_l4>
(reg:HI 70 [ D.3718 ])>
arg 4 <integer_cst 0xb7f24594 constant invariant 10>
arg 5 <component_ref 0xb7e19b68 type <integer_type 0xb7f963cc index_type>
arg 0 <array_ref 0xb7e344fc type <record_type 0xb7f96798 descriptor_dimension>
arg 0 <component_ref 0xb7e19b90 type <array_type 0xb7f96a8c>
arg 0 <indirect_ref 0xb7e37b60 type <record_type 0xb7fa22f4 gfc_array_l4>
arg 0 <parm_decl 0xb7dd32a0 array>> arg 1 <field_decl 0xb7fa1180 dim>> arg 1 <var_decl 0xb7dd70b8 n>> arg 1 <field_decl 0xb7f7bcc0 stride>>
arg 6 <name_memory_tag 0xb7df23dc NMT.10 type <record_type 0xb7fa22f4 gfc_array_l4>
addressable used file ../../../../gcc/libgfortran/generated/all_l4.c line 47 context <function_decl 0xb7dcff80 all_l4>>>
../../../../gcc/libgfortran/generated/all_l4.c:69>
(insn 106 105 107 ../../../../gcc/libgfortran/generated/all_l4.c:69 (set (reg:SI 156)
(mem/s:SI (plus:PSI (reg:HI 70 [ D.3718 ])
(const_int 10 [0xa])) [6 <variable>.stride+0 S4 A8])) -1 (nil))
/greed/dj/m32c/gcc/m32c-elf/./gcc/xgcc
-B/greed/dj/m32c/gcc/m32c-elf/./gcc/
-B/greed/dj/m32c/install/m32c-elf/bin/
-B/greed/dj/m32c/install/m32c-elf/lib/ -isystem
/greed/dj/m32c/install/m32c-elf/include -isystem
/greed/dj/m32c/install/m32c-elf/sys-include -DHAVE_CONFIG_H
-I. -I../../../../gcc/libgfortran
-I. -iquote../../../../gcc/libgfortran/io
-I../../../../gcc/libgfortran/../gcc
-I../../../../gcc/libgfortran/../gcc/config -I../../.././gcc
-D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings
-O2 -g -O2 -mcpu=m32cm -c
../../../../gcc/libgfortran/generated/all_l4.c -o all_l4.o