| 1234567891011121314151617181920212223 |
- // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- // Exceptions. See /LICENSE for license information.
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- //
- // EXTRA-ARGS: --no-dump-sem-ir
- //
- // AUTOUPDATE
- // TIP: To test this file alone, run:
- // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/builtins/int/complement.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/builtins/int/complement.carbon
- // --- int_complement.carbon
- fn Complement(a: i32) -> i32 = "int.complement";
- fn And(a: i32, b: i32) -> i32 = "int.and";
- var arr: [i32; And(Complement(0x123456), 0xFFFFFF)];
- let arr_p: [i32; 0xEDCBA9]* = &arr;
- fn RuntimeCallIsValid(a: i32) -> i32 {
- return Complement(a);
- }
|