* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / c-c++-common / tm / malloc.c
blob4312765f750d7f6f985df94b59ce369532c03dfe
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -fdump-tree-tmmark" } */
4 #include <stdlib.h>
6 char *z;
8 void foobar(void)
10 char *p, *q;
11 __transaction_atomic {
12 p = (char *)malloc(123);
13 q = (char *)calloc(555,1);
14 free(q);
15 free(p);
17 z = (char *)malloc (666);
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" } } */