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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr19831-1.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 "-O -fdump-tree-optimized" } */
3
 
4
void test1(void)
5
{
6
  int *p = __builtin_malloc (sizeof (int) * 4);
7
  int *q = p;
8
  *q++ = 4;
9
  *q++ = 4;
10
  __builtin_free (p);
11
}
12
 
13
void test3(int b)
14
{
15
  int *p = __builtin_malloc (sizeof (int) * 4);
16
  if (b)
17
    __builtin_free (p);
18
  *p = 5;
19
}
20
 
21
void test4(int b)
22
{
23
  int *p = __builtin_malloc (sizeof (int) * 4);
24
  if (b)
25
    __builtin_free (p);
26
  *p = 5;
27
  __builtin_free (p);
28
}
29
 
30
/* { dg-final { scan-tree-dump-times "free" 0 "optimized" } } */
31
/* { dg-final { scan-tree-dump-times "malloc" 0 "optimized" } } */
32
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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