public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/39441]  New: Discriminant & interface not implemented by full type (RM-2005 7.3 (7.3/2))
@ 2009-03-12 13:01 reet at codelabs dot ch
  2009-10-03 10:42 ` [Bug ada/39441] " sam at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: reet at codelabs dot ch @ 2009-03-12 13:01 UTC (permalink / raw)
  To: gcc-bugs

Given the following package spec:

package Full_View is

   type Base_Type (Num : Integer) is tagged private;

   type Base_Interface is interface;

   type New_Type is new Base_Type (Num => 11) 
     and Base_Interface with private;

private
   type Base_Type (Num : Integer) is tagged record
      My_Number : Integer := Num;
   end record;

   type New_Type is new Base_Type (Num => 11) and
     Base_Interface with null record;

end Full_View;

Trying to compile this with gcc 4.3.2 in Debian/Lenny results in the following
error:
full_view.ads:7:09: interface "Base_Interface" not implemented by full
type (RM-2005 7.3 (7.3/2))

Verbose output:

$ gcc -v -c full_view.ads
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1) 
COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=generic'
 /usr/lib/gcc/i486-linux-gnu/4.3.2/gnat1 -quiet -dumpbase full_view.ads
-mtune=generic full_view.ads -o /tmp/cchU6wbD.s
full_view.ads:7:09: interface "Base_Interface" not implemented by full type
(RM-2005 7.3 (7.3/2))

When removing the (Num => 11) discrimant initialization or the Base_Interface
interface from the New_Type type extension, the code compiles fine.

Seems to me that the consistency check of the partial and full view of a tagged
type covering interfaces does not work with discriminants.

- reto


-- 
           Summary: Discriminant & interface not implemented by full type
                    (RM-2005 7.3 (7.3/2))
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reet at codelabs dot ch
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


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


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

* [Bug ada/39441] Discriminant & interface not implemented by full type (RM-2005 7.3 (7.3/2))
  2009-03-12 13:01 [Bug ada/39441] New: Discriminant & interface not implemented by full type (RM-2005 7.3 (7.3/2)) reet at codelabs dot ch
@ 2009-10-03 10:42 ` sam at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: sam at gcc dot gnu dot org @ 2009-10-03 10:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from sam at gcc dot gnu dot org  2009-10-03 10:42 -------
This has been fixed in SVN, the fix will be in GCC 4.5.0.


-- 

sam at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gcc dot gnu dot org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.5.0


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


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

end of thread, other threads:[~2009-10-03 10:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-12 13:01 [Bug ada/39441] New: Discriminant & interface not implemented by full type (RM-2005 7.3 (7.3/2)) reet at codelabs dot ch
2009-10-03 10:42 ` [Bug ada/39441] " sam at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).