diff options
author | synergydev <synergye@codefi.re> | 2013-10-17 18:16:42 -0700 |
---|---|---|
committer | synergydev <synergye@codefi.re> | 2013-10-17 18:16:42 -0700 |
commit | 61c0330cc243abf13fdd01f377a7f80bd3989eb1 (patch) | |
tree | 119b08ae76294f23e2b1b7e72ff9a06afa9e8509 /gcc-4.8/gcc/testsuite/g++.dg/warn/Wunused-var-21.C | |
parent | 1c712bf7621f3859c33fd3afaa61fdcaf3fdfd76 (diff) | |
download | toolchain_gcc-61c0330cc243abf13fdd01f377a7f80bd3989eb1.tar.gz toolchain_gcc-61c0330cc243abf13fdd01f377a7f80bd3989eb1.tar.bz2 toolchain_gcc-61c0330cc243abf13fdd01f377a7f80bd3989eb1.zip |
[4.8] Merge GCC 4.8.2
Change-Id: I0f1fcf69c5076d8534c5c45562745e1a37adb197
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.dg/warn/Wunused-var-21.C')
-rw-r--r-- | gcc-4.8/gcc/testsuite/g++.dg/warn/Wunused-var-21.C | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/g++.dg/warn/Wunused-var-21.C b/gcc-4.8/gcc/testsuite/g++.dg/warn/Wunused-var-21.C new file mode 100644 index 000000000..d279e5980 --- /dev/null +++ b/gcc-4.8/gcc/testsuite/g++.dg/warn/Wunused-var-21.C @@ -0,0 +1,31 @@ +// PR c++/58325 +// { dg-do compile } +// { dg-options "-Wunused" } + +void +f1 () +{ + int *volatile a = new int[1]; + delete[] a; +} + +void +f2 () +{ + int *b = new int[1]; + delete[] b; +} + +void +f3 () +{ + int *volatile c = new int; + delete c; +} + +void +f4 () +{ + int *d = new int; + delete d; +} |