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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr25734.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-Os" } */
3
 
4
struct list_head {
5
 struct list_head *next;
6
};
7
static inline __attribute__((always_inline)) void list_del_init(struct
8
list_head *entry)
9
{
10
 __list_del(entry->next);
11
 (entry)->next = (entry);
12
};
13
struct dentry {
14
 void *d_fsdata;
15
};
16
struct sysfs_dirent {
17
 struct list_head s_sibling;
18
 struct list_head s_children;
19
};
20
const char *sysfs_get_name(struct sysfs_dirent *);
21
void sysfs_hash_and_remove(struct dentry * dir, const char * name)
22
{
23
 struct sysfs_dirent * sd;
24
 struct sysfs_dirent * parent_sd = dir->d_fsdata;
25
 for (sd = (struct sysfs_dirent *)((&parent_sd->s_children)->next);
26
     &sd->s_sibling != (&parent_sd->s_children);
27
     sd  = (struct sysfs_dirent *)sd->s_sibling.next) {
28
  if (!__builtin_strcmp(sysfs_get_name(sd), name))
29
  {
30
   list_del_init(&sd->s_sibling);
31
   break;
32
  }
33
 }
34
}

powered by: WebSVN 2.1.0

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