Fix fatal typo in gcc.dg/no_profile_instrument_function-attr-2.c
authorHans-Peter Nilsson <hp@axis.com>
Tue, 7 Sep 2021 20:08:49 +0000 (22:08 +0200)
committerHans-Peter Nilsson <hp@axis.com>
Tue, 7 Sep 2021 20:36:59 +0000 (22:36 +0200)
commit578cd82af71f978c7ffe5f50d9568df21beb25c4
treed182a5d04c8a3fd87382cf27c5dd5abf107e0c00
parent2a1537a19cb2fa85823cfa18ed40baa4b259b4e3
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