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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr24287.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-optimized" } */
3
int g1(int);
4
int h(int *a, int *b)__attribute__((pure));
5
void link_error();
6
 
7
/* The calls to link_error should be eliminated, since nothing escapes to
8
   non-pure functions.  */
9
int g(void)
10
{
11
  int t = 0, t1 = 2;
12
  int t2 = h(&t, &t1);
13
  if (t != 0)
14
    link_error ();
15
  if (t1 != 2)
16
    link_error ();
17
  g1(t2);
18
  if (t != 0)
19
    link_error ();
20
  if (t1 != 2)
21
    link_error ();
22
  return t2 == 2;
23
}
24
/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" } } */
25
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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