summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/sh/torture/strncmp.c
blob: cd50f5c05a7ec23d877454848e1571bece08ed8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do run } */

extern void abort (void);

const char *s="astc";
const char *s1="-----BEGIN RSA PRIVATE KEY-----";
const char *s2="atextaac";

main()
{
  if (! __builtin_strncmp ("astb", s, 4))
    abort();

  if (__builtin_strncmp(s1, "-----BEGIN ", 11))
    abort();

  if (! __builtin_strncmp ("atextaacb", s2, 9))
    abort();

  return 0;
}