diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/analyzer/malloc-callbacks.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/analyzer/malloc-callbacks.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-callbacks.c b/gcc/testsuite/gcc.dg/analyzer/malloc-callbacks.c index 8820ddd..c79f80d 100644 --- a/gcc/testsuite/gcc.dg/analyzer/malloc-callbacks.c +++ b/gcc/testsuite/gcc.dg/analyzer/malloc-callbacks.c @@ -61,9 +61,8 @@ int *test_5 (void) { allocator_t alloc_fn = get_alloca (); deallocator_t dealloc_fn = get_free (); - int *ptr = alloc_fn (sizeof (int)); /* { dg-message "pointer is from here" } */ - /* TODO: message should read "memory is allocated on the stack here". */ - dealloc_fn (ptr); /* { dg-warning "'free' of 'ptr' which points to memory not on the heap" } */ + int *ptr = alloc_fn (sizeof (int)); /* dg-message "region created on stack here" } */ + dealloc_fn (ptr); /* { dg-warning "'free' of 'ptr' which points to memory on the stack" } */ } static void __attribute__((noinline)) |