[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#416973: gnat-4.1: Illegal program not detected, Ada 2005, 3.9.4(12/2) and 7.5(6.1/2)



Package: gnat-4.1
Version: 4.1.1-22
Severity: normal

In the following program, the declaration of T3 is illegal because it
extends a limited type (T1) and a nonlimited interface (T2).

-- compiled -gnat05
-- error not detected
package pak1 is
   -- RM 3.9.4(12/2) and 7.5(6.1/2)
   -- check that both ancestors must be either limited or nonlimited
   type T1 is tagged limited null record;
   type T2 is interface;
   type T3 is new pak1.T1 and pak1.T2 with null record;  --ERROR: mixed types
end pak1;

To reproduce:
gnatmake -gnat05 pak1.ads

Error expected:
pak1.ads:8:30: all ancestors must be either limited or nonlimited

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-amd64
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages gnat-4.1 depends on:
ii  gcc-4.1                     4.1.1-21     The GNU C compiler
ii  gnat-4.1-base               4.1.1-22     The GNU Compiler Collection (gnat 
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libc6-dev                   2.3.6.ds1-13 GNU C Library: Development Librari
ii  libgcc1                     1:4.1.1-21   GCC support library
ii  libgnat-4.1                 4.1.1-22     Runtime library for GNU Ada applic
ii  libgnatprj4.1               4.1.1-22     GNU Ada Project Manager
ii  libgnatvsn4.1               4.1.1-22     GNU Ada compiler version library

gnat-4.1 recommends no packages.

-- no debconf information




Reply to: