1 2-- Copyright (C) 2001 Bill Billowitch. 3 4-- Some of the work to develop this test suite was done with Air Force 5-- support. The Air Force and Bill Billowitch assume no 6-- responsibilities for this software. 7 8-- This file is part of VESTs (Vhdl tESTs). 9 10-- VESTs is free software; you can redistribute it and/or modify it 11-- under the terms of the GNU General Public License as published by the 12-- Free Software Foundation; either version 2 of the License, or (at 13-- your option) any later version. 14 15-- VESTs is distributed in the hope that it will be useful, but WITHOUT 16-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 18-- for more details. 19 20-- You should have received a copy of the GNU General Public License 21-- along with VESTs; if not, write to the Free Software Foundation, 22-- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 24-- --------------------------------------------------------------------- 25-- 26-- $Id: tc2450.vhd,v 1.2 2001-10-26 16:30:19 paw Exp $ 27-- $Revision: 1.2 $ 28-- 29-- --------------------------------------------------------------------- 30 31ENTITY c07s03b02x02p03n02i02450ent IS 32END c07s03b02x02p03n02i02450ent; 33 34ARCHITECTURE c07s03b02x02p03n02i02450arch OF c07s03b02x02p03n02i02450ent IS 35 36BEGIN 37 TESTING: PROCESS 38 type ENUM is ( ONE ); 39 40 type A_ARRAY is array ( integer range <> ) of integer; 41 type B_ARRAY is array ( boolean range <> ) of real; 42 type C_ARRAY is array ( ENUM range <>, ENUM range <>) of bit; 43 44 subtype A_CON is A_ARRAY ( 1 to 4 ); 45 subtype B_CON is B_ARRAY ( FALSE to TRUE ); 46 subtype C_CON is C_ARRAY ( ONE to ONE, ONE to ONE ); 47 48 function F_A ( PAR : A_ARRAY ) return A_CON is 49 begin return (1,2,3,4); 50 end F_A; 51 52 function F_B ( PAR : B_ARRAY ) return B_CON is 53 begin return (1.0, 2.0); 54 end F_B; 55 56 function F_C ( PAR : C_ARRAY ) return C_CON is 57 begin return (ONE=>(ONE=>'0')); 58 end F_C; 59 60 variable V_A : A_CON ; 61 variable V_B : B_CON ; 62 variable V_C : C_CON ; 63 64 BEGIN 65 V_A := F_A( F_A( (1,2,others=>3) ) ); -- Failure_here 66 -- SEMANTIC ERROR: "others" used in aggregate which corresponds to 67 -- an unconstrained formal parameter 68 assert FALSE 69 report "***FAILED TEST: c07s03b02x02p03n02i02450 - Others is used in an aggregate which corresponds to an unconstrained formal parameter." 70 severity ERROR; 71 wait; 72 END PROCESS TESTING; 73 74END c07s03b02x02p03n02i02450arch; 75