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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [c-c++-common/] [tm/] [malloc.c] - Blame information for rev 848

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

Line No. Rev Author Line
1 686 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-fgnu-tm -fdump-tree-tmmark" } */
3
 
4
#include <stdlib.h>
5
 
6
char *z;
7
 
8
void foobar(void)
9
{
10
    char *p, *q;
11
    __transaction_atomic {
12
        p = (char *)malloc(123);
13
        q = (char *)calloc(555,1);
14
        free(q);
15
        free(p);
16
    }
17
    z = (char *)malloc (666);
18
}
19
 
20
/* { dg-final { scan-tree-dump-times " malloc .666" 1 "tmmark" { target { ! { *-*-solaris2* && c++ } } } } } */
21
/* Solaris 2 headers are C++-aware and declare std::malloc.  */
22
/* { dg-final { scan-tree-dump-times " std::malloc .666" 1 "tmmark" { target { *-*-solaris2* && c++ } } } } */
23
/* { dg-final { scan-tree-dump-times "__builtin__ITM_malloc" 1 "tmmark" } } */
24
/* { dg-final { scan-tree-dump-times "__builtin__ITM_calloc" 1 "tmmark" } } */
25
/* { dg-final { scan-tree-dump-times "__builtin__ITM_free" 2 "tmmark" } } */
26
/* { dg-final { cleanup-tree-dump "tmmark" } } */

powered by: WebSVN 2.1.0

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