Testsuite: vla-optimized-out.exp is too pessimistic
authorAlan Hayward <alan.hayward@arm.com>
Thu, 18 Oct 2018 10:43:40 +0000 (11:43 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Fri, 19 Oct 2018 10:21:12 +0000 (11:21 +0100)
On aarch64 (and possibly other ports), for O3 the sizeof "a" can still be shown.

2018-10-19  Alan Hayward  <alan.hayward@arm.com>

* gdb.base/vla-optimized-out.exp: Allow either optimized out or 6.

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

index 0cc9e445ead2358627fb247f280fac44bd025c3a..d33e7f2a672e9437a21a93d1234ddcc331e220be 100644 (file)
@@ -1,3 +1,7 @@
+2018-10-19  Alan Hayward  <alan.hayward@arm.com>
+
+       * gdb.base/vla-optimized-out.exp: Allow either optimized out or 6.
+
 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
 
        * gdb.cp/ovldbreak.exp: Fix regexps.
index 88c6fac9b988cbefb30adaf7ba1dd276b26a7370..dd04a006e0f15a98a02fc9dce4ccae21a8075f23 100644 (file)
@@ -70,10 +70,10 @@ proc vla_optimized_out {exe_suffix options} {
 
 foreach {test_prefix options} \
     { "o1" {{debug optimize=-O1 additional_flags=-DNOCLONE} "6"} \
-      "o3" {{debug optimize=-O3} "<optimized out>"} \
+      "o3" {{debug optimize=-O3} "<optimized out>|6"} \
       "o3_strict" {{debug optimize=-O3 \
                        additional_flags=-gstrict-dwarf} \
-                      "<optimized out>"}} {
+                      "<optimized out>|6"}} {
     with_test_prefix $test_prefix {
        vla_optimized_out $test_prefix $options
     }