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;


-- 
           Summary: ICE in dwarf2out with -g: sees Ada f-e
                    unconstrained_array_type node
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: baldrick at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32286

Reply via email to