We really need a testsuite for IMA testcases so that IMA does not brake again (or some testcases which cannot be reproduced with a normal testcase but only with IMA).
PR 16954 contains one testcase, Zack has my examples which were created (I might create some more and attach them here).
Another testcase in: <http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02951.html>.
[17:13] < Rhyolite> it mainly needs a group of files to be compiled with -combine and a driver that will compile them all at once [17:14] < Rhyolite> e.g., foo_a.c, foo_b.c, foo_c.c, foo_d.c, etc. [17:14] < Rhyolite> try to compile "gcc -combine foo_?.c"
Look at dg-additional-files and dg-additional-sources, defined in gcc-testsuite/lib/gcc-defs.exp and used in several tests. I'll take a closer look at them soon, but feel free to beat me to it and try them out on the IMA tests.
Here's how two tests mentioned here can use dg-additional-sources. I ran these in gcc.dg.special, which only treats files matching *[0-9].c as tests. I don't yet know why, but 'dg-do compile' turns into 'dg-do assemble' and vice versa when dg-additional-sources is used. % cat combine-1a.c extern int printf (const char *, ...); struct x { int a; int b; }; bar (struct x* p) { printf ("%d\n", p->a); } % cat combine-1.c /* { dg-do compile } */ /* { dg-options "-combine -O3" } */ /* { dg-additional-sources combine-1a.c } */ struct x; foo (struct x* q) { bar (q); } % cat combine-2a.c #include "combine-2.h" int sentence[MAX_WORD]; % cat combine-2b.c #include "combine-2.h" % cat combine-2.c /* { dg-do compile } */ /* { dg-options "-combine" } */ /* { dg-additional-sources "combine-2a.c combine-2b.c" } */ /* { dg-additional-files combine-2.h } */ #include "combine-2.h" % cat combine-2.h #define MAX_WORD 60 extern int sentence[];
I think we can close this as won't fix. LTO has a testsuite part already so it is not a big deal.