This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/15833] New: Gigi abort Code=401 with Unchecked_Union in private part


I've been succesful in isolating a bug:
GCC version:
Reading specs from /usr/lib/gcc/i486-linux/3.4.0/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,
objc,ada,treelang --prefix=/usr --libexecdir=/usr/lib 
--with-gxx-include-dir=/usr/include/c++/3.4 --enable-shared --with-system-zlib 
--enable-nls --enable-threads=posix --without-included-gettext 
--program-suffix=-3.4 --enable-__cxa_atexit --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk 
--disable-werror i486-linux
Thread model: posix
gcc version 3.4.0 (Debian 20040516)

It is also valid for gcc 3.3.3.
The declaration of a Unchecked_Union type in the private part of a specification 
make GNAT unable to compile:
$ gnatmake union.ads 
gcc-3.4 -c union.ads
+===========================GNAT BUG DETECTED==============================+
| 3.4.0 (Debian 20040516) (i486-pc-linux-gnu) Gigi abort, Code=401         |
| Error detected at union.ads:20:3                                         |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact gcc-3.4 or gnatmake command that you entered.          |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+

union.ads contains:
package Union is

  type A is null record;
  type B is null record;

  type Discriminant is (D1, D2);
  
  type Union is private;
  
private

  type Union(D : Discriminant := D1) is record
    case D is
      when D1 =>
        View1 : A;
      when D2 =>
        View2 : B;
    end case;
  end record;
  pragma Unchecked_Union (Union);

end Union;

Making the type union not private avoids the bug. No parameter seems to 
influence in any way.

Good luck,
JC

-- 
           Summary: Gigi abort Code=401 with Unchecked_Union in private part
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jc at apinc dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i586-pc-linux-gnu
  GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]