This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

test-suite question, dg-final/scan-file on objects?


Hi,

In the Obj{C,C++} testsuite we have cases where we want to check for reasonably long ascii strings in generated data.

At present, this is done in some places by dg-final/scan-assembler constructs, but these can (and do) fail when the target assembler breaks long strings into shorter concatenated segments.

One solution is target-specific scan-assembler statements, but makes the test cases less readable and more prone to maintenance error.

A nicer (and, in a way, more correct) solution would be to use scan- file to match for the string in the object.

dg-final/scan-file seems to work on all the targets I've got access to...
... however, grep tells me that scan-file is usually used on ".i" rather than ".o" files ... so I'd like to ask:


"Is it an accepted approach to use scan-file on objects? " ... or
"Is there an equivalent to scan-file specifically targeted at objects?" (nothing leaps out at me in the doc./google)


cheers
Iain


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]