OSDN Git Service

Squash commit of EH in gimple
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / tree-ssa / pr33593.C
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fnon-call-exceptions -fdump-tree-optimized" } */
3
4 #include <stdio.h>
5
6 void foo (int) { printf ("Bar\n"); }
7
8 int
9 main (void)
10 {
11   int a = 1 / 0;        // { dg-warning "division by zero" }
12   printf ("Foo\n");
13   foo (a);
14 }
15
16 // The expression 1 / 0 should not be propagated into the call to foo() if it
17 // may trap.
18 // { dg-final { scan-tree-dump-times "foo \\(1 \\/ 0\\)" 0 "optimized" } }
19 // { dg-final { cleanup-tree-dump "optimized" } }