testsuite problems after merge

I'm seeing ~100 new failures in the gcc testsuite due to the test file being doubled or tripled, as below. This appears to affect only files that were newly imported from gcc-4.2 in the recent merge. Does anybody have an idea for how to mechanize fixing these (I doubt you can count on the APPLE LOCAL comment being there)? If there's no better way than slogging through I'll help. And of course we should figure out why and prevent it from happening again....

now what? more $ld/gcc/llvm-gcc-4.2/gcc/testsuite/gcc.apple/5597292.c
/* APPLE LOCAL file 5597292 */
/* { dg-do compile } */
/* { dg-options "-static -O0 -gstabs+" } */
void * foo(unsigned int size)
{
   union {
     char _m[size];
   } *mem;
}
/* APPLE LOCAL file 5597292 */
/* { dg-do compile } */
/* { dg-options "-static -O0 -gstabs+" } */
void * foo(unsigned int size)
{
   union {
     char _m[size];
   } *mem;
}
/* APPLE LOCAL file 5597292 */
/* { dg-do compile } */
/* { dg-options "-static -O0 -gstabs+" } */
void * foo(unsigned int size)
{
   union {
     char _m[size];
   } *mem;
}

I'm seeing ~100 new failures in the gcc testsuite due to the test file being doubled or tripled, as below.

This is due to an incorrect use of the tools. Bill, I'd be happy to help out, but, you'd need to say how you did the merge. I suspect you may have just grabbed a patch and applied it three times in a row.

Roughly, what you need to do is to have a import branch that is unmodified upstream, and then you just merge the last version of that branch to the current version of that branch using svn merge onto your llvm branch.

diff -r upstream current

and then look for APPLE LOCAL markers that have been added, there should be none. That's the best auditing method I can come up with in seconds.

(I doubt you can count on the APPLE LOCAL comment being there)?

Yes, you can count on them being there.

I'll help you track these down. Give me a list of the ones that are failing and I can start slogging through them. It should be easy to fix, at least. I don't know what happened. The method I used was "svn diff" followed by "patch -p0". *shrugs* We should take Mike's suggestion next time.

-bw

If you did diff -r1 -r2, then diff -r2 -r3, then diff -r3 -r4, it should have worked.

These should be fixed now. Sorry for the mess.

-bw

Thanks for fixing it all. I'll try again overnight and let you know if you missed any:)