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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [Wunused-parm-1.c] - Blame information for rev 801

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 "-Wunused -W" } */
3
 
4
long
5
f1 (unsigned long long x)
6
{
7
  unsigned long long a = 1;
8
  const union { unsigned long long l; unsigned int p[2]; } b = { .l = x };
9
  const union { unsigned long long l; unsigned int p[2]; } c = { .l = a };
10
  return b.p[0] + c.p[0];
11
}
12
 
13
int
14
f2 (int x, int y)
15
{
16
  int a = 1;
17
  int b[] = { 1, 2, x, a, 3, 4 };
18
  return b[y];
19
}
20
 
21
int
22
f3 (int a,      /* { dg-warning "unused parameter" } */
23
    int b,      /* { dg-warning "set but not used" } */
24
    int c)
25
{
26
  b = 1;
27
  c = 1;
28
  return c;
29
}

powered by: WebSVN 2.1.0

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