[Bug ada/29283] Bug box in expand_expr_addr_expr_1, at expr.c:6393 on alpha

ludovic at ludovic-brenta dot org gcc-bugzilla@gcc.gnu.org
Sat Oct 13 19:09:00 GMT 2007



------- Comment #3 from ludovic at ludovic-brenta dot org  2007-10-13 19:09 -------
Here is a second, shorter test case that triggers the bug on i386, x86_64 and
powerpc.  Thanks to Prakash Countcham at imag.fr and Xavier Grave for
confirming on i386 and powerpc.  This bug is not in GCC 4.2.

procedure Test_Param is
   type Int_1 is range 0 .. 600;
   for Int_1'Size use 10;

   type Int_2 is range 0 .. 8_191;
   for Int_2'Size use 13;

   type T_A_B is record
      A : Int_1;
      B : Int_2 range 0 .. 6_350;
   end record;
   for T_A_B'Size use 23;
   pragma Pack(T_A_B);

   type T_C is array (1..7) of T_A_B;
   for T_C'Size use 7 * 23;
   pragma Pack(T_C);

   X : T_C;
begin
   if X(1).B'Valid then
      null;
   end if;
end Test_Param;

$ gnatmake test_param.adb
gcc-4.1 -c test_param.adb
+===========================GNAT BUG DETECTED==============================+
| 4.1.2 20061115 (prerelease) (Debian 4.1.1-22) (x86_64-pc-linux-gnu) GCC
error:|
| in expand_expr_addr_expr_1, at expr.c:6393                               |
| Error detected at test_param.adb:24:5                                    |


-- 

ludovic at ludovic-brenta dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
      Known to fail|                            |4.1.1
      Known to work|                            |4.2.2
         Resolution|INVALID                     |


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



More information about the Gcc-bugs mailing list