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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [20030907-1.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR optimization/12198
2
 
3
   This was a miscompilation of a switch expressions because
4
   the "Case Ranges" extension wasn't handled in tree-cfg.c.  */
5
 
6
/* { dg-do compile } */
7
/* { dg-options "-O -fdump-tree-optimized" } */
8
 
9
extern void abort (void);
10
extern void exit (int);
11
 
12
int main()
13
{
14
   int i;
15
   i = 2;
16
   switch (i)
17
      {
18
      case 1 ... 5:
19
         goto L1;
20
      default:
21
         abort ();
22
         goto L1;
23
      }
24
   L1:
25
   exit(0);
26
}
27
 
28
/* The abort() call clearly is unreachable.  */
29
/* { dg-final { scan-tree-dump-times "abort" 0 "optimized"} } */
30
/* { 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.