diff options
Diffstat (limited to 'testing/source/gcc10/patches')
-rw-r--r-- | testing/source/gcc10/patches/gcc-no_fixincludes.diff | 27 | ||||
-rw-r--r-- | testing/source/gcc10/patches/gfortran.deferred-shape-vs-assumed-shape.patch | 40 |
2 files changed, 67 insertions, 0 deletions
diff --git a/testing/source/gcc10/patches/gcc-no_fixincludes.diff b/testing/source/gcc10/patches/gcc-no_fixincludes.diff new file mode 100644 index 00000000..e152e082 --- /dev/null +++ b/testing/source/gcc10/patches/gcc-no_fixincludes.diff @@ -0,0 +1,27 @@ +--- ./gcc/Makefile.in.orig 2018-03-09 09:24:44.000000000 -0600 ++++ ./gcc/Makefile.in 2018-05-02 12:25:43.958002771 -0500 +@@ -3004,9 +3004,9 @@ + chmod a+r $${fix_dir}/limits.h; \ + done + # Install the README +- rm -f include-fixed/README +- cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README +- chmod a+r include-fixed/README ++# rm -f include-fixed/README ++# cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README ++# chmod a+r include-fixed/README + $(STAMP) $@ + + .PHONY: install-gcc-tooldir +@@ -3087,10 +3087,7 @@ + (TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \ + SHELL='$(SHELL)'; MACRO_LIST=`${PWD_COMMAND}`/macro_list ; \ + gcc_dir=`${PWD_COMMAND}` ; \ +- export TARGET_MACHINE srcdir SHELL MACRO_LIST && \ +- cd $(build_objdir)/fixincludes && \ +- $(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \ +- $(BUILD_SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \ ++ export TARGET_MACHINE srcdir SHELL MACRO_LIST ); \ + rm -f $${fix_dir}/syslimits.h; \ + if [ -f $${fix_dir}/limits.h ]; then \ + mv $${fix_dir}/limits.h $${fix_dir}/syslimits.h; \ diff --git a/testing/source/gcc10/patches/gfortran.deferred-shape-vs-assumed-shape.patch b/testing/source/gcc10/patches/gfortran.deferred-shape-vs-assumed-shape.patch new file mode 100644 index 00000000..f695b969 --- /dev/null +++ b/testing/source/gcc10/patches/gfortran.deferred-shape-vs-assumed-shape.patch @@ -0,0 +1,40 @@ +[PATCH] deferred-shape vs assumed-shape +Steve Kargl sgk@troutmask.apl.washington.edu +Wed Apr 1 20:04:43 GMT 2020 + +See +https://stackoverflow.com/questions/60972134/whats-wrong-with-the-following-fortran-code-gfortran-dtio-dummy-argument-at + +Is A(:) a deferred-shape array or an assumed-shape array? The +answer of course depends on context. + +This patch fixes the issue found at the above URL. + +Index: gcc/fortran/interface.c +=================================================================== +--- gcc/fortran/interface.c (revision 280157) ++++ gcc/fortran/interface.c (working copy) +@@ -4916,10 +4916,15 @@ check_dtio_arg_TKR_intent (gfc_symbol *fsym, bool type + || ((type != BT_CLASS) && fsym->attr.dimension))) + gfc_error ("DTIO dummy argument at %L must be a scalar", + &fsym->declared_at); +- else if (rank == 1 +- && (fsym->as == NULL || fsym->as->type != AS_ASSUMED_SHAPE)) +- gfc_error ("DTIO dummy argument at %L must be an " +- "ASSUMED SHAPE ARRAY", &fsym->declared_at); ++ else if (rank == 1) ++ { ++ if (fsym->as == NULL ++ || !(fsym->as->type == AS_ASSUMED_SHAPE ++ || (fsym->as->type == AS_DEFERRED && fsym->attr.dummy ++ && !fsym->attr.allocatable && !fsym->attr.pointer))) ++ gfc_error ("DTIO dummy argument at %L must be an " ++ "ASSUMED-SHAPE ARRAY", &fsym->declared_at); ++ } + + if (type == BT_CHARACTER && fsym->ts.u.cl->length != NULL) + gfc_error ("DTIO character argument at %L must have assumed length", + +-- +Steve + |