[Openmp-commits] [openmp] 86a4c78 - [Libomptarget] Add missing include to define `printf`

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Wed Jun 8 06:57:25 PDT 2022


Author: Joseph Huber
Date: 2022-06-08T09:56:51-04:00
New Revision: 86a4c78047cefd98863d5c62992616a43a0240c0

URL: https://github.com/llvm/llvm-project/commit/86a4c78047cefd98863d5c62992616a43a0240c0
DIFF: https://github.com/llvm/llvm-project/commit/86a4c78047cefd98863d5c62992616a43a0240c0.diff

LOG: [Libomptarget] Add missing include to define `printf`

Summary:
This test was failing because of an implicit declaration of `printf`
which isn't legal with newer C, causing it to fail. This patch just adds
the necessary header.

Added: 
    

Modified: 
    openmp/libomptarget/test/env/base_ptr_ref_count.c

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/test/env/base_ptr_ref_count.c b/openmp/libomptarget/test/env/base_ptr_ref_count.c
index 975e134a7e3d..bd2166e8b384 100644
--- a/openmp/libomptarget/test/env/base_ptr_ref_count.c
+++ b/openmp/libomptarget/test/env/base_ptr_ref_count.c
@@ -2,6 +2,7 @@
 // REQUIRES: libomptarget-debug
 
 #include <stdlib.h>
+#include <stdio.h>
 
 int *allocate(size_t n) {
   int *ptr = malloc(sizeof(int) * n);


        


More information about the Openmp-commits mailing list