diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/microblaze/others/string_cst2_gpopt.c')
-rw-r--r-- | gcc/testsuite/gcc.target/microblaze/others/string_cst2_gpopt.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/microblaze/others/string_cst2_gpopt.c b/gcc/testsuite/gcc.target/microblaze/others/string_cst2_gpopt.c new file mode 100644 index 000000000..057e8c447 --- /dev/null +++ b/gcc/testsuite/gcc.target/microblaze/others/string_cst2_gpopt.c @@ -0,0 +1,15 @@ +/* { dg-options "-mxl-gp-opt" } */ + +#include <string.h> + +/* { dg-final { scan-assembler "\.rodata*" } } */ +/* { dg-final { scan-assembler "\.sdata\[^2]+" } } */ +const char *string1 = "string1"; + +char* testfunc (char *cptr) +{ +/* { dg-final { scan-assembler "\lwi\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r13" } } */ + strcpy (cptr, string1); + + return cptr; +} |