PR tree-optimization/55060 - False un-initialized variable warnings
gcc/testsuite/ChangeLog: PR tree-optimization/55060 * gcc.dg/uninit-pr55060.c: New.
This commit is contained in:
parent
26e80a4968
commit
e88ca9f423
30
gcc/testsuite/gcc.dg/uninit-pr55060.c
Normal file
30
gcc/testsuite/gcc.dg/uninit-pr55060.c
Normal file
@ -0,0 +1,30 @@
|
||||
/* PR tree-optimization/55060 - False un-initialized variable warnings
|
||||
{ dg-do compile }
|
||||
{ dg-options "-O1 -Wuninitialized" } */
|
||||
|
||||
static void a(int *i) { }
|
||||
static void b(int p) { }
|
||||
int foo(void) {
|
||||
int i;
|
||||
a(&i);
|
||||
b(i); // { dg-bogus "\\\[-Wuninitialized" }
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void c(int *i) { }
|
||||
extern void d(int p);
|
||||
int bar(void) {
|
||||
int i;
|
||||
c(&i);
|
||||
d(i); // { dg-warning "\\\[-Wuninitialized" }
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern void e(int *i);
|
||||
static void f(int p) {};
|
||||
int baz(void) {
|
||||
int i;
|
||||
e(&i);
|
||||
f(i); // { dg-bogus "\\\[-Wuninitialized" }
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user