Skip VLA structure field tests when compiling with clang
authorGary Benson <gbenson@redhat.com>
Mon, 13 Jul 2020 13:47:44 +0000 (14:47 +0100)
committerGary Benson <gbenson@redhat.com>
Mon, 13 Jul 2020 13:47:44 +0000 (14:47 +0100)
commit3f00c730acee9d452ba81a3083f2c02d13c9f312
treeb4989447d3d0663ca8ca0066f3f738fb60034ccf
parent7a34d0ea4ddd5ff205637fbad5faf2e977921720
Skip VLA structure field tests when compiling with clang

Clang fails to compile gdb.base/vla-datatypes.c with the following
error: fields must have a constant size: 'variable length array in
structure' extension will never be supported.  This commit factors
the affected tests out into a new testcase, vla-struct-fields.{exp,c},
which is skipped when the testcase is compiled using clang,

gdb/testsuite/ChangeLog:

* gdb.base/vla-datatypes.c (vla_factory): Factor out sections
defining and using VLA structure fields into...
* gdb.base/vla-struct-fields.c: New file.
* gdb.base/vla-datatypes.exp: Factor out VLA structure field
tests into...
* gdb.base/vla-struct-fields.exp: New file.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/vla-datatypes.c
gdb/testsuite/gdb.base/vla-datatypes.exp
gdb/testsuite/gdb.base/vla-struct-fields.c [new file with mode: 0644]
gdb/testsuite/gdb.base/vla-struct-fields.exp [new file with mode: 0644]