summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/microblaze/others/string_cst2_gpopt.c
blob: 057e8c4479bb247dc683cfccac0801b02e5b7ed4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;
}