Skip to content

Commit a3bb7c3

Browse files
authored
Merge branch 'master' into saleel/honkify-examples
2 parents 5656600 + ceb8b35 commit a3bb7c3

File tree

5 files changed

+34
-2
lines changed

5 files changed

+34
-2
lines changed

.github/benchmark_projects.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
define: &AZ_COMMIT fd9f1458557f2d67bcf2d58ba4194e000f58600c
1+
define: &AZ_COMMIT f15942770bc391a4d66fe9c23262b755de77f71d
22
projects:
33
private-kernel-inner:
44
repo: AztecProtocol/aztec-packages

EXTERNAL_NOIR_LIBRARIES.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
define: &AZ_COMMIT fd9f1458557f2d67bcf2d58ba4194e000f58600c
1+
define: &AZ_COMMIT f15942770bc391a4d66fe9c23262b755de77f71d
22
libraries:
33
noir_check_shuffle:
44
repo: noir-lang/noir_check_shuffle

compiler/noirc_evaluator/src/ssa/checks/check_for_underconstrained_values.rs

+32
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,12 @@ impl DependencyContext {
336336

337337
if !visited {
338338
let results = function.dfg.instruction_results(*instruction);
339+
340+
// Calls with no results (e.g. print) shouldn't be checked
341+
if results.is_empty() {
342+
return;
343+
}
344+
339345
let current_tainted =
340346
BrilligTaintedIds::new(function, arguments, results);
341347

@@ -1418,4 +1424,30 @@ mod test {
14181424
let ssa_level_warnings = ssa.check_for_missing_brillig_constraints(true);
14191425
assert_eq!(ssa_level_warnings.len(), 0);
14201426
}
1427+
1428+
#[test]
1429+
#[traced_test]
1430+
/// No-result calls (e.g. print) shouldn't trigger the check
1431+
fn test_no_result_brillig_calls() {
1432+
let program = r#"
1433+
acir(inline) fn main f0 {
1434+
b0():
1435+
call f1(Field 1)
1436+
return Field 1
1437+
}
1438+
acir(inline) fn println f1 {
1439+
b0(v0: Field):
1440+
call f2(u1 1, v0)
1441+
return
1442+
}
1443+
brillig(inline) fn print_unconstrained f2 {
1444+
b0(v0: u1, v1: Field):
1445+
return
1446+
}
1447+
"#;
1448+
1449+
let mut ssa = Ssa::from_str(program).unwrap();
1450+
let ssa_level_warnings = ssa.check_for_missing_brillig_constraints(false);
1451+
assert_eq!(ssa_level_warnings.len(), 0);
1452+
}
14211453
}

0 commit comments

Comments
 (0)