Bug 26813 - Testsuite does not check for ICEs
Summary: Testsuite does not check for ICEs
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2006-03-22 20:08 UTC by Volker Reichelt
Modified: 2008-05-15 18:49 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-03-23 16:08:24


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2006-03-22 20:08:22 UTC
The testsuite does not check for ICEs. Therefore, ICEs often go unnoticed
when they happen in a line that is marked with { dg-error "" }.
(See e.g. PR 24128, PR 26739, PR 26740 and several others).

Btw, this is somewhat similar to
PR 25241 "DejaGNU does not distinguish between errors and warnings".

With the patch for PR 22600 in place, at least three frontends
(C, C++, Fortran) have different exit codes for ICEs (4) and regular
errors (<4). So this is a first step to be able to identify ICEs in the
testsuite.

There are two remaining problems:
* First, the driver passes the exit status of the frontend only when
  the command line option -pass-exit-codes is given.
  So we either have to supply this option automagically in the testsuite
  or make it the default.

* The second problem is in target_compile.
  This function currently does not return the exit status of the compiler,
  but a different status.

Well, there's a completely different approach: One can test for ICEs by
inspecting the error messages more closely. But that is more error-prone
than checking the exit status.
Comment 1 Andrew Pinski 2006-03-22 21:00:09 UTC
Confirmed, I was going to link the llibjava testing bug but you already found it :).
Comment 2 Volker Reichelt 2006-06-06 19:30:16 UTC
Janis went for the second approach:
http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00324.html
Comment 3 Janis Johnson 2006-06-06 20:48:05 UTC
Gosh, I don't remember ever seeing this stuff about new exit codes for ICEs.  I can rethink how the testsuite detects them, now that we know where to look.  Does the ICE message get translated for different locales?
Comment 4 Volker Reichelt 2006-06-06 21:04:41 UTC
> Does the ICE message get translated for different locales?

Yes, see e.g. the results from the testcase from comment #3 of PR 26155
below. That shouldn't impact the testsuite AFAIK, because the dg-error
markers require the C locale anyway.

C:

  PR26155.cc:8: error: namespace alias 'N::M' not allowed here, assuming 'N'
  PR26155.cc:8: internal compiler error: in resume_scope, at cp/name-lookup.c:1379
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Dutch (nl_NL):

  PR26155.cc:8: fout: namespace alias 'N::M' not allowed here, assuming 'N'
  PR26155.cc:8: interne compilerfout: in resume_scope, at cp/name-lookup.c:1379
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <URL:http://gcc.gnu.org/bugs.html> for instructions.

French (fr_FR):

  PR26155.cc:8: erreur: namespace alias 'N::M' not allowed here, assuming 'N'
  PR26155.cc:8: erreur interne du compilateur: dans resume_scope, à cp/name-lookup.c:1379
  Veuillez soumettre un rapport complet d'anomalies,
  avec le source pré-traité si nécessaire.
  Consultez <URL:http://gcc.gnu.org/bugs.html> pour plus de détail.

German (de_DE):

  PR26155.cc:8: Fehler: Namensbereich-Alias »N::M« ist hier nicht erlaubt, »N« angenommen
  PR26155.cc:8: interner Compiler-Fehler: in resume_scope, bei cp/name-lookup.c:1379
  Bitte senden Sie einen vollständigen Fehlerbericht auf Englisch ein;
  bearbeiten Sie die Quellen zunächst mit einem Präprozessor, wenn es
  dienlich ist.
  Fehler in der deutschen Übersetzung sind an translation-team-de@lists.sourceforge.net zu melden.

  Gehen Sie gemäß den Hinweisen in <URL:http://gcc.gnu.org/bugs.html> vor.

Spanish (es_ES):

  PR26155.cc:8: error: no se permite aquí el alias del espacio de nombres 'N::M', asumiendo que es 'N'
  PR26155.cc:8: error interno del compilador: en resume_scope, en cp/name-lookup.c:1379
  Por favor envíe un reporte completo de bichos,
  con el código preprocesado si es apropiado.
  Vea <URL:http://gcc.gnu.org/bugs.html> para más instrucciones.
Comment 5 Janis Johnson 2008-05-14 00:17:01 UTC
Are there any objections to calling this fixed, based on the committed patch referenced in comment #2?
Comment 6 Volker Reichelt 2008-05-15 18:49:53 UTC
> Are there any objections to calling this fixed, based on the committed patch
> referenced in comment #2?

Apparently not.
Let's call this bug fixed.