]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/gfortran.dg/ISO_Fortran_binding_8.c
testsuite/lib/gfortran.exp: Add -I for ISO*.h [PR101305, PR101660]
[gcc.git] / gcc / testsuite / gfortran.dg / ISO_Fortran_binding_8.c
CommitLineData
0324a497
PT
1/* Test the fix for PR89841. */
2
3/* Contributed by Reinhold Bader <Bader@lrz.de> */
4
527a1cf3 5#include <ISO_Fortran_binding.h>
0324a497
PT
6#include <stdio.h>
7
8float Cxgl[] = { 1.1, 2.3, 5.1, 4.2 };
9
10void globalp(CFI_cdesc_t *this)
11{
12 int i, status;
13 float *pt;
14 CFI_index_t lb[] = { 3 };
15 CFI_index_t ub[] = { 6 };
16
17 if (this->base_addr == NULL)
18 {
19 status = CFI_allocate(this, lb, ub, 0);
20 }
21 else
22 {
23 printf("FAIL C: already allocated.\n");
24 return;
25 }
26
27 if (status != CFI_SUCCESS)
28 {
29 printf("FAIL C: status is %i\n",status);
30 }
31
32 pt = (float *) this->base_addr;
33 for (i=0; i<4; i++)
34 {
35 pt[i] = Cxgl[i];
36 }
37}
This page took 1.989706 seconds and 5 git commands to generate.