aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/jit.dg/test-error-gcc_jit_timer_pop-mismatch.c
blob: d0862ddd40b0e1a4bb400c46467b6df332901a33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdlib.h>
#include <stdio.h>

#include "libgccjit.h"

#include "harness.h"

void
create_code (gcc_jit_context *ctxt, void *user_data)
{
  gcc_jit_timer *timer = gcc_jit_timer_new ();
  /* Error: mismatched push/pop.  */
  gcc_jit_timer_push (timer, "apples");
  gcc_jit_timer_pop (timer, "oranges");
  gcc_jit_timer_release (timer);
}

void
verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
{
  /* empty */
}