Skip to content
Browse files

Fix regression compiling numeric_std caused by previous commit

  • Loading branch information...
1 parent 22ac5a5 commit afd76b9ac09e6634f0c64205507d22f23e9b6332 @nickg committed
Showing with 5 additions and 6 deletions.
  1. +1 −1 lib/std/standard.vhd
  2. +2 −5 src/cgen.c
  3. +2 −0 test/regress/vecorder.vhd
View
2 lib/std/standard.vhd
@@ -79,6 +79,6 @@ package STANDARD is
type FILE_OPEN_STATUS is (OPEN_OK, STATUS_ERROR, NAME_ERROR,
MODE_ERROR);
- --attribute FOREIGN : STRING;
+ attribute FOREIGN : STRING;
end package;
View
7 src/cgen.c
@@ -806,12 +806,9 @@ static void cgen_call_args(tree_t t, LLVMValueRef *args, struct cgen_ctx *ctx)
// If we are passing an unconstrained array actual to a
// constrained formal then we need to unwrap the array
- if (type_kind(formal_type) == T_CARRAY) {
- bool need_unwrap = (!cgen_const_bounds(type)
- && (builtin == NULL));
-
+ if ((type_kind(formal_type) == T_CARRAY) && (builtin == NULL)) {
LLVMValueRef ptr = args[i];
- if (need_unwrap) {
+ if (!cgen_const_bounds(type)) {
// XXX: insert bounds checking here
ptr = LLVMBuildExtractValue(builder, args[i], 0, "aptr");
}
View
2 test/regress/vecorder.vhd
@@ -13,6 +13,7 @@ begin
begin
assert x(0) = 0 report "one";
assert x(1) = 1 report "two";
+ assert x = ( 0, 1 );
x := ( 2, 3 );
report integer'image(x(0));
report integer'image(x(1));
@@ -32,6 +33,7 @@ begin
assert y(0) = 0 report "y one";
assert y(1) = 1 report "y two";
+ assert y = ( 1, 0 );
y := ( 2, 3 );
report integer'image(y(0));
report integer'image(y(1));

0 comments on commit afd76b9

Please sign in to comment.
Something went wrong with that request. Please try again.