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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr45819.c] - Blame information for rev 749

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-optimized -w" } */
3
 
4
struct ehci_regs {
5
    char x;
6
    unsigned int port_status[0];
7
} __attribute__ ((packed));
8
 
9
struct ehci_hcd {
10
    struct ehci_regs *regs;
11
};
12
 
13
int ehci_hub_control (struct ehci_hcd *ehci, int wIndex)
14
{
15
  unsigned int *status_reg = &ehci->regs->port_status[wIndex];
16
  return *(volatile unsigned int *)status_reg;
17
}
18
 
19
/* { dg-final { scan-tree-dump "={v}" "optimized" } } */
20
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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