OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [bind_c_usage_10_c.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
/* Check BIND(C) for ENTRY
2
   PR fortran/34079
3
   To be linked with bind_c_usage_10.f03
4
*/
5
 
6
void mySub1(int *);
7
void mySub3(int *);
8
void mySubEnt2(float *);
9
void mySubEnt3(float *);
10
void sub4ent(float *);
11
 
12
int myFunc1(void);
13
int myFunc3(void);
14
float myFuncEnt2(void);
15
float myFuncEnt3(void);
16
float func4ent(void);
17
 
18
extern void abort(void);
19
 
20
int main()
21
{
22
  int i = -1;
23
  float r = -3.0f;
24
 
25
  mySub1(&i);
26
  if(i != 5) abort();
27
  mySub3(&i);
28
  if(i != 7) abort();
29
  mySubEnt2(&r);
30
  if(r != 66.0f) abort();
31
  mySubEnt3(&r);
32
  if(r != 77.0f) abort();
33
  sub4ent(&r);
34
  if(r != 88.0f) abort();
35
 
36
  i = myFunc1();
37
  if(i != -5) abort();
38
  i = myFunc3();
39
  if(i != -7) abort();
40
  r = myFuncEnt2();
41
  if(r != -66.0f) abort();
42
  r = myFuncEnt3();
43
  if(r != -77.0f) abort();
44
  r = func4ent();
45
  if(r != -88.0f) abort();
46
 
47
  return 0;
48
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.