comp.lang.ada
 help / color / mirror / Atom feed
* Brain bug or GNAT bug?
@ 2007-02-28 23:44 (see below)
  2007-03-01  0:11 ` Ludovic Brenta
  0 siblings, 1 reply; 5+ messages in thread
From: (see below) @ 2007-02-28 23:44 UTC (permalink / raw)


Using GNAT GPL 2006 (PPC/Darwin), I instantiate:

   generic
   
      type modular is mod <>;
   
   package try is
   
      type DT1 (the_size : modular)  is limited private;
   
   -- subtype bounded is modular;
      subtype bounded is modular range 1..9;
      type DT2 (the_size : bounded)  is limited private;
   --                         |
   -- >>> subtype must be compatible with parent discriminant
   
      function is_empty (the_data : DT2) return Boolean;
   
   private
   
      type a_thing is null record;
      type a_ptr   is access a_thing;
      
      type a_ptr_array is array (modular range <>) of a_ptr;
   
      type DT1 (the_size : modular) is
         record
            things : a_ptr_array (1 .. the_size);
         end record;
   
      type DT2 (the_size : bounded)  is new DT1(the_size);
   
   end try;

and I get the error message commented-out at line 11.

If I substitute the declaration at line 9 for that at line 10,
the test program compiles and runs correctly.

Am I blundering here, or is this a GNAT bug?

-- 
Bill Findlay
<surname><forename> chez blueyonder.co.uk





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-03-01  8:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-28 23:44 Brain bug or GNAT bug? (see below)
2007-03-01  0:11 ` Ludovic Brenta
2007-03-01  0:39   ` (see below)
2007-03-01  5:07     ` Jeffrey R. Carter
2007-03-01  8:45     ` Ludovic Brenta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox