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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ssa-dce-7.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do link } */
2
/* { dg-options "-O -fdump-tree-optimized" } */
3
 
4
extern void link_error (void);
5
void foo(int n)
6
{
7
  int * f = (int*) __builtin_malloc (n * sizeof (int));
8
  int * ff = (int*) __builtin_malloc (n * sizeof (int));
9
  int i;
10
 
11
  for (i = 0; i < n; ++i)
12
    {
13
      f[i] = 1;
14
      ff[i] = 2;
15
      if (f[i] != 1)
16
        link_error ();
17
      if (ff[i] != 2)
18
        link_error ();
19
    }
20
 
21
  __builtin_free (f);
22
  __builtin_free (ff);
23
}
24
int main()
25
{
26
  return 0;
27
}
28
 
29
/* We should have removed the calls to link_error () and all stores
30
   to the allocated memory.  */
31
 
32
/* { dg-final { scan-tree-dump-times "\\\*D" 0 "optimized" } } */
33
/* { 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.