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]

Re: PATCH for Re: more evidence that failing to detect ICE's is a significant problem


>>>>> "Jason" == Jason Merrill <jason@cygnus.com> writes:

>>>>> Mark Mitchell <mark@markmitchell.com> writes:

>>>>> "Jason" == Jason Merrill <jason@cygnus.com> writes:
    Jason> Oops, I forgot to respond to this before.  I don't think
    Jason> this patch is a good idea, as there's no way to set XFAIL
    Jason> for the ICE.  I think the old way of considering an ICE to
    Jason> be a failure was fine.  Sure, all crashes are bugs, but not
    Jason> necessarily worse bugs than others.

    >> Unfortunately, with something like this:

    >> void f() { /* Some bad code */ // ERROR - should get error -
    >> XFAIL }

    >> a crash anywhere would result in a PASS.

    Jason> No, we gave a FAIL for a crash where an error was expected.

The issue was that we were not spotting a regression.  In particular,
the test case was:

  //Build don't link:
  template class x {}; // ERROR - not a template instantiation XFAIL *-*-*

The testsuite output from explicit69.C was:

		  === g++ Summary ===

  # of expected passes		1
  # of expected failures		1

where the compiler output was (with line-wrapping by me):

 /mnt/u3/mitchell/egcs-1.1/gcc/testsuite/g++.old-deja/g++.pt/explicit69.C:2:
 Internal compiler error.
 /mnt/u3/mitchell/egcs-1.1/gcc/testsuite/g++.old-deja/g++.pt/explicit69.C:2: 
 Please submit a full bug report to `egcs-bugs@cygnus.com'.

  XFAIL: g++.pt/explicit69.C not a template instantiation 
                             (test for errors, line 2)
  PASS: g++.pt/explicit69.C (test for excess errors)

This case should have been a FAIL, not an XFAIL, IMO.  Perhaps that's
where we differ?  Your code spotted the internal error, and called it
a `FAIL'.  But, then we saw the XFAIL, and called this an XFAIL.  That
meant that even though we had what Joe Buck and I pereceived as a
regression (a crash, versus a missed error), the testsuite didn't
notify us.

    >> Also, even though your criticism is probably valid, doesn't it
    >> already apply to the sig7/11 handling code?

    Jason> Yes, but that code is never hit.

Then that code should go.  One of the things that sometimes makes it
difficult to work on GCC (and other programs, for that matter) is the
presence of old code whose utility is unclear to the novice, like
myself.

-- 
Mark Mitchell 			mark@markmitchell.com
Mark Mitchell Consulting	http://www.markmitchell.com


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