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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr21582.c] - Blame information for rev 823

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do link }  */
2
/* { dg-options "-O2 -fdump-tree-vrp1" }  */
3
 
4
static inline void do_thing(char *s, int *p, char *q)
5
{
6
        /* This should be folded away.  */
7
        if (s == 0 || q == 0)
8
                link_error ();
9
 
10
        /* This should not be folded as 'p' is not marked nonnull.  */
11
        if (p)
12
                *p = 3;
13
}
14
 
15
void __attribute__((nonnull (1, 3))) do_other_thing(char *s, int *p, char *q)
16
{
17
        do_thing(s, p, q);
18
}
19
 
20
int i;
21
 
22
main()
23
{
24
  do_other_thing ("xxx", &i, "yyy");
25
}
26
 
27
/* { dg-final { scan-tree-dump-times "Folding predicate p_.*" 0 "vrp1" } } */
28
/* { dg-final { cleanup-tree-dump "vrp1" } } */

powered by: WebSVN 2.1.0

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