From 578cd82af71f978c7ffe5f50d9568df21beb25c4 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Tue, 7 Sep 2021 22:08:49 +0200 Subject: [PATCH] Fix fatal typo in gcc.dg/no_profile_instrument_function-attr-2.c Dejagnu is unfortunately brittle: a syntax error in a directive can abort the test-run for the current "tool" (gcc, g++, gfortran), and if you don't check for this condition or actually read the stdout log yourself, your tools may make you believe the test was successful without regressions. At the very least, always grep for ^ERROR: in the stdout log! With r12-3379, the testsuite got such a fatal syntax error, causing the gcc test-run to abort at (e.g.): ... FAIL: gcc.dg/memchr.c (test for excess errors) FAIL: gcc.dg/memcmp-3.c (test for excess errors) ERROR: (DejaGnu) proc "scan-tree-dump-not\" = foo {\(\)"} optimized" does not exist. The error code is TCL LOOKUP COMMAND scan-tree-dump-not\" The info on the error is: invalid command name "scan-tree-dump-not"" while executing "::tcl_unknown scan-tree-dump-not\" = foo {\(\)"} optimized" ("uplevel" body line 1) invoked from within "uplevel 1 ::tcl_unknown $args" === gcc Summary === # of expected passes 63740 # of unexpected failures 38 # of unexpected successes 2 # of expected failures 351 # of unresolved testcases 3 # of unsupported tests 662 x/cris-elf/gccobj/gcc/xgcc version 12.0.0 20210907 (experimental)\ [master r12-3391-g849d5f5929fc] (GCC) testsuite: * gcc.dg/no_profile_instrument_function-attr-2.c: Fix typo in last change. --- gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-2.c b/gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-2.c index 472eca8..2e93ee5 100644 --- a/gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-2.c +++ b/gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-2.c @@ -12,4 +12,4 @@ int bar() return foo(); } -/* { dg-final { scan-tree-dump-not" = foo \\(\\)" "optimized"} } */ +/* { dg-final { scan-tree-dump-not " = foo \\(\\)" "optimized"} } */ -- 2.7.4