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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [nothrow1.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// Test that the nothrow optimization works properly.
2
// { dg-do compile }
3
// { dg-options "-O -fdump-tree-optimized" }
4
 
5
extern void blah() throw();
6
 
7
int i, j, k;
8
 
9
int main()
10
{
11
  try
12
    {
13
      ++i;
14
      blah();
15
      ++j;
16
    }
17
  catch (...)
18
    {
19
      return -42;
20
    }
21
}
22
 
23
// The catch block should be optimized away.
24
// { dg-final { scan-tree-dump-times "-42" 0 "optimized" } }
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.