This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [Patch, Fortran] -std=f2008tr, TR 29113 and OPTIONAL arguments with BIND(C)



Build and regtested on x86-64-linux
OK for the trunk?

I forgot to include a run-time test case. Find one attached.


Tobias

Attachment: bind_c_usage_24.f90
Description: Text document

/* Compiled and linked by bind_c.f90.  */

#include <stdlib.h>

void subtest (_Bool, int *);

void
c_proc (_Bool present, int *val)
{
  int val2;
  if (!present && val)
    abort ();
  else if (present)
    {
      if (!val) abort ();
      if (*val != 4) abort ();
      *val = 7;
    }

  val2 = 43;
  subtest (1, &val2);
  subtest (0, NULL);
  if (val2 != -45) abort ();
}

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