(forwarded from the Debian bug tracking system) package Pak1 is type T1 is tagged null record; function Eq(X, Y : T1) return Boolean renames "="; function Neq(X, Y : T1) return Boolean renames "/="; -- line 4 end Pak1; gnatmake pak1 yields: gnatmake pak1 gcc-4.1 -c pak1.ads +===========================GNAT BUG DETECTED==============================+ | 4.1.2 20061115 (prerelease) (Debian 4.1.1-22) (x86_64-pc-linux-gnu) | | Assert_Failure einfo.adb:846 | | Error detected at pak1.ads:4:43 | The token that triggers the bug box is the "renames" in line 4. Here is a second test case that triggers the same bug box: package Pak1 is type T1 is tagged null record; function Eq (X, Y : T1) return Boolean renames "="; type T2 is new T1 with null record; function Eq (X, Y : T2) return Boolean renames "="; -- line 6 end Pak1; gnatmake pak1 gcc-4.1 -c pak1.ads +===========================GNAT BUG DETECTED==============================+ | 4.1.2 20061115 (prerelease) (Debian 4.1.1-22) (x86_64-pc-linux-gnu) | | Assert_Failure einfo.adb:846 | | Error detected at pak1.ads:6:43 | The token that triggers this bug box is, again, the "renames" in line 6.
Same symptoms on i686-unknown-linux-gnu.
+===========================GNAT BUG DETECTED==============================+ | 4.2.0 (i686-pc-linux-gnu) Assert_Failure einfo.adb:853 | | Error detected at pak1.ads:4:43 | +===========================GNAT BUG DETECTED==============================+ | 4.1.2 (i686-pc-linux-gnu) Assert_Failure einfo.adb:846 | | Error detected at pak1.ads:4:43 | Compiles successfully with 3.4.6 and 4.0.4 so this is a regression.
And still present on trunk from a few weeks ago: +===========================GNAT BUG DETECTED==============================+ | 4.3.0 20070511 (experimental) (x86_64-unknown-linux-gnu) Assert_Failure einfo.adb:852| | Error detected at pak1.ads:4:43 |
Confirmed with trunk, with the error signaled at another place: +===========================GNAT BUG DETECTED==============================+ | 4.4.0 20080223 (experimental) (i686-pc-linux-gnu) GCC error: | | in gnat_to_gnu_entity, at ada/decl.c:301 | | Error detected at pak1.ads:2:9 |
Closing 4.1 branch.
Closing 4.2 branch.
GCC 4.3.4 is being released, adjusting target milestone.
GCC 4.3.5 is being released, adjusting target milestone.
This works with 4.4.x and 4.5.x: pak1.ads:2:09: prefix of "Unrestricted_Access" attribute cannot be intrinsic but fails again with 4.6.0: +===========================GNAT BUG DETECTED==============================+ | 4.6.0 20110106 (experimental) [trunk revision 168535] (i586-suse-linux-gnu) | | Assert_Failure einfo.adb:904 | | Error detected at pak1.ads:1:1
(In reply to comment #9) > This works with 4.4.x and 4.5.x: > > pak1.ads:2:09: prefix of "Unrestricted_Access" attribute cannot be intrinsic I wouldn't qualify this as "working". The test program does not use Unrestricted_Access and I think it is legal, so GCC should not reject it. I think this is in fact another bug which hides PR32164.
4.3 branch is being closed, moving to 4.4.7 target.
We now have two distinct assertion failures. First version with T1 Eq Neq gives: 4.6.1 (x86_64-pc-linux-gnu) Assert_Failure einfo.adb:904 Error detected at pak1.ads:1:1 Second version with T1 Eq and T2 Eq gives: 4.6.1 (x86_64-pc-linux-gnu) Assert_Failure einfo.adb:910 Error detected at pak2.ads:6:43
4.4 branch is being closed, moving to 4.5.4 target.
GCC 4.6.4 has been released and the branch has been closed.
The 4.7 branch is being closed, moving target milestone to 4.8.4.
works for me with some more recent compilers. Example: $ gnatchop -w pak1.ada && gnatmake -gnatvl pak1_1.ads pak1_2.ads splitting pak1.ada into: pak1_1.ads pak1_2.ads gcc -c -gnatvl pak1_1.ads GNAT 4.8.0 20130208 (experimental) [trunk revision 195897] Copyright 1992-2013, Free Software Foundation, Inc. Compiling: pak1_1.ads (source file time stamp: 2014-08-13 12:33:11) 1. package Pak1_1 is 2. type T1 is tagged null record; 3. function Eq(X, Y : T1) return Boolean renames "="; 4. function Neq(X, Y : T1) return Boolean renames "/="; -- line 4 5. end Pak1_1; 5 lines: No errors gcc -c -gnatvl pak1_2.ads GNAT 4.8.0 20130208 (experimental) [trunk revision 195897] Copyright 1992-2013, Free Software Foundation, Inc. Compiling: pak1_2.ads (source file time stamp: 2014-08-13 12:33:11) 1. 2. package Pak1_2 is 3. type T1 is tagged null record; 4. function Eq (X, Y : T1) return Boolean renames "="; 5. 6. type T2 is new T1 with null record; 7. function Eq (X, Y : T2) return Boolean renames "="; -- line 6 8. end Pak1_2; 8 lines: No errors Same for GNAT GPL 2014 (20140331) ; both on Mac OS X 10.9
4.8.2 and 4.9.1 behave well too.
GCC 4.8.4 has been released.
The gcc-4_8-branch is being closed, re-targeting regressions to 4.9.3.
GCC 4.9.3 has been released.
This is fixed in all active branches.