aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-1.c
blob: 202e009d7cfcc06830e0d1502087cbc8fc8bba9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-O2 -fprintf-return-value -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-not "__builtin_snprintf" "optimized"} } */

int
foo (void)
{
  int a = __builtin_snprintf (0, 0, "%s", "abcdefgh");
  return a;
}

void
bar (void)
{
  __builtin_snprintf (0, 0, "%s", "abcdefgh");
}