OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [volatile2.c] - Blame information for rev 404

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

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-gimple -fdump-tree-optimized" } */
3
 
4
struct GTeth_desc
5
{
6
  unsigned ed_cmdsts;
7
};
8
struct GTeth_softc
9
{
10
  struct GTeth_desc txq_desc[32];
11
};
12
 
13
void foo(struct GTeth_softc *sc)
14
{
15
  /* Verify that we retain the cast to (volatile struct GTeth_desc *)
16
     after gimplification and that we keep the volatileness on the
17
     store until after optimization.  */
18
  volatile struct GTeth_desc *p = &sc->txq_desc[0];
19
  p->ed_cmdsts = 0;
20
}
21
 
22
/* { dg-final { scan-tree-dump "\\(volatile struct GTeth_desc \\*\\) D" "gimple" } } */
23
/* { dg-final { scan-tree-dump "{v}" "optimized" } } */
24
/* { dg-final { cleanup-tree-dump "gimple" } } */
25
/* { 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.