[gdb/testsuite] Make noclone conditional in vla-optimized-out.c
authorTom de Vries <tdevries@suse.de>
Fri, 20 Jul 2018 14:40:10 +0000 (16:40 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 20 Jul 2018 15:04:02 +0000 (17:04 +0200)
Make the noclone attribute on f1 in vla-optimized-out.c conditional.  This
makes the test-case by default identical to
gcc/testsuite/gcc.dg/guality/vla-1.c.

Tested on x86_64-linux.

2018-07-20  Tom de Vries  <tdevries@suse.de>

* gdb.base/vla-optimized-out.c: Make noclone attribute conditional on
NOCLONE macro.
* gdb.base/vla-optimized-out.exp: Use additional_flags -DNOCLONE.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/vla-optimized-out.c
gdb/testsuite/gdb.base/vla-optimized-out.exp

index 79ef76faf76594c58bdc6562cb248de9fbe97a28..6d086644a6afa4c5a1a77a406aba30a87d4880c2 100644 (file)
@@ -1,3 +1,9 @@
+2018-07-20  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.base/vla-optimized-out.c: Make noclone attribute conditional on
+       NOCLONE macro.
+       * gdb.base/vla-optimized-out.exp: Use additional_flags -DNOCLONE.
+
 2018-07-19  Tom de Vries  <tdevries@suse.de>
 
        * gdb.mi/list-thread-groups-available.exp (cores_re): Fix quoting in
index 913e8ea8670d4d991cc7cb380572892922cbdd20..ec0a6fdd8012c2b29933f324eca324d701927cbf 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-int __attribute__((noinline, noclone))
+int
+#ifdef NOCLONE
+__attribute__((noinline, noclone))
+#else
+__attribute__((noinline))
+#endif
 f1 (int i)
 {
   char a[i + 1];
index 39abb795c8929a509157349ae4396d21c4c0a9bc..b27569ed1e18b0000235c2de1e086ca9a37b43e6 100644 (file)
@@ -18,7 +18,7 @@
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
-         {debug optimize=-O1}] } {
+         {debug optimize=-O1 additional_flags=-DNOCLONE}] } {
     return -1
 }
 
This page took 0.034068 seconds and 4 git commands to generate.