diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-05-13 13:54:49 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-05-13 13:54:49 +0300 |
commit | 42156b5190f4fa150e1fab6777eb81e69d4db8c9 (patch) | |
tree | 3bf47de81cf1f89892789535a036d2d55d93a136 /debian/patches/ada-749574.diff | |
download | gcc-9-debian/6.3.0-17.tar.gz |
Imported gcc-6 (6.3.0-17)debian/6.3.0-17
Diffstat (limited to 'debian/patches/ada-749574.diff')
-rw-r--r-- | debian/patches/ada-749574.diff | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/ada-749574.diff b/debian/patches/ada-749574.diff new file mode 100644 index 0000000..9dec870 --- /dev/null +++ b/debian/patches/ada-749574.diff @@ -0,0 +1,34 @@ +From: Ludovic Brenta <lbrenta@debian.org> +Forwarded: no +Bug-Debian: http://bugs.debian.org/749574 +Description: Constraint_Error, range check failed at gnatlink.adb:2195, when called from gnatmake with -D option + The procedure gnatlink assumes that the Linker_Options.Table contains access + values to strings whose 'First index is always 1. This assumption is wrong + for the string returned by function Base_Name. +. + Instead of fixing the assumption in many places, this patch changes the + function Base_Name always to return a string with 'First=1. +. + This looks like an upstream bug but strangely the reporter of this bug + says it does not happen on GCC built from upstream sources. Further + investigation is required to determine whether or not to forward this + bug and patch upstream. + +Index: b/src/gcc/ada/gnatlink.adb +=================================================================== +--- a/src/gcc/ada/gnatlink.adb ++++ b/src/gcc/ada/gnatlink.adb +@@ -266,7 +266,12 @@ procedure Gnatlink is + Findex2 := File_Name'Last + 1; + end if; + +- return File_Name (Findex1 .. Findex2 - 1); ++ declare ++ Result : String (1 .. Findex2 - Findex1); ++ begin ++ Result (1 .. Findex2 - Findex1) := File_Name (Findex1 .. Findex2 - 1); ++ return Result; ++ end; + end Base_Name; + + ------------------------------- |