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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wuninitialized-5.C] - Blame information for rev 701

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

Line No. Rev Author Line
1 693 jeremybenn
// PR middle-end/39666
2
// { dg-do compile }
3
// { dg-options "-O2 -Wuninitialized" }
4
 
5
int
6
foo (int i)
7
{
8
  int j;
9
  switch (i)
10
    {
11
    case -__INT_MAX__ - 1 ... -1:
12
      j = 6;
13
      break;
14
    case 0:
15
      j = 5;
16
      break;
17
    case 2 ... __INT_MAX__:
18
      j = 4;
19
      break;
20
    }
21
  return j;     // { dg-warning "may be used uninitialized" }
22
}

powered by: WebSVN 2.1.0

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