OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [uninit-suppress_2.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-fno-tree-ccp -fno-tree-vrp -O2 -Wuninitialized -Werror=uninitialized -Wno-error=maybe-uninitialized" } */
3
void blah();
4
int gflag;
5
 
6
void foo()
7
{
8
   int v;
9
   if (gflag)
10
     v = 10;
11
 
12
   blah(); /* *gflag may be killed, but compiler won't know */
13
 
14
   if (gflag)
15
    bar(v);   /* { dg-warning "uninitialized" "should not be promoted to error" } */
16
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.