That test 'testvoidarg' succeeds for me (normal
termination, no SIGSEGV) on Fedora 28 and Fedora 29.
Yes, it only seems to affect f30/Rawhide with GCC 9 (though I'm not sure it's the
culprit).
The traceback says:
> 41 QCOMPARE(addedFunc->arguments().count(), 0);
so the suggestion is to check if addedFunc->arguments() is NULL.
'addedFunc' itself is 0 (NULL).
Substituting testvoidarg.cpp.o as compiled by gcc-8.2.1-6.fc28.x86_64 (from the same
source)
gives the same SIGSEGV. So compiling testvoidarg.cpp with gcc-9 is no longer a suspect.
=====
void TestVoidArg::testVoidParsedFunction()
{
const char cppCode[] = "struct A { void a(void); };";
const char xmlCode[] = "\
<typesystem package=\"Foo\">\
<value-type name='A'/>\
</typesystem>";
TestUtil t(cppCode, xmlCode);
AbstractMetaClassList classes = t.builder()->classes();
AbstractMetaClass* classA = classes.findClass("A");
QVERIFY(classA);
const AbstractMetaFunction* addedFunc = classA->findFunction("a");
QCOMPARE(addedFunc->arguments().count(), 0); ///// line 41
}
=====