write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
+#include "config.h"
#include "libgfortran.h"
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
extern void move_alloc (gfc_array_char *, gfc_array_char *);
export_proto(move_alloc);
{
int i;
- internal_free (to->data);
+ if (to->data)
+ free (to->data);
for (i = 0; i < GFC_DESCRIPTOR_RANK (from); i++)
{
export_proto(move_alloc_c);
void
-move_alloc_c (gfc_array_char * from, GFC_INTEGER_4 from_length __attribute__((unused)),
- gfc_array_char * to, GFC_INTEGER_4 to_length __attribute__((unused)))
+move_alloc_c (gfc_array_char * from,
+ GFC_INTEGER_4 from_length __attribute__((unused)),
+ gfc_array_char * to,
+ GFC_INTEGER_4 to_length __attribute__((unused)))
{
move_alloc (from, to);
}