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

#include "Wobjsize-1.h"

char buf[6];
int main(int argc, char **argv)
{
  strcpy (buf,"hello ");
  return 0;
}

/* { dg-warning "will always overflow destination buffer" "" { target *-*-* } 6 } */
/* { dg-message "file included" "included" { target *-*-* } 0 } */
/* { dg-message "inlined from" "inlined" { target *-*-* } 0 } */