https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102910

--- Comment #1 from kargl at gcc dot gnu.org ---
This fixes the issue.  The assumption that alloca.h is available on
all systems is likely not a good idea.  The function alloca() lives
in stdlib.h on at least FreeBSD.

diff --git a/gcc/testsuite/gfortran.dg/c-interop/cf-descriptor-5-c.c
b/gcc/testsuite/gfortran.dg/c
-interop/cf-descriptor-5-c.c
index 12464b55512..2a525c522b8 100644
--- a/gcc/testsuite/gfortran.dg/c-interop/cf-descriptor-5-c.c
+++ b/gcc/testsuite/gfortran.dg/c-interop/cf-descriptor-5-c.c
@@ -1,6 +1,8 @@
 #include <stdlib.h>
 #include <stdio.h>
+#ifndef alloca
 #include <alloca.h>
+#endif

 #include <ISO_Fortran_binding.h>
 #include "dump-descriptors.h"

Reply via email to