aboutsummaryrefslogtreecommitdiff
path: root/gcc/cil/tests/string.c
blob: 4273e09e12d241c8ade24d05e5b1af32beb6011e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * This example tests the simple manipulation of a string.
 */

int foo(char* str)
{
    char a, b, c, d;
    a = str[0];
    b = str[1];
    c = str[2];
    d = str[3];
    return str[3] == 'l';
}


int main()
{
    char* string = "Hello.";
    if (foo(string))
        return 0;
    return 1;
}