Blame SOURCES/gcc12-libgfortran-compat.patch

0fe1ac
--- libgfortran/Makefile.am.jj	2022-04-28 15:56:10.129745930 +0200
0fe1ac
+++ libgfortran/Makefile.am	2022-05-13 13:27:57.237167557 +0200
0fe1ac
@@ -45,6 +45,7 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdi
0fe1ac
 	    $(lt_host_flags)
0fe1ac
 
0fe1ac
 toolexeclib_LTLIBRARIES = libgfortran.la
0fe1ac
+noinst_LTLIBRARIES = libgfortran_nonshared80.la
0fe1ac
 toolexeclib_DATA = libgfortran.spec
0fe1ac
 libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS)
0fe1ac
 libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
0fe1ac
@@ -1154,6 +1155,91 @@ libgfortran_la_SOURCES = $(prereq_SRC)
0fe1ac
 
0fe1ac
 endif
0fe1ac
 
0fe1ac
+$(patsubst %.c,%.lo,$(nonshared_generated_C_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.lo: $(srcdir)/generated/%.c
0fe1ac
+	$(LTCOMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
0fe1ac
+
0fe1ac
+$(patsubst %.c,%.o,$(nonshared_generated_C_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.o: $(srcdir)/generated/%.c
0fe1ac
+	$(COMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
0fe1ac
+
0fe1ac
+$(patsubst %.c,%.lo,$(nonshared_intrinsics_C_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.lo: $(srcdir)/intrinsics/%.c
0fe1ac
+	$(LTCOMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
0fe1ac
+
0fe1ac
+$(patsubst %.c,%.o,$(nonshared_intrinsics_C_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.o: $(srcdir)/intrinsics/%.c
0fe1ac
+	$(COMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
0fe1ac
+
0fe1ac
+$(patsubst %.c,%.lo,$(nonshared_runtime_C_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.lo: $(srcdir)/runtime/%.c
0fe1ac
+	$(LTCOMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
0fe1ac
+
0fe1ac
+$(patsubst %.c,%.o,$(nonshared_runtime_C_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.o: $(srcdir)/runtime/%.c
0fe1ac
+	$(COMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
0fe1ac
+
0fe1ac
+$(patsubst %.f90,%.lo,$(nonshared_intrinsics_f90_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.lo: $(srcdir)/intrinsics/%.f90
0fe1ac
+	$(LTPPFCCOMPILE) -c -o $@ $< -fallow-leading-underscore
0fe1ac
+
0fe1ac
+$(patsubst %.f90,%.o,$(nonshared_intrinsics_f90_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.o: $(srcdir)/intrinsics/%.f90
0fe1ac
+	$(PPFCCOMPILE) -c -o $@ $< -fallow-leading-underscore
0fe1ac
+
0fe1ac
+nonshared_runtime_C_SRC = \
0fe1ac
+nonshared-ISO_Fortran_binding.c
0fe1ac
+
0fe1ac
+nonshared_generated_C_SRC = \
0fe1ac
+nonshared-findloc0_i1.c \
0fe1ac
+nonshared-findloc0_i2.c \
0fe1ac
+nonshared-findloc0_i4.c \
0fe1ac
+nonshared-findloc0_i8.c \
0fe1ac
+nonshared-findloc0_i16.c \
0fe1ac
+nonshared-findloc0_r4.c \
0fe1ac
+nonshared-findloc0_r8.c \
0fe1ac
+nonshared-findloc0_r10.c \
0fe1ac
+nonshared-findloc0_r16.c \
0fe1ac
+nonshared-findloc0_c4.c \
0fe1ac
+nonshared-findloc0_c8.c \
0fe1ac
+nonshared-findloc0_c10.c \
0fe1ac
+nonshared-findloc0_c16.c \
0fe1ac
+nonshared-findloc0_s1.c \
0fe1ac
+nonshared-findloc0_s4.c \
0fe1ac
+nonshared-findloc1_i1.c \
0fe1ac
+nonshared-findloc1_i2.c \
0fe1ac
+nonshared-findloc1_i4.c \
0fe1ac
+nonshared-findloc1_i8.c \
0fe1ac
+nonshared-findloc1_i16.c \
0fe1ac
+nonshared-findloc1_r4.c \
0fe1ac
+nonshared-findloc1_r8.c \
0fe1ac
+nonshared-findloc1_r10.c \
0fe1ac
+nonshared-findloc1_r16.c \
0fe1ac
+nonshared-findloc1_c4.c \
0fe1ac
+nonshared-findloc1_c8.c \
0fe1ac
+nonshared-findloc1_c10.c \
0fe1ac
+nonshared-findloc1_c16.c \
0fe1ac
+nonshared-findloc1_s1.c \
0fe1ac
+nonshared-findloc1_s4.c \
0fe1ac
+nonshared-findloc2_s1.c \
0fe1ac
+nonshared-findloc2_s4.c
0fe1ac
+
0fe1ac
+nonshared_intrinsics_C_SRC = \
0fe1ac
+nonshared-is_contiguous.c \
0fe1ac
+nonshared-trigd.c
0fe1ac
+
0fe1ac
+nonshared_intrinsics_f90_SRC = \
0fe1ac
+nonshared-random_init.f90
0fe1ac
+
0fe1ac
+libgfortran_nonshared80_la_SOURCES = \
0fe1ac
+$(nonshared_runtime_C_SRC) \
0fe1ac
+$(nonshared_generated_C_SRC) \
0fe1ac
+$(nonshared_intrinsics_C_SRC) \
0fe1ac
+$(nonshared_intrinsics_f90_SRC) \
0fe1ac
+$(srcdir)/ieee/nonshared-ieee_arithmetic.c \
0fe1ac
+$(srcdir)/io/nonshared-transfer.c \
0fe1ac
+$(srcdir)/runtime/nonshared-error.c
0fe1ac
+
0fe1ac
 I_M4_DEPS=m4/iparm.m4 m4/mtype.m4
0fe1ac
 I_M4_DEPS0=$(I_M4_DEPS) m4/iforeach.m4
0fe1ac
 I_M4_DEPS1=$(I_M4_DEPS) m4/ifunction.m4
0fe1ac
--- libgfortran/ieee/nonshared-ieee_arithmetic.c.jj	2022-05-13 13:22:46.612357695 +0200
0fe1ac
+++ libgfortran/ieee/nonshared-ieee_arithmetic.c	2022-05-13 13:22:46.612357695 +0200
0fe1ac
@@ -0,0 +1,64 @@
0fe1ac
+/* Helper functions in C for IEEE modules
0fe1ac
+   Copyright (C) 2013-2022 Free Software Foundation, Inc.
0fe1ac
+   Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
0fe1ac
+
0fe1ac
+This file is part of the GNU Fortran runtime library (libgfortran).
0fe1ac
+
0fe1ac
+Libgfortran is free software; you can redistribute it and/or
0fe1ac
+modify it under the terms of the GNU General Public
0fe1ac
+License as published by the Free Software Foundation; either
0fe1ac
+version 3 of the License, or (at your option) any later version.
0fe1ac
+
0fe1ac
+Libgfortran is distributed in the hope that it will be useful,
0fe1ac
+but WITHOUT ANY WARRANTY; without even the implied warranty of
0fe1ac
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0fe1ac
+GNU General Public License for more details.
0fe1ac
+
0fe1ac
+Under Section 7 of GPL version 3, you are granted additional
0fe1ac
+permissions described in the GCC Runtime Library Exception, version
0fe1ac
+3.1, as published by the Free Software Foundation.
0fe1ac
+
0fe1ac
+You should have received a copy of the GNU General Public License and
0fe1ac
+a copy of the GCC Runtime Library Exception along with this program;
0fe1ac
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
0fe1ac
+<http://www.gnu.org/licenses/>.  */
0fe1ac
+
0fe1ac
+#include "libgfortran.h"
0fe1ac
+
0fe1ac
+GFC_LOGICAL_4
0fe1ac
+__ieee_arithmetic_MOD_ieee_support_subnormal_4 (gfc_array_r4 *arg)
0fe1ac
+{
0fe1ac
+  (void) arg;
0fe1ac
+  return 1;
0fe1ac
+}
0fe1ac
+
0fe1ac
+GFC_LOGICAL_4
0fe1ac
+__ieee_arithmetic_MOD_ieee_support_subnormal_8 (gfc_array_r8 *arg)
0fe1ac
+{
0fe1ac
+  (void) arg;
0fe1ac
+  return 1;
0fe1ac
+}
0fe1ac
+
0fe1ac
+#ifdef HAVE_GFC_REAL_10
0fe1ac
+GFC_LOGICAL_4
0fe1ac
+__ieee_arithmetic_MOD_ieee_support_subnormal_10 (gfc_array_r10 *arg)
0fe1ac
+{
0fe1ac
+  (void) arg;
0fe1ac
+  return 1;
0fe1ac
+}
0fe1ac
+#endif
0fe1ac
+
0fe1ac
+#ifdef HAVE_GFC_REAL_16
0fe1ac
+GFC_LOGICAL_4
0fe1ac
+__ieee_arithmetic_MOD_ieee_support_subnormal_16 (gfc_array_r16 *arg)
0fe1ac
+{
0fe1ac
+  (void) arg;
0fe1ac
+  return 1;
0fe1ac
+}
0fe1ac
+#endif
0fe1ac
+
0fe1ac
+GFC_LOGICAL_4
0fe1ac
+__ieee_arithmetic_MOD_ieee_support_subnormal_noarg (void)
0fe1ac
+{
0fe1ac
+  return 1;
0fe1ac
+}
0fe1ac
--- libgfortran/Makefile.in.jj	2022-04-28 15:56:10.132745889 +0200
0fe1ac
+++ libgfortran/Makefile.in	2022-05-13 13:28:10.925982986 +0200
0fe1ac
@@ -217,7 +217,8 @@ am__uninstall_files_from_dir = { \
0fe1ac
 am__installdirs = "$(DESTDIR)$(cafexeclibdir)" \
0fe1ac
 	"$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(toolexeclibdir)" \
0fe1ac
 	"$(DESTDIR)$(gfor_cdir)" "$(DESTDIR)$(fincludedir)"
0fe1ac
-LTLIBRARIES = $(cafexeclib_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
0fe1ac
+LTLIBRARIES = $(cafexeclib_LTLIBRARIES) $(noinst_LTLIBRARIES) \
0fe1ac
+	$(toolexeclib_LTLIBRARIES)
0fe1ac
 libcaf_single_la_LIBADD =
0fe1ac
 am_libcaf_single_la_OBJECTS = single.lo
0fe1ac
 libcaf_single_la_OBJECTS = $(am_libcaf_single_la_OBJECTS)
0fe1ac
@@ -487,6 +488,36 @@ am__objects_65 = $(am__objects_3) $(am__
0fe1ac
 @onestep_FALSE@am_libgfortran_la_OBJECTS = $(am__objects_65)
0fe1ac
 @onestep_TRUE@am_libgfortran_la_OBJECTS = libgfortran_c.lo
0fe1ac
 libgfortran_la_OBJECTS = $(am_libgfortran_la_OBJECTS)
0fe1ac
+libgfortran_nonshared80_la_LIBADD =
0fe1ac
+am__objects_66 = nonshared-ISO_Fortran_binding.lo
0fe1ac
+am__objects_67 = nonshared-findloc0_i1.lo nonshared-findloc0_i2.lo \
0fe1ac
+	nonshared-findloc0_i4.lo nonshared-findloc0_i8.lo \
0fe1ac
+	nonshared-findloc0_i16.lo nonshared-findloc0_r4.lo \
0fe1ac
+	nonshared-findloc0_r8.lo nonshared-findloc0_r10.lo \
0fe1ac
+	nonshared-findloc0_r16.lo nonshared-findloc0_c4.lo \
0fe1ac
+	nonshared-findloc0_c8.lo nonshared-findloc0_c10.lo \
0fe1ac
+	nonshared-findloc0_c16.lo nonshared-findloc0_s1.lo \
0fe1ac
+	nonshared-findloc0_s4.lo nonshared-findloc1_i1.lo \
0fe1ac
+	nonshared-findloc1_i2.lo nonshared-findloc1_i4.lo \
0fe1ac
+	nonshared-findloc1_i8.lo nonshared-findloc1_i16.lo \
0fe1ac
+	nonshared-findloc1_r4.lo nonshared-findloc1_r8.lo \
0fe1ac
+	nonshared-findloc1_r10.lo nonshared-findloc1_r16.lo \
0fe1ac
+	nonshared-findloc1_c4.lo nonshared-findloc1_c8.lo \
0fe1ac
+	nonshared-findloc1_c10.lo nonshared-findloc1_c16.lo \
0fe1ac
+	nonshared-findloc1_s1.lo nonshared-findloc1_s4.lo \
0fe1ac
+	nonshared-findloc2_s1.lo nonshared-findloc2_s4.lo
0fe1ac
+am__objects_68 = nonshared-is_contiguous.lo nonshared-trigd.lo
0fe1ac
+am__objects_69 = nonshared-random_init.lo
0fe1ac
+am_libgfortran_nonshared80_la_OBJECTS = $(am__objects_66) \
0fe1ac
+	$(am__objects_67) $(am__objects_68) $(am__objects_69) \
0fe1ac
+	nonshared-ieee_arithmetic.lo nonshared-transfer.lo \
0fe1ac
+	nonshared-error.lo
0fe1ac
+libgfortran_nonshared80_la_OBJECTS =  \
0fe1ac
+	$(am_libgfortran_nonshared80_la_OBJECTS)
0fe1ac
+AM_V_lt = $(am__v_lt_@AM_V@)
0fe1ac
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
0fe1ac
+am__v_lt_0 = --silent
0fe1ac
+am__v_lt_1 = 
0fe1ac
 AM_V_P = $(am__v_P_@AM_V@)
0fe1ac
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
0fe1ac
 am__v_P_0 = false
0fe1ac
@@ -503,10 +534,6 @@ DEFAULT_INCLUDES = -I.@am__isrc@
0fe1ac
 depcomp = $(SHELL) $(top_srcdir)/../depcomp
0fe1ac
 am__depfiles_maybe = depfiles
0fe1ac
 am__mv = mv -f
0fe1ac
-AM_V_lt = $(am__v_lt_@AM_V@)
0fe1ac
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
0fe1ac
-am__v_lt_0 = --silent
0fe1ac
-am__v_lt_1 = 
0fe1ac
 PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
0fe1ac
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
0fe1ac
 LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \
0fe1ac
@@ -550,7 +577,8 @@ AM_V_FC = $(am__v_FC_@AM_V@)
0fe1ac
 am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@)
0fe1ac
 am__v_FC_0 = @echo "  FC      " $@;
0fe1ac
 am__v_FC_1 = 
0fe1ac
-SOURCES = $(libcaf_single_la_SOURCES) $(libgfortran_la_SOURCES)
0fe1ac
+SOURCES = $(libcaf_single_la_SOURCES) $(libgfortran_la_SOURCES) \
0fe1ac
+	$(libgfortran_nonshared80_la_SOURCES)
0fe1ac
 am__can_run_installinfo = \
0fe1ac
   case $$AM_UPDATE_INFO_DIR in \
0fe1ac
     n|no|NO) false;; \
0fe1ac
@@ -754,6 +782,7 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdi
0fe1ac
 	    $(lt_host_flags)
0fe1ac
 
0fe1ac
 toolexeclib_LTLIBRARIES = libgfortran.la
0fe1ac
+noinst_LTLIBRARIES = libgfortran_nonshared80.la
0fe1ac
 toolexeclib_DATA = libgfortran.spec
0fe1ac
 libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS)
0fe1ac
 libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
0fe1ac
@@ -1670,6 +1699,59 @@ prereq_SRC = $(gfor_src) $(gfor_built_sr
0fe1ac
 #libgfortran_F.lo: 
0fe1ac
 #	$(LTPPFCCOMPILE) -c -o $@ $^ -combine
0fe1ac
 @onestep_TRUE@libgfortran_la_SOURCES = libgfortran_c.c $(filter-out %.c,$(prereq_SRC))
0fe1ac
+nonshared_runtime_C_SRC = \
0fe1ac
+nonshared-ISO_Fortran_binding.c
0fe1ac
+
0fe1ac
+nonshared_generated_C_SRC = \
0fe1ac
+nonshared-findloc0_i1.c \
0fe1ac
+nonshared-findloc0_i2.c \
0fe1ac
+nonshared-findloc0_i4.c \
0fe1ac
+nonshared-findloc0_i8.c \
0fe1ac
+nonshared-findloc0_i16.c \
0fe1ac
+nonshared-findloc0_r4.c \
0fe1ac
+nonshared-findloc0_r8.c \
0fe1ac
+nonshared-findloc0_r10.c \
0fe1ac
+nonshared-findloc0_r16.c \
0fe1ac
+nonshared-findloc0_c4.c \
0fe1ac
+nonshared-findloc0_c8.c \
0fe1ac
+nonshared-findloc0_c10.c \
0fe1ac
+nonshared-findloc0_c16.c \
0fe1ac
+nonshared-findloc0_s1.c \
0fe1ac
+nonshared-findloc0_s4.c \
0fe1ac
+nonshared-findloc1_i1.c \
0fe1ac
+nonshared-findloc1_i2.c \
0fe1ac
+nonshared-findloc1_i4.c \
0fe1ac
+nonshared-findloc1_i8.c \
0fe1ac
+nonshared-findloc1_i16.c \
0fe1ac
+nonshared-findloc1_r4.c \
0fe1ac
+nonshared-findloc1_r8.c \
0fe1ac
+nonshared-findloc1_r10.c \
0fe1ac
+nonshared-findloc1_r16.c \
0fe1ac
+nonshared-findloc1_c4.c \
0fe1ac
+nonshared-findloc1_c8.c \
0fe1ac
+nonshared-findloc1_c10.c \
0fe1ac
+nonshared-findloc1_c16.c \
0fe1ac
+nonshared-findloc1_s1.c \
0fe1ac
+nonshared-findloc1_s4.c \
0fe1ac
+nonshared-findloc2_s1.c \
0fe1ac
+nonshared-findloc2_s4.c
0fe1ac
+
0fe1ac
+nonshared_intrinsics_C_SRC = \
0fe1ac
+nonshared-is_contiguous.c \
0fe1ac
+nonshared-trigd.c
0fe1ac
+
0fe1ac
+nonshared_intrinsics_f90_SRC = \
0fe1ac
+nonshared-random_init.f90
0fe1ac
+
0fe1ac
+libgfortran_nonshared80_la_SOURCES = \
0fe1ac
+$(nonshared_runtime_C_SRC) \
0fe1ac
+$(nonshared_generated_C_SRC) \
0fe1ac
+$(nonshared_intrinsics_C_SRC) \
0fe1ac
+$(nonshared_intrinsics_f90_SRC) \
0fe1ac
+$(srcdir)/ieee/nonshared-ieee_arithmetic.c \
0fe1ac
+$(srcdir)/io/nonshared-transfer.c \
0fe1ac
+$(srcdir)/runtime/nonshared-error.c
0fe1ac
+
0fe1ac
 I_M4_DEPS = m4/iparm.m4 m4/mtype.m4
0fe1ac
 I_M4_DEPS0 = $(I_M4_DEPS) m4/iforeach.m4
0fe1ac
 I_M4_DEPS1 = $(I_M4_DEPS) m4/ifunction.m4
0fe1ac
@@ -1780,6 +1862,17 @@ clean-cafexeclibLTLIBRARIES:
0fe1ac
 	  rm -f $${locs}; \
0fe1ac
 	}
0fe1ac
 
0fe1ac
+clean-noinstLTLIBRARIES:
0fe1ac
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
0fe1ac
+	@list='$(noinst_LTLIBRARIES)'; \
0fe1ac
+	locs=`for p in $$list; do echo $$p; done | \
0fe1ac
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
0fe1ac
+	      sort -u`; \
0fe1ac
+	test -z "$$locs" || { \
0fe1ac
+	  echo rm -f $${locs}; \
0fe1ac
+	  rm -f $${locs}; \
0fe1ac
+	}
0fe1ac
+
0fe1ac
 install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
0fe1ac
 	@$(NORMAL_INSTALL)
0fe1ac
 	@list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \
0fe1ac
@@ -1821,6 +1914,9 @@ libcaf_single.la: $(libcaf_single_la_OBJ
0fe1ac
 libgfortran.la: $(libgfortran_la_OBJECTS) $(libgfortran_la_DEPENDENCIES) $(EXTRA_libgfortran_la_DEPENDENCIES) 
0fe1ac
 	$(AM_V_GEN)$(libgfortran_la_LINK) -rpath $(toolexeclibdir) $(libgfortran_la_OBJECTS) $(libgfortran_la_LIBADD) $(LIBS)
0fe1ac
 
0fe1ac
+libgfortran_nonshared80.la: $(libgfortran_nonshared80_la_OBJECTS) $(libgfortran_nonshared80_la_DEPENDENCIES) $(EXTRA_libgfortran_nonshared80_la_DEPENDENCIES) 
0fe1ac
+	$(AM_V_FCLD)$(FCLINK)  $(libgfortran_nonshared80_la_OBJECTS) $(libgfortran_nonshared80_la_LIBADD) $(LIBS)
0fe1ac
+
0fe1ac
 mostlyclean-compile:
0fe1ac
 	-rm -f *.$(OBJEXT)
0fe1ac
 
0fe1ac
@@ -2272,6 +2368,44 @@ distclean-compile:
0fe1ac
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval_r8.Plo@am__quote@
0fe1ac
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/move_alloc.Plo@am__quote@
0fe1ac
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mvbits.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-ISO_Fortran_binding.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-error.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_c10.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_c16.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_c4.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_c8.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_i1.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_i16.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_i2.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_i4.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_i8.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_r10.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_r16.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_r4.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_r8.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_s1.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_s4.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_c10.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_c16.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_c4.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_c8.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_i1.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_i16.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_i2.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_i4.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_i8.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_r10.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_r16.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_r4.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_r8.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_s1.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_s4.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc2_s1.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc2_s4.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-ieee_arithmetic.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-is_contiguous.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-transfer.Plo@am__quote@
0fe1ac
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-trigd.Plo@am__quote@
0fe1ac
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norm2_r10.Plo@am__quote@
0fe1ac
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norm2_r16.Plo@am__quote@
0fe1ac
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norm2_r17.Plo@am__quote@
0fe1ac
@@ -7316,6 +7450,27 @@ ieee_helper.lo: ieee/ieee_helper.c
0fe1ac
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
0fe1ac
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ieee_helper.lo `test -f 'ieee/ieee_helper.c' || echo '$(srcdir)/'`ieee/ieee_helper.c
0fe1ac
 
0fe1ac
+nonshared-ieee_arithmetic.lo: $(srcdir)/ieee/nonshared-ieee_arithmetic.c
0fe1ac
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nonshared-ieee_arithmetic.lo -MD -MP -MF $(DEPDIR)/nonshared-ieee_arithmetic.Tpo -c -o nonshared-ieee_arithmetic.lo `test -f '$(srcdir)/ieee/nonshared-ieee_arithmetic.c' || echo '$(srcdir)/'`$(srcdir)/ieee/nonshared-ieee_arithmetic.c
0fe1ac
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/nonshared-ieee_arithmetic.Tpo $(DEPDIR)/nonshared-ieee_arithmetic.Plo
0fe1ac
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(srcdir)/ieee/nonshared-ieee_arithmetic.c' object='nonshared-ieee_arithmetic.lo' libtool=yes @AMDEPBACKSLASH@
0fe1ac
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
0fe1ac
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nonshared-ieee_arithmetic.lo `test -f '$(srcdir)/ieee/nonshared-ieee_arithmetic.c' || echo '$(srcdir)/'`$(srcdir)/ieee/nonshared-ieee_arithmetic.c
0fe1ac
+
0fe1ac
+nonshared-transfer.lo: $(srcdir)/io/nonshared-transfer.c
0fe1ac
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nonshared-transfer.lo -MD -MP -MF $(DEPDIR)/nonshared-transfer.Tpo -c -o nonshared-transfer.lo `test -f '$(srcdir)/io/nonshared-transfer.c' || echo '$(srcdir)/'`$(srcdir)/io/nonshared-transfer.c
0fe1ac
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/nonshared-transfer.Tpo $(DEPDIR)/nonshared-transfer.Plo
0fe1ac
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(srcdir)/io/nonshared-transfer.c' object='nonshared-transfer.lo' libtool=yes @AMDEPBACKSLASH@
0fe1ac
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
0fe1ac
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nonshared-transfer.lo `test -f '$(srcdir)/io/nonshared-transfer.c' || echo '$(srcdir)/'`$(srcdir)/io/nonshared-transfer.c
0fe1ac
+
0fe1ac
+nonshared-error.lo: $(srcdir)/runtime/nonshared-error.c
0fe1ac
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nonshared-error.lo -MD -MP -MF $(DEPDIR)/nonshared-error.Tpo -c -o nonshared-error.lo `test -f '$(srcdir)/runtime/nonshared-error.c' || echo '$(srcdir)/'`$(srcdir)/runtime/nonshared-error.c
0fe1ac
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/nonshared-error.Tpo $(DEPDIR)/nonshared-error.Plo
0fe1ac
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(srcdir)/runtime/nonshared-error.c' object='nonshared-error.lo' libtool=yes @AMDEPBACKSLASH@
0fe1ac
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
0fe1ac
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nonshared-error.lo `test -f '$(srcdir)/runtime/nonshared-error.c' || echo '$(srcdir)/'`$(srcdir)/runtime/nonshared-error.c
0fe1ac
+
0fe1ac
 .f90.o:
0fe1ac
 	$(AM_V_FC)$(FCCOMPILE) -c -o $@ $<
0fe1ac
 
0fe1ac
@@ -7510,7 +7665,8 @@ maintainer-clean-generic:
0fe1ac
 clean: clean-am
0fe1ac
 
0fe1ac
 clean-am: clean-cafexeclibLTLIBRARIES clean-generic clean-libtool \
0fe1ac
-	clean-local clean-toolexeclibLTLIBRARIES mostlyclean-am
0fe1ac
+	clean-local clean-noinstLTLIBRARIES \
0fe1ac
+	clean-toolexeclibLTLIBRARIES mostlyclean-am
0fe1ac
 
0fe1ac
 distclean: distclean-am
0fe1ac
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
0fe1ac
@@ -7590,14 +7746,15 @@ uninstall-am: uninstall-cafexeclibLTLIBR
0fe1ac
 .PHONY: CTAGS GTAGS TAGS all all-am all-local am--refresh check \
0fe1ac
 	check-am clean clean-cafexeclibLTLIBRARIES clean-cscope \
0fe1ac
 	clean-generic clean-libtool clean-local \
0fe1ac
-	clean-toolexeclibLTLIBRARIES cscope cscopelist-am ctags \
0fe1ac
-	ctags-am distclean distclean-compile distclean-generic \
0fe1ac
-	distclean-hdr distclean-libtool distclean-local distclean-tags \
0fe1ac
-	dvi dvi-am html html-am info info-am install install-am \
0fe1ac
-	install-cafexeclibLTLIBRARIES install-data install-data-am \
0fe1ac
-	install-dvi install-dvi-am install-exec install-exec-am \
0fe1ac
-	install-exec-local install-gfor_cHEADERS install-html \
0fe1ac
-	install-html-am install-info install-info-am install-man \
0fe1ac
+	clean-noinstLTLIBRARIES clean-toolexeclibLTLIBRARIES cscope \
0fe1ac
+	cscopelist-am ctags ctags-am distclean distclean-compile \
0fe1ac
+	distclean-generic distclean-hdr distclean-libtool \
0fe1ac
+	distclean-local distclean-tags dvi dvi-am html html-am info \
0fe1ac
+	info-am install install-am install-cafexeclibLTLIBRARIES \
0fe1ac
+	install-data install-data-am install-dvi install-dvi-am \
0fe1ac
+	install-exec install-exec-am install-exec-local \
0fe1ac
+	install-gfor_cHEADERS install-html install-html-am \
0fe1ac
+	install-info install-info-am install-man \
0fe1ac
 	install-nodist_fincludeHEADERS install-pdf install-pdf-am \
0fe1ac
 	install-ps install-ps-am install-strip install-toolexeclibDATA \
0fe1ac
 	install-toolexeclibLTLIBRARIES installcheck installcheck-am \
0fe1ac
@@ -7673,6 +7830,38 @@ ieee_arithmetic.mod: ieee_arithmetic.lo
0fe1ac
 @onestep_TRUE@libgfortran_c.lo: $(filter %.c,$(prereq_SRC))
0fe1ac
 @onestep_TRUE@	$(LTCOMPILE) -c -o $@ $^ -combine
0fe1ac
 
0fe1ac
+$(patsubst %.c,%.lo,$(nonshared_generated_C_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.lo: $(srcdir)/generated/%.c
0fe1ac
+	$(LTCOMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
0fe1ac
+
0fe1ac
+$(patsubst %.c,%.o,$(nonshared_generated_C_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.o: $(srcdir)/generated/%.c
0fe1ac
+	$(COMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
0fe1ac
+
0fe1ac
+$(patsubst %.c,%.lo,$(nonshared_intrinsics_C_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.lo: $(srcdir)/intrinsics/%.c
0fe1ac
+	$(LTCOMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
0fe1ac
+
0fe1ac
+$(patsubst %.c,%.o,$(nonshared_intrinsics_C_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.o: $(srcdir)/intrinsics/%.c
0fe1ac
+	$(COMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
0fe1ac
+
0fe1ac
+$(patsubst %.c,%.lo,$(nonshared_runtime_C_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.lo: $(srcdir)/runtime/%.c
0fe1ac
+	$(LTCOMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
0fe1ac
+
0fe1ac
+$(patsubst %.c,%.o,$(nonshared_runtime_C_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.o: $(srcdir)/runtime/%.c
0fe1ac
+	$(COMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
0fe1ac
+
0fe1ac
+$(patsubst %.f90,%.lo,$(nonshared_intrinsics_f90_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.lo: $(srcdir)/intrinsics/%.f90
0fe1ac
+	$(LTPPFCCOMPILE) -c -o $@ $< -fallow-leading-underscore
0fe1ac
+
0fe1ac
+$(patsubst %.f90,%.o,$(nonshared_intrinsics_f90_SRC) $(nonshared)): \
0fe1ac
+nonshared-%.o: $(srcdir)/intrinsics/%.f90
0fe1ac
+	$(PPFCCOMPILE) -c -o $@ $< -fallow-leading-underscore
0fe1ac
+
0fe1ac
 kinds.h: $(srcdir)/mk-kinds-h.sh
0fe1ac
 	$(SHELL) $(srcdir)/mk-kinds-h.sh '@LIBGOMP_CHECKED_INT_KINDS@' '@LIBGOMP_CHECKED_REAL_KINDS@' '$(FCCOMPILE)' > $@ || rm $@
0fe1ac
 
0fe1ac
--- libgfortran/libgfortran.h.jj	2022-04-28 15:56:10.221744660 +0200
0fe1ac
+++ libgfortran/libgfortran.h	2022-05-13 13:22:46.652357155 +0200
0fe1ac
@@ -216,7 +216,7 @@ extern int __mingw_snprintf (char *, siz
0fe1ac
 # define internal_proto(x)	sym_rename(x, IPREFIX(x))
0fe1ac
 #endif
0fe1ac
 
0fe1ac
-#if defined(HAVE_ATTRIBUTE_VISIBILITY) && defined(HAVE_ATTRIBUTE_ALIAS)
0fe1ac
+#if defined(HAVE_ATTRIBUTE_VISIBILITY) && defined(HAVE_ATTRIBUTE_ALIAS) && !defined(LIBGFORTRAN_NONSHARED)
0fe1ac
 # define export_proto(x)	sym_rename(x, PREFIX(x))
0fe1ac
 # define export_proto_np(x)	extern char swallow_semicolon
0fe1ac
 # define iexport_proto(x)	internal_proto(x)
0fe1ac
@@ -291,6 +291,10 @@ typedef GFC_UINTEGER_4 gfc_char4_t;
0fe1ac
    simply equal to the kind parameter itself.  */
0fe1ac
 #define GFC_SIZE_OF_CHAR_KIND(kind) (kind)
0fe1ac
 
0fe1ac
+#ifdef LIBGFORTRAN_NONSHARED
0fe1ac
+#define big_endian (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
0fe1ac
+#endif
0fe1ac
+
0fe1ac
 #define GFOR_POINTER_TO_L1(p, kind) \
0fe1ac
   ((__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ? 1: 0) * (kind - 1) + (GFC_LOGICAL_1 *)(p))
0fe1ac
 
0fe1ac
@@ -2020,4 +2024,63 @@ extern int __snprintfieee128 (char *, si
0fe1ac
 #define HAVE_GFC_UINTEGER_1 1
0fe1ac
 #define HAVE_GFC_UINTEGER_4 1
0fe1ac
 
0fe1ac
+#ifdef LIBGFORTRAN_NONSHARED
0fe1ac
+#include <stdlib.h>
0fe1ac
+#include <string.h>              
0fe1ac
+#include <errno.h>
0fe1ac
+
0fe1ac
+#define internal_malloc_size nonshared_internal_malloc_size
0fe1ac
+#define xmalloc nonshared_internal_xmalloc
0fe1ac
+#define xmallocarray nonshared_internal_xmallocarray
0fe1ac
+#define reshape_packed nonshared_reshape_packed
0fe1ac
+static inline __attribute__((__always_inline__, __unused__))
0fe1ac
+void *
0fe1ac
+internal_malloc_size (size_t size)
0fe1ac
+{
0fe1ac
+  void *p;
0fe1ac
+
0fe1ac
+  if (size == 0)
0fe1ac
+    return NULL;
0fe1ac
+
0fe1ac
+  p = (void *) malloc (size);
0fe1ac
+  if (p == NULL)
0fe1ac
+    os_error ("Memory allocation failed");
0fe1ac
+  return p;
0fe1ac
+}
0fe1ac
+
0fe1ac
+static inline __attribute__((__always_inline__, __unused__))
0fe1ac
+void *
0fe1ac
+xmalloc (size_t size)
0fe1ac
+{
0fe1ac
+  return internal_malloc_size (size ? size : 1);
0fe1ac
+}
0fe1ac
+
0fe1ac
+static inline __attribute__((__always_inline__, __unused__))
0fe1ac
+void *
0fe1ac
+xmallocarray (size_t nmemb, size_t size)
0fe1ac
+{
0fe1ac
+  if (!nmemb || !size)
0fe1ac
+    size = nmemb = 1;
0fe1ac
+  else if (__builtin_expect ((nmemb | size)
0fe1ac
+			     >= (((size_t) 1) << (__CHAR_BIT__
0fe1ac
+						  * sizeof (size_t) / 2)), 0)
0fe1ac
+	   && nmemb > __SIZE_MAX__ / size)
0fe1ac
+    {
0fe1ac
+      errno = ENOMEM;
0fe1ac
+      os_error ("Integer overflow in xmallocarray");
0fe1ac
+    }
0fe1ac
+
0fe1ac
+  return internal_malloc_size (nmemb * size);
0fe1ac
+}
0fe1ac
+
0fe1ac
+static inline __attribute__((__always_inline__, __unused__))
0fe1ac
+#include "intrinsics/reshape_packed.c"
0fe1ac
+
0fe1ac
+struct no_bounds_check { int bounds_check; };
0fe1ac
+#define compile_options ((struct no_bounds_check) { .bounds_check = 0 })
0fe1ac
+
0fe1ac
+#define internal_error(x, y...) runtime_error (y)
0fe1ac
+
0fe1ac
+#endif
0fe1ac
+
0fe1ac
 #endif  /* LIBGFOR_H  */
0fe1ac
--- libgfortran/runtime/nonshared-error.c.jj	2022-05-13 13:22:46.653357141 +0200
0fe1ac
+++ libgfortran/runtime/nonshared-error.c	2022-05-13 13:22:46.653357141 +0200
0fe1ac
@@ -0,0 +1,56 @@
0fe1ac
+/* Copyright (C) 2020-2022 Free Software Foundation, Inc.
0fe1ac
+
0fe1ac
+This file is part of the GNU Fortran runtime library (libgfortran).
0fe1ac
+
0fe1ac
+Libgfortran is free software; you can redistribute it and/or modify
0fe1ac
+it under the terms of the GNU General Public License as published by
0fe1ac
+the Free Software Foundation; either version 3, or (at your option)
0fe1ac
+any later version.
0fe1ac
+
0fe1ac
+Libgfortran is distributed in the hope that it will be useful,
0fe1ac
+but WITHOUT ANY WARRANTY; without even the implied warranty of
0fe1ac
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0fe1ac
+GNU General Public License for more details.
0fe1ac
+
0fe1ac
+Under Section 7 of GPL version 3, you are granted additional
0fe1ac
+permissions described in the GCC Runtime Library Exception, version
0fe1ac
+3.1, as published by the Free Software Foundation.
0fe1ac
+
0fe1ac
+You should have received a copy of the GNU General Public License and
0fe1ac
+a copy of the GCC Runtime Library Exception along with this program;
0fe1ac
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
0fe1ac
+<http://www.gnu.org/licenses/>.  */
0fe1ac
+
0fe1ac
+
0fe1ac
+#define LIBGFORTRAN_NONSHARED
0fe1ac
+#include "libgfortran.h"
0fe1ac
+#include "io.h"
0fe1ac
+#include "async.h"
0fe1ac
+
0fe1ac
+#include <string.h>
0fe1ac
+#include <stdio.h>
0fe1ac
+
0fe1ac
+/* Improved version of os_error with a printf style format string and
0fe1ac
+   a locus.  */
0fe1ac
+
0fe1ac
+void
0fe1ac
+os_error_at (const char *where, const char *message, ...)
0fe1ac
+{
0fe1ac
+  char buf[4096];
0fe1ac
+  size_t len = strlen (where);
0fe1ac
+  int written;
0fe1ac
+  va_list ap;
0fe1ac
+
0fe1ac
+  if (len >= 2048)
0fe1ac
+    os_error ("Unknown error");
0fe1ac
+  memcpy (buf, where, len);
0fe1ac
+  memcpy (buf + len, ": ", 2);
0fe1ac
+  va_start (ap, message);
0fe1ac
+  written = vsnprintf (buf + len + 2, 4095 - len - 2, message, ap);
0fe1ac
+  va_end (ap);
0fe1ac
+  if (written < 0)
0fe1ac
+    written = 0;
0fe1ac
+  buf[len + 2 + written] = '\0';
0fe1ac
+  os_error (buf);
0fe1ac
+}
0fe1ac
+iexport(os_error_at);
0fe1ac
--- libgfortran/io/nonshared-transfer.c.jj	2022-05-13 13:22:46.653357141 +0200
0fe1ac
+++ libgfortran/io/nonshared-transfer.c	2022-05-13 13:22:46.653357141 +0200
0fe1ac
@@ -0,0 +1,42 @@
0fe1ac
+/* Copyright (C) 2002-2022 Free Software Foundation, Inc.
0fe1ac
+   Contributed by Andy Vaught
0fe1ac
+   Namelist transfer functions contributed by Paul Thomas
0fe1ac
+   F2003 I/O support contributed by Jerry DeLisle
0fe1ac
+
0fe1ac
+This file is part of the GNU Fortran runtime library (libgfortran).
0fe1ac
+
0fe1ac
+Libgfortran is free software; you can redistribute it and/or modify
0fe1ac
+it under the terms of the GNU General Public License as published by
0fe1ac
+the Free Software Foundation; either version 3, or (at your option)
0fe1ac
+any later version.
0fe1ac
+
0fe1ac
+Libgfortran is distributed in the hope that it will be useful,
0fe1ac
+but WITHOUT ANY WARRANTY; without even the implied warranty of
0fe1ac
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0fe1ac
+GNU General Public License for more details.
0fe1ac
+
0fe1ac
+Under Section 7 of GPL version 3, you are granted additional
0fe1ac
+permissions described in the GCC Runtime Library Exception, version
0fe1ac
+3.1, as published by the Free Software Foundation.
0fe1ac
+
0fe1ac
+You should have received a copy of the GNU General Public License and
0fe1ac
+a copy of the GCC Runtime Library Exception along with this program;
0fe1ac
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
0fe1ac
+<http://www.gnu.org/licenses/>.  */
0fe1ac
+
0fe1ac
+
0fe1ac
+/* transfer.c -- Top level handling of data transfer statements.  */
0fe1ac
+
0fe1ac
+#include "io.h"
0fe1ac
+#include "fbuf.h"
0fe1ac
+#include "format.h"
0fe1ac
+#include "unix.h"
0fe1ac
+#include "async.h"
0fe1ac
+#include <string.h>
0fe1ac
+#include <errno.h>
0fe1ac
+
0fe1ac
+void
0fe1ac
+st_wait_async (st_parameter_wait *wtp)
0fe1ac
+{
0fe1ac
+  (void) wtp;
0fe1ac
+}