Bug 15305 - Bug box in Gigi, code=505
Summary: Bug box in Gigi, code=505
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.2.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-05-06 05:10 UTC by Ludovic Brenta
Modified: 2006-03-19 05:54 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2005-06-20 19:30:17


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ludovic Brenta 2004-05-06 05:10:54 UTC
with unchecked_conversion;
procedure Test_100 is
   package pak1 is
      type T2 is private;

      function "=" (left, right : T2) return Boolean;
   private

      type T3 is access integer;
      type T2 is new T3;

      function convert is new unchecked_conversion (integer, T3);

   end pak1;

   package body pak1 is

      function "=" (left, right : T2) return Boolean is
      begin
         return false;
      end "=";

   end pak1;

   generic
      type T1 is private;
      x1: in T1;
      x2: in out T1;
   package pak2 is
      b: boolean := x1 = x2;
   end pak2;

   y1: pak1.T2;
   y2: pak1.T2;
   package new_pak2 is new pak2 (pak1.T2, y1, y2);
begin
   null;
end Test_100;


gcc -c -x ada test_100.ada
+===========================GNAT BUG DETECTED==============================+
| 3.5.0 20040327 (experimental) (i686-pc-linux-gnu) Gigi abort, Code=505   |
| Error detected at test_100.ada:30:26 [test_100.ada:35:4]                 |
| 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 or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+
Comment 1 Andrew Pinski 2004-10-12 03:50:34 UTC
Confirmed on the mainline:
+===========================GNAT BUG 
DETECTED==============================+
| 4.0.0 20041008 (experimental) (powerpc-apple-darwin7.4.1) GCC error:     |
| in build_binary_op, at /ada/utils2.c:875                                 |
| Error detected at test_100.ada:30:26 [test_100.ada:35:4]                 |
| 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 or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==============================================================
============+
Comment 2 Andrew Pinski 2006-03-19 05:54:17 UTC
Fixed in 4.2.0.