This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: Fix a function decl in gfortran


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


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