The following occurs with svn head and GNAT GPL 2007. $ gcc -c -g -gnat05 e.adb +===========================GNAT BUG DETECTED==============================+ | 4.3.0 20070611 (experimental) (i686-pc-linux-gnu) GCC error: | | in gen_type_die_with_usage, at dwarf2out.c:12921 | | Error detected around e.adb:8 | ... This occurs because a node type that should be internal to the Ada f-e (unconstrained_array_type) has made its way as far as gen_type_die_with_usage in dwarf2out.c. Testcase: package E is type T (S : access String) is null record; procedure P (X : T); end; package body E is procedure P (X : T) is S : String renames X.S.all; F : String (S'Range); for F'Address use S (S'First)'Address; begin null; end; end;
gcc -c -g -gnat05 e.adb works on 4.1.2, but it ICEs on 4.2 and 4.3. +===========================GNAT BUG DETECTED==============================+ | 4.2.0 (i686-pc-linux-gnu) in gen_type_die, at dwarf2out.c:12720 | | Error detected at e.adb:8:7 | | Please submit a bug report; see http://gcc.gnu.org/bugs.html. |
Have you tried with a recent trunk GCC? Your GCC reads "20070611", but with the current trunk (4.3.0 20071207), I cannot reproduce the bug on i686-pc-linux-gnu: % gcc -c -g -gnat05 e.adb Laurent, which version did you use?
Trunk from 20070611, but if it doesn't show up now (I haven't checked) this should be marked as fixed on trunk.
This is fixed on trunk.