summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr38616.c
blob: b4534b508c0d5e8c1a29d314d2edced8c69ea8a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* PR middle-end/38616 */
/* { dg-do run } */
/* { dg-options "-O2 -fstack-protector" } */
/* { dg-require-effective-target fstack_protector } */

#include <stdio.h> 

#define BUFFER "1234567890abcdefghijklmno"
int main (void)
{
  char buffer[1024]="";
  sprintf (buffer, "%s", BUFFER);
  return strcmp (buffer, BUFFER);
}