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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [pr29683.c] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-Os -fno-inline-functions" } */
3
 
4
void abort (void);
5
 
6
typedef struct {
7
  int x[7];
8
} agg7;
9
 
10
typedef struct {
11
  int mbr1;
12
  int mbr2;
13
} agg2;
14
 
15
int expected = 31415;
16
agg7 filler;
17
 
18
int GetConst (agg7 filler, agg2 split)
19
{
20
  return expected;
21
}
22
 
23
void VerifyValues (agg7 filler, int last_reg, int first_stack, int second_stack)
24
{
25
  if (first_stack != 123 || second_stack != expected)
26
    abort ();
27
}
28
 
29
void RunTest (agg2 a)
30
{
31
  int result;
32
 
33
  result = GetConst (filler, a);
34
  VerifyValues (filler, 0, a.mbr1, result);
35
}
36
 
37
int main(void)
38
{
39
  agg2 result = {123, 456};
40
  RunTest (result);
41
  return 0;
42
}
43
 

powered by: WebSVN 2.1.0

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