The following program results in clashing assembler symbols when compiled with gnat-4.3. This does not happen when using gnat-4.2. -- file: pkg.ads -- package Pkg is procedure Foo; Max : Natural := 1; type Arr is array(Natural range 0..Max) of Natural; type T is record A : Arr := (others => 0); end record; end; -- file: pkg.adb -- package body Pkg is procedure Foo is X, Y : T; begin null; end; end; -- compilation -- gcc-4.3 -c pkg.adb /tmp/ccP5RYSw.s: Assembler messages: /tmp/ccP5RYSw.s:76: Error: symbol `pkg__foo__T3scc___U' is already defined End of compilation gnatmake: "pkg.adb" compilation error
Confirmed that it works with 4.2.4 but fails with 4.3.2 and trunk on x86_64-linux at least. gcc version 4.4.0 20081118 (experimental) [trunk revision 141967] (GCC) $ gcc -c pkg.adb /tmp/ccF1O7nh.s: Assembler messages: /tmp/ccF1O7nh.s:86: Error: symbol `pkg__foo__T3scc___U' is already defined
GCC 4.3.3 is being released, adjusting target milestone.
FYI, this issue seems to be fixed in GNAT GPL 2009, released today.
The issue is present on 4.4.0 guerby@gcc16:~/tmp$ /opt/cfarm/release/4.4.0/bin/gcc -c pkg.adb /tmp/cc6tnj9K.s: Assembler messages: /tmp/cc6tnj9K.s:86: Error: symbol `pkg__foo__T3scc___U' is already defined But fixed on trunk as of revision 147903
GCC 4.3.4 is being released, adjusting target milestone.
GCC 4.3.5 is being released, adjusting target milestone.
Subject: Bug 38394 Author: ebotcazou Date: Mon May 24 21:43:31 2010 New Revision: 159798 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159798 Log: PR ada/38394 * gnat.dg/array13.ad[sb]: New test. Added: trunk/gcc/testsuite/gnat.dg/array13.adb trunk/gcc/testsuite/gnat.dg/array13.ads Modified: trunk/gcc/testsuite/ChangeLog
Subject: Bug 38394 Author: ebotcazou Date: Mon May 24 21:46:05 2010 New Revision: 159799 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159799 Log: PR ada/38394 * gnat.dg/array13.ad[sb]: New test. Added: branches/gcc-4_5-branch/gcc/testsuite/gnat.dg/array13.adb - copied unchanged from r159798, trunk/gcc/testsuite/gnat.dg/array13.adb branches/gcc-4_5-branch/gcc/testsuite/gnat.dg/array13.ads - copied unchanged from r159798, trunk/gcc/testsuite/gnat.dg/array13.ads Modified: branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
Too delicate to fix on the older branches.