This is the mail archive of the gcc-patches@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]

Re: [PATCH] Clean up tests where a later dg-do completely overrides another.


On 04/29/2016 05:56 PM, Dominik Vogt wrote:

Yeah, sorry, I really should have mentioned this but forgot about
it.  It's a bug in DejaGnu.  When it encounters a conditional
dg-do and the condition does not match, it *still* replaces the
do-action of a prior dg-do with the current one.  With DejaGnu
prior to 1.6, there are two possibilities.

  /* { dg-do run { target sh*-*-* } } */
  /* { dg-do compile } */

The "compile" always wins.  The test is just compiled on all
platforms and not run anywhere.  With

  /* { dg-do compile } */
  /* { dg-do run { target sh*-*-* } } */

The "run" wins and the test is compiled and run everywhere, even
on targets that do not match sh*-*-*.

The bug is fixed in DejaGnu-1.6 which has been released on the
15th of April.  This is the fix:

  http://git.savannah.gnu.org/gitweb/?p=dejagnu.git;a=commit;h=569f8718b534a2cd9511a7d640352eb0126ff492

(The patch could easily be backported to earlier DejaGnu
releases.)

I think it might be best to either update DejaGnu locally or to
live with the failure.  It really indicates a bug - in DejaGnu
though, not in Gcc.  However, there are some target specific test
cases that rely on multiple conditional dg-do to work properly
that are not executed as they should be (some stuff on Power and
another target that I can't remember; Mips?).  The only way to
deal with the situation properly is to upgrade DejaGnu.  Otherwise
you either have failing test cases or test cases don't do what the
test file says.

Maybe a comment should be added to the test case

  /* If this test is *run* (not just compiled) and therefore fails
     on non sh*-targets, this is because of a bug older DejaGnu
     versions.  This is fixed with DejaGnu-1.6.  */
I think we have a couple issues now that are resolved if we step forward to a newer version of dejagnu.

Given dejagnu-1.6 was recently released, should we just bite the bullet and ask everyone to step forward?

jeff


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