aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr85598.c
blob: c84b63f80844e27b8629fffc29e0a5f431b4beec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-O2 -Wall" } */

typedef __SIZE_TYPE__ size_t;
extern void __chk_fail (void);
extern int snprintf (char *, size_t, const char *, ...);

int main()
{
    char temp[100];
    unsigned int x;
    char *str = temp;
    for(x=0; x<256; ++x) {
      snprintf(str, 4, "%%%02X", x);
    }
}