Hi, The attached patch fixes symbol matching in the sh/sp-switch.c testcase to allow zero or more prefix underscores. This should make the test pass on sh4-linux. Tested on sh-sim with make check-gcc RUNTESTFLAGS="sh.exp=sp-switch.c --target_board=sh-sim \{-m4/-ml}" and make check-gcc RUNTESTFLAGS="sh.exp=sp-switch.c --target_board=sh-sim \{-m4/-ml/-fno-leading-underscore}" Committed as r218706.
Cheers, Oleg gcc/testsuite/ChangeLog: * gcc.target/sh/sp-switch.c: Match zero or more underscores in alt_stack symbol.
Index: gcc/testsuite/gcc.target/sh/sp-switch.c =================================================================== --- gcc/testsuite/gcc.target/sh/sp-switch.c (revision 218604) +++ gcc/testsuite/gcc.target/sh/sp-switch.c (working copy) @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-final { scan-assembler "mov\tr0,r15" } } */ -/* { dg-final { scan-assembler ".long\t_alt_stack" } } */ +/* { dg-final { scan-assembler ".long\t\[_\]*alt_stack" } } */ void *alt_stack; void f() __attribute__ ((interrupt_handler, sp_switch ("alt_stack")));