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: PR31692 - Wrong code when passing function name as result to procedures


Irritatingly, it's broken on x86_ia64/FC5.

Later, later - it's my birthday today and I have cake and champagne waiting.

Paul

On 5/3/07, Tobias Burnus <burnus@net-b.de> wrote:
Hi again,

Tobias Burnus wrote:
> How about the following test? I did not test yet your patch ;-)
>
But I should have done so!

>       if(foo1(n) /= [ 1,2,3 ]) call abort()
>       if(foo2(n) /= [ 1,2,3 ]) call abort()
>
There is an "any( .... /= ...)" missing.

In addition, gfortran gets it wrong for foo2:
foo2 (__result, n)
{ // ...
    __result->data = _gfortran_allocate64_array (__result->data, size.0, 0);
  bar1 ((int4 *) n, __result);

The function call is wrong. bar1 expects an "array(*)" not an "array(:)".

foo1 does do it correctly:
    __result.0 = (int4[0:D.1413] *) __result->data;
  bar1 ((int4 *) n, __result.0);


Tobias




--
"Success is the ability to go from one failure to another with no loss
of enthusiasm."  -  Winston Churchill


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