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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr30590.C] - Blame information for rev 825

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 "-O" } */
3
struct test
4
{
5
  int type;
6
  char buffer[4242]; /* should trigger pass-by-reference */
7
};
8
 
9
int flag = 0;
10
 
11
struct test
12
reset (void)
13
{
14
  struct test retval;
15
  retval.type = 1;
16
  return retval;
17
}
18
 
19
struct test
20
test (void)
21
{
22
  struct test result;
23
  result.type = 0;
24
 
25
  for (int i = 0; i < 2; ++i)
26
    {
27
      struct test candidate = reset ();
28
      if (flag)
29
        result = candidate;
30
    }
31
 
32
  return result;
33
}
34
 
35
int
36
main (void)
37
{
38
  struct test result = test ();
39
  return result.type;
40
}

powered by: WebSVN 2.1.0

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