Howdy, I am looking at bug number 99 on http://gcc.gnu.org/bugzilla/show_bug.cgi?id=99 and I am adding a test case for it. The testcase looks like this: //-----------start test case /* {do-run compile} */
template<typename S> class X {}; template<typename Q> int f(X<int>, X<Q>); template<typename B> int f(X<B>, X<int>); int main(void) { return f(X<int>(), X<int>()); /*{ dg-error "int f(X<B>, X<int>)"}*/ } //-----------end test case Now, when I run the testcase, I *think* I should have two unexpected failures: one because the code will not compile and another because the error expected to be seen by dg-error is not seen when the test case is run. However, when I run the testcase, I only get one unexpected failure. Here is what I ran: da...@pete:~/gccbuild$ make -C gcc check-g++ RUNTESTFLAGS=dg.exp=pr99.C make: Entering directory `/home/david/gccbuild/gcc' make[1]: Entering directory `/home/david/gccbuild/gcc' test -d plugin || mkdir plugin test -d testsuite || mkdir testsuite test -d testsuite/g++ || mkdir testsuite/g++ (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd ../../gcc/./gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite/g++; \ rm -f tmp-site.exp; \ sed '/set tmpdir/ s|testsuite$|testsuite/g++|' \ < ../../site.exp > tmp-site.exp; \ /bin/bash ${srcdir}/../move-if-change tmp-site.exp site.exp; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ runtestflags= ; \ if [ -n "" ] ; then \ runtestflags=""; \ elif [ -n "" ] ; then \ parts="`echo ' ' \ | sed 's/=[^ ]* / /g'`"; \ for part in `find $srcdir/testsuite/g++* -name \*.exp` ; do \ part=`basename $part` ; \ case " $parts $runtestflags " in \ *" $part "*) ;; \ *) runtestflags="$runtestflags $part" ;; \ esac ; \ done ; \ fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ dg.exp=pr99.C $runtestflags) Test Run By david on Tue Sep 14 16:32:21 2010 Native configuration is x86_64-unknown-linux-gnu === g++ tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/david/gcc/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/david/gcc/gcc/testsuite/g++.dg/dg.exp ... FAIL: g++.dg/template/pr99.C (test for excess errors) === g++ Summary === # of unexpected failures 1 /home/david/gccbuild/gcc/testsuite/g++/../../g++ version 4.6.0 20100831 (experimental) (GCC) make[1]: [check-parallel-g++] Error 1 (ignored) make[1]: Leaving directory `/home/david/gccbuild/gcc' make: Leaving directory `/home/david/gccbuild/gcc' ___________________ In the summary, I expect to have two unexpected failures. What am I missing? -- Thanks, dw