Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/pr80776-2.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* { dg-do compile } */ | |
2 /* { dg-options "-O2 -Wformat-overflow" } */ | |
3 | |
4 extern int sprintf (char *restrict, const char *restrict, ...) | |
5 __attribute__ ((__nothrow__)); | |
6 extern int foo (void); | |
7 | |
8 int | |
9 Fgenerate_new_buffer_name (void) | |
10 { | |
11 char number[2]; | |
12 int i = foo (); | |
13 if (i < 0) | |
14 __builtin_unreachable (); | |
15 if (i >= 2) | |
16 __builtin_unreachable (); | |
17 return sprintf (number, "%d", i); /* { dg-bogus "writing" } */ | |
18 } |