summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/langs0.c
blob: 1477a324f91aa4597177245d6cfb5bf1935bed2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* This file is actually in C, it is not supposed to simulate something
   translated from another language or anything like that.  */
#ifdef PROTOTYPES
extern  int fsub_();

int csub (int x)
#else
int
csub (x)
     int x;
#endif
{
  return x + 1;
}

int
langs0__2do ()
{
  return fsub_ () + 2;
}

int
main ()
{
#ifdef usestubs
  set_debug_traps();
  breakpoint();
#endif
  if (langs0__2do () == 5003)
    /* Success.  */
    return 0;
  else
    return 1;
}