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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.base/] [shmain.c] - Diff between revs 107 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 107 Rev 1765
/* A test */
/* A test */
 
 
#include "ss.h"
#include "ss.h"
#include <stdio.h>
#include <stdio.h>
 
 
extern int structarg(struct s);
extern int structarg(struct s);
extern int pstructarg(struct s*);
extern int pstructarg(struct s*);
extern int shr1(int);
extern int shr1(int);
extern int shr2(int);
extern int shr2(int);
extern float sg;
extern float sg;
 
 
int eglob;
int eglob;
 
 
struct {
struct {
 int a;
 int a;
 int b;
 int b;
} s;
} s;
 
 
int g;
int g;
 
 
#ifdef PROTOTYPES
#ifdef PROTOTYPES
int local_structarg(struct s x)
int local_structarg(struct s x)
#else
#else
int local_structarg(x)
int local_structarg(x)
struct s x;
struct s x;
#endif
#endif
{
{
  return x.b;
  return x.b;
}
}
 
 
#ifdef PROTOTYPES
#ifdef PROTOTYPES
int mainshr1(int g)
int mainshr1(int g)
#else
#else
int mainshr1(g)
int mainshr1(g)
int g;
int g;
#endif
#endif
{
{
  return 2*g;
  return 2*g;
}
}
 
 
int main()
int main()
{
{
  struct s y;
  struct s y;
  g = 1;
  g = 1;
  g = shr1(g);
  g = shr1(g);
  g = shr2(g);
  g = shr2(g);
  g = mainshr1(g);
  g = mainshr1(g);
  sg = 1.1;
  sg = 1.1;
  printf("address of sg is 0x%x\n", &sg);
  printf("address of sg is 0x%x\n", &sg);
  y.a = 3;
  y.a = 3;
  y.b = 4;
  y.b = 4;
  g = local_structarg(y);
  g = local_structarg(y);
  g = structarg(y);
  g = structarg(y);
  g = pstructarg(&y);
  g = pstructarg(&y);
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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