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



             Bug #: 54636

           Summary: Nested variable record in ADA gives GNAT bug

    Classification: Unclassified

           Product: gcc

           Version: 4.4.5

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: ada

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: jaime.daw...@gmail.com





Created attachment 28228

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28228

example code showing GNAT BUG DETECTED



gcc -v =>

Using built-in specs. Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8'

--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable

languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4

--enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib

--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix

--with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls

--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc

--with-arch-32=i586 --with-tune=generic --enable-checking=release

--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

Thread model: posix     gcc version 4.4.5 (Debian 4.4.5-8)

 gnat -v   =>    GNAT 4.4.5

gcc -c showbug.adb 

+===========================GNAT BUG DETECTED==============================+

| 4.4.5 (x86_64-pc-linux-gnu) in tree_low_cst, at tree.c:5018              |

| Error detected at showbug.adb:29:28   ..... etc



Problem appears to be due to an indetermined length array (MAP1) held within a

nested variant record structure.  Adding additional components to the EnDep_T

record (ie replacing B=> null; with B=> Dum: Integer) or re-ordering the arrays

MAP1 and MAP2, code compiles.



Code compiles on older version:  gcc 4.3.2 and GNAT 4.3.2

Reply via email to