This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
970125-0.f
- To: egcs-bugs at cygnus dot com
- Subject: 970125-0.f
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 01 Jun 1998 00:53:46 -0600
- Cc: burley at gnu dot org
- Reply-To: law at cygnus dot com
I think the problem with this testcase is actually in the Fortran
front-end, but not being an expert on trees, I'm not really sure.
Basically it looks like when building an argument list for a
function call we end up creating this kind of tree for one
of the arguments:
(gdb) p debug_tree(item)
<addr_expr 0x82b8c70
type <pointer_type 0x82cbe5c
type <pointer_type 0x82cbd94 type <integer_type 0x82c1dbc integer>
allocated from permanent_obstack
unsigned permanent SI
size <integer_cst 0x82b6fcc constant permanent 32>
align 32 symtab 0
pointer_to_this <pointer_type 0x82cbe5c>>
allocated from permanent_obstack
unsigned permanent SI size <integer_cst 0x82b6fcc 32>
align 32 symtab 0>
allocated from momentary_obstack
arg 0 <addr_expr 0x82b8c34 type <pointer_type 0x82cbd94>
allocated from momentary_obstack
arg 0 <var_decl 0x82b9fc0 i4 type <integer_type 0x82c1dbc integer>
allocated from function maybepermanent obstack
addressable used common SI file k.f line 1 size <integer_cst 0x82b6fcc 32>
align 32 context <function_decl 0x82cbbb8 MAIN__>
(mem:SI (addressof:SI (reg:SI 23) 21))>>>
Note that we have (ADDR_EXPR (ADDR_EXPR ...)) which seems more than
a little strange to me.
This happens in ffecom_arg_ptr_to_expr at this line:
13222
13223 item = ffecom_1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (item)),
13224 item);
13225 return item;
When we get to this point item is:
<addr_expr 0x82b8c34
type <pointer_type 0x82cbd94
type <integer_type 0x82c1dbc integer allocated from permanent_obstack
permanent SI
size <integer_cst 0x82b6fcc constant permanent 32>
align 32 symtab 0 precision 32
min <integer_cst 0x82c1e18 constant permanent -2147483648>
max <integer_cst 0x82c1e30 constant permanent 2147483647>
pointer_to_this <pointer_type 0x82cbd94>>
allocated from permanent_obstack
unsigned permanent SI size <integer_cst 0x82b6fcc 32>
align 32 symtab 0>
allocated from momentary_obstack
arg 0 <var_decl 0x82b9fc0 i4 type <integer_type 0x82c1dbc integer>
allocated from function maybepermanent obstack
addressable used common SI file k.f line 1 size <integer_cst 0x82b6fcc 32>
align 32 context <function_decl 0x82cbbb8 MAIN__>
(mem:SI (addressof:SI (reg:SI 23) 21))>>
Does it make sense to make (ADDR_EXPR (ADDR_EXPR ...)??
If it doesn't, then the bug is the Fortran front end.
jeff