This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Fix a function decl in gfortran
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>, Tobias Burnus <burnus at net-b dot de>
- Cc: <fortran at gcc dot gnu dot org>, <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 4 Jun 2014 19:29:32 +0200
- Subject: Re: Fix a function decl in gfortran
- Authentication-results: sourceware.org; auth=none
- References: <20140527140139 dot GA4291 at physik dot fu-berlin dot de> <538E285C dot 40304 at codesourcery dot com> <538E42AA dot 6050005 at net-b dot de> <538EB918 dot 8050503 at net-b dot de> <20140604074046 dot GA12107 at physik dot fu-berlin dot de>
On 06/04/2014 09:40 AM, Tobias Burnus wrote:
Still untested patch, but I cannot resist pointing out stupid
typos by myself.
I intent to tests the build and test the patch - and then to
commit it as obvious. If you see problems with this approach
please scream now.
Even with this applied, I'm still seeing similar failures. I'm now
looking at gfortran.dg/realloc_on_assign_1.f03 and related testcases.
(gdb) p gfc_debug_expr(gfc_expr*) (expr)
_gfortran_reshape_4[[((MAIN__:src(FULL)) ((/ , /)) ((arg not-present))
((arg not-present)))]]
[later:]
(gdb) p exp
$17 = <call_expr 0x7ffff064ac60>
(gdb) pge
_gfortran_reshape_4 (_631, _630, _629, 0B, 0B)
(gdb) p fndecl
$18 = <function_decl 0x7ffff07e5b00 _gfortran_reshape_4>
(gdb) pt
<function_decl 0x7ffff07e5b00 _gfortran_reshape_4
type <function_type
type <void_type void VOID
align 8 symtab 0 alias set -1 canonical type
pointer_to_this <pointer_type>>
SI
size <integer_cst constant 32>
unit size <integer_cst constant 4>
align 32 symtab 0 alias set -1 canonical type
attributes <tree_list
purpose <identifier_node fn spec>
value <tree_list 0x7ffff07fddc0
value <string_cst 0x7ffff07f8f60 constant ".wrr">>>
arg-types <tree_list value <reference_type >
chain <tree_list value <reference_type >
chain <tree_list value <reference_type >
chain <tree_list value <void_type void>>>>>
pointer_to_this <pointer_type >>
and in libgfortran:
void
reshape_4 (gfc_array_i4 * const restrict ret,
gfc_array_i4 * const restrict source,
shape_type * const restrict shape,
gfc_array_i4 * const restrict pad,
shape_type * const restrict order)
So we're seeing more arguments in the call than on the decl (oddly the
call only has four arguments at the assembly level, but that might a
problem with my backend - I'll investigate).
Bernd