mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 10:51:06 +01:00
Goal is to reduce churn in names in test updates (by churning a lot of them in this PR). --------- Co-authored-by: Josh L <josh11b@users.noreply.github.com>
311 lines
18 KiB
Plaintext
311 lines
18 KiB
Plaintext
// 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
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/pointer/fail_address_of_value.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/pointer/fail_address_of_value.carbon
|
|
|
|
fn G() -> i32;
|
|
|
|
fn H() -> {.a: i32};
|
|
|
|
fn AddressOfLiteral() {
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef]
|
|
// CHECK:STDERR: &0;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
&0;
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef]
|
|
// CHECK:STDERR: &true;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
&true;
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef]
|
|
// CHECK:STDERR: &1.0;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
&1.0;
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef]
|
|
// CHECK:STDERR: &"Hello";
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
&"Hello";
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef]
|
|
// CHECK:STDERR: &(1, 2);
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
&(1, 2);
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef]
|
|
// CHECK:STDERR: &{.a = 5};
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
&{.a = 5};
|
|
}
|
|
|
|
fn AddressOfOperator() {
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef]
|
|
// CHECK:STDERR: &(true and false);
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
&(true and false);
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of a temporary object [AddrOfEphemeralRef]
|
|
// CHECK:STDERR: &H().a;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
&H().a;
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef]
|
|
// CHECK:STDERR: &(not true);
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
&(not true);
|
|
}
|
|
|
|
fn AddressOfCall() {
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef]
|
|
// CHECK:STDERR: &G();
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
&G();
|
|
}
|
|
|
|
fn AddressOfType() {
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef]
|
|
// CHECK:STDERR: &i32;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
&i32;
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef]
|
|
// CHECK:STDERR: &(const i32*);
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
&(const i32*);
|
|
}
|
|
|
|
fn AddressOfTupleElementValue() {
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef]
|
|
// CHECK:STDERR: &((1, 2).0);
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
&((1, 2).0);
|
|
}
|
|
|
|
fn AddressOfParam(param: i32) {
|
|
// CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:26: error: cannot take the address of non-reference expression [AddrOfNonRef]
|
|
// CHECK:STDERR: var param_addr: i32* = ¶m;
|
|
// CHECK:STDERR: ^
|
|
var param_addr: i32* = ¶m;
|
|
}
|
|
|
|
// CHECK:STDOUT: --- fail_address_of_value.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
|
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
|
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
|
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
|
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
|
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
|
// CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template]
|
|
// CHECK:STDOUT: %H.type: type = fn_type @H [template]
|
|
// CHECK:STDOUT: %H: %H.type = struct_value () [template]
|
|
// CHECK:STDOUT: %AddressOfLiteral.type: type = fn_type @AddressOfLiteral [template]
|
|
// CHECK:STDOUT: %AddressOfLiteral: %AddressOfLiteral.type = struct_value () [template]
|
|
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template]
|
|
// CHECK:STDOUT: %ptr.1: type = ptr_type Core.IntLiteral [template]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [template]
|
|
// CHECK:STDOUT: %ptr.2: type = ptr_type bool [template]
|
|
// CHECK:STDOUT: %float: f64 = float_literal 1 [template]
|
|
// CHECK:STDOUT: %ptr.3: type = ptr_type f64 [template]
|
|
// CHECK:STDOUT: %ptr.4: type = ptr_type String [template]
|
|
// CHECK:STDOUT: %str: String = string_literal "Hello" [template]
|
|
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template]
|
|
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template]
|
|
// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %ptr.5: type = ptr_type %tuple.type [template]
|
|
// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template]
|
|
// CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template]
|
|
// CHECK:STDOUT: %ptr.6: type = ptr_type %struct_type.a.2 [template]
|
|
// CHECK:STDOUT: %AddressOfOperator.type: type = fn_type @AddressOfOperator [template]
|
|
// CHECK:STDOUT: %AddressOfOperator: %AddressOfOperator.type = struct_value () [template]
|
|
// CHECK:STDOUT: %false: bool = bool_literal false [template]
|
|
// CHECK:STDOUT: %ptr.7: type = ptr_type %i32 [template]
|
|
// CHECK:STDOUT: %AddressOfCall.type: type = fn_type @AddressOfCall [template]
|
|
// CHECK:STDOUT: %AddressOfCall: %AddressOfCall.type = struct_value () [template]
|
|
// CHECK:STDOUT: %AddressOfType.type: type = fn_type @AddressOfType [template]
|
|
// CHECK:STDOUT: %AddressOfType: %AddressOfType.type = struct_value () [template]
|
|
// CHECK:STDOUT: %ptr.8: type = ptr_type type [template]
|
|
// CHECK:STDOUT: %const: type = const_type %i32 [template]
|
|
// CHECK:STDOUT: %ptr.9: type = ptr_type %const [template]
|
|
// CHECK:STDOUT: %AddressOfTupleElementValue.type: type = fn_type @AddressOfTupleElementValue [template]
|
|
// CHECK:STDOUT: %AddressOfTupleElementValue: %AddressOfTupleElementValue.type = struct_value () [template]
|
|
// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%int_1, %int_2) [template]
|
|
// CHECK:STDOUT: %AddressOfParam.type: type = fn_type @AddressOfParam [template]
|
|
// CHECK:STDOUT: %AddressOfParam: %AddressOfParam.type = struct_value () [template]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
// CHECK:STDOUT: .Int = %import_ref
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .G = %G.decl
|
|
// CHECK:STDOUT: .H = %H.decl
|
|
// CHECK:STDOUT: .AddressOfLiteral = %AddressOfLiteral.decl
|
|
// CHECK:STDOUT: .AddressOfOperator = %AddressOfOperator.decl
|
|
// CHECK:STDOUT: .AddressOfCall = %AddressOfCall.decl
|
|
// CHECK:STDOUT: .AddressOfType = %AddressOfType.decl
|
|
// CHECK:STDOUT: .AddressOfTupleElementValue = %AddressOfTupleElementValue.decl
|
|
// CHECK:STDOUT: .AddressOfParam = %AddressOfParam.decl
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
|
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
|
|
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed, %.loc11_11.1 [template = constants.%i32]
|
|
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0
|
|
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {
|
|
// CHECK:STDOUT: %return.patt: %struct_type.a.1 = return_slot_pattern
|
|
// CHECK:STDOUT: %return.param_patt: %struct_type.a.1 = out_param_pattern %return.patt, runtime_param0
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc13_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc13_16.2: type = converted %int.make_type_signed, %.loc13_16.1 [template = constants.%i32]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1]
|
|
// CHECK:STDOUT: %return.param: ref %struct_type.a.1 = out_param runtime_param0
|
|
// CHECK:STDOUT: %return: ref %struct_type.a.1 = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %AddressOfLiteral.decl: %AddressOfLiteral.type = fn_decl @AddressOfLiteral [template = constants.%AddressOfLiteral] {} {}
|
|
// CHECK:STDOUT: %AddressOfOperator.decl: %AddressOfOperator.type = fn_decl @AddressOfOperator [template = constants.%AddressOfOperator] {} {}
|
|
// CHECK:STDOUT: %AddressOfCall.decl: %AddressOfCall.type = fn_decl @AddressOfCall [template = constants.%AddressOfCall] {} {}
|
|
// CHECK:STDOUT: %AddressOfType.decl: %AddressOfType.type = fn_decl @AddressOfType [template = constants.%AddressOfType] {} {}
|
|
// CHECK:STDOUT: %AddressOfTupleElementValue.decl: %AddressOfTupleElementValue.type = fn_decl @AddressOfTupleElementValue [template = constants.%AddressOfTupleElementValue] {} {}
|
|
// CHECK:STDOUT: %AddressOfParam.decl: %AddressOfParam.type = fn_decl @AddressOfParam [template = constants.%AddressOfParam] {
|
|
// CHECK:STDOUT: %param.patt: %i32 = binding_pattern param
|
|
// CHECK:STDOUT: %param.param_patt: %i32 = value_param_pattern %param.patt, runtime_param0
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %int_32.loc95: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc95: init type = call constants.%Int(%int_32.loc95) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc95_26.1: type = value_of_initializer %int.make_type_signed.loc95 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc95_26.2: type = converted %int.make_type_signed.loc95, %.loc95_26.1 [template = constants.%i32]
|
|
// CHECK:STDOUT: %param.param: %i32 = value_param runtime_param0
|
|
// CHECK:STDOUT: %param: %i32 = bind_name param, %param.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @G() -> %i32;
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @H() -> %struct_type.a.1;
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @AddressOfLiteral() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
|
|
// CHECK:STDOUT: %addr.loc20: %ptr.1 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true]
|
|
// CHECK:STDOUT: %addr.loc25: %ptr.2 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: %float: f64 = float_literal 1 [template = constants.%float]
|
|
// CHECK:STDOUT: %addr.loc30: %ptr.3 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: %str: String = string_literal "Hello" [template = constants.%str]
|
|
// CHECK:STDOUT: %addr.loc35: %ptr.4 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1]
|
|
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2]
|
|
// CHECK:STDOUT: %.loc40: %tuple.type = tuple_literal (%int_1, %int_2)
|
|
// CHECK:STDOUT: %addr.loc40: %ptr.5 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5]
|
|
// CHECK:STDOUT: %.loc45: %struct_type.a.2 = struct_literal (%int_5)
|
|
// CHECK:STDOUT: %addr.loc45: %ptr.6 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @AddressOfOperator() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %true.loc53: bool = bool_literal true [template = constants.%true]
|
|
// CHECK:STDOUT: %false.loc53_10: bool = bool_literal false [template = constants.%false]
|
|
// CHECK:STDOUT: if %true.loc53 br !and.rhs else br !and.result(%false.loc53_10)
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !and.rhs:
|
|
// CHECK:STDOUT: %false.loc53_14: bool = bool_literal false [template = constants.%false]
|
|
// CHECK:STDOUT: br !and.result(%false.loc53_14)
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !and.result:
|
|
// CHECK:STDOUT: %.loc53: bool = block_arg !and.result [template = constants.%false]
|
|
// CHECK:STDOUT: %addr.loc53: %ptr.2 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [template = constants.%H]
|
|
// CHECK:STDOUT: %H.call: init %struct_type.a.1 = call %H.ref()
|
|
// CHECK:STDOUT: %.loc58_6.1: ref %struct_type.a.1 = temporary_storage
|
|
// CHECK:STDOUT: %.loc58_6.2: ref %struct_type.a.1 = temporary %.loc58_6.1, %H.call
|
|
// CHECK:STDOUT: %.loc58_7: ref %i32 = struct_access %.loc58_6.2, element0
|
|
// CHECK:STDOUT: %addr.loc58: %ptr.7 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: %true.loc63: bool = bool_literal true [template = constants.%true]
|
|
// CHECK:STDOUT: %.loc63: bool = not %true.loc63 [template = constants.%false]
|
|
// CHECK:STDOUT: %addr.loc63: %ptr.2 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @AddressOfCall() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G]
|
|
// CHECK:STDOUT: %G.call: init %i32 = call %G.ref()
|
|
// CHECK:STDOUT: %addr: %ptr.7 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @AddressOfType() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %int_32.loc79: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc79: init type = call constants.%Int(%int_32.loc79) [template = constants.%i32]
|
|
// CHECK:STDOUT: %addr.loc79: %ptr.8 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: %int_32.loc84: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc84: init type = call constants.%Int(%int_32.loc84) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc84_5.1: type = value_of_initializer %int.make_type_signed.loc84 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc84_5.2: type = converted %int.make_type_signed.loc84, %.loc84_5.1 [template = constants.%i32]
|
|
// CHECK:STDOUT: %const: type = const_type %i32 [template = constants.%const]
|
|
// CHECK:STDOUT: %ptr: type = ptr_type %const [template = constants.%ptr.9]
|
|
// CHECK:STDOUT: %addr.loc84: %ptr.8 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @AddressOfTupleElementValue() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1]
|
|
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2]
|
|
// CHECK:STDOUT: %.loc92_10.1: %tuple.type = tuple_literal (%int_1, %int_2)
|
|
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
|
|
// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%int_1, %int_2) [template = constants.%tuple]
|
|
// CHECK:STDOUT: %.loc92_10.2: %tuple.type = converted %.loc92_10.1, %tuple [template = constants.%tuple]
|
|
// CHECK:STDOUT: %tuple.elem0: Core.IntLiteral = tuple_access %.loc92_10.2, element0 [template = constants.%int_1]
|
|
// CHECK:STDOUT: %addr: %ptr.1 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @AddressOfParam(%param.param_patt: %i32) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %int_32.loc99: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc99: init type = call constants.%Int(%int_32.loc99) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc99_22.1: type = value_of_initializer %int.make_type_signed.loc99 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc99_22.2: type = converted %int.make_type_signed.loc99, %.loc99_22.1 [template = constants.%i32]
|
|
// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.7]
|
|
// CHECK:STDOUT: %param_addr.var: ref %ptr.7 = var param_addr
|
|
// CHECK:STDOUT: %param_addr: ref %ptr.7 = bind_name param_addr, %param_addr.var
|
|
// CHECK:STDOUT: %param.ref: %i32 = name_ref param, %param
|
|
// CHECK:STDOUT: %addr: %ptr.7 = addr_of <error> [template = <error>]
|
|
// CHECK:STDOUT: assign %param_addr.var, %addr
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|