summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/chkp-strchr.c
blob: 01ee619dfd91dfd318ff3599125f861a40788fe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile { target { ! x32 } } } */
/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */

#include "string.h"

static char *
test1 (char *str)
{
  return strrchr (str, '_');
}

char *
test2 ()
{
  return test1 ("test_string");
}