------- Additional Comments From laurent at guerby dot net  2004-12-05 21:02 
-------
The simplest ACATS test I could find that exhibits this ICE is c41325a.
Here is the standalone code with no ties to ACATS support. Removing anything
makes the ICE go away according to Andreas Schwab.

$ cat rep.ads
package Rep is
     procedure FAILED (M : in String);
     procedure RESULT;

     procedure Test (S1, S2 : in String);

   function Ident_Int(X : Integer) return Integer;
   function Ident_Bool (X : Boolean) return Boolean;
end Rep;

$ cat rep.adb
package body Rep is
     procedure Test (S1, S2 : in String) is begin null; end;
     procedure FAILED (M : in String) is
     begin
        raise Program_Error;
     end FAILED;

     procedure RESULT is begin null; end;

   function Ident_Int(X : Integer) return Integer is
   begin
      return X;
   end;

   function Ident_Bool (X : Boolean) return Boolean is
   begin
      return X;
   end;



end Rep;

$ cat pia.adb
with Rep; use Rep;
PROCEDURE PIA IS
   
     PACKAGE P IS
          TYPE CATARRAY IS ARRAY (INTEGER RANGE <>) OF INTEGER;

          TYPE ARRAY_1 IS ARRAY (1..10) OF INTEGER;
          TYPE ARRAY_2 IS ARRAY (1..4, 1..4) OF INTEGER;
          TYPE ARRAY_3 IS ARRAY (1..2, 1..3, 1..4) OF INTEGER;
          TYPE ARRAY_4 IS ARRAY (1..10) OF BOOLEAN;
          TYPE ARRAY_5 IS ARRAY (1..4, 1..4) OF BOOLEAN;
          TYPE ARRAY_6 IS ARRAY (1..2, 1..3, 1..4) OF BOOLEAN;

          OBJ_ARA_1 : ARRAY_1 := (1..10 => IDENT_INT(0));
          OBJ_ARA_2 : ARRAY_2 := (1..4 => (1..4 => IDENT_INT(0)));
          OBJ_ARA_3 : ARRAY_3 := (1..2 => (1..3 =>
                                               (1..4 => IDENT_INT(0))));
          OBJ_ARA_4 : ARRAY_4 := (1..10 => IDENT_BOOL(FALSE));
          OBJ_ARA_5 : ARRAY_5 := (1..4 => (1..4 => IDENT_BOOL(FALSE)));
          OBJ_ARA_6 : ARRAY_6 := (1..2 => (1..3 =>
                                          (1..4 => IDENT_BOOL(FALSE))));
          OBJ_ARA_7 : CATARRAY (1..10) := (1..10 => IDENT_INT(0));
          OBJ_ARA_20 : CATARRAY (1..20) := (1..10 => 1,
                                                11..20 => IDENT_INT(0));
     END P;

     VAR_ARA_1 : P.ARRAY_1 := (1..10 => IDENT_INT(1));
     VAR_ARA_2 : P.ARRAY_2 := (1..4 => (1..4 => IDENT_INT(1)));
     VAR_ARA_3 : P.ARRAY_3 := (1..2 => (1..3 =>
                                               (1..4 => IDENT_INT(1))));
     VAR_ARA_4 : P.ARRAY_4 := (1..10 => IDENT_BOOL(TRUE));
     VAR_ARA_5 : P.ARRAY_5 := (1..4 => (1..4 => IDENT_BOOL(TRUE)));
     VAR_ARA_6 : P.ARRAY_6 := (1..2 => (1..3 =>
                                           (1..4 => IDENT_BOOL(TRUE))));
     VAR_ARA_7 : P.CATARRAY (1..10) := (1..10 => IDENT_INT(1));
     VAR_ARA_8 : P.ARRAY_4 := (1..10 => IDENT_BOOL(TRUE));
     VAR_ARA_20 : P.CATARRAY (1..20) := (1..20 => IDENT_INT(0));
     
BEGIN
     TEST ("C41325A", "CHECK THAT IMPLICITLY DECLARED ENTITIES CAN " &
                      "BE SELECTED FROM OUTSIDE THE PACKAGE USING AN " &
                      "EXPANDED NAME, FOR AN ARRAY TYPE");

     -- CASE 1: MULTIDIMENSIONAL ARRAYS.

     IF P."=" (VAR_ARA_2, P.OBJ_ARA_2) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 1");
     END IF;

     IF P."=" (VAR_ARA_5, P.OBJ_ARA_5) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 2");
     END IF;

     IF P."/=" (VAR_ARA_2, P.ARRAY_2'(1..4 => (1..4 => 1))) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 3");
     END IF;

     IF P."/=" (VAR_ARA_5, P.ARRAY_5'(1..4 => (1..4 => TRUE))) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 4");
     END IF;

     IF P."=" (VAR_ARA_3, P.OBJ_ARA_3) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 5");
     END IF;

     IF P."/=" (VAR_ARA_6, P.ARRAY_6'(1..2 =>(1..3 =>(1..4 => TRUE)))) 
          THEN
               FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 6");
     END IF;

     -- CASE 2: ONE DIMENSIONAL ARRAYS.

     IF P."=" (VAR_ARA_1, P.OBJ_ARA_1) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 7");
     END IF;

     IF P."/=" (VAR_ARA_1, P.ARRAY_1'(1..10 => 1)) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 8");
     END IF;

     VAR_ARA_20 := P."&" (VAR_ARA_7, P.OBJ_ARA_7);
     IF P."/=" (VAR_ARA_20, P.OBJ_ARA_20) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 9");
     END IF;

     IF P."<" (VAR_ARA_1, P.OBJ_ARA_1) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 10");
     END IF;

     IF P.">" (P.OBJ_ARA_1, VAR_ARA_1) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 11");
     END IF;

     IF P."<=" (VAR_ARA_1, P.OBJ_ARA_1) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 12");
     END IF;

     IF P."<=" (VAR_ARA_1, P.ARRAY_1'(1..10 => 1)) THEN
          NULL;
     ELSE
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 13");
     END IF;

     IF P.">=" (VAR_ARA_1, P.ARRAY_1'(1..10 => 2)) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 14");
     END IF;

     IF P.">=" (VAR_ARA_1, P.ARRAY_1'(1..10 => 1)) THEN
          NULL;
     ELSE
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 15");
     END IF;

     VAR_ARA_8 := P."NOT" (VAR_ARA_4);
     IF P."/=" (VAR_ARA_8, P.OBJ_ARA_4) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 16");
     END IF;

     VAR_ARA_8 := P."OR" (VAR_ARA_4, P.OBJ_ARA_4);
     IF P."=" (VAR_ARA_8, P.OBJ_ARA_4) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 17");
     END IF;

     VAR_ARA_8 := P."AND" (VAR_ARA_4, P.OBJ_ARA_4);
     IF P."/=" (VAR_ARA_8, P.OBJ_ARA_4) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 18");
     END IF;

     VAR_ARA_8 := P."XOR" (VAR_ARA_4, P.OBJ_ARA_4);
     IF P."=" (VAR_ARA_8, P.OBJ_ARA_4) THEN
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 19");
     END IF;

     RESULT;
END;

$ gnatmake -f -O2 pia
# leads to the ICE


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0 Regression] [Ada]      |[4.0 Regression] [Ada]
                   |[ia64] ICE while building   |[ia64] ACATS c41325a & other
                   |libada                      |ICE, also while building
                   |                            |libada


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Reply via email to