Silence -Wunused-variable in release builds.
[llvm/stm8.git] / test / FrontendC++ / integration-O2.cpp
blobbb65ac210332a8a8cb3431ef04529e3c5ad5d8ff
1 // RUN: %llvmgxx %s -O2 -S -o - | FileCheck %s
3 // This test verifies that we get expected codegen out of the -O2 optimization
4 // level from the full optimizer.
8 // Verify that ipsccp is running and can eliminate globals.
9 static int test1g = 42;
10 void test1f1() {
11 if (test1g == 0) test1g = 0;
13 int test1f2() {
14 return test1g;
17 // CHECK: @_Z7test1f2v()
18 // CHECK: entry:
19 // CHECK-NEXT: ret i32 42