summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wobjsize-1.c
blob: 17e554b2a36ebfff513f4bca1bd266fa4bed61c6 (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" "" { target *-*-* } 0 } */
/* { dg-message "inlined from" "" { target *-*-* } 0 } */