The unified diff between revisions [1c7420f5..] and [be06f10a..] is displayed below. It can also be downloaded as a raw diff.
#
#
# add_file "debian/patches/pr38333.dpatch"
# content [3c451ca85b979299074732d863f3d3c8c404b816]
#
# patch "debian/changelog"
# from [54bb7e4cc36c6e8f5bf26f8f622ca3f8082167c4]
# to [1d3d757552294cf62bc908712fcf66a96ea08422]
#
# patch "debian/rules.patch"
# from [93eab32b60c77da9d724f71a052ab8e05d70b5a6]
# to [de30ff09a6e38118260b3a9afb6f40c0e609b1a8]
#
============================================================
--- debian/patches/pr38333.dpatch 3c451ca85b979299074732d863f3d3c8c404b816
+++ debian/patches/pr38333.dpatch 3c451ca85b979299074732d863f3d3c8c404b816
@@ -0,0 +1,94 @@
+#! /bin/sh -e
+
+# All lines beginning with `# DPATCH:' are a description of the patch.
+# DP: PR ada/38333: Forbid pragma Import of an abstract subprogram
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p1 < $0
+ #cd ${dir}gcc && autoconf2.59
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+ #rm ${dir}gcc/configure
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# append the patch here and adjust the -p? flag in the patch calls.
+
+B.1(22) says that an Import pragma must be the completion of a
+declaration, and 6.1(20) says that a completion is not allowed for an
+abstract subprogram declaration.
+
+With the following patch, the attached example gives
+
+ 5. pragma Import (Ada, p1);
+ |
+ >>> cannot import abstract subprogram "p1" declared at line 4
+
+whereas without it the no error is reported and the compilation is
+succesful.
+
+Bootstrapped and regtested on x86_64-linux. Ok for trunk?
+
+ gcc/ada/
+ PR ada/38333
+ * sem_prag.adb (Process_Import_Or_Interface): Forbid an abstract
+ subprogram to be completed with a "pragma Import".
+
+ gcc/testsuite/
+ PR ada/38333
+ * gnat.dg/specs/import_abstract.ads: New.
+---
+ gcc/ada/sem_prag.adb | 9 +++++++++
+ gcc/testsuite/gnat.dg/specs/import_abstract.ads | 6 ++++++
+ 2 files changed, 15 insertions(+), 0 deletions(-)
+ create mode 100644 gcc/testsuite/gnat.dg/specs/import_abstract.ads
+
+diff --git a/src/gcc/ada/sem_prag.adb b/src/gcc/ada/sem_prag.adb
+index 065cb97..4e43b66 100644
+--- a/src/gcc/ada/sem_prag.adb
++++ b/src/gcc/ada/sem_prag.adb
+@@ -3455,6 +3455,15 @@ package body Sem_Prag is
+ else
+ Set_Imported (Def_Id);
+
++ if Is_Subprogram (Def_Id)
++ and then Is_Abstract_Subprogram (Def_Id)
++ then
++ Error_Msg_Sloc := Sloc (Def_Id);
++ Error_Msg_NE
++ ("cannot import abstract subprogram& declared#",
++ Arg2, Def_Id);
++ end if;
++
+ -- Special processing for Convention_Intrinsic
+
+ if C = Convention_Intrinsic then
+diff --git a/gcc/testsuite/gnat.dg/specs/import_abstract.ads b/gcc/testsuite/gnat.dg/specs/import_abstract.ads
+new file mode 100644
+index 0000000..9d05f0c
+--- /dev/null
++++ b/src/gcc/testsuite/gnat.dg/specs/import_abstract.ads
+@@ -0,0 +1,6 @@
++-- { dg-do compile }
++package Import_Abstract is
++ type T1 is abstract tagged null record;
++ procedure p1(X : T1) is abstract;
++ pragma Import (Ada, p1); -- { dg-error "cannot import abstract subprogram" }
++end Import_Abstract;
+--
+1.6.0.4.880.g80093
+
============================================================
--- debian/changelog 54bb7e4cc36c6e8f5bf26f8f622ca3f8082167c4
+++ debian/changelog 1d3d757552294cf62bc908712fcf66a96ea08422
@@ -1,3 +1,10 @@
+gnat-4.3 (4.3.4-4) unstable; urgency=low
+
+ [Ludovic Brenta]
+ * debian/patches/pr38333.dpatch: new backport from the trunk.
+
+ -- Ludovic Brenta <lbrenta@debian.org> Tue, 6 Oct 2009 18:58:01 +0200
+
gnat-4.3 (4.3.4-3) unstable; urgency=low
[Ludovic Brenta]
============================================================
--- debian/rules.patch 93eab32b60c77da9d724f71a052ab8e05d70b5a6
+++ debian/rules.patch de30ff09a6e38118260b3a9afb6f40c0e609b1a8
@@ -72,6 +72,7 @@ debian_patches += \
pr34466 \
pr35050 \
pr35792 \
+ pr38333 \
gnalasup_to_lapack \
gcc-m68k-pch \
pr35020 \