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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr45709-2.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
 
3
struct Region {
4
    int storage[4];
5
    int count;
6
};
7
static inline Region subtract(int lhs)
8
{
9
  Region reg;
10
  int* storage = reg.storage;
11
  int* storage2 = reg.storage;
12
  if (lhs > 0)
13
    storage++, storage2--;
14
  reg.count = storage - reg.storage + storage2 - reg.storage;
15
  return reg;
16
}
17
void bar(int a)
18
{
19
  const Region copyBack(subtract(a));
20
}

powered by: WebSVN 2.1.0

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